Hi,
I’ve been trying to create fulfillments with the admin REST API and I always get “Not found” error.
Already looked to some related posts here but none was able to fix the issue.
This is the response (with data masked) - Looks fine to me:
{
"fulfillment_orders": [
{
"id": ID,
"shop_id": SHOP_ID,
"order_id": ORDER_ID,
"assigned_location_id": LOCATION_ID,
"request_status": "unsubmitted",
"status": "open",
"supported_actions": [
"create_fulfillment",
"hold"
],
"destination": {
"id": DESTINATION_ID,
"address1": null,
"address2": null,
"city": null,
"company": null,
"country": null,
"email": null,
"first_name": null,
"last_name": null,
"phone": null,
"province": null,
"zip": null
},
"line_items": [
{
"id": LINE_ID,
"shop_id": SHOP_ID,
"fulfillment_order_id": FULFILLMENT_ORDER_ID,
"quantity": 1,
"line_item_id": LINE_ITEM_ID,
"inventory_item_id": INVENTORY_ITEM_ITEM,
"fulfillable_quantity": 1,
"variant_id": VARIANT_ID
}
],
.......
X-Request-Id: 879051bd-9286-4a79-af7f-4ae505c1c3f9
{
"fulfillment": {
"message":"The package was shipped this morning.",
"notify_customer":false,
"tracking_info": {
"number":1562678,
"url":"https://www.my-shipping-company.com",
"company":"my-shipping-company"
},
"line_items_by_fulfillment_order":[
{
"fulfillment_order_id": ID, // field 'ID' from last response
"fulfillment_order_line_items":[
{ "id": LINE_ID, "quantity":1 } // Field 'LINE_ID' from last response
]
}
]
}
}
HEADERS:
X-Shopify-Access-Token: {SHP_TOKEN}
I get the following response:
{
"errors": "Not Found"
}
If I try:
[POST] https://{shop}/admin/api/2023-01/orders/{ORDER_ID}/fulfillments.json
X-Request-Id: 6a8502aa-5701-4f6e-ba32-cd4afa4ceb19
{
"fulfillment": {
"message": "The package was shipped this morning.",
"notify_customer": false,
"tracking_info": {
"number": 1562678,
"url": "https://www.my-shipping-company.com",
"company": "my-shipping-company"
},
"line_items_by_fulfillment_order": [
{
"fulfillment_order_id": FULFILLMENT_ORDER_ID,
"fulfillment_order_line_items": [
{
"id": FULFILLMENT_LINE_ITEM_ID_1,
"quantity": 1
},
{
"id": FULFILLMENT_LINE_ITEM_ID_1,
"quantity": 1
}
]
}
]
}
}
Response:
{
"fulfillments": []
}
I’ve already checked permissions and I have:
- write_fulfillments / read_fulfillments
- write_inventory / read_inventory
- write_locations / read_locations
- write_third_party_fulfillment_orders / read_third_party_fulfillment_orders
- write_custom_fulfillment_services / read_custom_fulfillment_services
I’m not really sure what I’m missing. Any help would be welcome. ![]()
Thanks!