Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
Solved

Missing line_item of Fulfillment Order

RendyW
Tourist
3 1 0

Hi,

 

I'm trying to use new fulfillmentOrder API to fulfill a 2-line-items order.

 

{
  "order":{
    "id":xxxxxxx,
    "line_items":[
      {
        "id": xxxx, # item 1
      },
      {
        "id": xxxx, # item 2
      },
    ]
  }
}

 

 

According to the guide line, we should query the fulfillment order by order_id to get the fulfillment orders.

However, there's only 1 line_item in all fulfillment orders of this order_id.

 

{
      "id":xxxxx,
      "shop_id":xxxxx,
      "order_id":xxxxx,
      "line_items":[
         {
            "id":xxxx, # only 1 item
         }
      ],
      ...
}

 

 

Is there anything i missed?

Thank you very much.

 

Best regards,

Rendy

Accepted Solutions (2)
Michael_AG
Shopify Staff
47 8 11

This is an accepted solution.

Please share with me the whole REST query (except auth tokens) and it's result.
Please share with me the shop id and the order id, so I could take a look on the real data.

 

This REST query is expected to return you all this order's fulfillment orders you have access to.

In theory, if everything is right with your query, it might be that your api client does not have access to the second fulfillment order (e.g. it does not have access to the underlying location).

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

RendyW
Tourist
3 1 0

This is an accepted solution.

Hi Michael_AG,

 

Just like what you said, it seems that the app does not have access to the underlying location.

After checking the permission of third_party_fulfillment_orders of the app, it can receive 2 FulfillmentOrders.

image.png

 

Thank you very much!

View solution in original post

Replies 4 (4)

Michael_AG
Shopify Staff
47 8 11

Hi RendyW,

 

I would be more helpful if I knew what scenario you are solving and if you use rest or graphql API.

 

In GraphQL, FulfillmentOrder.lineItems return FulfillmentOrderLineItem objects. Which means, if your order consists of cups and kettles, and cups are stored in Location A, but kettles are stored in Location B, this order will cause two fulfillment orders. FulfillmentOrder 1 will have one FulfillmentOrderLineItem of cups with a specified quantity, and FulfillmentOrder 2 will have one FulfillmentOrderLineItem on kettles. 

 

Feel free to specify your problem and ask me follow-up questions.

To learn more visit the Shopify Help Center or the Community Blog.

RendyW
Tourist
3 1 0

Hi Michael_AG,

 

Thank you for the response and we're using rest API.

 

Our scenario is very like your example, order consists of cups and kettles, and cups are stored in Location A, but kettles are stored in Location B, so there should be 2 FulfillmentOrders.

However,  when we GET FulfillmentOrders through order_id, API only return FulfillmentOrder 1 and we can only fulfill the cups.

We need to find FulfillmentOrder 2 to fulfill the whole order, but it disappear from the API.

 

Please tell me if you need any other information of this issue.

Thank you very much.

Michael_AG
Shopify Staff
47 8 11

This is an accepted solution.

Please share with me the whole REST query (except auth tokens) and it's result.
Please share with me the shop id and the order id, so I could take a look on the real data.

 

This REST query is expected to return you all this order's fulfillment orders you have access to.

In theory, if everything is right with your query, it might be that your api client does not have access to the second fulfillment order (e.g. it does not have access to the underlying location).

To learn more visit the Shopify Help Center or the Community Blog.

RendyW
Tourist
3 1 0

This is an accepted solution.

Hi Michael_AG,

 

Just like what you said, it seems that the app does not have access to the underlying location.

After checking the permission of third_party_fulfillment_orders of the app, it can receive 2 FulfillmentOrders.

image.png

 

Thank you very much!