php-shopify icon indicating copy to clipboard operation
php-shopify copied to clipboard

How can I create a gift card?

Open emreisik95 opened this issue 4 years ago • 3 comments

Hello there,

We are a Shopify Plus store and we want to create gift card programmatically. How can we do that with this framework? I couldn't see any reference for it.

Thanks, Emre

emreisik95 avatar Feb 18 '21 20:02 emreisik95

Hi Emre,

Not sure if you fixed this for yourself but the standard get(), post(), put() and delete() are all available. $giftcard =array("initial_value"=>"10","code"=>"1234567890","note"=>"Voucher created via API"); $shopify->GiftCard->post($GiftCard);

That should create $10 giftcard with number 1234567890 and a note saying it was added via the API.

Andy

andyredfern avatar May 11 '21 15:05 andyredfern

Hi Emre,

Not sure if you fixed this for yourself but the standard get(), post(), put() and delete() are all available. $giftcard =array("initial_value"=>"10","code"=>"1234567890","note"=>"Voucher created via API"); $shopify->GiftCard->post($GiftCard);

That should create $10 giftcard with number 1234567890 and a note saying it was added via the API.

Andy

I returned a "Not Found" error

jungshen avatar Sep 16 '22 08:09 jungshen

Was the store a Shopify Plus store? It will only work with Shopify Plus accounts. There is no gift card api for other Shopify stores.

andyredfern avatar Sep 18 '22 17:09 andyredfern