"Unprocessable entity" while closing fulfillment order

Excursionist
27 1 0

The API call to add tracking number for a fulfillment order works perfectly well

 

PUT: /admin/api/2019-04/orders/1091724902459/fulfillments/1035618058299.json

200 OK

 

But marking the fulfillment order as complete

 

POST: /admin/api/2019-04/orders/1091724902459/fulfillments/1035618058299/complete.json

com.aihello.shopify.api.ShopifyApiClient : 422 Unprocessable Entity

 

 

It would be nice if Shopify could send more verbose errors so we know what exactly went wrong

AiHello.com: Smart Fulfillment for your ecommerce platform.
0 Likes
Shopify Staff
Shopify Staff
297 32 61

Hey there,

 

Can you please provide me with the 'X-Request-Id' response header for this request so I can have a look?

 

Posting the request payload will also help, it's usually just a small syntax error which leads to a 422. 

0 Likes
Excursionist
27 1 0

@Zameer 

 

Request:

com.aihello.shopify.api.ShopifyClient : Shopify URL https://XXXX.myshopify.com/admin/api/2019-04/orders/1061878628411/fulfillments/1008850894907/complet... , request being sent <{},{Authorization=[Basic NjY1YTIxMTMxYTdkNTNmODAwOGY1NTAwMzI1NGE1ZjU6ODJjYjMwMTBmOGQyMWEzZTBhOGVkYjJiMTE5OTFiMzM=], Content-Type=[application/json]}>

 

Response:
org.springframework.web.client.HttpClientErrorException: 422 Unprocessable Entity

 

The response is a HTTP exception and as such there is no response to read from for the x-request-id.

 

 

 

 

The call to update tracking number for same order and fulfillment ID seems to work well

 

com.aihello.shopify.api.ShopifyClient : Shopify URL https://XXXXX.myshopify.com/admin/api/2019-04/orders/1061878628411/fulfillments/1008850894907.json , request being sent

 

com.aihello.shopify.api.ShopifyClient : Shopify response <200,com.aihello.shopify.api.model.FulfillmentWrapper@275c02dd,{Date=[Fri, 10 May 2019 18:00:30 GMT], Content-Type=[application/json; charset=utf-8], Transfer-Encoding=[chunked], Connection=[keep-alive], X-Sorting-Hat-PodId=[58], X-Sorting-Hat-ShopId=[23393521], Vary=[Accept-Encoding], Referrer-Policy=[origin-when-cross-origin], X-Frame-Options=[DENY], X-ShopId=[23393521], X-ShardId=[58], X-Stats-UserId=[], X-Stats-ApiClientId=[2839303], X-Stats-ApiPermissionId=[104713420859],X-Request-Id=[9c5c985d-0350-46f9-8cf7-c65a6402b9c6], X-Shopify-Stage=[production], Content-Security-Policy=....

 

AiHello.com: Smart Fulfillment for your ecommerce platform.
0 Likes
Excursionist
27 1 0

@Zameer 

 

Can you please look into this issue? I tried all routes and it seems impossible to close the order after the fulfillments are all processed.

Maybe there is something I am missing?

AiHello.com: Smart Fulfillment for your ecommerce platform.
0 Likes
Highlighted
Shopify Staff
Shopify Staff
297 32 61

Hey Ganesh,

 

Sorry for the hold-up, I've been out of the office and unfortunately can't find that Request Id in our logs anymore. 

 

Do you have a more recent example? I'll dig in to see if we can find a solution.

0 Likes
Excursionist
27 1 0

@Zameer 

 

We figured this out (I think). What I assume is that if all order line items are fulfilled then Shopify automatically "closes" the order which displays as "archived" on admin UI. I could not find any documentation validating my hypothesis so please let me know if this is correct.

 

Then, I assume that we get an error if we try to close an "archived" order.

 

 

 

AiHello.com: Smart Fulfillment for your ecommerce platform.
0 Likes