This my code below:
var req = await unirest.post(`${process.env.BASE_URL}/admin/api/2023-01/fulfillments.json`)
.headers({
'X-Shopify-Access-Token': process.env.API_KEY
})
.send({
"fulfillment": {
"message":"Fulfilled Donation.",
"line_items_by_fulfillment_order": [
{
"fulfillment_order_id": item.fulfillment_order_id,
"fulfillment_order_line_items": [
{
"id": item.id,
"quantity": item.quantity
}
]
}
]
}
})
However it returns the error:
{ errors: { fulfillment: 'Required parameter missing or invalid' } }
Doesn’t make sense as I’ve done as instructed via the dev docs here.