Development discussions around Shopify APIs
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
Hi all,
I'm trying to update an order's note using cURL and I'm constantly getting an error, although I can't see what's wrong.
This is the call I do:
curl -X PUT https://KEY:SECRET@URL/admin/api/2021-07/orders/ORDERID.json -H 'Content-Type: application/json' -d {"order":{"id":ORDERID,"note":"Test"}}
This is the message I get:
"errors" : {"order" : "Required parameter missing or invalid"}}
Does anybody know what could be the issue?
Thanks!
Hey @martin_dev
Thanks for getting in touch. Taking a look at the Curl example from our docs here It looks like the example is missing the content header "Content-Type: application/json" - mine works ok when I add that to the given example.
So if I try something like this :
curl -d '{"order":{"id":1234567891011,"note":"Customer contacted us about a custom engraving on this iPod"}}' \
-H "Content-Type: application/json" \
-X PUT "https://coolteststore.myshopify.com/admin/api/2021-07/orders/1234567891011.json" \
-H "X-Shopify-Access-Token: putyouraccesstokenhere"
I'm able to PUT my note ok to my order via my Curl client. We'll look into the docs. Hope that helps!
User | RANK |
---|---|
5 | |
5 | |
4 | |
4 | |
4 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022