Getting an 422 error after completing fulfillments via REST api

Hi,

our system tries to complete fulfillments via REST api endpoint: https://shopify.dev/api/admin-rest/2022-01/resources/fulfillment#post-orders-order-id-fulfillments-fulfillment-id-complete

But Shopify always answers with an HTTP 422 error with empty error response for specific orders/fulfillments.

I checked the page https://shopify.dev/api/usage/response-codes, too. But none of them helped.

How can I debug the error and correct the API request?

Thank you,

David

Hi @dpommer

Can you please provide an x-request-id? I will see if I can find any additional context in the logs.

Thanks!

Hello @csam ,

unfortunately I can’t provide an x-request-id, but managed the find the reason of the error: The system mixed up reference ID so the order ID and fulfillment ID didn’t match. After correcting the references the proper fulfillments were completed.

Regards,

David

PS. I’ve tried to reply with the solution earlier but was blocked by the spam protection, sorry.

1 Like