Why isn't my gift card API functioning correctly?

Why isn't my gift card API functioning correctly?

shri_abhi12
Visitor
1 0 0

Hey Everyone, 

I'm try to run gift card api using postman but it not working. All api response geting 404 not found. I already set my custom app permisions correctly to read and write gift cards.


I follow the shopify api documentation below:

https://shopify.dev/api/admin-rest/2022-04/resources/gift-card#get-gift-cards


Also i tried the curl:

curl --location -g --request GET 'https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/api/{{api_version}}/gift_cards.json' \ --header 'Content-Type: application/json'

 

But it's not work.
I hope any one my frient will help me soon.
I am sharing some screenshot for more info.

Thanku.

Replies 5 (5)

hardik355
Shopify Partner
253 23 38

Hello Shri_abhi12

Hope you are doing great!

You need to take special permission for gift card API. You can not create a gift card using API if you don't have permission. Otherwise, your store should be Shopify plus store. Then you can create gift card.

If helpful then please Like and Accept Solution.
For App Development and Design changes Hire Me.
Skype: live:hardikradadiya355
Thanks
bobkitz
Visitor
1 0 0

I have set both read_gift_cards and write_gift_cards permissions set (and also have a ShopifyPlus store) but I am getting the same 404 error when I try to POST (create) a gift card.  When I try a GET it works fine.

devPramod
Shopify Partner
22 0 13

Hello @bobkitz,

I am facing the same issue. have you resolved this? please let me know how?

deepaksamria
Excursionist
15 0 10

Hi @shri_abhi12 , i'm also getting a 404 response in Create Gift card API...Have you resolved your issue?

devPramod
Shopify Partner
22 0 13

To resolved this get "read_gift_cards,write_gift_cards" permission for your app.