I’m trying to update some order info after an order is created. I’m able to successfully authenticate with the API, but a PUT request doesn’t update the fields like I’d expect. For example, trying to update the note field, the response is a 200 status code, but the response body does not contain the updated information:
I’m testing the API using Postman. Trying to authenticate using the “Authorization: Basic [base64 encoded username:password]” was unsuccessful. I have authenticated using the “X-Shopify-Access-Token” header, as explained here.
I suspect I’m missing a critical piece to be able to successfully update orders - any advice or resources to check out?
Thanks for the reply, I figured it out! I was using the full domain of the site to hit the API endpoint, rather than shop.myshopify.com as the domain. Things are working as expected now!
As the PUT request header indicated, indeed it is. But the barebones request headers, the PUT URL, the PUT request body, etc. are generically applied regardless of what tool you are using to issue the request, right?
That’s right, i am having hard time changing order phone number using put request, i am trying with js right now i wrote “get” request and got the order with response, but now i need to update it to admin with api call request, i am kinda new with shopify api so i am trying this on js syntax:
I would simplify things before delving into if the AJAX might be incorrect. First try issuing the basic request using curl, Postman, etc. If it works then you know the actual PUT request is okay. One thing I recall is that I think it’s the Shopify API provider that validates phone numbers, e-mail address, etc. So if you are using dummy values for those the API request might fail due to that…