As of January 11, 2022, we are releasing:
- An
id field in our Cards endpoints
- A
card_ids request parameter in the GET accounts/:account_id/cards endpoint
- A new GET accounts/:account_id/cards/:card_id endpoint
id Field
This field is in service of two new upcoming Cards endpoints, PUT and DELETE, which will require the card ID in the URL path. We plan to release these endpoints (PUT and DELETE) in the coming months*. These two upcoming endpoints will help enable Cards editing and deleting via our newer JSON-based Cards endpoints.
The new JSON-based endpoints allow developers to build Cards using components rather than working with Card-specific resources.
This new id field is the numeric portion of the card URI - i.e. the value without the “card://” prefix.
- Note: this new
id field is base-10.
In version 9, we removed the id and card_type response fields from our Cards endpoints. We did this with the intention of reintroducing them. In version 10, we brought back the card_type response field with new values to help distinguish between the various card types returned in the Cards response. Today, the id field is back.
*As of this forum announcement, these endpoints are in closed beta.
card_ids Request Parameter
The new request parameter, card_ids, available within the GET accounts/:account_id/cards endpoint, will allow you to fetch up to 200 cards by ID. This parameter is analogous to the existing card_uris param.
Documentation
For more information on these updates and the future PUT and DELETE Cards endpoints, visit our Cards endpoints page.
Twitter Ads API team