Fulfillment errors

OrderId: 4764724625587

“fulfillment_order_line_items” : “id” is coming from line_items array for each line item.

Paylod:

{

“fulfillment”: {

“location_id”: “30406673”,

“line_items_by_fulfillment_order”: [

{

“fulfillment_order_id”: " 5774323450035",

“fulfillment_order_line_items”: [

{

“id”: “12235020140723”,

“quantity”: “1”

},

{

“id”: “12235020173491”,

“quantity”: “1”

},

{

“id”: “12235020206259”,

“quantity”: “1”

},

{

“id”: “12235020239027”,

“quantity”: “1”

},

{

“id”: “12235020271795”,

“quantity”: “1”

},

{

“id”: “12235020304563”,

“quantity”: “1”

}

]

}

],

“tracking_info”: {

“number”: “9405511206207101107059”,

“url”: www.usps.com

},

“notify_customer”: false,

“message”: " Your package was shipped."

}

}

Sending payload directly to this endpoint: /admin/api/2023-01/orders/4764724625587/fulfillments.json

Error: 404 Not Found

If I remove “location_id”:” 30406673”,

400 Bad Request {“error”:“location_id must be specified when creating fulfillments.”}

This is so frustrating. What am I doing wrong?

Hi epipko,

Thanks for your post. The endpoint for POSTing to create new fulfillments has changed in versions 2022-07 and newer. Now that endpoint doesn’t include an order ID, for example /admin/api/2023-01/fulfillments.json [related endpoint docs].

More detailed information about these changes to fulfillments can be found in the [Fulfillment Orders Migration Guide], where at the bottom following the ‘Order Management’ path will lead to more info about [creating fulfillments and other actions].

We’ll look into getting the error message made more clear when POSTing to the old fulfillment creation endpoint as you’ve described, as that path is [only for GET requests now].

Hope you have a great day