{"info":{"_postman_id":"c4a05cbb-d988-4a0b-be0d-644e11332138","name":"CBP Duty Calculation API","description":"<html><head></head><body><h1 id=\"cbp-duty-calculation-api\">CBP Duty Calculation API</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>REST API for calculating US Customs and Border Protection (CBP) duties against the Harmonized Tariff Schedule of the United States (HTSUS).</p>\n<p>The authentication flow is OAuth 2.0 client-credentials. All requests require <code>Authorization: Bearer</code> .</p>\n<p>Three endpoints are exposed under <code>/api/v1</code>. See each operation's own description for its request/response contract and validation behavior.</p>\n<h2 id=\"hts-code-inputs\">HTS code inputs</h2>\n<p>Duties are calculated at the full <strong>10-digit</strong> statistical-suffix level. Every HTS code submitted as input — the calculation item's code, its component codes, and the lookup endpoint's code — must be a full 10-digit code, dotted (<code>6201.40.50.11</code>) or plain (<code>6201405011</code>). The single exception: an 8-digit tariff line is accepted for <strong>component-rated classifications</strong> (e.g. watches, <code>9101.11.40</code>), where the statistical suffixes identify the article's components rather than the article itself. A broader code is rejected with <code>V_TenDigitHtsCodeRequired</code>.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>OAuth 2.0 client-credentials flow. Token endpoint:</p>\n<ul>\n<li>Sandbox: <code>https://auth.dutycollection-sandbox.safepackage.com/realms/SafePackage/protocol/openid-connect/token</code></li>\n</ul>\n<p>Submit the resulting JWT as <code>Authorization: Bearer</code> on each request.</p>\n<h2 id=\"errors\">Errors</h2>\n<p>All <code>400 Bad Request</code> responses follow the shape <code>{ \"errors\": [{ \"fieldName\", \"rejectedValue\", \"code\", \"message\" }] }</code>. Codes are stable and prefixed <code>V_</code> for validation failures (e.g. <code>V_InvalidHtsCode</code>, <code>V_HtsCodeNotFound</code>, <code>V_TenDigitHtsCodeRequired</code>, <code>V_DeclaredValueRequired</code>, <code>V_QuantityRequired</code>, <code>V_MutuallyExclusiveProperties</code>, <code>V_MissingRequiredComponents</code>, <code>V_AluminumSmeltDataRequired</code>, <code>V_SteelMeltAndPourDataRequired</code>, <code>V_CountryNotFound</code>). <code>404 Not Found</code> is returned without a body for HTS lookups against unknown codes. <code>401 Unauthorized</code> is returned when the bearer token is missing or invalid, and <code>403 Forbidden</code> when the caller is not permitted to access the resource.</p>\n<h2 id=\"support\">Support</h2>\n<ul>\n<li><p>API access provisioning: <code>api-access@safepackage.com</code></p>\n</li>\n<li><p>Technical support: <code>support@safepackage.com</code></p>\n</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"CBP Duty Calculation API","slug":"cbp-duty-calculation-api"}],"owner":"48610445","collectionId":"c4a05cbb-d988-4a0b-be0d-644e11332138","publishedId":"2sBY4VHwHZ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"BA2D53"},"publishDate":"2026-08-04T22:29:05.000Z"},"item":[{"name":"Client Credentials Authentication","id":"661347c3-fe67-4cbd-a7a9-4e623be50c09","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"type":"text","key":"grant_type","value":"client_credentials"},{"type":"text","key":"client_id","value":"your_client_id"},{"type":"text","key":"client_secret","value":"your_client_secret"}]},"url":"https://auth.dutycollection-sandbox.safepackage.com/realms/SafePackage/protocol/openid-connect/token","auth":{"type":"oauth2","oauth2":{"basicConfig":[],"advancedConfig":[{"key":"accessTokenUrl","value":"<access-token-url>"},{"key":"grant_type","value":"<grant_type>"}]},"isInherited":true,"source":{"_postman_id":"c4a05cbb-d988-4a0b-be0d-644e11332138","id":"c4a05cbb-d988-4a0b-be0d-644e11332138","name":"CBP Duty Calculation API","type":"collection"}},"urlObject":{"host":["https://auth.dutycollection-sandbox.safepackage.com/realms/SafePackage/protocol/openid-connect/token"],"query":[],"variable":[]}},"response":[],"_postman_id":"661347c3-fe67-4cbd-a7a9-4e623be50c09"},{"name":"Calculate Duties","id":"2a6da45c-48ec-4633-b969-9efd35833729","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"entryDate\": \"2026-08-05\",\n  \"items\": [\n    {\n      \"htsCode\": \"6201.40.50.11\",\n      \"reference\": \"PO-12345\",\n      \"quantities\": [\n        { \"amount\": 25, \"unitOfMeasure\": \"Dozen\" },\n        { \"amount\": 120, \"unitOfMeasure\": \"Kg\" }\n      ],\n      \"totalDeclaredValue\": 25000.00,\n      \"countryOfOrigin\": \"CN\",\n      \"components\": []\n    }\n  ]\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://dutycalculation-sandbox.safepackage.com/api/v1/duties/calculate","description":"<h1 id=\"calculate-duties\">Calculate duties</h1>\n<p>Calculates the duty owed for each requested item, broken down by duty layer, plus the grand total across all items. All duty amounts leave the calculator rounded to whole cents (half away from zero); every aggregate is the exact sum of its rounded lines.</p>\n<h2 id=\"request-body\">Request body</h2>\n<ul>\n<li><p><strong>entryDate</strong> (string, conditionally required) — ISO 8601 date (<code>YYYY-MM-DD</code>) for the whole request; selects the tariff rows in effect. Falls back to each item's own deprecated <code>entryDate</code> when omitted; one of the two must be present or the request is rejected with <code>V_ValueEmpty</code>.</p>\n</li>\n<li><p><strong>items</strong> (array, required) — one or more product lines to calculate. Each item carries the fields below.</p>\n</li>\n<li><p><strong>items[].htsCode</strong> (string, required) — full 10-digit HTS tariff code, dotted (<code>6201.40.50.11</code>) or plain (<code>6201405011</code>). An 8-digit tariff line is accepted only for component-rated classifications (e.g. watches, <code>9101.11.40</code>); any other broader code returns <code>V_TenDigitHtsCodeRequired</code>.</p>\n</li>\n<li><p><strong>items[].reference</strong> (string, optional) — client correlation reference echoed back in the matching <code>itemCalculations[]</code> entry. If omitted, the server assigns a new GUID.</p>\n</li>\n<li><p><strong>items[].totalDeclaredValue</strong> (number, conditionally required) — total transaction value of the goods across the whole line in USD, &gt;= 0. The basis for ad valorem rates; required when any resolved rate is value-based (<code>V_DeclaredValueRequired</code>).</p>\n</li>\n<li><p><strong>items[].quantities</strong> (array, conditionally required) — declared quantities across the whole line, each <code>{ amount: number &gt; 0, unitOfMeasure: enum }</code>, at most one per unit of measure. The basis for per-unit rates: a rate that bills per unit requires a quantity in (or convertible to) that unit, otherwise <code>V_QuantityRequired</code>. Mass units (kg, g, t) are converted automatically.</p>\n</li>\n<li><p><strong>items[].countryOfOrigin</strong> (string, required) — ISO 3166-1 alpha-2 uppercase country of origin code.</p>\n</li>\n<li><p><strong>items[].tradeProgramCode</strong> (string, optional) — special program indicator (SPI) from HTSUS general note 3(c)(i) claiming preferential treatment, e.g. 'R' (CBTPA), 'D' (AGOA), 'S+' (USMCA TRQ). Claims only apply when the country of origin is a beneficiary of the claimed program.</p>\n</li>\n<li><p><strong>items[].components</strong> (array, conditionally required) — required for compound rates (e.g. watches: case, movement, strap, battery) and content-based rates (e.g. lead content in copper ore). Each component carries:</p>\n<ul>\n<li><p><strong>htsCode</strong> (string, required) — full 10-digit statistical suffix code of the component.</p>\n</li>\n<li><p><strong>declaredValue</strong> (number, optional) — declared value of this component across the parent item's whole quantity in USD.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>items[].sugarPolarizationDegree</strong> (number 0..100, conditionally required) — required only for Ch. 17 raw sugar sliding rates (heading 1701), otherwise <code>V_SugarPolarizationDegreeRequired</code>.</p>\n</li>\n<li><p><strong>items[].aluminumSmelt</strong> (object, conditionally required) — required for Ch. 76 aluminum articles and derivative aluminum products (<code>V_AluminumSmeltDataRequired</code>). Section 232 aluminum duties are assessed on the aluminum content value and qualify on the smelt country rather than the country of origin. Fields:</p>\n<ul>\n<li><p><strong>aluminumContentValue</strong> (number, required) — declared value of the aluminum content across the whole line in USD.</p>\n</li>\n<li><p><strong>aluminumContentWeightKg</strong> (number, required) — weight of the aluminum content in kilograms.</p>\n</li>\n<li><p><strong>primaryCountryOfSmelt</strong> (string, required) — ISO2 code for the primary country of smelt.</p>\n</li>\n<li><p><strong>secondaryCountryOfSmelt</strong> (string, optional) — ISO2 code for the secondary country of smelt.</p>\n</li>\n<li><p><strong>countryOfCast</strong> (string, optional) — ISO2 code for the country where the aluminum was cast.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>items[].steelMeltAndPour</strong> (object, conditionally required) — required for Ch. 72/73 steel articles and derivative steel products (<code>V_SteelMeltAndPourDataRequired</code>); Section 232 steel duties qualify on the country of melt and pour. Fields:</p>\n<ul>\n<li><strong>countryOfMeltAndPour</strong> (string, required) — ISO2 code for the country where the steel was melted and poured.</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"deprecated-fields\">Deprecated fields</h2>\n<p>Accepted for backward compatibility; new integrations should not send them:</p>\n<ul>\n<li><p><strong>items[].quantity</strong> (object) — single declared quantity; superseded by <code>quantities</code> (ignored when <code>quantities</code> is populated).</p>\n</li>\n<li><p><strong>items[].singleUnitDeclaredValue</strong> (number) — per-unit value; the line total is derived as <code>singleUnitDeclaredValue x quantity.amount</code>. Mutually exclusive with <code>totalDeclaredValue</code> (<code>V_MutuallyExclusiveProperties</code>).</p>\n</li>\n<li><p><strong>items[].entryDate</strong> (string) — per-item entry date; superseded by the request-level <code>entryDate</code>.</p>\n</li>\n<li><p><strong>items[].components[].singleUnitDeclaredValue</strong> / <strong>components[].quantity</strong> — per-unit component pricing; superseded by the component's line-total <code>declaredValue</code>.</p>\n</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<ul>\n<li><p><strong>itemCalculations[]</strong> — one entry per requested item, in request order. Each entry carries the fields below.</p>\n</li>\n<li><p><strong>itemCalculations[].reference</strong> — the item's correlation reference: the client-supplied value, or the server-generated GUID when none was provided.</p>\n</li>\n<li><p><strong>itemCalculations[].htsClassification</strong> — the resolved HTS entry: the matched HTS code (which may differ from the submitted code) and its full hierarchical description.</p>\n</li>\n<li><p><strong>itemCalculations[].baseCalculations[]</strong> — the base duty layers (base rate plus any additional duties and surcharges). Each layer: <code>sourceHtsCode</code>, <code>description</code>, <code>dutiesOwed</code> in USD, rounded to whole cents.</p>\n</li>\n<li><p><strong>itemCalculations[].componentCalculations[]</strong> — per-component duty layers when the product carries components. Each entry: component HTS code, leaf-level description, per-component duty calculations, and the component's <code>dutiesOwed</code>.</p>\n</li>\n<li><p><strong>itemCalculations[].totalDutiesOwed</strong> — sum of that item's <code>baseCalculations[].dutiesOwed</code> + <code>componentCalculations[].dutiesOwed</code> in USD.</p>\n</li>\n<li><p><strong>totalDutiesOwed</strong> — sum of every item's <code>totalDutiesOwed</code> in USD.</p>\n</li>\n</ul>\n<h2 id=\"validation\">Validation</h2>\n<p>Validation is stable and assertable by error code (all prefixed <code>V_</code>):</p>\n<ul>\n<li><p><code>V_ValueEmpty</code>, <code>V_InvalidHtsCode</code>, <code>V_HtsCodeNotFound</code>, <code>V_TenDigitHtsCodeRequired</code> — HTS code or entry date missing, code malformed, unknown, or not specific enough.</p>\n</li>\n<li><p><code>V_DeclaredValueRequired</code>, <code>V_QuantityRequired</code> — the resolved tariff bills on a value or on a unit the request did not declare.</p>\n</li>\n<li><p><code>V_DuplicateQuantityUnitsNotAllowed</code> — a repeated unit of measure in <code>quantities</code>.</p>\n</li>\n<li><p><code>V_MutuallyExclusiveProperties</code> — <code>totalDeclaredValue</code> combined with <code>singleUnitDeclaredValue</code>.</p>\n</li>\n<li><p><code>V_InvalidCountryCode</code>, <code>V_CountryNotFound</code> — bad ISO2 or unknown country.</p>\n</li>\n<li><p><code>V_ValueMustBeGreaterThanZero</code>, <code>V_ValueMustBeGreaterThanOrEqualToZero</code> — a value or quantity amount out of range.</p>\n</li>\n<li><p><code>V_DuplicateComponentsNotAllowed</code>, <code>V_InvalidComponentHtsCode</code>, <code>V_MissingRequiredComponents</code> — components list problems.</p>\n</li>\n<li><p><code>V_AluminumSmeltDataRequired</code>, <code>V_SteelMeltAndPourDataRequired</code>, <code>V_SugarPolarizationDegreeRequired</code> — Ch. 76 / Ch. 72-73 / heading 1701 entries without their required side data.</p>\n</li>\n</ul>\n","auth":{"type":"oauth2","oauth2":{"basicConfig":[],"advancedConfig":[{"key":"accessTokenUrl","value":"<access-token-url>"},{"key":"grant_type","value":"<grant_type>"}]},"isInherited":true,"source":{"_postman_id":"c4a05cbb-d988-4a0b-be0d-644e11332138","id":"c4a05cbb-d988-4a0b-be0d-644e11332138","name":"CBP Duty Calculation API","type":"collection"}},"urlObject":{"path":["api","v1","duties","calculate"],"host":["https://dutycalculation-sandbox.safepackage.com"],"query":[],"variable":[]}},"response":[{"id":"eca702f7-9ef1-40d4-9d22-118c10a720c6","name":"Regular product (no components)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"description":"Added as a part of security scheme: oauth2","key":"Authorization","value":"<token>"}],"body":{"mode":"raw","raw":"{\n  \"entryDate\": \"2026-08-05\",\n  \"items\": [\n    {\n      \"htsCode\": \"6201.40.50.11\",\n      \"reference\": \"PO-12345\",\n      \"quantities\": [\n        { \"amount\": 25, \"unitOfMeasure\": \"Dozen\" },\n        { \"amount\": 120, \"unitOfMeasure\": \"Kg\" }\n      ],\n      \"totalDeclaredValue\": 25000.00,\n      \"countryOfOrigin\": \"CN\",\n      \"components\": []\n    }\n  ]\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://dutycalculation-sandbox.safepackage.com/api/v1/duties/calculate"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"itemCalculations\": [\n    {\n      \"reference\": \"PO-12345\",\n      \"htsClassification\": {\n        \"htsCode\": \"6201.40.50\",\n        \"text\": \"Men's or boys' overcoats, carcoats, capes, cloaks, anoraks (including ski jackets), windbreakers and similar articles (including padded, sleeveless jackets), other than those of heading 6203: Of man-made fibers: Other\"\n      },\n      \"baseCalculations\": [\n        {\n          \"sourceHtsCode\": \"6201.40.50\",\n          \"description\": \"Other\",\n          \"dutiesOwed\": 6925\n        }\n      ],\n      \"componentCalculations\": [],\n      \"totalDutiesOwed\": 6925\n    }\n  ],\n  \"totalDutiesOwed\": 6925\n}"},{"id":"bfb5903a-b893-41d6-ab19-bd90170c895c","name":"Compound product (watch with components)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"description":"Added as a part of security scheme: oauth2","key":"Authorization","value":"<token>"}],"body":{"mode":"raw","raw":"{\n  \"entryDate\": \"2026-08-05\",\n  \"items\": [\n    {\n      \"htsCode\": \"9101.11.40\",\n      \"quantities\": [\n        { \"amount\": 10, \"unitOfMeasure\": \"Number\" }\n      ],\n      \"totalDeclaredValue\": 2500.00,\n      \"countryOfOrigin\": \"CN\",\n      \"components\": [\n        { \"htsCode\": \"9101.11.40.10\", \"declaredValue\": 850.00 },\n        { \"htsCode\": \"9101.11.40.20\", \"declaredValue\": 1500.00 },\n        { \"htsCode\": \"9101.11.40.30\", \"declaredValue\": 150.00 },\n        { \"htsCode\": \"9101.11.40.40\", \"declaredValue\": 30.00 }\n      ]\n    }\n  ]\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://dutycalculation-sandbox.safepackage.com/api/v1/duties/calculate"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"itemCalculations\": [\n    {\n      \"reference\": \"b7e2c1a4-5f3d-4e8b-9c2a-1d6f8e0a3b5c\",\n      \"htsClassification\": {\n        \"htsCode\": \"9101.11.40\",\n        \"text\": \"Wrist watches, pocket watches and other watches, including stop watches, with case of precious metal or of metal clad with precious metal: With mechanical display only: Having no jewels or only one jewel in the movement\"\n      },\n      \"baseCalculations\": [],\n      \"componentCalculations\": [\n        {\n          \"htsCode\": \"9101.11.40.10\",\n          \"text\": \"Movement\",\n          \"dutyCalculations\": [\n            {\n              \"sourceHtsCode\": \"9101.11.40.10\",\n              \"description\": \"Movement\",\n              \"dutiesOwed\": 5.1\n            }\n          ],\n          \"dutiesOwed\": 5.1\n        },\n        {\n          \"htsCode\": \"9101.11.40.20\",\n          \"text\": \"Case\",\n          \"dutyCalculations\": [\n            {\n              \"sourceHtsCode\": \"9101.11.40.20\",\n              \"description\": \"Case\",\n              \"dutiesOwed\": 93.75\n            }\n          ],\n          \"dutiesOwed\": 93.75\n        },\n        {\n          \"htsCode\": \"9101.11.40.30\",\n          \"text\": \"Strap, band or bracelet\",\n          \"dutyCalculations\": [\n            {\n              \"sourceHtsCode\": \"9101.11.40.30\",\n              \"description\": \"Strap, band or bracelet\",\n              \"dutiesOwed\": 9.38\n            }\n          ],\n          \"dutiesOwed\": 9.38\n        },\n        {\n          \"htsCode\": \"9101.11.40.40\",\n          \"text\": \"Battery\",\n          \"dutyCalculations\": [\n            {\n              \"sourceHtsCode\": \"9101.11.40.40\",\n              \"description\": \"Battery\",\n              \"dutiesOwed\": 1.59\n            }\n          ],\n          \"dutiesOwed\": 1.59\n        }\n      ],\n      \"totalDutiesOwed\": 109.82\n    }\n  ],\n  \"totalDutiesOwed\": 109.82\n}"},{"id":"18dba3e4-d1f9-4878-9eba-6c157e8e4034","name":"Bad Request","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"description":"Added as a part of security scheme: oauth2","key":"Authorization","value":"<token>"}],"body":{"mode":"raw","raw":"{\n  \"entryDate\": \"2026-08-05\",\n  \"items\": [\n    {\n      \"htsCode\": \"6201.40.50.11\",\n      \"reference\": \"PO-12345\",\n      \"quantities\": [\n        { \"amount\": 25, \"unitOfMeasure\": \"Dozen\" },\n        { \"amount\": 120, \"unitOfMeasure\": \"Kg\" }\n      ],\n      \"totalDeclaredValue\": 25000.00,\n      \"countryOfOrigin\": \"CN\",\n      \"components\": []\n    }\n  ]\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"https://dutycalculation-sandbox.safepackage.com/api/v1/duties/calculate"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"errors\": [\n    {\n      \"fieldName\": \"Items[0].HtsCode\",\n      \"rejectedValue\": \"6912.00.48\",\n      \"code\": \"V_TenDigitHtsCodeRequired\",\n      \"message\": \"A full 10-digit HTS code is required; broader codes are only accepted for component-rated tariff lines\"\n    },\n    {\n      \"fieldName\": \"Items[0].EntryDate\",\n      \"rejectedValue\": null,\n      \"code\": \"V_ValueEmpty\",\n      \"message\": \"Value cannot be empty\"\n    }\n  ]\n}"}],"_postman_id":"2a6da45c-48ec-4633-b969-9efd35833729"},{"name":"Search Hts Codes","id":"db6f2c78-a61c-4498-9172-55402d21582d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://dutycalculation-sandbox.safepackage.com/api/v1/hts-codes?code=6201&text=overcoats&page=1&pageSize=50","description":"<h1 id=\"search-hts-codes\">Search HTS codes</h1>\n<p>Paged search over the HTS codes that are valid as the main HTS code of a duty calculation request. Use it to discover the full 10-digit code when only a partial code or a product description is known.</p>\n<h2 id=\"query-parameters\">Query parameters</h2>\n<ul>\n<li><strong>code</strong> (string, optional) — code prefix filter; digits only are compared, so <code>6201</code>, <code>6201.40</code> and <code>620140</code> are equivalent.</li>\n<li><strong>text</strong> (string, optional) — case-insensitive filter over the full hierarchical description.</li>\n<li><strong>page</strong> (integer, optional, default 1) — 1-based page number.</li>\n<li><strong>pageSize</strong> (integer, optional, default 50, max 200) — items per page.</li>\n</ul>\n<h2 id=\"response-200\">Response (200)</h2>\n<ul>\n<li><strong>items[]</strong> — matching codes, each <code>{ htsCode, text }</code> with the code in canonical dotted form and the full hierarchical description.</li>\n<li><strong>totalCount</strong> — total matches across all pages.</li>\n<li><strong>page</strong>, <strong>pageSize</strong> — the returned page window.</li>\n</ul>\n","auth":{"type":"oauth2","oauth2":{"basicConfig":[],"advancedConfig":[{"key":"accessTokenUrl","value":"<access-token-url>"},{"key":"grant_type","value":"<grant_type>"}]},"isInherited":true,"source":{"_postman_id":"c4a05cbb-d988-4a0b-be0d-644e11332138","id":"c4a05cbb-d988-4a0b-be0d-644e11332138","name":"CBP Duty Calculation API","type":"collection"}},"urlObject":{"path":["api","v1","hts-codes"],"host":["https://dutycalculation-sandbox.safepackage.com"],"query":[{"description":{"content":"<p>Digits-only prefix filter; dots are ignored.</p>\n","type":"text/plain"},"key":"code","value":"6201"},{"description":{"content":"<p>Case-insensitive full-text filter over the hierarchical description.</p>\n","type":"text/plain"},"key":"text","value":"overcoats"},{"description":{"content":"<p>1-based page number.</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Items per page, max 200.</p>\n","type":"text/plain"},"key":"pageSize","value":"50"}],"variable":[]}},"response":[{"id":"28c8dfd2-3366-4f2d-983c-71048f2e34ad","name":"OK","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"description":"Added as a part of security scheme: oauth2","key":"Authorization","value":"<token>"}],"url":{"raw":"https://dutycalculation-sandbox.safepackage.com/api/v1/hts-codes?code=6201&text=overcoats&page=1&pageSize=50","host":["https://dutycalculation-sandbox.safepackage.com"],"path":["api","v1","hts-codes"],"query":[{"key":"code","value":"6201"},{"key":"text","value":"overcoats"},{"key":"page","value":"1"},{"key":"pageSize","value":"50"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"items\": [\n    {\n      \"htsCode\": \"6201.40.50.11\",\n      \"text\": \"Men's or boys' overcoats, carcoats, capes, cloaks, anoraks (including ski jackets), windbreakers and similar articles (including padded, sleeveless jackets), other than those of heading 6203: Of man-made fibers: Other: Men's (634)\"\n    }\n  ],\n  \"totalCount\": 1,\n  \"page\": 1,\n  \"pageSize\": 50\n}"}],"_postman_id":"db6f2c78-a61c-4498-9172-55402d21582d"},{"name":"Get Hts Code Info","id":"74e41ba5-c242-4936-989e-6b7c327abd00","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"https://dutycalculation-sandbox.safepackage.com/api/v1/hts-codes/6201.40.50.11","description":"<h1 id=\"get-hts-code-info\">Get HTS code info</h1>\n<p>Reference lookup for a single HTS code. Accepts both dotted (<code>6201.40.50.11</code>) and plain (<code>6201405011</code>) forms.</p>\n<p>Lets client integrations discover what an HTS code resolves to before submitting a calculation request — in particular which units of measure a duty calculation must declare quantities in, and which components a component-rated classification requires.</p>\n<h2 id=\"route-parameter\">Route parameter</h2>\n<ul>\n<li><strong>htsCode</strong> (string, required) — full 10-digit HTS tariff code. An 8-digit tariff line is accepted only for component-rated classifications (e.g. watches, <code>9101.11.40</code>); any other broader code returns <code>400</code> with <code>V_TenDigitHtsCodeRequired</code>.</li>\n</ul>\n<h2 id=\"response-200\">Response (200)</h2>\n<ul>\n<li><strong>htsCode</strong> — the normalized HTS code in canonical dotted form.</li>\n<li><strong>text</strong> — full hierarchical description (heading + subheading + tariff line + statistical suffix).</li>\n<li><strong>unitsOfMeasure</strong> — accepted units of measure for this HTS entry (e.g. <code>[\"Number\"]</code>, <code>[\"Kg\"]</code>).</li>\n<li><strong>requiredComponents</strong> — components a duty calculation request must supply for this HTS code. Each entry: <code>htsCode</code> of the required component and its leaf-level <code>text</code> (not the full hierarchical path). Empty list when no components are required.</li>\n<li><strong>requiresDeclaredValue</strong> — whether a duty calculation for this entry must declare a value (<code>totalDeclaredValue</code>): <code>true</code> when any of the entry's rates is value-based (ad valorem or compound).</li>\n<li><strong>requiresAluminumSmeltData</strong> — whether a duty calculation for this entry must supply <code>aluminumSmelt</code> data (Ch. 76 aluminum articles and derivative aluminum products).</li>\n<li><strong>requiresSteelMeltAndPourData</strong> — whether a duty calculation for this entry must supply <code>steelMeltAndPour</code> data (Ch. 72/73 steel articles and derivative steel products).</li>\n</ul>\n<h2 id=\"responses\">Responses</h2>\n<ul>\n<li><code>200 OK</code> — HTS entry resolved.</li>\n<li><code>400 Bad Request</code> (<code>V_InvalidHtsCode</code>, <code>V_TenDigitHtsCodeRequired</code>) — <code>htsCode</code> malformed, or not a 10-digit code (and not component-rated).</li>\n<li><code>404 Not Found</code> — <code>htsCode</code> is well-formed but no matching HTS entry exists.</li>\n<li><code>401 Unauthorized</code> — missing or invalid bearer token.</li>\n<li><code>403 Forbidden</code> — the caller is not permitted to access this resource.</li>\n</ul>\n","auth":{"type":"oauth2","oauth2":{"basicConfig":[],"advancedConfig":[{"key":"accessTokenUrl","value":"<access-token-url>"},{"key":"grant_type","value":"<grant_type>"}]},"isInherited":true,"source":{"_postman_id":"c4a05cbb-d988-4a0b-be0d-644e11332138","id":"c4a05cbb-d988-4a0b-be0d-644e11332138","name":"CBP Duty Calculation API","type":"collection"}},"urlObject":{"path":["api","v1","hts-codes","6201.40.50.11"],"host":["https://dutycalculation-sandbox.safepackage.com"],"query":[],"variable":[]}},"response":[{"id":"5c27b7a9-6059-40c9-8cb6-847639813348","name":"OK","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"description":"Added as a part of security scheme: oauth2","key":"Authorization","value":"<token>"}],"url":"https://dutycalculation-sandbox.safepackage.com/api/v1/hts-codes/6201.40.50.11"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"htsCode\": \"6201.40.50.11\",\n  \"text\": \"Men's or boys' overcoats, carcoats, capes, cloaks, anoraks (including ski jackets), windbreakers and similar articles (including padded, sleeveless jackets), other than those of heading 6203: Of man-made fibers: Other: Men's (634)\",\n  \"unitsOfMeasure\": [\n    \"Dozen\",\n    \"Kg\"\n  ],\n  \"requiredComponents\": [],\n  \"requiresDeclaredValue\": true,\n  \"requiresAluminumSmeltData\": false,\n  \"requiresSteelMeltAndPourData\": false\n}"},{"id":"7a96179d-c090-425f-ac7a-b1d823acbab3","name":"Bad Request","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"description":"Added as a part of security scheme: oauth2","key":"Authorization","value":"<token>"}],"url":"https://dutycalculation-sandbox.safepackage.com/api/v1/hts-codes/6912.00.48"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"errors\": [\n    {\n      \"fieldName\": \"HtsCode\",\n      \"rejectedValue\": \"6912.00.48\",\n      \"code\": \"V_TenDigitHtsCodeRequired\",\n      \"message\": \"A full 10-digit HTS code is required; broader codes are only accepted for component-rated tariff lines\"\n    }\n  ]\n}"},{"id":"2b17bb70-b53e-4c08-a89f-627d5f24f4ba","name":"Not Found","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: oauth2","key":"Authorization","value":"<token>"}],"url":"https://dutycalculation-sandbox.safepackage.com/api/v1/hts-codes/9999.99.99.99"},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"74e41ba5-c242-4936-989e-6b7c327abd00"}],"auth":{"type":"oauth2","oauth2":{"basicConfig":[],"advancedConfig":[{"key":"accessTokenUrl","value":"<access-token-url>"},{"key":"grant_type","value":"<grant_type>"}]}},"variable":[{"key":"baseUrl","value":"https://dutycalculation-sandbox.safepackage.com"},{"key":"tokenUrl","value":"https://auth.dutycollection-sandbox.safepackage.com/realms/SafePackage/protocol/openid-connect/token"}]}