Learn how we request customer cards from your API and how to respond to these requests.
[a-zA-Z0-9_-]+
).POST
Content-Type
: application/json
Accept
: application/json
Plain-Workspace-Id
: the ID of the workspace the customer is in. This is useful for logging or request routing.User-Agent
: Plain/1.0 (plain.com; help@plain.com)
cardKeys
: an array of card keys being requestedcustomer
: an object with the customer’s core details
email
: the email of the customerexternalId
(optional): if the customer has an externalId
then it will be sent, otherwise it is null
.https://api.example.com/cards
https://api.example.com/cards/
https://api.example.com/Cards
Authorization
AUTHORIZATION
authorization
Bearer my-token
bearer my-token
bearer my-token
200
status code or the response body won’t be processed and will be treated as an error.
The response body must be a JSON object with:
cards
: an array of cards. Every cardKey
requested should have a corresponding key
returned. Any extra returned
cards will be ignored.
key
: the requested keytimeToLiveSeconds
(optional, nullable): can either be omitted or null
. If provided it will override the default time to live value. This allows you to control caching on a case-by-case basis.components
(nullable): null
to indicate that the card has no data or an array of Plain UI Components.timeToLiveSeconds
. This overrides the value from settings and allows your API to dynamically set the TTL using custom logic.5xx
response status code429
Too Many Requests response status code429
Too Many Requests response status codesubscription-details
is requested but the cards
array in the response doesn’t have an element with the key subscription-details
.