Accepting or Rejecting a cancellation_request on fulfillment order

jshao
New Member
3 0 0

Following this guide to implement the fulfillment service, when the fulfillment order gets accepted by our fulfillment service, then the merchant try to request for cancellation. The documented way to make the REST API call is failing for both Accept or Reject calls.

 

https://{shop}.myshopify.com/admin/api/2021-10/fulfillment_orders/{fulfillment_order_id}/fulfillment...

https://{shop}.myshopify.com/admin/api/2021-10/fulfillment_orders/{fulfillment_order_id}/fulfillment...

 

When making the call following the guide, what we get back is the response of 422, and the error states

 {"errors":["The fulfillment order is not in an open state."]}

 

Has anyone gotten this to work and might know the issue?

 

Replies 4 (4)
L_J_K
Shopify Staff
363 54 65

Hey @jshao 

Thanks for raising this! By chance do you have a request ID from the request that returned 422? We can take a look - thanks!

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
jshao
New Member
3 0 0

@L_J_K 

 

Requesting a cancel in the UI doesn't work either.

 

Request ID: 98acfc74-8a02-4690-9744-7c8445a42775

{"data":{"fulfillmentOrderSubmitCancellationRequest":{"fulfillmentOrder":null,"userErrors":[{"field":null,"message":"Failed to submit cancel request.","__typename":"UserError"}],"__typename":"FulfillmentOrderSubmitCancellationRequestPayload"}},"extensions":{"cost":{"requestedQueryCost":11,"actualQueryCost":10,"throttleStatus":{"maximumAvailable":5000.0,"currentlyAvailable":4990,"restoreRate":250.0}}}}

 

For accepting the cancel fulfillment request

Request ID: 'X-Request-ID': '37679f18-4173-4618-8d1f-e2f5b6e6e050

b'{"errors":["The fulfillment order is not in an open state."]}'

jshao
New Member
3 0 0
L_J_K
Shopify Staff
363 54 65

Hey @jshao 

 

So, for both of these fulfillment orders involved in those request id(s), at the time the call is made (whether via the Admin or  via the Fulfillment Services API client) the state of them in the database is ‘in progress’, so neither of them are actually not in a state of 'open'. Both of the fulfilment orders request status is  cancellation_requested presently.

 

I checked backstage and this scenario isn’t something that is affecting the platform at scale  - I wasn't able to locate any other open issues where the errors you are facing are present. Not to say it's a non issue though.

 

One question -  Is this happening for any new Fulfillment orders with that specific Fulfillment Service since the last try? I saw the Fulfillment Service has the rights scopes for the calls that are being made.

 

If still receiving the issue, I'd say it's a good idea to raise this in our API bug reporting queue, as on the forums we are restricted into how much we can investigate, which in turn limits what we can pass back to partners in the Community Forums, especially if we require explicit authenticated permission to access to an app or store specifically.

 

While our inability to authenticate here on the forums isn't ideal, we can work around this with those x-request-Id's you've provided. Once authenticated, you can access the beta reporting form at - https://help.shopify.com/en/questions/partners#/contact  -  it sidesteps the above limitation of the forums. Feel free to reference this post if you raise a bug report. Thanks!

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