Unable to Fulfill Orders via API: Incorrect Request Format?

Topic summary

A developer is experiencing difficulties fulfilling orders through the Shopify API using a two-step process:

Current Workflow:

  • Step 1: Successfully fetching Fulfillment Order ID via GET request to /admin/api/2024-10/orders/${numericOrderId}.json
  • Step 2: Attempting to create fulfillment via POST request to /admin/api/2024-10/${numericOrderId}/fulfillments.json

Issue:
The POST request fails despite providing required data including location_id (formatted as gid://shopify/Location/123456) and line item IDs in the request body.

Request Structure:
The developer is using proper headers (X-Shopify-Access-Token, Content-Type: application/json) and a fulfillment object containing location_id and line_items array.

Status:
The issue remains unresolved with no responses yet. The developer is seeking guidance on potential problems with the request format or data structure.

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

Hi everyone,

I’m facing an issue with fulfilling orders using the Shopify API. Here’s the flow I’m trying to implement:

Step 1: Fetch the Fulfillment Order ID for a specific order.
Step 2: Use this Fulfillment Order ID to create a fulfillment via the API.
However, I’m encountering difficulties in either retrieving the Fulfillment Order ID or correctly creating the fulfillment. Below is the flow I’m following:

Fetching the Fulfillment Order ID using this endpoint:

GET

[https://store-url/admin/api/2024-10/orders/](https://store-url/admin/api/2024-10/orders/)${numericOrderId}.json,

The response seems correct, but when I
Creating the Fulfillment using this endpoint:

POST

[https://store-url/admin/api/2024-10/](https://store-url/admin/api/2024-10/)${numericOrderId}/fulfillments.json,

fulfillmentData,

{
headers: {
‘X-Shopify-Access-Token’: accessToken,
‘Content-Type’: ‘application/json’,
},
},

{
“fulfillment”: {
“location_id”: “gid://shopify/Location/123456”,
“line_items”: [
{
“id”: 123456
}
]
}
}
I’m providing the location ID and fulfillment order ID, but the request doesn’t seem to go through successfully. Here’s the structure I’m using:

Has anyone faced this issue before or can offer any guidance on what might be wrong with the request format or data?

Thanks in advance!