Covers all questions related to inventory management, order fulfillment, and shipping.
Here is my request data:
curl -X GET https://quickstart-8dd91d84.myshopify.com/admin/api/2023-10/orders.json?status=open -H 'Content-Type: application/json' -H 'X-Shopify-Access-Token:xxxxxxxxxxxxxxxxxxxxxxxxxxx'
In respond data,
order 1001, origin from location B, no loaction_id data, changed to location A, still no loaction_id data.
order 1002, origin form location A(default loaction), had loaction_id data.
order 1004, origin form location A(default loaction), no loaction_id data.
I don't know how can I make the location_id can be always shown.
"location_id": 92291629329,
"merchant_of_record_app_id": null,
"name": "#1002",
Hey @Tomcheng
Try this endpoint: https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillmentorder#get-orders-order-id-fulfi...
Scott | Developer Advocate @ Shopify
Hi @SBD_ Thanks for your answer, but I need to use the Location_id to identify open orders, because I have some warehouses, each warehouse has different orders, how can the warehouses read the oders of themself. for now, the warehouses can read all these orders, but they can't identify their orders without Location_id. How can I help them?
Thanks for the info!
From the docs: Location_id is the ID of one of the locations that was assigned to fulfill the order when the order was created. Orders can have multiple fulfillment orders. These fulfillment orders can each be assigned to a different location which is responsible for fulfilling a subset of the items in an order. The Order.location_id
field will only point to one of these locations. Use the FulfillmentOrder resource for up-to-date fulfillment location information.
If you're open to using GraphQL, you can filter fulfillment orders by location ID. I can't see an equivalent in REST. Let me know if you get stuck!
Scott | Developer Advocate @ Shopify
Hi Scott, I try to study this GraphQL, and make a request like below:
I tried to use filter some filed by location ID, but all were failed, which filed should I choose? And also I can't choose the proudct infomation, how can I get it? @SBD_
I found how to use the filter like below:
{fulfillmentOrders (first: 8, query: "assigned_location_id:'93810262289'"){
edges {
node {
orderName
orderId
createdAt
destination{
address1
address2
city
countryCode
email
firstName
lastName
phone
province
zip
}
assignedLocation{
countryCode
location{
id
}
}
lineItems(first:10){
edges{
node{
productTitle
sku
totalQuantity
}
}
}
}
}
}
and also got the product infomation, but I still have a problem, I can't filter the orders by date time, for example, I want choose all today's orders, how can do it?
Hey @Tomcheng
Sorry to report it appears the only supported query parameters are `assigned_location_id` and `status`.
Scott | Developer Advocate @ Shopify
Hi @SBD_
We have same issue location_id not found form API response. the location_id always empty when new order status even though it has appeared in the shopify seller center.
Please help from Support Ticket 45858111
Just replying to say we all have the exact same problem we're trying to solve. The fact that the assigned fulfill location doesn't just show from the orders api is pretty ridiculous. This should be there by default without trying to band-aid multiple api calls or a shopify flow creating tags to achieve so we can reference this downstream in other applications like Netsuite.
Hi @SBD_
We found scenario location_id from endpoint GET /admin/api/2024-01/orders/450789469.json?
1. Customer detail null, location_id show at response
2. Customer detail available, location_id null
Did you have exact problem with API GET Order @lumberbeard ??
Please help assistant to fixing this issue @SBD_
Hey @Adit_Forstok
Please reach out to Partner Support with your store information and these two example orders.
Scott | Developer Advocate @ Shopify