HTS Classification API for ERP Integration: SAP, Oracle, and NetSuite

I built HTS classification APIs that connect to SAP GTS, Oracle GTM, and NetSuite. Here is the integration architecture that eliminates manual re-keying.

Chen Cui
Chen Cui14 min read

Co-Founder of GingerControl, Building scalable AI and automated workflows for trade compliance teams.

Connect with me on LinkedIn! I want to help you :)

How does an HTS classification API connect to an ERP system?

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.

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 API supports all three platforms with standard JSON request/response patterns.


TL;DR: 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 HTS Classification Researcher provides REST API endpoints that map directly to ERP field structures, with batch processing for catalog-scale operations and iterative classification that asks clarifying questions rather than guessing, a fundamentally different approach from single-shot keyword matching tools.

Last updated: April 2026


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 single source of truth 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, return results in a format an ERP can consume directly, and include the full reasoning chain so the audit trail is never broken.


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 product description, material composition, intended use, and country of origin. It applies GRI logic, references Section and Chapter Notes, checks CROSS ruling precedent, and determines the correct 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, Chapter 99, and Section 122 reciprocal tariffs. This calculation is date-sensitive, as the applicable rates depend on the entry date.

Step 4: Results write back to the ERP. The API response, containing the HTS code, duty rate breakdown, reasoning chain, and CROSS ruling citations, maps to ERP fields. The product master record is updated, and the full response is stored as an audit attachment.

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              + Section 122
                                    │
                                    ▼
                            API Response (JSON)
                            - hts_code (10-digit)
                            - duty_rate_breakdown
                            - reasoning_chain
                            - cross_ruling_citations
                            - classification_date
                                    │
                                    ▼
                            ERP Product Master Updated
                            - HTS code field populated
                            - Duty rate field populated
                            - Reasoning 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 (MARA/MAKT) Maps To API Request Field
MAKTX (Material description) Product description product_description
WRKST (Basic material) Material composition material_composition
MATKL (Material group) Product category product_category
REGIO (Country of origin) Origin country country_of_origin
MEINS (Base unit of measure) Unit context unit_of_measure

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. The full reasoning chain is stored in the GTS classification log, giving auditors a direct link between the product record and the classification decision.

For enterprise SAP environments with thousands of material records, GingerControl's batch endpoint processes catalog-scale classification in parallel. The webhook callback notifies SAP CPI when the batch completes, triggering an automated import into 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 integration supports both synchronous calls for individual items and asynchronous batch patterns using webhooks.

Integration Approach Best For Implementation Time
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, Chapter 99, and Section 122 reciprocal tariffs, returning a complete duty breakdown alongside the HTS code.


How to Handle Errors, Fallbacks, and Reclassification Triggers

Production integrations must account for scenarios where classification cannot be completed automatically. In testing GingerControl's API across enterprise deployments, I have found that three failure modes account for over 90% of integration issues.

Low-confidence classifications. The API returns a confidence indicator with every result. Set a threshold in your integration logic. Classifications above the threshold write directly to the ERP. Classifications below route to a compliance review queue with the candidate codes and reasoning chain attached, so analysts have full context for their decision.

Ambiguity requiring clarification. GingerControl's iterative classification surfaces multiple candidate HTS codes and identifies divergence points between them. When the API indicates that additional product information would resolve ambiguity, the integration can auto-resolve from supplementary ERP fields (material composition, functional specifications) or route clarifying questions to a compliance analyst through an ERP workflow task.

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 Tariff Briefing tracks daily policy changes that affect stored classifications.

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, duty rate breakdown, and full GRI reasoning chain, all mappable to 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. GingerControl's iterative approach identifies when additional data would resolve divergence between candidate HTS codes, and the API can request supplementary fields from the ERP automatically rather than defaulting to a best guess.

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 base MFN rate, Section 301, Section 232, Chapter 99, and Section 122 reciprocal tariffs, 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?

GingerControl's API responses include the complete reasoning chain: GRI rules applied, Section and Chapter Notes referenced, CROSS rulings cited, and the staged determination at the 4-digit through 10-digit HTS level. 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?

A middleware-based integration (MuleSoft, Boomi, or native ERP iPaaS) typically takes 2-4 weeks from discovery to production. Direct API integrations with custom connectors take 4-8 weeks depending on ERP complexity. GingerControl provides API documentation, sample payloads, and integration consulting through our AI System Build service to accelerate both approaches, including batch migration of existing product catalogs.


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 HTS Classification Researcher connects to SAP, Oracle, NetSuite, and any ERP with standard REST endpoints. Batch processing handles catalog migration, webhook callbacks support asynchronous workflows, and every response includes the full reasoning chain for CBP audit readiness. Start classifying products to validate accuracy against your catalog.

GingerControl is not just a tool, we work with importers and trade compliance teams on process consulting, digital transformation strategy, and end-to-end custom system development. Talk to our integration team


References

[REF 1] 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

[REF 2] 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

[REF 3] 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

[REF 4] 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

[REF 5] SAP S/4HANA Integration with Global Trade Services Data cited: Integration patterns for SAP S/4HANA and GTS Source: SAP S/4HANA GTS Integration

[REF 6] Oracle Global Trade Management Cloud Data cited: Oracle GTM compliance workflow management, ERP integration, ML-assisted classification Source: Oracle GTM

[REF 7] NetSuite Applications Suite, Manufacturer Tariff and Commodity Code Fields Data cited: NetSuite HTS code storage in Manufacturer Tariff field Source: NetSuite Commodity Code Documentation

[REF 8] CBP Focused Assessment Program Data cited: CBP's risk-based audit methodology evaluating importer compliance practices Source: CBP Focused Assessment

[REF 9] CBP ACE Portal Modernization (February 2025) Data cited: ACE portal migration completed; March 2026 enhancement for multi-HTSUS duty calculation Source: ACE Portal Modernization

[REF 10] Descartes CustomsInfo, Trade Content APIs for ERP Integration Data cited: Misclassification accounts for 42% of all CBP customs penalties Source: Trade Content APIs

[REF 11] NetSuite Tariff Configuration for Administrators Data cited: NetSuite tariff management configuration and custom field setup Source: NetSuite Tariff Management

Chen Cui

Written by

Chen Cui

Co-Founder of GingerControl

Building scalable AI and automated workflows for trade compliance teams.

LinkedIn Profile

You may also like these

Related Post

We use cookies to understand how visitors interact with our site. No personal data is shared with advertisers.