Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Creating Gift Cards - with Specific codes via API

Creating Gift Cards - with Specific codes via API

matt_clogau
Visitor
1 0 0

Hi. We need to create our own gift card codes using the gift card POST method. Currently, the POST method generates and returns codes to us automatically, but we need to specify our own. Secondly, can the amount remaining on a gift card be adjusted via the API?

Reply 1 (1)

SBD_
Shopify Staff
1831 273 421

Hey @matt_clogau 

 

The code can be set on the initial creation:

 

{
  "gift_card": {
    "initial_value": "100.00",
    "code": "abcdefghijklmnop"
  }
}

 

I was unable to adjust the balance of an existing card via the API.

Scott | Developer Advocate @ Shopify