API List items/ Get Item not returning all fields

Hi guys!

I’m trying to get all my collection items from the API, but the response comes with some fields missing. I tried using both list collection items/ get collection item methods and the returned data was the same, but when I query for my collection schema, I get the response with all fields. Those fields not always have data but even having it, it doesn’t show in the returned collection Item.

Has anybody experienced this before?

Thanks in advance for your help!

Get Schema method

var response = UrlFetchApp.fetch('https://api.webflow.com/collections/62ba32276a6846664443cb0a', options);

  var data = JSON.parse(response.getContentText());

  console.log(data.fields);

Log response

[ { name: 'Job title',
    slug: 'job-title',
    type: 'PlainText',
    required: false,
    editable: true,
    helpText: '',
    id: 'da69d8d9d9428104eb1237e957d6cce2',
    validations: { singleLine: true } },
  { name: 'Libraries',
    slug: 'libraries',
    type: 'PlainText',
    required: false,
    editable: true,
    helpText: '',
    id: 'e30562993b14d9a440ac15532a4e9877',
    validations: { singleLine: true } },
  { name: 'Framework',
    slug: 'framework',
    type: 'PlainText',
    required: false,
    editable: true,
    helpText: '',
    id: 'debb55cb3f932cb790780441c6e641ba',
    validations: { singleLine: true } },
  { name: 'Apis',
    slug: 'apis',
    type: 'PlainText',
    required: false,
    editable: true,
    helpText: '',
    id: '8744fd8596a4a3bb5413ed8b03e8a4b5',
    validations: { singleLine: true } },
  { name: 'Platforms',
    slug: 'platforms',
    type: 'PlainText',
    required: false,
    editable: true,
    helpText: '',
    id: 'b5ea53aced39a1b50c2e6b2c3f57f93e',
    validations: { singleLine: true } },
  { name: 'Database',
    slug: 'database',
    type: 'PlainText',
    required: false,
    editable: true,
    helpText: '',
    id: 'b36debce398b28fb074af791fb36de6e',
    validations: { singleLine: true } },
  { name: 'Image',
    slug: 'image',
    type: 'ImageRef',
    required: false,
    editable: true,
    helpText: '',
    id: 'a621de92935e91505153f4e6addfed46',
    validations: {} },
  { name: 'SEO text',
    slug: 'seo-text',
    type: 'RichText',
    required: false,
    editable: true,
    helpText: '',
    id: '40d5d32e679b3920b530a9e2601a8ae0',
    validations: {} },
  { name: 'Interview Questions',
    slug: 'faq-field',
    type: 'RichText',
    required: false,
    editable: true,
    helpText: '',
    id: '93978a4d8801e4161ce4e2fdc673506f',
    validations: {} },
  { name: 'Name',
    slug: 'name',
    type: 'PlainText',
    required: true,
    editable: true,
    helpText: '',
    id: 'a657b14776f6f20fdfa98b28ece1418c',
    validations: { maxLength: 256 } },
  { name: 'Slug',
    slug: 'slug',
    type: 'PlainText',
    required: true,
    editable: true,
    unique: true,
    helpText: '',
    id: '432ba3dc14067c60a7fdb5af8afa378f',
    validations: { maxLength: 256, pattern: {}, messages: [Object] } },
  { name: 'Archived',
    slug: '_archived',
    type: 'Bool',
    required: true,
    editable: true,
    id: '312b59b93d1ef3551d05def727d109d2',
    default: false },
  { name: 'Draft',
    slug: '_draft',
    type: 'Bool',
    required: true,
    editable: true,
    id: '03a4e2951cd2afac0b439ea0ecc402df',
    default: false },
  { name: 'Created On',
    slug: 'created-on',
    type: 'Date',
    required: false,
    editable: false,
    id: 'f7075ba5220971f23b2188722f07ce08' },
  { name: 'Updated On',
    slug: 'updated-on',
    type: 'Date',
    required: false,
    editable: false,
    id: '7cfae1be0dd698f65bf2367cbd0036c5' },
  { name: 'Published On',
    slug: 'published-on',
    type: 'Date',
    required: false,
    editable: false,
    id: '3ce80a08eb50b83e2b523921ac72c068' },
  { name: 'Created By',
    slug: 'created-by',
    type: 'User',
    required: false,
    editable: false,
    id: '27b436397f9c21b071ef54b4729351d2' },
  { name: 'Updated By',
    slug: 'updated-by',
    type: 'User',
    required: false,
    editable: false,
    id: 'a805d13e1daa4e26298505dd6a968042' },
  { name: 'Published By',
    slug: 'published-by',
    type: 'User',
    required: false,
    editable: false,
    id: 'b42cdbc10744a08780fe6a95c993be12' } ]

Get Item Method

 response = UrlFetchApp.fetch('https://api.webflow.com/collections/62ba32276a6846664443cb0a/items?limit=1', options);

  data = JSON.parse(response.getContentText());

  console.log(data.items);

Log Response

{ items: 
   [ { _archived: false,
       _draft: false,
       'job-title': 'developers',
       name: 'Zsh',
       apis: 'Amazon Web Services (AWS) | Google Cloud Platform (GCP) | Linux | Docker | Heroku | Firebase | Digital Ocean | Oracle | Kubernetes | Dapr | Azure | AWS Lambda | Redux',
       database: 'MongoDB | PostgreSQL | MySQL | Redis | SQLite | MariaDB | Microsoft SQL Server',
       framework: 'Facebook API | Instagram API | YouTube API | Spotify API | Apple Music API | Google API | Jira REST API | GitHub API | SoundCloud API',
       slug: 'zsh-developers',
       image: [Object],
       'updated-on': '2022-06-10T14:49:24.504Z',
       'updated-by': 'Person_625ecc016f7f04924731ad5a',
       'created-on': '2022-06-10T14:49:24.504Z',
       'created-by': 'Person_625ecc016f7f04924731ad5a',
       'published-on': '2022-06-27T22:42:45.029Z',
       'published-by': 'Person_59f8d91278cc2d0001fd6993',
       _cid: '62ba32276a6846664443cb0a',
       _id: '62ba32276a6846470b43dbd1' } ],
  count: 1,
  limit: 100,
  offset: 0,
  total: 1 }

Looks like Webflow “List Collection Items” API doesn’t return the fields that are not set. You can change the field values and then they will show up.

I think its not the case, because these fields return as null sometimes.

{ items: 
   [ { _archived: false,
       _draft: false,
       libraries: null,
       'job-title': 'developers',
       name: 'VBA',
       apis: 'Amazon Web Services (AWS) | Google Cloud Platform (GCP) | Linux | Docker | Heroku | Firebase | Digital Ocean | Oracle | Kubernetes | Dapr | Azure | AWS Lambda | Redux',
       database: 'MongoDB | PostgreSQL | MySQL | Redis | SQLite | MariaDB | Microsoft SQL Server',
       framework: 'Facebook API | Instagram API | YouTube API | Spotify API | Apple Music API | Google API | Jira REST API | GitHub API | SoundCloud API',
       image: [Object],
       slug: 'vba-developers',
       'updated-on': '2022-06-10T14:47:13.714Z',
       'updated-by': 'Person_625ecc016f7f04924731ad5a',
       'created-on': '2022-06-10T14:47:13.714Z',
       'created-by': 'Person_625ecc016f7f04924731ad5a',
       'published-on': '2022-06-27T22:42:45.029Z',
       'published-by': 'Person_59f8d91278cc2d0001fd6993',
       _cid: '62ba32276a6846664443cb0a',
       _id: '62ba32276a68462b3643db80' } ],
  count: 1,
  limit: 100,
  offset: 0,
  total: 1 }

In this case, the API returned the field libraries as null, because the field is not set in this Item, but in my previous examples, this field doesn’t show up.