Getting "location_id must be specified when creating fulfillments." when creating fulfillment

Topic summary

Multiple users are encountering the error “location_id must be specified when creating fulfillments” when attempting to create fulfillments via the Shopify API.

Key Issue:

  • The error occurs despite following the official Shopify API documentation example
  • Including the location_id in the request returns a 404 error
  • Omitting the location_id returns a 400 error with the location_id requirement message

Current Status:

  • Users have shared their JSON payload structures, which appear to match Shopify’s documented format
  • The payloads include standard fields: tracking_info, line_items_by_fulfillment_order, fulfillment_order_id, and line item details
  • No resolution has been identified yet

Note: Some code snippets in the thread appear corrupted or reversed, making complete technical analysis difficult. The discussion remains open with users seeking guidance on the missing element or correct implementation.

Summarized with AI on November 18. AI used: claude-sonnet-4-5-20250929.

Here is my post:

{
	"fulfillment": {
		"tracking_info": {
			"number": "XXXXXXXXXXXXXXXXXXXXXXX",
			"company": "DHL eCommerce"
		},
		"line_items_by_fulfillment_order": [{
			"fulfillment_order_id": 00000000000,
			"fulfillment_order_line_items": [{
				"id": 000000000000,
				"quantity": 2
			}]
		}]
	}
}

This was working just a few days ago.

I am having the same problem creating a fulfillment; [error] => location_id must be specified when creating fulfillments.

It is giving a location ID error. If you include the location ID it returns a 404 and without it a 400 error.

this is the example in the shopify API:

{
“fulfillment”: {
“message”: “The package was shipped this morning.”,
“notify_customer”: false,
“tracking_info”: {
“number”: “1Z001985YW99744790”,
“company”: “UPS”
},
“line_items_by_fulfillment_order”: [{
“fulfillment_order_id”: 1046000798,
“fulfillment_order_line_items”: [{
“id”: 1058737530,
“quantity”: 1
}]
}]
}
}

Here’s what I’m posting:

{

“fulfillment”: {

“message”: “The package was shipping”,

“notify_customer”: false,

“tracking_info”: {

“number”: “420276049374811015300205691782”,

“company”: “DHL eCommerce”

},

“line_items_by_fulfillment_order”: [{

“fulfillment_order_id”: 6385204920639,

“fulfillment_order_line_items”: [{

“id”: 14169238339903,

“quantity”: 2

}]

}]

}

}

am i missing something?

this is the example in the shopify API:

{
“fulfillment”: {
“message”: “The package was shipped this morning.”,
“notify_customer”: false,
“tracking_info”: {
“number”: “1Z001985YW99744790”,
“company”: “UPS”
},
“line_items_by_fulfillment_order”: [{
“fulfillment_order_id”: 1046000798,
“fulfillment_order_line_items”: [{
“id”: 1058737530,
“quantity”: 1
}]
}]
}
}

Here’s what I’m posting:

{

“fulfillment”: {

“message”: “The package was shipping”,

“notify_customer”: false,

“tracking_info”: {

“number”: “420276049374811015300205691782”,

“company”: “DHL eCommerce”

},

“line_items_by_fulfillment_order”: [{

“fulfillment_order_id”: 6385204920639,

“fulfillment_order_line_items”: [{

“id”: 14169238339903,

“quantity”: 2

}]

}]

}

}

am i missing something?