gift_cards
Resource: gift_card
This link relationship returns a collection of gift cards. You can paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last.
Required Scopes
Full
store_full_access
Read
gift_cards_read
Write
gift_cards_write Collection Resource
gift_cardActions
GET View a list of gift_cards
POST Create a new gift card
HEAD Get just the header response
OPTIONS Get a response explaining which HTTP methods are supported
Properties (5)
_embedded Object · Read-only Contains fx:gift_cards[] — array of gift_card resources
total_items String · Read-only Total number of resources in this collection.
returned_items Number · Read-only Number of resources returned in this page.
limit Number · Read-only Maximum number of resources per page.
offset Number · Read-only Number of resources skipped.
Link Relations (5)
self This Collection first First Page of this Collection prev Previous Page of this Collection next Next Page of this Collection last Last Page of this Collection https://api.foxycart.com/stores/{store_id}/gift_cards
Example Representation
{
"_links": {
"curies": [
{
"name": "fx",
"href": "https://api.foxycart.com/rels/{rel}",
"templated": true
}
],
"self": {
"href": "https://api.foxycart.com/stores/123/gift_cards",
"title": "This Collection"
},
"first": {
"href": "https://api.foxycart.com/stores/123/gift_cards?offset=0",
"title": "First Page of this Collection"
},
"prev": {
"href": "https://api.foxycart.com/stores/123/gift_cards?offset=0",
"title": "Previous Page of this Collection"
},
"next": {
"href": "https://api.foxycart.com/stores/123/gift_cards?offset=20",
"title": "Next Page of this Collection"
},
"last": {
"href": "https://api.foxycart.com/stores/123/gift_cards?offset=20",
"title": "Last Page of this Collection"
}
},
"_embedded": {
"fx:gift_cards": [
{
"_links": {
"curies": [
{
"name": "fx",
"href": "https://api.foxycart.com/rels/{rel}",
"templated": true
}
],
"self": {
"href": "https://api.foxycart.com/gift_cards/456",
"title": "This Gift Card"
},
"fx:attributes": {
"href": "https://api.foxycart.com/gift_cards/123/attributes",
"title": "Attributes for This Gift Card"
},
"fx:store": {
"href": "https://api.foxycart.com/stores/456",
"title": "This Store"
},
"fx:generate_codes": {
"href": "https://api.foxycart.com/gift_cards/123/generate_codes",
"title": "Generate random Gift Card Codes"
},
"fx:gift_card_codes": {
"href": "https://api.foxycart.com/gift_cards/123/codes",
"title": "Gift Card Codes"
},
"fx:gift_card_item_categories": {
"href": "https://api.foxycart.com/gift_cards/123/item_categories",
"title": "Valid Item Categories for this Gift Card"
}
},
"name": "new test card",
"currency_code": "USD",
"expires_after": "1w",
"product_code_restrictions": null,
"sku": "test_card",
"provisioning_config": {
"allow_autoprovisioning": true,
"initial_balance_max": 12,
"initial_balance_min": 12
},
"date_created": "2021-11-08T09:03:17-0800",
"date_modified": "2021-11-10T17:04:52-0800"
}
]
},
"total_items": 1,
"returned_items": 1,
"limit": 20,
"offset": 0
}