Getting an 422 error after completing fulfillments via REST api

dpommer
Shopify Partner
6 1 3

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-f...

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?

Bildschirmfoto von 2022-02-25 15-06-22.png

Thank you,

David

Replies 2 (2)

csam
Shopify Staff (Retired)
267 40 51

Hi @dpommer 

 

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

 

Thanks!

To learn more visit the Shopify Help Center or the Community Blog.

dpommer
Shopify Partner
6 1 3

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.