Covers all questions related to inventory management, order fulfillment, and shipping.
I am trying to fulfill an order, but get an error. Please tell me what I am doing wrong:
Array
(
[errors] => Array
(
[fulfillment] => Required parameter missing or invalid
)
[http_code] => 400
[original_request] => {"fulfillment":{"api_version":"2023-10","notify_customer":false,"tracking_info":{"number":"TEST1234","url":"https://www.yodel.co.uk/track/TEST1234"},"line_items_by_fulfillment_order":{"fulfillment_order_id":6500782670097,"fulfillment_order_line_items":[{"id":14377671000337,"quantity":1}]}}}
[x_request_id] => 960002b8-10e9-409c-8835-c303c0295563
)
Hey @_max
`line_items_by_fulfillment_order` should be an array (not a hash). Try:
{
"fulfillment": {
"api_version": "2023-10",
"notify_customer": false,
"tracking_info": {
"number": "TEST1234",
"url": "https://www.yodel.co.uk/track/TEST1234"
},
"line_items_by_fulfillment_order": [
{
"fulfillment_order_id": 6500782670097,
"fulfillment_order_line_items": [
{
"id": 14377671000337,
"quantity": 1
}
]
}
]
}
}
Scott | Developer Advocate @ Shopify
Hi Scott,
Well spotted, thanks, but I have updated this and still get the same error. Latest request ID: e76c49df-c856-4050-8390-9b7bbe68fe70
Thanks for the request ID. It looks like the params are wrapped in one too many `{}` and formatted weirdly. On this end we're receiving:
{"{\"fulfillment\":{\"api_version\":\"2023-10\",\"notify_customer\":false, ...
Can you show me a screenshot of how you send the request? (e.g. code/command/Postman)
Scott | Developer Advocate @ Shopify
That makes some sense. I have added a content-type header and now all working perfectly. Thanks for the help!