Skip to content

property_item objects now return a type, next_url, and id. #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #241
KoditkarVedant opened this issue Jul 10, 2022 · 0 comments · Fixed by #267, #269 or #276
Closed
Tracked by #241

property_item objects now return a type, next_url, and id. #244

KoditkarVedant opened this issue Jul 10, 2022 · 0 comments · Fixed by #267, #269 or #276
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@KoditkarVedant
Copy link
Contributor

KoditkarVedant commented Jul 10, 2022

Property item lists now always have type property_item. Rollup aggregations are now returned inside that type.

Notion has also added the property id field and the next_url to fetch the next set of property items.

Here is an example of a previous rollup property_item list:

{
  "object": "list",
  "results": [
    {
      "object": "property_item",
      "type": "relation",
      "relation": {
        "id": "83f92c9d-523d-466e-8c1f-9bc2c25a99fe"
      }
    },
        ...
  ],
  "next_cursor": "some-next-cursor-value",
  "has_more": true,
  "rollup": {
    "type": "date",
    "date": {
      "start": "2021-10-07T14:42:00.000+00:00",
      "end": null
    },
    "function": "latest_date"
  },
  "type": "rollup"
}

Here is an example of the updated rollup property_item list:

{
  "object": "list",
  "results": [
    {
      "object": "property_item",
      "id": "xYz890",
      "type": "relation",
      "relation": {
        "id": "83f92c9d-523d-466e-8c1f-9bc2c25a99fe"
      }
    },
        ...
  ],
  "next_cursor": "some-next-cursor-value",
  "has_more": true,
  "type": "property_item",
  "property_item": {
    "id": "aBcD123"
    "next_url": "https://api.notion.com/v1/pages/b55c9c91-384d-452b-81db-d1ef79372b75/properties/aBcD123?start_cursor=some-next-cursor-value",
    "type": "rollup",
    "rollup": {
        "type": "date",
        "date": {
        "start": "2021-10-07T14:42:00.000+00:00",
        "end": null
        },
        "function": "latest_date"
        }
  },
  
}

Notion changelog: https://developers.notion.com/changelog/releasing-notion-version-2022-02-22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment