🎉 30 days FREE!Claim Now

· MicroPIM Team · PIM Fundamentals  · 15 min read

HS Codes and Country Codes in E-commerce: What They Are, When You Need Them, and How MicroPIM Helps

A single trouser style in seven sizes shipping to four markets can need dozens of separate HS code and country-of-origin entries. Here is what these fields actually are, where Shopify buries them, and how to stop tracking them by hand.

Two fields tucked away in a collapsed Shopify panel decide whether your shipment clears customs smoothly or sits in a bonded warehouse while your ops team fields a call from a broker. An HS code and a country of origin look like small, boring text fields. At scale, across sizes and destination markets, they multiply into one of the least visible but most consequential data problems a cross-border catalog has to solve.


AEO answer: An HS (Harmonized System) code is a product classification number, standardized to six digits globally by the World Customs Organization, that customs authorities use to apply duties and screen shipments; individual countries then extend it to eight digits (EU Combined Nomenclature) or ten digits (US Harmonized Tariff Schedule) for their own tariff schedules. Country code here means country of origin, an ISO 3166-1 alpha-2 code for where the item was made, which is independent of the warehouse it ships from. In Shopify both are variant-level fields under Shipping > More details, so one style with several sizes and several destination markets can require dozens of individual entries.


What an HS Code Actually Is

The Harmonized System is a nomenclature maintained by the World Customs Organization, whose HS Committee governs how goods are coded for customs worldwide. It groups trade into roughly 1,200 headings across 96 chapters, with over 5,600 groups of goods at the six-digit level, so a customs officer in Rotterdam and one in Los Angeles describe the same product the same way.

The six digits break into three segments: digits 1–2 give the chapter, the broad category; digits 3–4 give the heading, its position within it; digits 5–6 give the subheading, the specific refinement.

Take the trousers, cotton style APH8122SNE-30, classified under 6203.42. Chapter 62 covers non-knitted apparel; heading 6203 narrows that to men’s or boys’ trousers; subheading 6203.42 narrows further to trousers, of cotton. Three pairs of digits, three decisions, one code.

Six digits is where global agreement stops. Every participating country bolts its own extension onto those digits for its own tariff schedule.

LevelDigitsGoverned byUsed for
HS (global)6World Customs OrganizationUniversal classification, the language every country builds on
EU Combined Nomenclature8European CommissionEU customs duty rates and trade statistics
US Harmonized Tariff Schedule10U.S. International Trade CommissionUS duty rates; last two digits are a statistical suffix
UK commodity code10HMRC (UK Trade Tariff)UK duty rate, VAT treatment, and trade controls

6203.42 is the shared root across all four rows. What sits after it is where the EU, US, and UK go their own way, the seed of the “one SKU, many codes” problem covered later.

The nomenclature is not frozen, either. The WCO’s own guidance states the Harmonized System “is only amended every 5 years,” a slow cadence allowing time for deliberation, trade consultation, translation, and national legislative process. A code accurate today can, on that cycle, need revisiting, because the classification system changed underneath it.

What “Country Code” Means Here

“Country code” is one of the more overloaded terms in e-commerce data. In a customs context it means country of origin: an ISO 3166-1 alpha-2 code, the same two-letter family used for internet domains, identifying where a product was manufactured or substantially transformed. For the trousers, that code is TR, for Türkiye.

It is easy to conflate this with ISO 4217, the standard behind currency codes like USD and GBP, which shares the same two-letter root for many codes. They are not interchangeable: one answers “what currency is this price in,” the other “where was this made.” A catalog that enters a currency code where an origin code belongs will fail validation, or pass silently with the wrong value.

Country of origin is also not the same as a shipping or warehouse address, a mix-up common enough to earn its own section below.

Three Identifiers, Three Purposes: SKU vs GTIN vs HS Code

A catalog can look fully populated and still be missing the fields a cross-border shipment actually needs. That gap is easiest to see in a real screenshot.

The SKU field reads LMH870WINE-30, filled in and consistent. Right next to it, the Barcode (ISBN, UPC, GTIN, etc.) field sits empty. Nothing looks broken, but that empty field previews the same gap customs data suffers from, and it is worth being clear why three “product identifier” fields serve three unrelated purposes:

  • SKU is internal, and means nothing outside your own systems.
  • GTIN (EAN, UPC, ISBN) is external product identity: how Google Merchant Center, Amazon, and marketplaces recognize a product independent of who sells it.
  • HS code plus country of origin is external regulatory classification: how customs decides what duty applies and whether a shipment needs closer screening.

A clean set of SKUs says nothing about whether the GTIN or customs fields are filled in; they are three separate systems layered on one variant. The GTIN gap has its own failure mode once a feed reaches Google or Meta; see why missing product data quietly demotes listings on Shopify, Google, and Meta. This article covers the layer that does not throttle ad visibility, it stops a box at a border.

Why Both Fields Matter for Cross-Border Selling

An HS code and a country of origin are not paperwork for its own sake. Three things depend on them.

Duty calculation. Customs uses the HS code, refined by each country’s extension, to look up the duty rate. A wrong code means a wrong duty, usually not in the shipment’s favor.

Restricted-goods screening. Certain classifications trigger extra scrutiny depending on destination and origin together. A correct code helps avoid an unneeded review.

DDP versus DDU checkout accuracy. A storefront promising delivered-duty-paid pricing has to match what customs assesses at the border, which depends on these two fields. For the platform-side duty display, see Shopify Markets and selling across multiple countries; this article covers the catalog data feeding it.

Get either field wrong, or leave it blank, and the problem does not stay on a shipping label: it surfaces as an inaccurate checkout price, a held package, or a compliance question support cannot answer.

Where These Fields Live in Shopify

Open the trousers variant in Shopify admin and these fields are not on the main product form. They sit inside the Shipping card, under a collapsed More details section most merchants never click open.

Shopify variant Shipping panel with Country code of origin set to Türkiye and Harmonized System (HS) code 6203.42, with the code lookup dropdown open

Expand that section on the pictured variant and you see Country code of origin set to Türkiye, and Harmonized System (HS) code set to 6203.42, with the typeahead open showing the match: “6203.42 - Men’s or boys’ suits, ensembles, jackets, blazers, trousers, bib and brace overalls, breeches and shorts (other than swimwear).; Trousers, bib and brace overalls, breeches and shorts; Of cotton.” The screen also shows the seven-size variant list and the two warehouse rows: Poland (Warsaw) and Berlin (WS Warehouse).

Three things stand out here, explaining most of the operational pain this article exists to solve:

  1. These are variant-level fields, not product-level. Shopify does not let you set an HS code once for every size; each variant carries its own value, inside a panel collapsed by default.
  2. Country of origin is independent of fulfillment location. The trousers were made in Türkiye; they ship from Berlin or Warsaw depending on stock. The origin field stays TR either way, since it describes manufacturing, not logistics. Merchants routinely set it to match the warehouse country instead, which is wrong.
  3. A seven-size run means seven manual entries of the same code. Same style, fabric, and origin, still seven distinct variant records; nothing propagates automatically.

That third point is the real workload, and it gets worse once destination markets stack on top of size variants.

One SKU, Many Destination Codes: The Real Data Model

The six-digit HS code is global; the extensions are not. Once destination-specific digits enter the picture, a single SKU can legitimately need several full codes depending on where an order is headed, which is what Shopify’s own Add HS codes by country/region feature handles.

Shopify "Add HS codes by country/region" modal with a default HS code row and a Türkiye-specific row, both 6203.42

The modal sets a default code, then lets you add country- or region-specific rows on top, each with its own code and a ”+ Add country/region” control. In the screenshot, the default row and a Türkiye-specific row both read 6203.42, since here the base classification does not diverge by market. That sameness is the point: the mechanism exists to let codes differ by destination, whether or not a product actually needs it to.

The table below illustrates how entries multiply across a size run and a few destinations. It is not a claim that these trousers require different codes per market, and it is not a lookup table: never copy a tariff code out of a blog post, this one included. It is a picture of the volume problem once a style has real size and market breadth.

The codes below are shown as structure, not as classifications to copy. The six-digit root is shared; what each destination appends is theirs to define, and only that destination’s official tariff can tell you the digits that belong in place of the xs.

Size variantEU (8-digit CN)UK (10-digit)US (10-digit HTS)Switzerland (8-digit)
316203.42.xx6203.42.xxxx6203.42.xxxx6203.42.xx
326203.42.xx6203.42.xxxx6203.42.xxxx6203.42.xx
336203.42.xx6203.42.xxxx6203.42.xxxx6203.42.xx
346203.42.xx6203.42.xxxx6203.42.xxxx6203.42.xx
366203.42.xx6203.42.xxxx6203.42.xxxx6203.42.xx
386203.42.xx6203.42.xxxx6203.42.xxxx6203.42.xx
406203.42.xx6203.42.xxxx6203.42.xxxx6203.42.xx

Seven sizes across four destinations is 28 cells before origin is even factored in, and before a fifth market joins. Every cell is a place a stale, guessed, or missing value can sit unnoticed: not one field per SKU, but one field per SKU per destination. And every x above is a lookup somebody has to do once and record somewhere durable, because the person who did it will not remember it in six months and the next person will not know it was ever done.

When You Actually Need to Set These Fields

Short version: any time a shipment crosses a border, and increasingly before it even gets that far. Cross-border orders need an accurate HS code and origin for clearance. A DDP checkout needs both to quote duty correctly. Carriers building customs forms pull from these fields when present, or ask for them manually when not, and a growing number of feeds require the data as a condition of listing at all.

What changed in 2026 is that the thresholds below which this data used to be optional are shrinking. CBP indefinitely suspended the $800 US duty-free de minimis exemption for non-postal shipments, effective June 24, 2026, under an executive order continuing that suspension. In the EU, the €150 duty exemption for low-value consignments is being removed, accompanied by what the European Commission describes as “a simple, temporary solution for the calculation of customs duties in the interim period, until mid-2028,” when the EU Customs Data Hub is expected to take over duty calculation for e-commerce. The mechanics of that interim calculation are still settling, so confirm the current rule with your carrier or broker rather than budgeting against a number you read months earlier. Shipments that used to clear with minimal data now need accurate classification at a much lower value floor.

Compliance note: Classification is a legal determination made by the importer of record, not a data-entry convenience. Thresholds, required attributes, and enforcement vary by jurisdiction and change, as the 2026 US and EU examples show. Nothing here is customs or legal advice. Confirm current requirements and the correct classification with your customs broker or the relevant authority before relying on any code in production.

Common Mistakes That Cause Customs Delays

Most customs friction traces back to a handful of repeatable mistakes, not genuinely ambiguous classification calls.

MistakeConsequenceFix
Guessed a code instead of looking it upWrong duty, or shipment flagged for reviewLook up the code, don’t estimate from a similar product
Left origin as the fulfillment countryOrigin declared as Poland when made in TürkiyeSet origin to where the item was made, not the warehouse
Added a variant, never copied the codeNew size ships with a blank code and gets heldTreat code and origin as required in your new-variant checklist
Used a placeholder like “n/a”Passes text validation, fails at the borderEnforce real values before publish
Never revisited codes after a revisionA code accurate under the old edition is wrong under the new oneRe-check on the WCO’s revision cycle, not only at creation

Every one of these is a data-governance failure, not a classification-difficulty one. The mistakes happen at scale because no single place enforces that the field stays correct.

How MicroPIM Fits: Centralizing Compliance Data

None of the mistakes above are unique to Shopify or this one product. They happen when a compliance field lives in a spreadsheet column, a variant panel, and someone’s memory, with no single owner and no validation between them. A single source of truth for the catalog is the structural fix, and customs data is one of the clearest cases why.

In MicroPIM, the HS code has a dedicated Tariff / HS Code field, not a generic custom attribute, with a placeholder shaped like a real code (8504.40.90). Alongside it sits a country of origin field, validated as a two-letter ISO code: anything not exactly two letters is rejected, and entries normalize to upper case, so tr and TR become the same value. These sit next to other trade data the record holds: EU Intrastat commodity code, excise code, gross weight, volume, and a 13-digit-validated EAN, part of the product attributes and custom fields a cross-border catalog needs.

Because it is one centralized catalog, the verified code is reused everywhere instead of retyped per platform. A batch correction runs through bulk edit, and audit logging records who changed what and when.

Being direct about current limits matters too. MicroPIM’s customs fields are product level today, not variant level, so the seven-size example here would share one code across the style rather than per-size overrides. There is no per-destination-country override yet, the way Shopify’s “Add HS codes by country/region” modal provides; these fields are not part of the completeness score; and there is no AI or automatic HS classification. What it gives you is one authoritative, validated home for the code, pushed out consistently, a better starting point than a spreadsheet nobody owns. The variant and per-country granularity Shopify exposes is on the roadmap, not solved yet.

For the broader case on centralization, see PIM for e-commerce; for running this across countries and currencies, see the case study on an 11-market cross-border seller and managing inventory across multiple channels. For catalogs spanning languages too, variants and multilingual catalogs is the companion piece.

Frequently Asked Questions

What is an HS code and who assigns it?

A six-digit classification number maintained by the World Customs Organization through its HS Committee. Nobody assigns it for you: you, or your broker, match the product against the WCO’s chapters, headings, and subheadings, then your destination country extends it with national digits.

What’s the difference between an HS code and a country code in e-commerce?

An HS code classifies what the product is, for duty and screening. A country code here means country of origin: an ISO 3166-1 alpha-2 code for where the item was made. They live in separate fields; confusing origin with the similarly-named ISO 4217 currency codes is a common error.

Where do I enter the HS code and country of origin in Shopify?

On each variant’s Shipping section, under “More details.” Both are variant-level fields, not product-level, so a style with seven sizes needs the code entered seven times unless copied across deliberately.

Does the same HS code work for every country I ship to?

The six-digit base is global and does not change by destination. What changes is the extension: the EU’s 8-digit CN, the 10-digit US HTS, and the UK’s 10-digit commodity code build on those six digits with extra digits. The same SKU can carry a different full code per market.

What happens if I use the wrong HS code?

Consequences range from the wrong duty charged, breaking a DDP promise, to a shipment held for review, to penalties for repeated misclassification. Classification is a legal determination the importer of record is responsible for, so a guessed or copied code is a real liability.

Is country of origin the same as the warehouse my order ships from?

No. Country of origin is where the product was manufactured or substantially transformed; fulfillment location is simply which warehouse ships it. Trousers made in Türkiye keep Türkiye as their origin whether they ship from a Poland or Berlin warehouse.

Can MicroPIM automatically assign HS codes to my products?

No, not today. MicroPIM gives the HS code a dedicated, validated field, alongside country of origin, Intrastat commodity code, excise code, and other trade data, and pushes the value out consistently to every channel. It does not classify products with AI; that assistance is on the roadmap. What you get now is one accurate, audited home for the code instead of a spreadsheet column that drifts.


Stop re-typing the same HS code across sizes, channels, and spreadsheets. Start a free MicroPIM trial and give your catalog’s customs data one validated, centralized home instead of a dozen copies that quietly drift apart.

MicroPIM Team

Written by

MicroPIM Team

Founder MicroPIM

Entrepreneur and founder of MicroPIM, passionate about helping e-commerce businesses scale through smarter product data management.

"Your most unhappy customers are your greatest source of learning." — Bill Gates

Back to Blog

Related Posts

View All Posts »
Get Started Today

Start Using MicroPIM for Free

No credit card required. Free trial available for all Pro features.

Join other business owners who are using MicroPIM to automate their product management and grow their sales.

  • 14-day free trial for Pro features
  • No credit card required
  • Cancel anytime
SSL Secured
4.9/5 rating