HTS Classification API for ERP Integration: SAP, Oracle, and NetSuite
What changed: Removed unshipped future-tariff calculation claims from API-versus-app explanations and synchronized translations.
An HTS classification API for ERP integration works by accepting product master data from SAP, Oracle, or NetSuite via REST endpoints, running classification logic against the USITC Harmonized Tariff Schedule, and writing the resulting HTS code, duty rate, and reasoning documentation back to ERP fields automatically. The API eliminates manual re-keying between classification tools and enterprise systems.
In this post
- Which ERP systems support HTS classification API integration?
- Why ERP Systems Need an External Classification API
- How the Integration Architecture Works: ERP to API to ERP
- Classification API SAP: Connecting to SAP GTS
- HTS Oracle Integration: Working with Oracle GTM
- NetSuite HTS Classification: Building Custom Integration
- How to Handle Errors, Fallbacks, and Reclassification Triggers
- Frequently Asked Questions
- Build Your ERP Classification Integration
- References
Consider AI integration beyond legacy global trade management when the ERP stores codes but does not supply the current reasoning behind them.
Which ERP systems support HTS classification API integration?
Any ERP system that supports outbound HTTP calls or middleware connections can integrate with an HTS classification API. SAP S/4HANA connects through SAP CPI or RFC/BAPI calls to populate GTS commodity codes. Oracle ERP Cloud uses Oracle Integration Cloud REST adapters to feed GTM. NetSuite uses SuiteScript 2.0 or RESTlets. GingerControl's Classification + Tariff Calculation API works with all three through standard JSON over HTTPS; there are no pre-built connectors.
Connecting an HTS classification API to your ERP eliminates the manual process of copying tariff codes between standalone classification tools and product master records, a workflow that introduces transcription errors and breaks audit trails at scale. SAP GTS, Oracle GTM, and NetSuite each store tariff codes as static fields but lack the GRI reasoning logic to generate them. An external classification API fills this gap by accepting product data, applying structured legal reasoning, and returning audit-ready results. GingerControl's Classification + Tariff Calculation API returns a 10-digit HTS code and its U.S. duty layers as JSON, 120 items per call by default; for one product at a time, the Classification Researcher in the GingerLite app asks clarifying questions rather than guessing, and GingerOS does the same across a catalog.
Evaluate the automated HS classification API at catalog scale against the data quality, volume and documentation your catalog actually requires.
Why ERP Systems Need an External Classification API
SAP, Oracle, and NetSuite collectively serve over 60% of the global enterprise ERP market. These platforms are the system of record for product data, purchase orders, and supplier records, the same data that drives customs classification decisions. Yet none of them can classify products on their own.
SAP Global Trade Services (GTS) manages customs declarations, license determination, and compliance screening, but it relies on externally populated commodity codes in the material master's Foreign Trade tab. Oracle GTM provides compliance workflow management and integrates with Oracle E-Business Suite and Cloud SCM for screening and filing, but classification data must come from an external source. NetSuite stores HTS codes in the Manufacturer Tariff field but offers no classification logic whatsoever.
This creates a structural gap. Product data lives in the ERP. Classification logic lives outside it. Without an API bridge, compliance analysts resort to exporting product lists, classifying in standalone tools, and manually re-entering 10-digit HTS codes back into the ERP. Industry data indicates that misclassification accounts for 42% of all CBP customs penalties, making it the single most common compliance failure category. Much of that risk originates from manual data re-entry between disconnected systems.
"The ultimate responsibility for classification rests with the importer. Customs expects that the importer will exercise reasonable care in classifying merchandise." , CBP Informed Compliance Publication on Classification
When I designed GingerControl's classification API, the core requirement was simple: accept the same product fields an ERP already stores, and return results in a format an ERP can consume directly, with your own item_id on every result so each code maps back to its record.
How the Integration Architecture Works: ERP to API to ERP
The data flow for an HTS classification API ERP integration follows a consistent pattern regardless of platform. Understanding this architecture is essential before choosing an implementation approach.
Step 1: ERP triggers a classification request. When a product record is created or updated in the ERP, a trigger (SAP CPI iFlow, Oracle Integration Cloud flow, or NetSuite SuiteScript event) extracts product fields and sends them to the classification API.
Step 2: Classification API processes the request. The API receives a product description and its country of origin (put material, function and composition into the description) and returns the HTS code at the 10-digit level.
Step 3: Duty calculation runs against the classification result. The duty rate is calculated across the full tariff stack: base MFN rate, Section 301, Section 232 and other Chapter 99 lines. The API returns the layers in force when it is called; to price a selected supported entry date, use the Tariff Calculator.
Step 4: Results write back to the ERP. The API response, containing the HTS code and duty layers with your item_id, maps to ERP fields. The product master record is updated, and the response is stored as an audit attachment; in GingerOS, the reasoning and approval record is kept with each code.
Integration architecture in text form:
ERP Product Master Classification API Duty Calculation
(SAP / Oracle / NetSuite) (GingerControl) (Full Tariff Stack)
Product created/updated Receive product data
description ──────────► Apply GRI 1-6 logic ──► Base MFN rate
material ──────────► Check Section/Chapter Notes + Section 301
intended use ─────────► Reference CROSS rulings + Section 232
country of origin ────► Resolve divergence points + Chapter 99
Return HTS code
│
▼
API Response (JSON)
- hts_code (10-digit)
- duty_rate_breakdown
- item_id
- classification_date
│
▼
ERP Product Master Updated
- HTS code field populated
- Duty rate field populated
- Response stored as attachment
- Audit log entry created
GingerControl's HTS Classification Researcher follows GRI logic and asks clarifying questions before assigning a classification, producing audit-ready reports grounded in Section Notes, Chapter Notes, and relevant cross rulings. The API returns structured JSON that maps to ERP fields without proprietary adapters.
Classification API SAP: Connecting to SAP GTS
SAP GTS is the most widely deployed trade compliance module among large importers. It handles customs declarations, license management, and compliance screening, but it expects commodity codes to be populated externally. The integration target is the material master's STAWN field (commodity code) on the Foreign Trade tab.
SAP field mapping for classification API requests:
| SAP Field (MAKT/MARA/MARC) | Maps To | API Request Field |
|---|---|---|
| MAKTX (Material description) | Product description | description |
| WRKST (Basic material) | Material composition | added to description |
| MATKL (Material group) | Product category | added to description |
| HERKL (Country of origin) | Origin country | country_of_origin |
| MEINS (Base unit of measure) | Unit context | added to description |
Integration mechanism: SAP Cloud Platform Integration (CPI) creates an iFlow triggered by material master changes. The iFlow extracts SAP fields, constructs a REST API request to the classification endpoint, processes the JSON response, and writes the HTS code to the STAWN field, and stores the response with its item_id and X-Request-Id as the audit link between the product record and the classification.
For enterprise SAP environments with thousands of material records, GingerControl's batch endpoint takes 120 items per call by default, sized to your throughput, and returns results in your item_id order, so CPI can loop through the catalog and write each batch back to the material master.
HTS Oracle Integration: Working with Oracle GTM
Oracle Global Trade Management provides compliance workflow management, denied party screening, and customs documentation preparation. Oracle GTM uses machine learning for product classification but still benefits from purpose-built classification APIs that encode the full GRI legal reasoning framework.
Integration mechanism: Oracle Integration Cloud (OIC) builds a flow triggered by item master changes. Oracle's REST adapter makes direct API calls straightforward, mapping item attributes to classification request fields and writing results back to trade compliance attributes. The API takes synchronous calls, one item or a batch of up to 120 by default; its manual documents no webhooks.
| Integration Approach | Best For | Implementation Time (our estimate for your team's build) |
|---|---|---|
| GingerControl REST API + Oracle OIC | Teams with existing OIC investment | 2-3 weeks |
| GingerControl REST API + custom PL/SQL | Teams with Oracle development resources | 3-5 weeks |
| GingerControl REST API + middleware (MuleSoft/Boomi) | Teams using third-party iPaaS | 2-4 weeks |
Bottom line: Oracle GTM handles compliance workflow management well but depends on externally sourced classification data. GingerControl's API fills this gap with GRI-logic-driven classification, including the full tariff stack calculation that Oracle GTM does not provide natively.
NetSuite HTS Classification: Building Custom Integration
NetSuite does not include a native trade compliance module, which makes it both the simplest and most flexible platform for classification API integration. You create custom fields on the item record for HTS code, duty rate, classification date, and reasoning reference, then use SuiteScript 2.0 to trigger classification.
NetSuite custom fields to create:
| Custom Field ID | Label | Type | Purpose |
|---|---|---|---|
| custitem_hts_code | HTS Code | Free-Form Text | 10-digit HTS classification |
| custitem_duty_rate | Duty Rate | Percent | Total applicable duty rate |
| custitem_classification_date | Classification Date | Date | Timestamp of last classification |
| custitem_reasoning_ref | Classification Report | URL | Link to stored reasoning document |
SuiteScript 2.0 integration pattern: A User Event script fires on the afterSubmit event when an item record is created or updated. The script extracts the item description, material, and country of origin, sends a REST request to the classification API, and writes the results back to the custom fields using record.submitFields().
For NetSuite tariff management, the classification API provides the upstream data that NetSuite's built-in tariff fields cannot generate on their own. GingerControl's Tariff Calculator covers the full U.S. tariff stack, including base duty, Section 232, Section 301 and other Chapter 99 lines (Section 122 for entries in its window), and the API returns the duty layers alongside the HTS code.
How to Handle Errors, Fallbacks, and Reclassification Triggers
Production integrations must account for scenarios where classification cannot be completed automatically. Three failure modes come up most often.
Results that need a person. The API returns a code and its duty layers, and its manual documents no confidence score, so decide which items always go to review (new product families, composite goods, high-duty lines) and route those to a compliance review queue. GingerOS handles this for you: it records the reasoning for each code and writes back only what a person approves.
Ambiguity requiring clarification. The API classifies from the description it receives, so put material, function and composition into the description from the start. When facts are still missing, GingerOS asks for them before it suggests a code, and the Classification Researcher in the GingerLite app does the same for a single product.
Reclassification triggers. HTS codes are not static. The USITC revises the Harmonized Tariff Schedule periodically, and tariff program changes (Section 301 modifications, Chapter 99 additions) can alter applicable duty rates without changing the HTS code itself. Build a scheduled reclassification job that re-submits existing product records to the classification API on a quarterly basis, or when tariff policy changes trigger alerts. GingerControl's free Policy Briefings email you when a U.S. trade rule changes, and GingerOS checks every SKU against a new rule.
Audit trail continuity. Every classification event, whether initial, reclassification, or human override, must be logged with timestamps, input data, API response, and reviewer identity. This documentation directly supports the reasonable care standard under 19 USC 1484. During a CBP Focused Assessment, auditors will evaluate whether your classification process is systematic and documented, not just whether individual codes are correct.
As of March 2026, CBP's modernized ACE portal can calculate and estimate import duties on entries with multiple HTSUS codes, making accurate, API-sourced classification data even more critical for downstream filing accuracy.
Frequently Asked Questions
How does an HTS classification API for ERP differ from a standalone classification tool?
A standalone classification tool requires manual data entry and manual transfer of results back to the ERP. An HTS classification API for ERP eliminates both steps by accepting product data programmatically and returning structured results that write directly to ERP fields. GingerControl's REST API returns JSON with the HTS code and its duty layers, mapped back to your records by item_id and ready for SAP, Oracle, or NetSuite fields without manual intervention.
Can I integrate a classification API with SAP GTS without custom ABAP development?
Yes. SAP Cloud Platform Integration (CPI) provides pre-built REST connectors that call external APIs and map responses to SAP fields without ABAP code. GingerControl's classification API SAP integration uses standard JSON over HTTPS, which CPI handles natively. For teams without CPI, middleware platforms like MuleSoft and Boomi also offer SAP-certified connectors that work with GingerControl's endpoints.
What data does the API need from my ERP to classify a product?
At minimum, a product description and country of origin. Richer inputs improve accuracy: material composition, intended use, functional specifications, and product category all help resolve classification ambiguity. Put them into the description: the API classifies from what it receives, and in GingerOS, missing facts are asked for before a code is suggested.
How does HTS Oracle integration handle duty rate calculations alongside classification?
Oracle GTM manages compliance workflows but does not calculate the full U.S. tariff stack. GingerControl's API returns both the HTS code and the complete duty breakdown, including the general and special rates, Section 301, Section 232 and other Chapter 99 lines in force when it is called, in a single response. This lets Oracle ERP teams populate both classification and duty fields in one API call instead of maintaining separate rate tables.
Is NetSuite HTS classification possible without a native trade compliance module?
Yes. NetSuite's flexibility through custom fields and SuiteScript 2.0 makes it well-suited for classification API integration. GingerControl's API connects to NetSuite through SuiteScript User Event scripts or RESTlets, populating custom HTS code, duty rate, and classification date fields on item records. The absence of a native module actually simplifies integration because there is no existing compliance workflow to conflict with.
How does the API maintain audit trails that satisfy CBP reasonable care requirements?
In GingerOS, every code is stored with its reasoning: GRI rules applied, Section and Chapter Notes referenced, CROSS rulings cited, and the staged determination at the 4-digit through 10-digit HTS level; the API alone returns the code and its duty layers. When stored alongside ERP product records as attachments or in a linked audit table, this documentation directly supports the reasonable care standard under 19 USC 1484, providing exactly the evidence CBP auditors evaluate during Focused Assessments.
How long does a typical ERP customs classification API integration take?
By our estimate, a middleware-based integration (MuleSoft, Boomi, or native ERP iPaaS) takes 2-4 weeks from discovery to production, and a direct API integration with custom connectors 4-8 weeks depending on ERP complexity; GingerControl publishes no integration timeline for the API. GingerControl provides the API manual and sample payloads. If you would rather not build and maintain the integration yourself, GingerOS is set up per project instead, typically 8 to 16 weeks from first call to go-live, including batch classification of the existing catalog.
Use trade compliance API integration from pilot to production to plan authentication, data mapping, error handling and production monitoring together.
Build Your ERP Classification Integration
Manual re-keying of HTS codes between classification tools and ERP systems is a compliance liability that produces transcription errors, breaks audit trails, and consumes analyst hours that should go toward strategic work. An API-based integration eliminates this gap by triggering classification automatically when products change and writing audit-ready results directly to ERP records.
GingerControl's Classification + Tariff Calculation API works with SAP, Oracle, NetSuite and any system that makes outbound HTTPS calls, 120 items per call by default; it is for enterprise systems and starts with a call. If you would rather not build the connector, GingerOS is set up per project, read-only, with write-back to your ERP only where you approve.
GingerControl builds GingerOS, the AI trade compliance platform that runs on your process and the data you have, ERP or not. A project starts with Prototype Week, the step before a quote. Talk to our integration team
References
- U.S. Customs and Border Protection, Informed Compliance Publications on Classification
Data cited: "The ultimate responsibility for classification rests with the importer. Customs expects that the importer will exercise reasonable care in classifying merchandise."
Source: CBP Informed Compliance Publications - 19 USC 1484, Entry of Merchandise, Reasonable Care Standard
Data cited: Importer's obligation to exercise reasonable care in classification decisions
Source: 19 USC 1484 - USITC Harmonized Tariff Schedule, Official HTS data in API, CSV, Excel, and JSON formats
Data cited: HTS schedule access, periodic revisions, electronic data formats
Source: USITC HTS - SAP Global Trade Services Documentation, Product Classification and Commodity Codes
Data cited: SAP GTS commodity code management, material master Foreign Trade tab integration
Source: SAP GTS Product Classification - SAP S/4HANA Integration with Global Trade Services
Data cited: Integration patterns for SAP S/4HANA and GTS
Source: SAP S/4HANA GTS Integration - Oracle Global Trade Management Cloud
Data cited: Oracle GTM compliance workflow management, ERP integration, ML-assisted classification
Source: Oracle GTM - NetSuite Applications Suite, Manufacturer Tariff and Commodity Code Fields
Data cited: NetSuite HTS code storage in Manufacturer Tariff field
Source: NetSuite Commodity Code Documentation - CBP Focused Assessment Program
Data cited: CBP's risk-based audit methodology evaluating importer compliance practices
Source: CBP Focused Assessment - CBP ACE Portal Modernization (February 2025)
Data cited: ACE portal migration completed; March 2026 enhancement for multi-HTSUS duty calculation
Source: ACE Portal Modernization - Descartes CustomsInfo, Trade Content APIs for ERP Integration
Data cited: Misclassification accounts for 42% of all CBP customs penalties
Source: Trade Content APIs - NetSuite Tariff Configuration for Administrators
Data cited: NetSuite tariff management configuration and custom field setup
Source: NetSuite Tariff Management
Classifying SKUs one ruling at a time?
Hand this to GingerOS.
Pick a 30-minute slot on the next page with Chen Cui, our CEO. Bring one notice or one SKU list (an ERP export, a spreadsheet or an email will do) and see what GingerOS does with it.
Reviewed by Michael Weick, LCB / CCS




