Order fulfillment 2023-10 hook returning empty origin_address

Order fulfillment 2023-10 hook returning empty origin_address

itsarrow
Shopify Partner
2 0 0

Hi, I'm attempting to get a parcel's "sender" address using an order fulfillment hook. Would this be the origin_address in the fulfillment array? If so, why is it returning empty? I found there is also a location_id field, but that is just the id for a location. I would prefer if I could use one webhook for all my needs.

 

Much Appreciated

Replies 4 (4)

Liam
Shopify Staff
2873 312 821

Hi Itsarrow,

 

Yes, you are correct. The "sender" address in the context of a fulfillment would typically be represented by the origin_address field in the fulfillment array. This field should contain the address from where the fulfillment has been done, usually a warehouse or fulfillment center.

However, if it's returning empty, there could be a few possible explanations:

  1. The fulfillment may not have been associated with an origin address at the time the webhook was triggered.
  2. The origin_address field might be empty if the fulfillment was made from a location that does not have a specified address.
  3. There could be an issue with the permissions of your API client. Make sure your API client has the necessary read_orders or read_marketplace_orders access scopes.

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

itsarrow
Shopify Partner
2 0 0

Hey Liam,

 

I appreciate the help so far.

The obstacle persists. My observations so far:

  1. The fulfillment should be associated with an origin address at the time the webhook was triggered since the webhook is triggered after purchasing a shipping label.
  2.  The location ID is correct within the payload.
  3.  The shipping origin address under Store Settings>Shipping & Delivery exists, with the name matching the location ID's name.
  4. I am receiving all other data within the payload so I do not think the issue is with permissions.
  5. Could it be that Shopify is not recognizing the address set within shipping origins? (Since I believe shipping quotes are based off just the postal code)
    The Address Field in Shipping & Delivery settings has the format:
    P.O Box 11111 RPO someRPO, Toronto Ontario Z1Z 1Z1, Canada

    Any ideas?
DarpanMemes
Visitor
1 0 1

I am facing the same issue , response coming from fulfillment creation hook returning origin_location as null but while fetching all fulfillments with rest api getting origin_location in line items array in all fullfillments of an order.
Is it possible that i will receive origin_location in webhook as well.
Checked All scopes working fine 

HiT2
Tourist
7 0 1

Bump on this, really frustrating that the test webhook contains no origin location data. Even when trying to manually trigger it nothing seems to be there, could be an issue around shipping labels not being present, but I'm not going to build my app whilst constantly placing real orders to test. Shopify seem to have missed a step here.