GET request returns an object representation that includes only tokens of associated objects, thus minimizing the response size.
Alternatively, you can use the expand query parameter to include the associated objects in the response, thus decreasing the number of required subsequent API calls. Objects that can be expanded are described in this page.
Query parameter details
| Fields | Description |
|---|---|
| expand string Optional | Embeds the associated object of the specified type into the response, for all GET``/cards endpoints.Allowable Values: user, cardproduct |
Sample requests and responses
To retrieve a card object that includes only the token of the associated user, use theGET request without the expand query parameter:
GET /cards/{card_token}
This request returns a card object that contains the user_token field:
JSON
user object in the response, use the GET request with the expand query parameter:
GET /cards/{card_token}?expand=user
This request returns a card object with the complete user object embedded within it:
JSON