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.

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.