API Gift Card Management
Create, import, update, deactivate, and redeem gift cards through the Admin API
Manage gift cards and redeem them on orders through the Admin API.
Create a Gift Card
Create a gift card with the giftCardsCreate endpoint. If you don't pass a code, a unique code is generated for the gift card.
{
"code": "KATE-123_ABC", // optional, generated if not passed
"initial": "100.00", // gift card amount
"currency": "USD",
"user": {
"email": "testuser@example.com" // optional, customer receives the gift card email
},
"expired_at": "2027-10-28T00:00:00Z" // optional, must be in the future
}The create response is the only response that includes the full gift card code. Save it if you want to send the gift card to the customer yourself.
Set an Expiration Date
Set expired_at when you create the gift card, or change it later with the giftCardsPartialUpdate endpoint. The date must be in the future. A gift card without expired_at never expires. An expired gift card can't be redeemed on orders.
{
"expired_at": "2027-12-28T00:00:00Z" // new expiration date
}Import Gift Cards
To move gift cards from another platform, pass the existing code and set send_email to false so the customer is not emailed again. Codes are 4 to 18 characters and can contain letters, numbers, hyphens, and underscores.
{
"code": "KATE-123_ABC", // existing gift card code
"initial": "100.00",
"currency": "USD",
"user": {
"email": "testuser@example.com"
},
"send_email": false // skip the gift card email
}Update a Gift Card
Assign a user to a gift card that has no customer yet with the giftCardsPartialUpdate endpoint. The customer receives the gift card email.
{
"user": {
"email": "testuser@example.com"
}
}Deactivate a Gift Card
Deactivate a gift card with the giftCardsDeactivate endpoint.
{}Deactivating a gift card cannot be undone.
Redeem a Gift Card on an Order
Pass the gift card code in the vouchers field, the same field used for coupon codes. This works on ordersCreate, cartsCreate, and cartsUpdate.
{
"lines": [
{
"product_id": 184, // product variant id
"quantity": 1
}
],
"user": {
"email": "test@29next.store"
},
// shipping address and payment fields
"vouchers": ["MARIA45"] // gift card or coupon codes
}API Subscription Management
Create, update, pause, cancel, renew, and retry subscriptions through the Admin API, including line item, schedule, payment, and bulk operations
API Product Management
Create products and variants, manage images, prices, inventory, categories and visibility, and sync your catalogue from an external system through the Admin API