Covers all questions related to inventory management, order fulfillment, and shipping.
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.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
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
}
]
}
]
}
}