Error creating a fulfillment

Topic summary

Issue: Creating a fulfillment for non-shipping digital items via Shopify Admin REST returned “fulfillment: Required parameter missing or invalid.”

Context: The fulfillment_order_id was retrieved from /admin/api/2024-01/orders/<ORDER_ID>/fulfillment_orders.json and used to POST to /admin/api/2024-01/fulfillments.json with line_items_by_fulfillment_order (line item id and quantity).

Error details: The request included api_version in the body and otherwise appeared to contain required fields.

Discussion: One reply suggested removing api_version from the payload and rechecking required fields. The original poster noted the docs indicate api_version is required for this endpoint.

Resolution: The payload must be wrapped in a top-level “fulfillment” object. Including { fulfillment: { api_version, notify_customer, line_items_by_fulfillment_order[…] } } fixed the error.

Outcome: Resolved. Key fix was the missing top-level “fulfillment” property. Minor disagreement remains about whether api_version belongs in the body, but the working request included it under “fulfillment.”

Summarized with AI on January 8. AI used: gpt-5.

Getting an error when trying to create a fulfillment. Use case is that I want to automatically fulfill digital line items in an order that do not require shipping.

I have gotten the fulfillment order ID from the following endpoint:

/admin/api/2024-01/orders/<ORDER_ID>/fulfillment_orders.json

And trying to use this endpoint with the fulfillment order ID and fulfillment order line item ID:

/admin/api/2024-01/fulfillments.json

And getting the following error:

{
    "errors": {
        "fulfillment": "Required parameter missing or invalid"
    }
}

My request body:

{
  "api_version": "2024-01",
  "notify_customer": true,
  "line_items_by_fulfillment_order": [
    {
      "fulfillment_order_id": 6596237721XXX,
      "fulfillment_order_line_items": [
        {
          "id": 14564806754XXX,
          "quantity": 1
        }
      ]
    }
  ]
}

Anyone run into this issue before? All the required parameters are there and should be correct.

Hi Kjdointhings,

Can you double-check that all required fields are correctly included and formatted in your request. This includes fulfillment_order_id and line_items with their id and quantity. Also the api_version field in your request body is unusual. Typically, the API version is specified in the URL or headers, not in the request body. You may want to remove this field from your payload.

The API docs say that api_version (string) is a required parameter for the /admin/api/2024-01/fulfillments.json endpoint. I was able to get this working though. The body of the request needs a top level “fulfillment” property. So my code from above needed to be:

{
  "fulfillment": {
    "api_version": "2024-01",
    "notify_customer": true,
    "line_items_by_fulfillment_order": [
      {
        "fulfillment_order_id": 6596237721XXX,
        "fulfillment_order_line_items": [
          {
            "id": 14564806754XXX,
            "quantity": 1
          }
        ]
      }
    ]
  }
}