Skip to content

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_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • valueintegerrequired

    Minor units of the store currency.

  • expires_ondate · or null

    YYYY-MM-DD: the last day it can be used.

  • customer_idstring · or null

    TypeID with the cus prefix.

  • recipient_emailstring · or null
  • recipient_namestring · or null
  • messagestring · or null

    Shown in the email.

  • sender_namestring · or null

    Who gives it, shown with the message ("From Faisal").

  • notestring · or null

    For staff only.

  • notifyboolean

    Email the recipient the code.

Returns

201 Issued, with its code.

Errors

  • 422validation_failedInvalid value, date or recipient.