Got error "Not Found" when call Cancel Order API

Got error "Not Found" when call Cancel Order API

jinzaitech
Visitor
1 0 0

I want to try cancelling an order by using respective API's .

I tried call API like this link, but I got the error "not found".

Could you help me fix this?

 

Replies 2 (2)

chetancrao
Shopify Partner
42 5 5

Hello @jinzaitech 

 

Thank you for reaching out to the Shopify community.

 

It appears that you are facing an issue with the cancel order API. To resolve this matter, kindly ensure that you have the appropriate access to utilize this resource. The following scopes are required to access the order:

  • read_orders/write_orders (This allows you to access past 60 days orders)
  • read_all_orders (This allows you to access all the orders)

Once you have confirmed that you have these access scopes, we kindly request you to navigate to the API Access section on the manage app page. To do so, please follow these steps:

  1. Go to "All Apps" in your Shopify dashboard.
  2. Locate your app and click on it.
  3. Click on "API Access."
  4. Request access to the "Read all orders scope" as shown in the attached screenshot for your reference.

chetancrao_0-1692878332372.png

 

Also, please give it a try canceling the order that was created within 60 days. If you still encounter any problems, please share the Postman collection for further investigation of the issue.

 

If you encounter any difficulties or require further assistance, please do not hesitate to let me know. 

 

Thanks.

Cheetos || Recurpay Subscriptions

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

Hey, I tried everything but it's not working, 

 

I have multiple order to cancel I have wrote the script but when I try to cancel the order using postmen just to text if the api is working or not then I see and error saying 'not found' even though the actual order is there in the shopify store. 

 

https://{{store-name}}.myshopify.com/admin/api/2024-10/orders/{{order-id}}/cancel.json


The API I'm hitting is this one.