Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

The api_client does not have access to the fulfillment order.

Solved

The api_client does not have access to the fulfillment order.

matwilk
Shopify Partner
1 0 1

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

 

Accepted Solution (1)

RobZone
Shopify Staff
77 11 23

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.

View solution in original post

Replies 2 (2)

RobZone
Shopify Staff
77 11 23

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.

tanktankke
Tourist
8 0 2

I have the same problem. How did you solve it?