Add Variant HS Tariff Codes to REST API

Solved
Highlighted

Hey Shopify team,

 

Currently the "HS Tariff Codes" property assigned to a Variant, are not available when using the REST API. I can see that it is available on the GraphQL API, but my use case requires use of the REST API.

 

Can you please add the property to the REST API too, so we can get that important info.

 

For reference, it's called "harmonisedSystemCode" on the GraphQL API: https://help.shopify.com/en/api/graphql-admin-api/reference/object/productvariant#harmonizedsystemco...

 

Thanks for your consideration!

 

Ps. Bonus points if we can also get the "Country of origin" property of Variants exposed on the APIs too :)

 

Bjorn

Bjorn Forsberg | FORSBERG+two | Award-winning Shopify Apps since 2011
2 Likes
Shopify Partner
4 0 2

"country_code_of_origin", "province_code_of_origin", "harmonized_system_code" & "country_harmonized_system_codes" are attached to inventory items in the REST API, if that helps.

1 Like

Thanks, but that's a lot more API calls needed for something that "should" be the same on all inventory items (same SKU).

Bjorn Forsberg | FORSBERG+two | Award-winning Shopify Apps since 2011
1 Like

Success.

Pathfinder
131 4 25

It looks like they pushed an update on Feb. 15 to include the HS code and Country Code of Origin to the InventoryItem endpoint: https://developers.shopify.com/changelog/the-inventoryitem-resource-now-includes-hs-codes-country-co...

 

The HS Tariff code is also currently available in the Product Variant Metafield under the key "harmonized_system_code" but it looks like it will be deprecated in the next few months.

1 Like
Shopify Partner
4 0 2

@Bjorn_Forsberg_ wrote:

Thanks, but that's a lot more API calls needed for something that "should" be the same on all inventory items (same SKU).



Agreed. It's the same approach Shopify took a while ago with "cost per item", turning it into a `cost` field on InventoryItem rather than attaching it to Variant directly. Since Variant & InventoryItem have a 1:1 relationship, splitting information like that does not seem to offer any benefit but comes with the cost of having to make additional API calls to get all the data.

 

Perhaps someone from Shopify can explain the rationale behind this?

0 Likes

@Jonathan-HA Ah, thanks for the heads up.. didn't spot that one :)

Bjorn Forsberg | FORSBERG+two | Award-winning Shopify Apps since 2011
0 Likes

Success.

@Nik_Avvakumov Yeah, seems unnecessary.. BUT the more I think about it the more it makes sense. Depending on the Location of the goods, they may have been manufactured at a different factory.. and have different cost base due to import duties, different taxes etc.

 

For example: Tesla are setting up manufacturing in China, they also manufacture in California. If you buy a Tesla in China, it will eventually have the Country of Origin as China, as it will be cheaper to sell you one that was made locally. The cost on that Tesla will be different to one manufactured in California, hence it makes sense to have those details attached to each Inventory Item (which is linked to a location), instead of the overall Variant.

 

Guess I'll just have to either skip supporting that info, or make more API calls.. sigh 😬

Bjorn Forsberg | FORSBERG+two | Award-winning Shopify Apps since 2011
0 Likes