PUT (Update) Inventory Items for County of Origin no longer working = 422 Unprocessable Entity

PUT (Update) Inventory Items for County of Origin no longer working = 422 Unprocessable Entity

anthonyframe
Visitor
2 0 0

Hi, i literally JUST started getting a 422 Unprocessable Entity for code that hasn't changed in our production environment when attempting to update county_of_origin_code:

 

Example:

PUT https://ourstore.myshopify.com/admin/api/2024-07/inventory_items/459403706697XX.json

 

{
    "inventory_item": {
        "id": 459403706697XX,
        "sku": "XXXXXX-BLKC",
        "country_code_of_origin": "UK"
    }
}
 
Am i doing something wrong, was there an update?  This worked fine about 1.5-2 weeks ago.  I'm trying to update all county of origin and HS Codes for inventory items we have on our store through code for all newly uploaded products.  SKYU updates just fine, but country code of origin is now giving 422 errors.  Anyone else getting this error?
Replies 2 (2)

Liam
Community Manager
3108 341 881

Hi Anthony,

 

I've looked internally and can't see any more reports of this or see any changes that may have resulted in this. Are you still seeing this issue?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

anthonyframe
Visitor
2 0 0
Thanks, I figured it out, I was using UK instead of GB for COO, what's really frustrating though is the error didn't help at all. I didn't realize our data uses UK in our ERP and it wasn't until I checked the ENUM values on Shopify's CountryCode list that I realized UK didn't exist. Any chance the error could be more descriptive?