Development discussions around Shopify APIs
We are looking at the docs RE meta fields:
http://docs.shopify.com/api/metafield
We do not see the answer to our question.
Our question is:
1) How do we query all metafields for a specific order?
2) How do we test if a specific order has any meta fields?
3) How do we request a single, specific, metafield for a specific order?
I should add, that we have tried everything we can think of, per the docs.
E.g.
/admin/orders/1060.json // returns 404 error
/admin/order/1060.json // dito
/admin/orders/1068/metafields.json // ditto
We have tried for various orders, including ones where we can see metafields on the shopify order.
Thanks!
Hello, can you provide the request id (its in the request headers) when you are attempting to retrieve a specific order (from your first example).
The end point is valid as per the Order documentation, but I want to understand further why you are seeing a 404 error in this case.
Ack! Now I am confused!
What is the "request id" header?
In fiddler, I usually just do:
GET
<my store url>/admin/orders/1068/metafields.json
with these headers:
Content-Type: application/json
X-Shopify-Access-Token: #####
Host: ####.myshopify.com
Connection: Keep-Alive
The above works fine for many calls.
What am I missing? (RE 404 errrors?)
Also, I should note that the call above works.... to a degree. It does not return a 404. But it also does not return metafields I can see when I am logged in to the merchant console.
Hello, the request id headers will be returned from our server upon your request. Using Fiddler, the request id would be in the web response.
You can't use the order number ie #1060 you have to use the unique ID which you can see in the shopify admin. I think it's a 12 digit number.
Rob, Where do I see the unique id in the order payload? (the payload returned by /admin/orders.json) ?
I am looking through it, and do not see a unique id
Please advise!
Thanks!
Some 404's related to fetching an order: /admin/orders/1063.json
X-Request-Id: ec6aa888-9cbf-4234-acb8-207d58d5fa14
X-Request-Id: d73d7fb3-8fea-4853-bc38-2b19ecc227ae
X-Request-Id: 20c56668-6de1-4de1-af20-3dd9e3cd5912
An Orders unique ID is represented in the "id" property. Each Order will include this property and the value.
The requests you've listed above are returning 404 because the Shop you are testing against does not have Orders with those IDs.
How are you determining the Order IDs for these requests?
Thank you!
That was the issue. (id). Solved!
Awesome! 🙂
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023