Issue gift card
POST
/ admin/ v1/ stores/ {store_id}/ gift-cards- customers:write
- Idempotency-Key supported
Issues a gift card and, with notify, emails the recipient its code. The response is the only time the code is shown.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
valueintegerrequiredMinor units of the store currency.
expires_ondate · or nullYYYY-MM-DD: the last day it can be used.customer_idstring · or nullTypeID with the
cusprefix.recipient_emailstring · or nullrecipient_namestring · or nullmessagestring · or nullShown in the email.
sender_namestring · or nullWho gives it, shown with the message ("From Faisal").
notestring · or nullFor staff only.
notifybooleanEmail the recipient the code.
Returns
201 Issued, with its code.
Errors
- 422
validation_failedInvalid value, date or recipient.