Development discussions around Shopify APIs
We are looking at the docs RE meta fields:
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.
/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.
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:
<my store url>/admin/orders/1068/metafields.json
with these headers:
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
Some 404's related to fetching an order: /admin/orders/1063.json
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?
That was the issue. (id). Solved!
As a business owner, have you ever wondered when your customer's first impression of yo...By Skye Jun 6, 2023
We're excited to announce improvements to the threaded messaging experience in our communi...By TyW May 31, 2023
Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...By Jacqui May 30, 2023