API reference
Gift cards
List gift cards
/gift-cardsRequired scopes:read_gift_cards
Query parameters
| Name | Type | Description |
|---|---|---|
limit | integer | Page size, 1–250 (default 50). default 50 · min 1 · max 250 |
cursor | string | next_cursor from the previous page. |
updated_since | string<date-time> | Only objects changed at or after this ISO-8601 time. |
created_since | string<date-time> | Only objects created at or after this ISO-8601 time. |
status | string | Status. One of: |
customer_id | integer | Of this customer. |
Example request
curl "https://api.sellorchard.com/v1/gift-cards?limit=50" \
-H "Authorization: Bearer $SELLORCHARD_API_KEY"Response200Gift cards.
ShowHide response schema
dataarray of GiftCardrequiredShowHide item attributes
objectstringrequiredidintegerrequiredId.
codestringThe full code: only in the response that issues the card.
last4stringrequiredLast four characters of the code.
initial_valuestringrequiredValue when issued.
pattern ^-?\d+\.\d{2}$
balancestringrequiredBalance left.
pattern ^-?\d+\.\d{2}$
currencystringrequiredCurrency.
statusstringrequiredRight now.
One of:
activeusedexpireddisabledsourcestring | nullrequiredHow it was issued.
customer_idinteger | nullrequiredCustomer.
order_idinteger | nullrequiredOrder that bought it.
recipient_emailstring | nullrequiredRecipient.
recipient_namestring | nullrequiredRecipient name.
notestring | nullrequiredStaff note.
expires_atstring<date-time> | nullrequiredExpiry.
disabled_atstring<date-time> | nullrequiredDisabled.
created_atstring<date-time>requiredIssued.
updated_atstring<date-time>requiredLast changed.
has_morebooleanrequiredMore pages after this one.
next_cursorstring | nullrequiredPass as
cursorfor the next page; null on the last page.
{
"data": [
{
"object": "gift_card",
"id": 77,
"last4": "Q7K2",
"initial_value": "50.00",
"balance": "50.00",
"currency": "USD",
"status": "active",
"source": "api",
"customer_id": null,
"order_id": null,
"recipient_email": "sam@example.com",
"recipient_name": "Sam",
"note": null,
"expires_at": null,
"disabled_at": null,
"created_at": "2026-11-02T15:00:00Z",
"updated_at": "2026-11-02T15:00:00Z"
}
],
"has_more": false,
"next_cursor": null
}Error responses
- 400
invalid_requestMalformed request (e.g. a bad cursor). - 401
authenticationMissing, invalid, expired or revoked API key. - 403
permissionThe key lacks the scope, or the store's plan doesn't include the API. - 422
invalid_requestInvalid parameters;errorslists each field. - 429
rate_limitedToo many requests. - 500
serverSomething went wrong on our side; safe to retry with the same Idempotency-Key.
Issue a gift card
/gift-cardsThe full code is in this response only. Fires gift_card.issued.
Required scopes:write_gift_cards
Headers
| Name | Type | Description |
|---|---|---|
Idempotency-Key | string | Any unique string (e.g. a UUID, up to 255 characters). A retry with the same key and body within 24 hours gets the first response again (Idempotent-Replayed: true); the same key with a different body is a 409 conflict. |
Request body
valuestring | numberrequiredValue (0.01–100000).
codestring | nullYour own code (8–32 letters and numbers); generated when empty.
expires_atstring<date> | nullExpiry date (after today).
customer_idinteger | nullCustomer.
recipient_emailstring<email> | nullRecipient.
recipient_namestring | nullRecipient name.
messagestring | nullMessage in the email.
notestring | nullStaff note.
send_emailbooleanEmail the card to the recipient now.
Example request
curl -X POST "https://api.sellorchard.com/v1/gift-cards" \
-H "Authorization: Bearer $SELLORCHARD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"value": "50.00"
}'Response201The card, with its full code (shown only here).
ShowHide response schema
dataGiftCardrequiredShowHide child attributes
objectstringrequiredidintegerrequiredId.
codestringThe full code: only in the response that issues the card.
last4stringrequiredLast four characters of the code.
initial_valuestringrequiredValue when issued.
pattern ^-?\d+\.\d{2}$
balancestringrequiredBalance left.
pattern ^-?\d+\.\d{2}$
currencystringrequiredCurrency.
statusstringrequiredRight now.
One of:
activeusedexpireddisabledsourcestring | nullrequiredHow it was issued.
customer_idinteger | nullrequiredCustomer.
order_idinteger | nullrequiredOrder that bought it.
recipient_emailstring | nullrequiredRecipient.
recipient_namestring | nullrequiredRecipient name.
notestring | nullrequiredStaff note.
expires_atstring<date-time> | nullrequiredExpiry.
disabled_atstring<date-time> | nullrequiredDisabled.
created_atstring<date-time>requiredIssued.
updated_atstring<date-time>requiredLast changed.
{
"data": {
"object": "gift_card",
"id": 77,
"code": "AB3D-9F2K-7LMN-Q7K2",
"last4": "Q7K2",
"initial_value": "50.00",
"balance": "50.00",
"currency": "USD",
"status": "active",
"source": "api",
"customer_id": null,
"order_id": null,
"recipient_email": "sam@example.com",
"recipient_name": "Sam",
"note": null,
"expires_at": null,
"disabled_at": null,
"created_at": "2026-11-02T15:00:00Z",
"updated_at": "2026-11-02T15:00:00Z"
}
}Error responses
- 401
authenticationMissing, invalid, expired or revoked API key. - 403
permissionThe key lacks the scope, or the store's plan doesn't include the API. - 409
conflictThe Idempotency-Key was used with a different request, or that request is still running. - 422
invalid_requestInvalid parameters;errorslists each field. - 429
rate_limitedToo many requests. - 500
serverSomething went wrong on our side; safe to retry with the same Idempotency-Key.
Get a gift card
/gift-cards/{id}Required scopes:read_gift_cards
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer | The object id. |
Example request
curl "https://api.sellorchard.com/v1/gift-cards/120" \
-H "Authorization: Bearer $SELLORCHARD_API_KEY"Response200A gift card.
ShowHide response schema
dataGiftCardrequiredShowHide child attributes
objectstringrequiredidintegerrequiredId.
codestringThe full code: only in the response that issues the card.
last4stringrequiredLast four characters of the code.
initial_valuestringrequiredValue when issued.
pattern ^-?\d+\.\d{2}$
balancestringrequiredBalance left.
pattern ^-?\d+\.\d{2}$
currencystringrequiredCurrency.
statusstringrequiredRight now.
One of:
activeusedexpireddisabledsourcestring | nullrequiredHow it was issued.
customer_idinteger | nullrequiredCustomer.
order_idinteger | nullrequiredOrder that bought it.
recipient_emailstring | nullrequiredRecipient.
recipient_namestring | nullrequiredRecipient name.
notestring | nullrequiredStaff note.
expires_atstring<date-time> | nullrequiredExpiry.
disabled_atstring<date-time> | nullrequiredDisabled.
created_atstring<date-time>requiredIssued.
updated_atstring<date-time>requiredLast changed.
{
"data": {
"object": "gift_card",
"id": 77,
"last4": "Q7K2",
"initial_value": "50.00",
"balance": "50.00",
"currency": "USD",
"status": "active",
"source": "api",
"customer_id": null,
"order_id": null,
"recipient_email": "sam@example.com",
"recipient_name": "Sam",
"note": null,
"expires_at": null,
"disabled_at": null,
"created_at": "2026-11-02T15:00:00Z",
"updated_at": "2026-11-02T15:00:00Z"
}
}Error responses
- 401
authenticationMissing, invalid, expired or revoked API key. - 403
permissionThe key lacks the scope, or the store's plan doesn't include the API. - 404
not_foundNo such object in this store. - 429
rate_limitedToo many requests. - 500
serverSomething went wrong on our side; safe to retry with the same Idempotency-Key.
Disable a gift card
/gift-cards/{id}/disableRequired scopes:write_gift_cards
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer | The object id. |
Headers
| Name | Type | Description |
|---|---|---|
Idempotency-Key | string | Any unique string (e.g. a UUID, up to 255 characters). A retry with the same key and body within 24 hours gets the first response again (Idempotent-Replayed: true); the same key with a different body is a 409 conflict. |
Example request
curl -X POST "https://api.sellorchard.com/v1/gift-cards/120/disable" \
-H "Authorization: Bearer $SELLORCHARD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Response200A gift card.
ShowHide response schema
dataGiftCardrequiredShowHide child attributes
objectstringrequiredidintegerrequiredId.
codestringThe full code: only in the response that issues the card.
last4stringrequiredLast four characters of the code.
initial_valuestringrequiredValue when issued.
pattern ^-?\d+\.\d{2}$
balancestringrequiredBalance left.
pattern ^-?\d+\.\d{2}$
currencystringrequiredCurrency.
statusstringrequiredRight now.
One of:
activeusedexpireddisabledsourcestring | nullrequiredHow it was issued.
customer_idinteger | nullrequiredCustomer.
order_idinteger | nullrequiredOrder that bought it.
recipient_emailstring | nullrequiredRecipient.
recipient_namestring | nullrequiredRecipient name.
notestring | nullrequiredStaff note.
expires_atstring<date-time> | nullrequiredExpiry.
disabled_atstring<date-time> | nullrequiredDisabled.
created_atstring<date-time>requiredIssued.
updated_atstring<date-time>requiredLast changed.
{
"data": {
"object": "gift_card",
"id": 77,
"last4": "Q7K2",
"initial_value": "50.00",
"balance": "50.00",
"currency": "USD",
"status": "active",
"source": "api",
"customer_id": null,
"order_id": null,
"recipient_email": "sam@example.com",
"recipient_name": "Sam",
"note": null,
"expires_at": null,
"disabled_at": null,
"created_at": "2026-11-02T15:00:00Z",
"updated_at": "2026-11-02T15:00:00Z"
}
}Error responses
- 401
authenticationMissing, invalid, expired or revoked API key. - 403
permissionThe key lacks the scope, or the store's plan doesn't include the API. - 404
not_foundNo such object in this store. - 409
conflictThe Idempotency-Key was used with a different request, or that request is still running. - 429
rate_limitedToo many requests. - 500
serverSomething went wrong on our side; safe to retry with the same Idempotency-Key.