Spree Admin SDK
Delete a gift card
Deletes an unused gift card. Cards that have been redeemed or partially redeemed cannot be deleted and return 422.
Required scope: write_gift_cards (for API-key authentication).
DELETE
Spree Admin SDK
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
await client.giftCards.delete('gc_K3zr8x')spree api delete /gift_cards/{id}{
"error": {
"code": "validation_error",
"message": "Gift card cannot be deleted"
}
}Deletes an unused gift card. Cards that have been redeemed or partially redeemed cannot be deleted and return 422.
Required scope: write_gift_cards (for API-key authentication).
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
await client.giftCards.delete('gc_K3zr8x')spree api delete /gift_cards/{id}{
"error": {
"code": "validation_error",
"message": "Gift card cannot be deleted"
}
}Was this page helpful?
