Location Id is null after completed draft order

Solved
Highlighted
Tourist
4 0 0

I used Shopify API to created order.

Steps created order:

Created draft order -> Update valid shipping address -> complete draft order -> Get order info (location_id is null).

 

Call API steps:
1. Call API to create draft order:
https://shopify.dev/docs/admin-api/rest/reference/orders/draftorder?api[version]=2020-04#create-2020...
2. Update valid shipping address
https://shopify.dev/docs/admin-api/rest/reference/orders/draftorder?api[version]=2020-04#update-2020...
3. Complete Draft Order
https://shopify.dev/docs/admin-api/rest/reference/orders/draftorder?api[version]=2020-04#complete-20...
4. Get order
https://shopify.dev/docs/admin-api/rest/reference/orders/order?api[version]=2020-04#show-2020-04
=> location_id is null.

 

How can you help know about for issue?

Thanks!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1040 140 165

This is an accepted solution.

Hey @VinhLe 

 

This is expected. location_id is the ID of the physical location where the order was processed, which will usually be null (unless the order was placed via POS).

1 Like