The Core API supports object expansion for some GET requests. Append the expand parameter to your request URL to specify the type of object you want to expand.

Query parameter details

Name Type Required Description Supported Endpoints Allowable Values
expand string No Embeds the associated object of the specified type into the response. All GET /cards
endpoints
user

Sample response bodies

Some Core API endpoints return objects that include the token of an associated object. For example, GET /cards/{card_token} returns a card object; that card object contains a user_token field that references the user associated with the card. The following sample shows such a response:

{
"created_time": "2016-12-28T18:31:23Z",
"last_modified_time": "2017-02-14T19:32:38Z",
"token": "my_user_01_card_02",
"user_token": "my_user_01",
"card_product_token": "red_cardproduct",
"last_four": "0865",
"pan": "1111111824980865",
"expiration": "1220",
"expiration_time": "2020-12-31T23:59:59Z",
"cvv_number": "137",
"barcode": "25815105237561780909",
"pin_is_set": false,
"state": "UNACTIVATED",
"state_reason": "New card",
"fulfillment_status": "DIGITALLY_PRESENTED",
"fulfillment": {
"shipping": {
"method": "FEDEX_REGULAR",
"care_of_line": "my_care_of_value"
}
}
}

The optional expand query parameter allows you to embed the expanded object in the response (as opposed to returning only the object's token). For example, GET /cards/{card_token}?expand=user returns a card object with the complete user object embedded within it:

{
"created_time": "2016-12-28T18:31:23Z",
"last_modified_time": "2017-02-14T19:32:38Z",
"token": "my_user_01_card_02",
"user_token": "my_user_01",
"card_product_token": "red_cardproduct",
"last_four": "0865",
"pan": "1111111824980865",
"expiration": "1220",
"expiration_time": "2020-12-31T23:59:59Z",
"cvv_number": "137",
"barcode": "25815105237561780909",
"pin_is_set": false,
"state": "UNACTIVATED",
"state_reason": "New card",
"fulfillment_status": "DIGITALLY_PRESENTED",
"fulfillment": {
"shipping": {
"method": "FEDEX_REGULAR",
"care_of_line": "my_care_of_value"
}
},
"user": {
"token": "my_user_01",
"active": true,
"metadata": {},
"corporate_card_holder": false,
"uses_parent_account": false,
"created_time": "2017-04-07T19:01:08Z",
"last_modified_time": "2017-04-07T19:01:08Z"
}
}