Why am I receiving a 422 error when completing a draft order through the admin rest API?

Hi, I met troubles while trying to complete the draft order through the admin rest API.

I receive:

"

Received an error response (422 Unprocessable Entity) from Shopify:
“There was an issue completing this order. Please try again.”
If you report this error, please include this id: eb3245f0-e955-410a-aa22-7f212a9bcb57

"

This functionality seems to be not working before.

I’m using October23 version and do it like this:

      let draftOrder = await shopifyAppClient.api.rest.DraftOrder.find({session, id});
            await draftOrder.complete({});

The confusing behaiviour is that I cannot complete this order from shopify admin(not API) not only after .complete() request from api, but even before it(when I set my application on debug before this .complete line)

The error from shopify: “There was an issue completing this order. Please try again.”

The only call I have before this is GET draft-order.

Besides that, I receive draft-order update webhook with the same data

1 Like