Rest api admin product stock and price update fails

in shopify i was not able to update stock and price of a product using rest api. but am able to get products , locations etc

i dont know the reason

for example


curl --location --request PUT 'https://shopify.lenzcamera.com/admin/api/2025-01/products/9637862572336.json' \
--header 'X-Shopify-Access-Token: shpat_ccccccccccccccccccccccccc' \
--header 'Content-Type: application/json' \
--header 'Cookie: request_method=PUT' \
--data '{
  "product": {
    "id": 9637862572336,
    "variants": [
      {
        "id": 49198139244848,
        "price": "1498"
      }
    ]
  }
}'

not working
it gives 200. but giving old price
while stock update gives 404

Hi, you should move over to GraphQL as REST is no longer supported.

But i was getting this api working before i move to production dns

Regardless, you need to switch over to GraphQL, REST is no longer supported.

Hello,

Thanks for your question. I note that you have been having this issue since you migrated your production domain name, thanks for the additional info.

You may find this post helpful: Re: Custom domain to call API - Shopify Community

In summary, please continue to use your myshopify.com domain for Admin API requests. Hope this helps!

1 Like

hey… that worked. thanks for ur support

2 Likes

hey team @EfstathiosStivaros
i have got another issue

i am calling the orders api

https://hooooo.myshopify.com/admin/api/2023-04/orders.json?status=any

i get result but the customer node
“customer”: {
“id”: 8458361012528,
“created_at”: “2025-01-24T20:18:06+03:00”,
“updated_at”: “2025-01-24T20:18:07+03:00”,
“state”: “disabled”,
“note”: null,
“verified_email”: true,
“multipass_identifier”: null,
…
}

not contains name,email phone etc
when i checked in admin panel these customer details exists in order detail page

also my api has scope read_customers

whats wrong now?

i even tried
https://hoooooo.myshopify.com/admin/api/2025-01/customers/8222000000000.json

to get specific customer info
here also am not getting name and phone such details

Hi, as mentioned, REST is no longer supported so the Shopify team won’t be able to help you on it. You need to move over to GraphQL.

Hi @Luke but i dont think its the reason. because i was able to access customer information before.

i understood the issue

the restriction is with the base plan

Access to personally identifiable information (PII) like customer names, addresses, emails, phone numbers is only available on Shopify, Advanced, and Plus plans

thanks