Hello,
We are experiencing an issue with trying to fulfil an order through the Shopify API.
This is the error response we receive:
422 (Unprocessable Entity)
at stream.catch.then.data (/var/task/node_modules/got/index.js:386:13)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'HTTPError',
host: undefined,
hostname: 'cider-mill-press.myshopify.com',
method: 'POST',
path: '/admin/orders/2326199566468/fulfillments.json',
protocol: 'https:',
url: undefined,
statusCode: 422,
statusMessage: 'Unprocessable Entity',
The order only has 1 item, delivery with UPS Next Day Air® . The order id is 2326199566468 . Thank you!
Not too long ago there were some posts regarding fulfilling orders via the REST API. Here is one sample JSON request body that worked fine for me when I tested it. Note the enclosing "fulfillment": { } around the particulars, as well as specifying the line items. While I'm not sure it's required to specify the line items I do know the fulfillment enclosure is required!
{
"fulfillment": {
"location_id": 203128,
"tracking_number": "123456789",
"service": "manual",
"tracking_url": "https://shipping.xyz/track.php?num=123456789",
"tracking_company": "Jack Black's Pack, Stack and Track",
"receipt": {},
"line_items": [{"id": 4204529844276, "quantity": 1, "variant_id": null, "fulfillment_service":"manual" }],
"notify_customer": false
}
}
User | Count |
---|---|
12 | |
11 | |
10 | |
8 | |
5 |