Hello Shopify Community, We're encountering a persistent and puzzling HTTP 406 Not Acceptable error when trying to create fulfillments via the REST Admin API for orders assigned to a location using the "Manual" fulfillment service, and hoping someone might have encountered this or have insights. The Scenario:
- We have orders where line items are assigned to a specific merchant-managed location (let's call it "Our Warehouse").
- This "Our Warehouse" location uses the "Manual" fulfillment service setting in Shopify.
- Our goal is to programmatically create a fulfillment record via API and add shipment tracking information after we've shipped the items from "Our Warehouse".
The Problem:
- No FulfillmentOrder Exists: As expected with the "Manual" service setting, Shopify does not automatically create FulfillmentOrder objects for these orders. We've confirmed this by querying the Order via the GraphQL API (order.fulfillmentOrders.edges is empty). The FulfillmentOrder documentation also states these cannot be created manually.
- GraphQL fulfillmentCreateV2 Fails: Consequently, the standard GraphQL fulfillmentCreateV2 mutation fails because it requires a fulfillmentOrderId, which doesn't exist.
- GraphQL fulfillmentCreate (Legacy) Fails: We also confirmed the older fulfillmentCreate mutation is unavailable in recent API versions (e.g., 2024-04, 2024-01), returning an "undefinedField" error.
- REST API POST /fulfillments.json Fails with 406: Based on documentation and Shopify's standard flow for manual fulfillments, the correct approach seems to be using the REST endpoint POST /admin/api/{version}/orders/{order_id}/fulfillments.json, providing the location_id and line_items. However, this endpoint consistently returns HTTP 406 Not Acceptable with an empty response body.
Example REST Request Structure (Generic):
- Endpoint: https://{shop}.myshopify.com/admin/api/2024-01/orders/{order_id}/fulfillments.json (Also tried 2024-04)
- X-Shopify-Access-Token: [Valid Token]
- Content-Type: application/json
{
"fulfillment": {
"location_id": [Numeric Location ID for "Our Warehouse"],
"tracking_number": "[Actual Tracking Number]",
// "tracking_company": "[Carrier Name]", // Tried with and without this
// "tracking_info": { ... }, // Tried this structure too
"line_items": [
{ "id": [Numeric Line Item ID 1], "quantity": 1 },
{ "id": [Numeric Line Item ID 2], "quantity": 1 }
// ... other line items ...
],
"notify_customer": true // Tried false as well
}
}
Troubleshooting We've Done:
- Verified all necessary API scopes (read/write_orders, read/write_fulfillments, read_locations) are enabled for our custom app.
- Confirmed we can successfully query the Order, Location, and Line Item numeric IDs via GraphQL.
- Ensured Content-Type: application/json and Accept: application/json headers are correctly sent.
- Tested against REST API versions 2024-04 and 2024-01.
- Tried simplifying the REST payload (removing tracking_company, trying tracking_info object, toggling notify_customer).
- Tested using different HTTP clients (axios, standard fetch).
- The 406 error persists in all REST API attempts, always with an empty response body.
Our Questions for the Community:
- Has anyone successfully used the REST POST /fulfillments.json endpoint to create fulfillments for orders assigned to a "Manual" fulfillment service location in recent API versions (2024-01 or later)?
- Is there any known reason why this specific endpoint might return 406 Not Acceptable (despite correct headers) specifically in the context of "Manual" service orders where no FulfillmentOrder object exists?
- Is there an alternative, recommended API approach for programmatically creating fulfillment records + tracking for these types of orders that we might have missed?
We seem to be following the documented approach for manual fulfillments, but hitting this unusual 406 blocker. Any pointers or shared experiences would be incredibly helpful! Thanks!