Covers all questions related to inventory management, order fulfillment, and shipping.
Hi,
I'm getting the error 'The api_client does not have access to the fulfillment order.' when trying to fulfil an order via the fulfilment orders GraphQL API
I'm wondering under what circumstances one can expect to get that error?
Here's the mutation I'm using in Postman to test :-
mutation fulfillmentCreateV2 {
fulfillmentCreateV2(fulfillment: {
trackingInfo: {
number:"05222701968432",
url:"https://tracking.dpd.de/status/en_US/parcel/05222701968432"
}
notifyCustomer: true,
lineItemsByFulfillmentOrder: [
{
fulfillmentOrderId:"gid://shopify/FulfillmentOrder/5831213514916"
fulfillmentOrderLineItems: {
id:"gid://shopify/FulfillmentOrderLineItem/12380782362788"
quantity:1
}
}],
})
{
fulfillment {
id
status
trackingInfo {
company
number
url
}
}
userErrors {
field
message
}
}
}
The fulfilment order id and the fulfilment line item id was obtained from a successful order query on the order, so that tells me they are correct and that the access token I'm using is correct.
Any help/ideas as to what else could be wrong?
TIA,
Matt
Solved! Go to the solution
This is an accepted solution.
Your API client id does not have write access to this fulfillment order, I suspect you are missing an access scope. A fulfillment service app will need write_assigned_fulfillment_orders, plus the fulfillment order needs to be assigned to the fulfillment service app location. An order management app will need write_merchant_managed_fulfillment_orders for merchant managed locations or write_third_party_fulfillment_orders for fulfillment service locations not managed by the app.
I hope that helps.
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
Your API client id does not have write access to this fulfillment order, I suspect you are missing an access scope. A fulfillment service app will need write_assigned_fulfillment_orders, plus the fulfillment order needs to be assigned to the fulfillment service app location. An order management app will need write_merchant_managed_fulfillment_orders for merchant managed locations or write_third_party_fulfillment_orders for fulfillment service locations not managed by the app.
I hope that helps.
To learn more visit the Shopify Help Center or the Community Blog.
I have the same problem. How did you solve it?