Order fulfillment API failing with version 2022-10

Order fulfillment API failing with version 2022-10

mayurib_cloud9
Visitor
1 0 0

I am trying to call Fulfillment API from version 2022-10 to fulfill an order in Shopify. Calling the API by passing Shopify API Key and Password and generating the token using Basic Authentication.

URL: https://{store}.myshopify.com/admin/api/2022-10/fulfillments.json

JSON:

{

    fulfillment:

        {

            location_id: {locationid},

            tracking_number: {tracking_number},

            tracking_company: {tracking_company},

            notify_customer: false,

            line_items_by_fulfillment_order: 

            {          

               fulfillment_order_id: {orderid}

            }

        }

}

The API is returning Response with Status Code as ‘Forbidden’ and message as The api_client does not have the required permission(s).

I checked in Shopify account for access scopes and the account/app has been granted write_fulfillments access. Is there any additional scope required for the API call?

Reply 1 (1)

chetancrao
Shopify Partner
42 5 5

Hello @mayurib_cloud9,

 

Thank you for reaching out to the Shopify community.

 

It appears that you are experiencing an issue with the fulfillment resource. Please ensure that you have sufficient access to use this resource. The following scopes are required to create a fulfillment for the order:

  • write_merchant_managed_fulfillment_orders *
  • write_third_party_fulfillment_orders
  • write_orders

Once you have confirmed that you have all the necessary access, please follow the instructions outlined below:

  1. Make an API call named "Fetch order fulfillments" and pass the order id to it.
  2. Once you receive a response from the fetch API, utilize the id from the fulfillment_orders array in the next API call named "Create order fulfillment".

Here is the Postman collection for further reference/additional use.

 

If you encounter any difficulties or require further assistance, please do not hesitate to let us know. We are here to support you and ensure a smooth resolution of the issue.

 

Thanks

Cheetos || Recurpay Subscriptions

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution