When a customer pays for an order, I want to be able to send this information to a 3PL. This 3PL is dependent on which location Shopify applies to the order (usually based on stock levels).
So I did a webhook registration for orders/paid which is working great, my app receives the order details when I create an order. However the 'location_id' parameter is null. For example:
┃ cancelled_at: null,
┃ cancel_reason: null,
┃ total_price_usd: '13.68',
┃ checkout_token: 'xxx',
┃ reference: null,
┃ user_id: null,
┃ location_id: null,
┃ source_identifier: null,
┃ source_url: null,
┃ processed_at: '2021-02-02T13:27:27-05:00',
┃ device_id: null,
┃ phone: null,
┃ customer_locale: 'en',
┃ app_id: xxx,
┃ browser_ip: 'xxx',
If you can shed any light on how to get access to this location or location_id when a customer successfully completes payment for their order, this would be great.
I don't believe location_id is what you expect it to be. Please check out our order API docs for a more detailed explanation: https://shopify.dev/docs/admin-api/rest/reference/orders/order
Thanks @Kevin_A, you were absolutely correct. I actually wanted to find where Shopify had allocated the order to be fulfilled from. I got there in the end, once the order had been placed I then needed to use the order_id to call the fulfillment_orders api.
Have you created a collection on your online store and experienced an issue with adding yo...By Ollie Aug 24, 2022
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...By Ollie Jul 28, 2022