How to cancel fulfillment API using API?

Hello team,

I need help regarding order cancel API. I have used the following endpoint.

Post method: /admin/api/2021-10/fulfillment_orders/3790345306186/cancel.json

Where ‘3790345306186’ is the fulfillment order id. When I try to run API in Postman, it returns me an error as -

{
“errors”: “Fulfillment order does not exist.”
}

Though the order is fulfilled and also added the tracking details still it returns this error.

Kindly help me with this and let me know if anything is missing.

Hey @EvinceDev ,

I had a closer look here, and while we aren’t able to locate store or app details, there are still few insights to share based on the error. Here are a few questions I like to work through:

  1. Where was the id initially returned from? A webhook, request, etc? Was the entire payload logged, or just pertinent fields? Have there potentially been updates to the order/fulfillment since the data was returned?
  2. Have you confirmed that other related details are valid? Eg. Confirmation of order_id?
  3. This error is generally returned when a resource can’t be found, and there are cases where an id may no longer be available. Additionally, there would be a similar outcome if the id isn’t a valid fulfillment_order_id (FulfillmentOrder.id). These ideas are occasionally confused with fulfillment_id (Fulfillment.id) or order_id (Order.id), all of which will be unique.
  4. Is this happening with every fulfillment order?If not, additional troubleshooting could include confirmation that fulfillment order exists via a GET request, or similar request to the related order resource.

If this is happening with multiple fulfillment orders, please log and share examples of x-request-id response header values returned with the error - we can take a closer look for logs and pass on next steps - Cheers!

1 Like