Reques `POST /admin/api/2022-01/fulfillments.json`

We use request: POST /admin/api/2022-01/orders/xxxxxxxx/fulfillments.json

We want to go to request: POST /admin/api/2022-01/fulfillments.json

We have some trouble with a new request.

When ordering with one unit of goods, in our service this product can be changed to several others, and when sent it is packed in different boxes, in this case for each box we need to get several tracking_info → number and tracking_info → url BUT in the shopify the goods are single

Request example:
POST /admin/api/2022-01/fulfillments.json
{ "fulfillment": { "message": "The package was shipped this morning.", "notify_customer": false, "tracking_info": { "number": xxxxxx, "url": "https:/xxxx.xxxx", "company": "xxxxx" }, "line_items_by_fulfillment_order": [ { "fulfillment_order_id": xxxxxx, "fulfillment_order_line_items": [ { "id": xxxxxxx, "quantity": 1 } ] } ] } }

If I try to send a few tracking/numbers/URLs for one order position (send few requests with different tracking_info). I receive error response:
{ “errors”: [ “Invalid fulfillment order line item quantity requested.” ] }

how can we be in such situation?

Hi @Valya ,

Lets say you have a fulfillment request with 1 item which requires 1 qty to be fulfilled.

You fulfill it once with qty 1 shopify excludes this 1 qty from qty which needs to be fulfilled, this means that there are no remaining qty which needs to be fulfilled, that’s why you get the error when you try to fulfill it. It’s only possible to fulfill item with 1 qty once. It would work if you would have 2 qty which needs to be fulfilled, but I believe that’s not your case.

You have quite unique situation and is seems shopify isn’t really suitable with handling with such cases.

Maybe you could consider possibility of updating customer order in such case by removing his purchased item and adding separate items on this order (as I understood it’s kind of a bundle which you may need to ship in separate shippments sometimes) In that case it would bring more clarity to you and your customer because he would receive order fulfillment confimations emails of 2 shipments. It’s just a though which came into my head.