{"info":{"_postman_id":"63c9e82e-9c39-4970-b577-37a0d2769539","name":"International Mail Duty Collection API","description":"<html><head></head><body><h1 id=\"international-mail-duty-collection-api-documentation\">International Mail Duty Collection API Documentation</h1>\n<h2 id=\"upcoming-entry-type-13-pga-data-cbp-testing-starts-september-22nd\">Upcoming: Entry Type 13 PGA Data (CBP testing starts September 22nd)</h2>\n<p>Starting <strong>September 22nd</strong>, CBP will begin testing the implementation of the <strong>Entry Type 13</strong> filing, which requires additional <strong>PGA (Partner Government Agency)</strong> data for package items. Two new item-level fields are available on the package submission endpoints (<code>/packages</code> and <code>/shipments</code>):</p>\n<ul>\n<li><p><strong>pgaData</strong> — PGA data elements for the item, as type/value pairs</p>\n</li>\n<li><p><strong>notForMedicalUse</strong> — attestation that the product is not intended for medical use</p>\n</li>\n</ul>\n<p>These fields are <strong>optional for now</strong>, but <strong>will become required in the future, depending on the HTS code of the item</strong>: HTS codes carrying PGA indicators (FDA, APHIS/Lacey Act, Fish &amp; Wildlife, EPA, ...) will demand the corresponding data elements, and packages whose items are missing them will be rejected. See the field documentation on the <strong>Create Packages</strong> and <strong>Create Shipment</strong> endpoints for the field shapes and the list of data element types, use the <strong>Get HTS Code Requirements</strong> endpoint (<code>GET /hts/{htsCode}/requirements</code>) to discover which data elements a specific HTS code demands, and start submitting the data early to avoid disruption when enforcement begins.</p>\n<h2 id=\"overview\">Overview</h2>\n<p>The International Mail Duty Collection API allows developers to integrate comprehensive customs and duty processing capabilities within their shipping and e-commerce applications. The API offers package creation, container management, shipment processing, and automated duty calculation features.</p>\n<p><strong>Getting Started:</strong> For additional help, please email us at <a href=\"https://mailto:support@safepackage.com\"><b>support@safepackage.com</b></a>.</p>\n<p><strong>Account Setup:</strong> To request API access, please email <a href=\"https://mailto:api-access@safepackage.com\"><b>api-access@safepackage.com</b></a> with your business information and integration requirements. Our team will provision your account and provide the necessary credentials for authentication.</p>\n<h2 id=\"endpoints-and-services\">Endpoints and Services</h2>\n<p><strong>Package Management</strong><br>Create and manage individual mail packages with detailed customs information including country of origin, declared values, and item details.</p>\n<p><strong>Container Operations</strong><br>Group packages into containers with comprehensive entry route information including flight numbers, vessel details, transport types, carrier codes, and port of entry data.</p>\n<p><strong>Shipment Processing</strong><br>Process complete shipments with multiple containers and packages in a single operation. This powerful endpoint combines package creation, container management, and automatic associations in one streamlined workflow.</p>\n<h2 id=\"authentication-and-security\">Authentication and Security</h2>\n<p>The International Mail Duty Collection API uses JWT Bearer token authentication via OAuth2 integration. All API requests require proper authentication using JWT Bearer tokens.</p>\n<p><strong>Authentication Setup</strong><br>Obtain your JWT tokens from our OAuth2 authentication service at <a href=\"https://auth.dutycollection.safepackage.com/protocol/openid-connect/token\">https://auth.dutycollection.safepackage.com</a>. Configure your application with the client credentials provided during account setup.</p>\n<h2 id=\"duty-calculation-and-compliance\">Duty Calculation and Compliance</h2>\n<p><strong>Automatic Duty Calculation</strong><br>The API automatically calculates duties and tariffs based on country of origin, declared values, current trade policy and tariff rates.</p>\n<h2 id=\"api-information\">API Information</h2>\n<p><strong>Production Environment</strong></p>\n<ul>\n<li><p><strong>Base URL</strong>: <a href=\"https://dutycollectionapi.safepackage.com\">https://dutycollection.safepackage.com</a></p>\n</li>\n<li><p><strong>Authentication URL</strong>: <a href=\"https://auth.dutycollection.safepackage.com/protocol/openid-connect/token\">https://auth.dutycollection.safepackage.com</a></p>\n</li>\n</ul>\n<p><strong>Sandbox Environment</strong></p>\n<ul>\n<li><p><strong>Base URL</strong>: <a href=\"https://dutycollectionapi.safepackage.com\">https://dutycollection-sandbox.safepackage.com</a></p>\n</li>\n<li><p><strong>Authentication URL</strong>: <a href=\"https://auth.dutycollection.safepackage.com/protocol/openid-connect/token\">https://auth.dutycollection-sandbox.safepackage.com</a></p>\n</li>\n</ul>\n<h2 id=\"support-and-resources\">Support and Resources</h2>\n<p><strong>Getting Help</strong></p>\n<ul>\n<li><p><strong>Email Support</strong>: <a href=\"https://mailto:support@safepackage.com\">support@safepackage.com</a></p>\n</li>\n<li><p><strong>Account Setup</strong>: Email <a href=\"https://mailto:api-access@safepackage.com\">api-access@safepackage.com</a> for account provisioning</p>\n</li>\n<li><p><strong>Integration Assistance</strong>: Custom implementation support available</p>\n</li>\n</ul>\n<h2 id=\"duty-exempt-hts-codes\">Duty-exempt HTS codes</h2>\n<p>The API allows the submittal of item HTS code information, which helps to differentiate between taxable and exempt goods. Listed below is a table of eligible HTS code prefixes. If an HTS code begins with one of the listed prefixes, it is eligible for a duty exemption.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTS Code Prefix</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>3704.00.00</td>\n</tr>\n<tr>\n<td>3705.00.00</td>\n</tr>\n<tr>\n<td>3706</td>\n</tr>\n<tr>\n<td>Chapter 49 (HTS codes starting with 49)</td>\n</tr>\n<tr>\n<td>5807</td>\n</tr>\n<tr>\n<td>6307.90.30</td>\n</tr>\n<tr>\n<td>6307.90.85</td>\n</tr>\n<tr>\n<td>8310</td>\n</tr>\n<tr>\n<td>8523.29</td>\n</tr>\n<tr>\n<td>8523.41</td>\n</tr>\n<tr>\n<td>8523.49</td>\n</tr>\n<tr>\n<td>8523.80.10</td>\n</tr>\n<tr>\n<td>9405.61</td>\n</tr>\n<tr>\n<td>9405.69</td>\n</tr>\n<tr>\n<td>9701</td>\n</tr>\n<tr>\n<td>9702</td>\n</tr>\n<tr>\n<td>9703</td>\n</tr>\n<tr>\n<td>9704</td>\n</tr>\n<tr>\n<td>9705</td>\n</tr>\n<tr>\n<td>9903.01.03</td>\n</tr>\n<tr>\n<td>9903.01.12</td>\n</tr>\n<tr>\n<td>9903.01.22</td>\n</tr>\n<tr>\n<td>9903.01.31</td>\n</tr>\n</tbody>\n</table>\n</div><p>2 separate HTS codes can also be used to claim tax exemption, but are part of specific cases:</p>\n<ul>\n<li><p>9804.00.30 - HTS code for items specified as gifts, where all items in the package are eligible for duty exemption if the they all have the specified HTS code and the total declared value of the package does not exceed $100</p>\n</li>\n<li><p>9801.00.10 - Returns, items whose country of origin is the US which are being returned to the country</p>\n</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"International Mail Duty Collection API Documentation","slug":"international-mail-duty-collection-api-documentation"}],"owner":"48610445","collectionId":"63c9e82e-9c39-4970-b577-37a0d2769539","publishedId":"2sBYAvtpqD","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-09-01T21:11:28.000Z"},"item":[{"name":"Authentication","item":[{"name":"Client Credentials Authentication","id":"3e66b514-5753-452c-b4da-f47fac02d0cd","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.safepackage.com/protocol/openid-connect/token","urlObject":{"host":["https://auth.dutycollection.safepackage.com/protocol/openid-connect/token"],"query":[],"variable":[]}},"response":[],"_postman_id":"3e66b514-5753-452c-b4da-f47fac02d0cd"}],"id":"01e20b65-0b3f-4a66-ae64-4b5499053651","description":"<p>Authentication samples for obtaining an access token from the authentication URL</p>\n","_postman_id":"01e20b65-0b3f-4a66-ae64-4b5499053651"},{"name":"Packages","item":[{"name":"Create Packages","id":"42da45fe-770f-4c25-b704-67ff42fca79b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer ","description":"<p>JWT token for authentication</p>\n"}],"body":{"mode":"raw","raw":"{\n    \"packages\": [\n        {\n            \"trackingReference\": \"US123456789US\",\n            \"items\": [\n                {\n                    \"countryOfOrigin\": \"CN\",\n                    \"totalDeclaredValue\": 77.97,\n                    \"description\": \"Men's knitted cotton t-shirt, short sleeve\",\n                    \"htsCode\": \"6109.10.00.12\",\n                    \"quantity\": 3,\n                    \"customsQuantities\": [\n                        {\n                            \"value\": 0.6,\n                            \"unitOfMeasure\": \"Kg\"\n                        }\n                    ]\n                },\n                {\n                    \"countryOfOrigin\": \"JP\",\n                    \"totalDeclaredValue\": 91.0,\n                    \"description\": \"Ceramic coffee mug, hand painted\",\n                    \"htsCode\": \"6912.00.44.00\",\n                    \"quantity\": 2,\n                    \"singleUnitWeight\": {\n                        \"value\": 0.7,\n                        \"unitOfMeasure\": \"Kilograms\"\n                    },\n                    \"pgaData\": [\n                        {\n                            \"type\": \"IntendedUse\",\n                            \"value\": \"Household tableware for hot beverages (food contact)\"\n                        },\n                        {\n                            \"type\": \"ProductCode\",\n                            \"value\": \"23FGH07\"\n                        },\n                        {\n                            \"type\": \"CountryOfProduction\",\n                            \"value\": \"JP\"\n                        },\n                        {\n                            \"type\": \"TradeBrandName\",\n                            \"value\": \"Sakura Ceramics\"\n                        },\n                        {\n                            \"type\": \"ProductSpecificDescription\",\n                            \"value\": \"Hand painted ceramic coffee mug, 350 ml\"\n                        },\n                        {\n                            \"type\": \"PackagingLevels\",\n                            \"value\": \"1 box containing 2 mugs\"\n                        }\n                    ],\n                    \"notForMedicalUse\": true\n                }\n            ]\n        },\n        {\n            \"trackingReference\": \"CN987654321CN\",\n            \"items\": [\n                {\n                    \"countryOfOrigin\": \"DE\",\n                    \"declaredValue\": 75.0,\n                    \"description\": \"Leather wallet, bovine\",\n                    \"htsCode\": \"4202.31.60.00\",\n                    \"quantity\": 1,\n                    \"weight\": {\n                        \"value\": 0.2,\n                        \"unitOfMeasure\": \"Kilograms\"\n                    }\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/packages","description":"<h1 id=\"create-packages\">Create Packages</h1>\n<p>Creates multiple packages in a single operation. Each package can contain multiple items with different countries of origin and declared values.</p>\n<h2 id=\"request-body-fields\">Request Body Fields</h2>\n<h3 id=\"root-object\">Root Object</h3>\n<ul>\n<li><strong>packages</strong> (array, required): Collection of packages to create</li>\n</ul>\n<h3 id=\"package-object\">Package Object</h3>\n<ul>\n<li><p><strong>trackingReference</strong> (string, required): Unique identifier for the package</p>\n<ul>\n<li><p>Format: UPU S10 (2 letters + 9 digits + 2 letters) or USPS IMPB (22/26/30/34 digits)</p>\n</li>\n<li><p>Example: <code>US123456789US</code>, <code>CN987654321CN</code></p>\n</li>\n<li><p>Must be unique across all packages in the system</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"package-items-array\">Package Items Array</h3>\n<ul>\n<li><p><strong>items</strong> (array, required): Collection of items within the package</p>\n<ul>\n<li><p>Minimum: 1 item required per package</p>\n</li>\n<li><p>Maximum: No limit on items per package</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"package-item-object\">Package Item Object</h3>\n<ul>\n<li><p><strong>countryOfOrigin</strong> (string, required): ISO country code of item origin</p>\n<ul>\n<li><p>Format: 2-letter ISO country code</p>\n</li>\n<li><p>Examples: <code>CN</code> (China), <code>JP</code> (Japan), <code>DE</code> (Germany), <code>US</code> (United States)</p>\n</li>\n<li><p>Used for tariff calculation and customs processing</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Declared value — exactly one of the following fields must be set per item:</strong></p>\n<ul>\n<li><p><strong>totalDeclaredValue</strong> (number, recommended): Declared monetary value for the whole line (all units together)</p>\n</li>\n<li><p><strong>declaredValue</strong> (number, deprecated): Legacy field kept for existing integrations — carries the <strong>line total</strong>, not a per-unit value</p>\n</li>\n<li><p>Format: Decimal number with up to 2 decimal places, in your configured input currency (USD unless agreed otherwise)</p>\n</li>\n<li><p>The sum of all item line totals in a package must not exceed $2,500 (postal clearance limit)</p>\n</li>\n</ul>\n</li>\n<li><p><strong>description</strong> (string, required in practice): Human-readable description of the item</p>\n<ul>\n<li><p>Example: <code>Men's knitted cotton t-shirt, short sleeve</code></p>\n</li>\n<li><p>Drives HTS classification whenever the submitted <code>htsCode</code> is not a full 10-digit code</p>\n</li>\n</ul>\n</li>\n<li><p><strong>htsCode</strong> (string, optional): Harmonized Tariff Schedule (HTS) code, dotted or plain digits</p>\n<ul>\n<li><p>Accepted at 6, 8 or 10 digits — but duties are always calculated against a <strong>full 10-digit</strong> schedule code</p>\n</li>\n<li><p>A 6/8-digit code is treated as a classification hint; the remaining digits are resolved from the item <code>description</code></p>\n</li>\n<li><p>Submit the full 10-digit code (e.g. <code>6109.10.00.12</code>) for deterministic classification and pricing</p>\n</li>\n</ul>\n</li>\n<li><p><strong>quantity</strong> (number, optional): Number of units in the line. Whole number, minimum 1, defaults to 1</p>\n<ul>\n<li>Plain number — the previous <code>{ \"value\": ..., \"unitOfMeasure\": ... }</code> object form is no longer accepted</li>\n</ul>\n</li>\n<li><p><strong>customsQuantities</strong> (array, optional): Line-total quantities in the units a tariff rate can bill on</p>\n<ul>\n<li><p>Each entry: <strong>value</strong> (number, &gt; 0) and <strong>unitOfMeasure</strong> (string): one of <code>Kg</code>, <code>Gram</code>, <code>Dozen</code>, <code>SquareMeter</code>, <code>CubicMeter</code>, <code>MetricTon</code>, <code>Liter</code>, <code>ProofLiter</code>, <code>Barrel</code>, <code>Gross</code>, <code>Pair</code>, <code>Per1000</code>, <code>Number</code></p>\n</li>\n<li><p>At most one entry per unit of measure</p>\n</li>\n<li><p>Include a mass entry (e.g. <code>{ \"value\": 0.6, \"unitOfMeasure\": \"Kg\" }</code> for the whole line) whenever the tariff bills on weight — the calculation is rejected otherwise</p>\n</li>\n</ul>\n</li>\n<li><p><strong>singleUnitWeight</strong> (object, deprecated): Weight of the <strong>whole line</strong> (despite the name), folded into <code>customsQuantities</code> as a mass entry</p>\n<ul>\n<li><strong>value</strong> (number, &gt; 0) and <strong>unitOfMeasure</strong> (string): one of <code>Pounds</code>, <code>Kilograms</code>, <code>Grams</code></li>\n</ul>\n</li>\n<li><p><strong>weight</strong> (object, deprecated): Same meaning as <code>singleUnitWeight</code> — the line-total weight; only one of the two may be set</p>\n</li>\n</ul>\n<p><strong>Since July 24th, 2026 duties are calculated against the full HTS schedule:</strong> every item must resolve to a valid 10-digit HTS code — from the submitted <code>htsCode</code> or from the <code>description</code> via classification — or the package is rejected. A mass entry in <code>customsQuantities</code> is required whenever the resolved tariff bills on weight.</p>\n<h3 id=\"pga--entry-type-13-data\">PGA / Entry Type 13 Data</h3>\n<ul>\n<li><p><strong>pgaData</strong> (array, optional for now): PGA (Partner Government Agency) data elements for the item, driven by the item's HTS code</p>\n<ul>\n<li><p>Each entry carries a <strong>type</strong> (string enum) and a <strong>value</strong> (string, max 1000 characters)</p>\n</li>\n<li><p>A <strong>type</strong> may appear at most once per item</p>\n</li>\n<li><p><strong>type</strong> values: <code>IntendedUse</code>, <code>IntendedUseCode</code>, <code>ProductCode</code>, <code>CountryOfProduction</code>, <code>TradeBrandName</code>, <code>ProductSpecificDescription</code>, <code>ManufacturerFei</code>, <code>ImporterOfRecordFei</code>, <code>PointOfContact</code>, <code>ShipperFei</code>, <code>DeliveredToPartyFei</code>, <code>PackagingLevels</code>, <code>ProductId</code>, <code>CitationCodes</code>, <code>ManufactureDate</code>, <code>ManufacturePlace</code>, <code>ProductTestDate</code>, <code>TestingLaboratory</code>, <code>CountryOfHarvest</code>, <code>ScientificNameGenus</code>, <code>ScientificNameSpecies</code>, <code>CommonName</code>, <code>PermitNumber</code>, <code>ManufacturerId</code>, <code>TscaCertification</code></p>\n</li>\n<li><p>Which types are needed depends on the PGA indicators of the item's HTS code — e.g. FDA-flagged codes (food contact, cosmetics) call for <code>IntendedUse</code>, <code>ProductCode</code>, <code>CountryOfProduction</code>, <code>TradeBrandName</code>, <code>ProductSpecificDescription</code> and <code>PackagingLevels</code></p>\n</li>\n</ul>\n</li>\n<li><p><strong>notForMedicalUse</strong> (boolean, optional for now, defaults to <code>false</code>): attests the product is not intended for medical use</p>\n<ul>\n<li>Some HTS codes are approved for shipping only for non-medical products; items under those codes must submit <code>true</code></li>\n</ul>\n</li>\n<li><p>Once the Entry Type 13 requirement is enforced for your account, packages failing the PGA rules are rejected with error codes <code>V_PgaRequiredInformationMissing</code>, <code>V_HtsCodeNotApprovedForShipping</code> or <code>V_NotForMedicalUseAttestationRequired</code></p>\n</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<p>Returns an array of created packages with:</p>\n<ul>\n<li><p>Package ID (system generated)</p>\n</li>\n<li><p>Tracking reference (as provided)</p>\n</li>\n<li><p>Total declared value (calculated)</p>\n</li>\n<li><p>Total duties owed (calculated)</p>\n</li>\n<li><p>Individual items with calculated duties</p>\n</li>\n<li><p>Creation timestamp</p>\n</li>\n</ul>\n<h2 id=\"use-cases\">Use Cases</h2>\n<ul>\n<li><p>Bulk import of packages from external systems</p>\n</li>\n<li><p>Batch processing of mail items</p>\n</li>\n<li><p>Initial package registration before container assignment</p>\n</li>\n</ul>\n<h2 id=\"business-rules\">Business Rules</h2>\n<ul>\n<li><p>Tracking references must be unique system-wide</p>\n</li>\n<li><p>Each package must have at least one item</p>\n</li>\n<li><p>Declared values must be positive numbers</p>\n</li>\n<li><p>Country codes must be valid ISO codes</p>\n</li>\n<li><p>Duties are automatically calculated based on origin country and value</p>\n</li>\n</ul>\n","urlObject":{"path":["api","v1","packages"],"host":["https://dutycollection.safepackage.com"],"query":[],"variable":[]}},"response":[{"id":"8556f403-7465-4ad7-86c9-b97ec6962b45","name":"Successful Package Creation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n    \"packages\": [\n        {\n            \"trackingReference\": \"US123456789US\",\n            \"items\": [\n                {\n                    \"countryOfOrigin\": \"CN\",\n                    \"totalDeclaredValue\": 77.97,\n                    \"description\": \"Men's knitted cotton t-shirt, short sleeve\",\n                    \"htsCode\": \"6109.10.00.12\",\n                    \"quantity\": 3,\n                    \"customsQuantities\": [\n                        {\n                            \"value\": 0.6,\n                            \"unitOfMeasure\": \"Kg\"\n                        }\n                    ]\n                },\n                {\n                    \"countryOfOrigin\": \"JP\",\n                    \"totalDeclaredValue\": 91.0,\n                    \"description\": \"Ceramic coffee mug, hand painted\",\n                    \"htsCode\": \"6912.00.44.00\",\n                    \"quantity\": 2,\n                    \"singleUnitWeight\": {\n                        \"value\": 0.7,\n                        \"unitOfMeasure\": \"Kilograms\"\n                    }\n                }\n            ]\n        },\n        {\n            \"trackingReference\": \"CN987654321CN\",\n            \"items\": [\n                {\n                    \"countryOfOrigin\": \"DE\",\n                    \"declaredValue\": 75.0,\n                    \"description\": \"Leather wallet, bovine\",\n                    \"htsCode\": \"4202.31.60.00\",\n                    \"quantity\": 1,\n                    \"weight\": {\n                        \"value\": 0.2,\n                        \"unitOfMeasure\": \"Kilograms\"\n                    }\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/packages"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"packages\": [\n    {\n      \"id\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c101\",\n      \"trackingReference\": \"US123456789US\",\n      \"client\": {\n        \"id\": \"8651bce6-f384-4391-92ee-0ad134d94e87\",\n        \"name\": \"Acme Post\",\n        \"slug\": \"acme\",\n        \"country\": null,\n        \"paymentProcessors\": []\n      },\n      \"shipment\": null,\n      \"items\": [\n        {\n          \"id\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c111\",\n          \"name\": null,\n          \"description\": \"Men's knitted cotton t-shirt, short sleeve\",\n          \"singleUnitDeclaredValue\": 25.99,\n          \"quantity\": 3,\n          \"countryOfOrigin\": \"CN\",\n          \"htsCode\": \"6109100012\",\n          \"declaredHtsCode\": \"6109100012\",\n          \"resolvedHtsCode\": null,\n          \"hasDeclaredHtsMismatch\": false,\n          \"totalWeightValue\": 0.6,\n          \"totalWeightUnit\": \"KG\",\n          \"tariffRatePercentage\": 16.5,\n          \"totalDutiesOwed\": 12.87,\n          \"tariffLines\": [\n            {\n              \"htsCode\": \"6109.10.00.12\",\n              \"description\": \"T-shirts, singlets, tank tops and similar garments, knitted or crocheted: Of cotton: Men's or boys': Other: Men's\",\n              \"ratePercentage\": 16.5,\n              \"rateDescriptor\": null,\n              \"usdDutiesOwed\": 12.87\n            }\n          ],\n          \"missingFields\": []\n        },\n        {\n          \"id\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c112\",\n          \"name\": null,\n          \"description\": \"Ceramic coffee mug, hand painted\",\n          \"singleUnitDeclaredValue\": 45.5,\n          \"quantity\": 2,\n          \"countryOfOrigin\": \"JP\",\n          \"htsCode\": \"6912004400\",\n          \"declaredHtsCode\": \"6912004400\",\n          \"resolvedHtsCode\": null,\n          \"hasDeclaredHtsMismatch\": false,\n          \"totalWeightValue\": 1.4,\n          \"totalWeightUnit\": \"KG\",\n          \"tariffRatePercentage\": 10.0,\n          \"totalDutiesOwed\": 9.1,\n          \"tariffLines\": [\n            {\n              \"htsCode\": \"6912.00.44.00\",\n              \"description\": \"Ceramic tableware, kitchenware: Mugs and other steins\",\n              \"ratePercentage\": 10.0,\n              \"rateDescriptor\": null,\n              \"usdDutiesOwed\": 9.1\n            }\n          ],\n          \"missingFields\": []\n        }\n      ],\n      \"totalDeclaredValue\": 168.97,\n      \"totalDutiesOwed\": 21.97,\n      \"fee\": 2.5,\n      \"inputCurrency\": \"USD\",\n      \"inputCurrencyToUsdConversionRate\": 1,\n      \"inputCurrencyTotalDeclaredValue\": 168.97,\n      \"inputCurrencyTotalDutiesOwed\": 21.97,\n      \"inputCurrencyFee\": 2.5,\n      \"payments\": [],\n      \"paymentStatus\": \"Pending\",\n      \"declarationId\": null,\n      \"labelReference\": null,\n      \"createdAtUtc\": \"2026-08-04T10:35:22.123Z\",\n      \"classificationType\": \"Regular\"\n    }\n  ],\n  \"packageErrors\": [],\n  \"genericErrors\": []\n}"},{"id":"392829ae-00fa-4bb6-adb7-d7b3a6f8e0f6","name":"Successful Creation with PGA Data (Entry Type 13)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n    \"packages\": [\n        {\n            \"trackingReference\": \"FR555666777FR\",\n            \"items\": [\n                {\n                    \"countryOfOrigin\": \"FR\",\n                    \"totalDeclaredValue\": 60.0,\n                    \"description\": \"Matte lipstick, cosmetic lip make-up\",\n                    \"htsCode\": \"3304.10.00.00\",\n                    \"quantity\": 5,\n                    \"customsQuantities\": [\n                        {\n                            \"value\": 0.1,\n                            \"unitOfMeasure\": \"Kg\"\n                        }\n                    ],\n                    \"pgaData\": [\n                        {\n                            \"type\": \"IntendedUse\",\n                            \"value\": \"Cosmetic - lip make-up\"\n                        },\n                        {\n                            \"type\": \"ProductCode\",\n                            \"value\": \"53CBF03\"\n                        },\n                        {\n                            \"type\": \"CountryOfProduction\",\n                            \"value\": \"FR\"\n                        },\n                        {\n                            \"type\": \"TradeBrandName\",\n                            \"value\": \"Belle Rouge\"\n                        },\n                        {\n                            \"type\": \"ProductSpecificDescription\",\n                            \"value\": \"Matte lipstick, 4 g stick, shade 12\"\n                        },\n                        {\n                            \"type\": \"PackagingLevels\",\n                            \"value\": \"1 box containing 5 lipsticks\"\n                        }\n                    ]\n                },\n                {\n                    \"countryOfOrigin\": \"IN\",\n                    \"totalDeclaredValue\": 38.5,\n                    \"description\": \"Peppermint essential oil for aromatherapy diffusers\",\n                    \"htsCode\": \"3301.24.00.00\",\n                    \"quantity\": 2,\n                    \"customsQuantities\": [\n                        {\n                            \"value\": 0.25,\n                            \"unitOfMeasure\": \"Kg\"\n                        }\n                    ],\n                    \"pgaData\": [\n                        {\n                            \"type\": \"IntendedUse\",\n                            \"value\": \"Aromatherapy diffuser oil - not for medical use\"\n                        },\n                        {\n                            \"type\": \"ProductCode\",\n                            \"value\": \"40BEE01\"\n                        },\n                        {\n                            \"type\": \"CountryOfProduction\",\n                            \"value\": \"IN\"\n                        },\n                        {\n                            \"type\": \"TradeBrandName\",\n                            \"value\": \"Mentha Naturals\"\n                        },\n                        {\n                            \"type\": \"ProductSpecificDescription\",\n                            \"value\": \"Steam-distilled peppermint essential oil, 2 x 30 ml bottles\"\n                        },\n                        {\n                            \"type\": \"PackagingLevels\",\n                            \"value\": \"1 box containing 2 bottles\"\n                        }\n                    ],\n                    \"notForMedicalUse\": true\n                },\n                {\n                    \"countryOfOrigin\": \"FR\",\n                    \"totalDeclaredValue\": 24.0,\n                    \"description\": \"Reed diffuser refill, lavender room fragrance\",\n                    \"htsCode\": \"3307.49.00.00\",\n                    \"quantity\": 1,\n                    \"customsQuantities\": [\n                        {\n                            \"value\": 0.3,\n                            \"unitOfMeasure\": \"Kg\"\n                        }\n                    ],\n                    \"pgaData\": [\n                        {\n                            \"type\": \"IntendedUse\",\n                            \"value\": \"Room fragrance - reed diffuser refill\"\n                        },\n                        {\n                            \"type\": \"ProductCode\",\n                            \"value\": \"53FMF07\"\n                        },\n                        {\n                            \"type\": \"CountryOfProduction\",\n                            \"value\": \"FR\"\n                        },\n                        {\n                            \"type\": \"TradeBrandName\",\n                            \"value\": \"Maison Lavande\"\n                        },\n                        {\n                            \"type\": \"ProductSpecificDescription\",\n                            \"value\": \"Lavender reed diffuser refill, 200 ml bottle\"\n                        },\n                        {\n                            \"type\": \"PackagingLevels\",\n                            \"value\": \"1 box containing 1 bottle\"\n                        },\n                        {\n                            \"type\": \"TscaCertification\",\n                            \"value\": \"Positive certification - all chemical substances comply with TSCA\"\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/packages"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"packages\": [\n    {\n      \"id\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c101\",\n      \"trackingReference\": \"FR555666777FR\",\n      \"client\": {\n        \"id\": \"8651bce6-f384-4391-92ee-0ad134d94e87\",\n        \"name\": \"Acme Post\",\n        \"slug\": \"acme\",\n        \"country\": null,\n        \"paymentProcessors\": []\n      },\n      \"shipment\": null,\n      \"items\": [\n        {\n          \"id\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c201\",\n          \"name\": null,\n          \"description\": \"Matte lipstick, cosmetic lip make-up\",\n          \"singleUnitDeclaredValue\": 12.0,\n          \"quantity\": 5,\n          \"countryOfOrigin\": \"FR\",\n          \"htsCode\": \"3304100000\",\n          \"declaredHtsCode\": \"3304100000\",\n          \"resolvedHtsCode\": null,\n          \"hasDeclaredHtsMismatch\": false,\n          \"totalWeightValue\": 0.1,\n          \"totalWeightUnit\": \"KG\",\n          \"tariffRatePercentage\": 0.0,\n          \"totalDutiesOwed\": 0.0,\n          \"tariffLines\": [\n            {\n              \"htsCode\": \"3304.10.00.00\",\n              \"description\": \"Beauty or make-up preparations and preparations for the care of the skin (other than medicaments), including sunscreen or sun tan preparations; manicure or pedicure preparations: Lip make-up preparations\",\n              \"ratePercentage\": 0.0,\n              \"rateDescriptor\": null,\n              \"usdDutiesOwed\": 0.0\n            }\n          ],\n          \"missingFields\": []\n        },\n        {\n          \"id\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c202\",\n          \"name\": null,\n          \"description\": \"Peppermint essential oil for aromatherapy diffusers\",\n          \"singleUnitDeclaredValue\": 19.25,\n          \"quantity\": 2,\n          \"countryOfOrigin\": \"IN\",\n          \"htsCode\": \"3301240000\",\n          \"declaredHtsCode\": \"3301240000\",\n          \"resolvedHtsCode\": null,\n          \"hasDeclaredHtsMismatch\": false,\n          \"totalWeightValue\": 0.25,\n          \"totalWeightUnit\": \"KG\",\n          \"tariffRatePercentage\": 4.2,\n          \"totalDutiesOwed\": 1.62,\n          \"tariffLines\": [\n            {\n              \"htsCode\": \"3301.24.00.00\",\n              \"description\": \"Essential oils (terpeneless or not), including concretes and absolutes; resinoids; extracted oleoresins; concentrates of essential oils in fats, in fixed oils, in waxes or the like, obtained by enfleurage or maceration; terpenic by products of the deterpenation of essential oils; aqueous distillates and aqueous solutions of essential oils: Of peppermint (Mentha piperita)\",\n              \"ratePercentage\": 4.2,\n              \"rateDescriptor\": null,\n              \"usdDutiesOwed\": 1.62\n            }\n          ],\n          \"missingFields\": []\n        },\n        {\n          \"id\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c203\",\n          \"name\": null,\n          \"description\": \"Reed diffuser refill, lavender room fragrance\",\n          \"singleUnitDeclaredValue\": 24.0,\n          \"quantity\": 1,\n          \"countryOfOrigin\": \"FR\",\n          \"htsCode\": \"3307490000\",\n          \"declaredHtsCode\": \"3307490000\",\n          \"resolvedHtsCode\": null,\n          \"hasDeclaredHtsMismatch\": false,\n          \"totalWeightValue\": 0.3,\n          \"totalWeightUnit\": \"KG\",\n          \"tariffRatePercentage\": 6.0,\n          \"totalDutiesOwed\": 1.44,\n          \"tariffLines\": [\n            {\n              \"htsCode\": \"3307.49.00.00\",\n              \"description\": \"Pre-shave, shaving or after-shave preparations, personal deodorants, bath preparations, depilatories and other perfumery, cosmetic or toilet preparations, not elsewhere specified or included; prepared room deodorizers, whether or not perfumed or having disinfectant properties: Other: Other\",\n              \"ratePercentage\": 6.0,\n              \"rateDescriptor\": null,\n              \"usdDutiesOwed\": 1.44\n            }\n          ],\n          \"missingFields\": []\n        }\n      ],\n      \"totalDeclaredValue\": 122.5,\n      \"totalDutiesOwed\": 3.06,\n      \"fee\": 2.5,\n      \"inputCurrency\": \"USD\",\n      \"inputCurrencyToUsdConversionRate\": 1,\n      \"inputCurrencyTotalDeclaredValue\": 122.5,\n      \"inputCurrencyTotalDutiesOwed\": 3.06,\n      \"inputCurrencyFee\": 2.5,\n      \"payments\": [],\n      \"paymentStatus\": \"Pending\",\n      \"declarationId\": null,\n      \"labelReference\": null,\n      \"createdAtUtc\": \"2026-08-04T10:35:22.123Z\",\n      \"classificationType\": \"Regular\"\n    }\n  ],\n  \"packageErrors\": [],\n  \"genericErrors\": []\n}"},{"id":"9100a43f-25e9-42af-be79-0827290702fc","name":"Partial Success with Errors","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n    \"packages\": [\n        {\n            \"trackingReference\": \"US123456789US\",\n            \"items\": [\n                {\n                    \"countryOfOrigin\": \"CN\",\n                    \"totalDeclaredValue\": 77.97,\n                    \"description\": \"Men's knitted cotton t-shirt, short sleeve\",\n                    \"htsCode\": \"6109.10.00.12\",\n                    \"quantity\": 3,\n                    \"customsQuantities\": [\n                        {\n                            \"value\": 0.6,\n                            \"unitOfMeasure\": \"Kg\"\n                        }\n                    ]\n                },\n                {\n                    \"countryOfOrigin\": \"JP\",\n                    \"totalDeclaredValue\": 91.0,\n                    \"description\": \"Ceramic coffee mug, hand painted\",\n                    \"htsCode\": \"6912.00.44.00\",\n                    \"quantity\": 2,\n                    \"singleUnitWeight\": {\n                        \"value\": 0.7,\n                        \"unitOfMeasure\": \"Kilograms\"\n                    }\n                }\n            ]\n        },\n        {\n            \"trackingReference\": \"CN987654321CN\",\n            \"items\": [\n                {\n                    \"countryOfOrigin\": \"DE\",\n                    \"declaredValue\": 75.0,\n                    \"description\": \"Leather wallet, bovine\",\n                    \"htsCode\": \"4202.31.60.00\",\n                    \"quantity\": 1,\n                    \"weight\": {\n                        \"value\": 0.2,\n                        \"unitOfMeasure\": \"Kilograms\"\n                    }\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/packages"},"status":"Multi-Status","code":207,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"packages\": [\n    {\n      \"id\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c101\",\n      \"trackingReference\": \"US123456789US\",\n      \"client\": {\n        \"id\": \"8651bce6-f384-4391-92ee-0ad134d94e87\",\n        \"name\": \"Acme Post\",\n        \"slug\": \"acme\",\n        \"country\": null,\n        \"paymentProcessors\": []\n      },\n      \"shipment\": null,\n      \"items\": [\n        {\n          \"id\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c111\",\n          \"name\": null,\n          \"description\": \"Men's knitted cotton t-shirt, short sleeve\",\n          \"singleUnitDeclaredValue\": 25.99,\n          \"quantity\": 3,\n          \"countryOfOrigin\": \"CN\",\n          \"htsCode\": \"6109100012\",\n          \"declaredHtsCode\": \"6109100012\",\n          \"resolvedHtsCode\": null,\n          \"hasDeclaredHtsMismatch\": false,\n          \"totalWeightValue\": 0.6,\n          \"totalWeightUnit\": \"KG\",\n          \"tariffRatePercentage\": 16.5,\n          \"totalDutiesOwed\": 12.87,\n          \"tariffLines\": [],\n          \"missingFields\": []\n        }\n      ],\n      \"totalDeclaredValue\": 77.97,\n      \"totalDutiesOwed\": 12.87,\n      \"fee\": 2.5,\n      \"inputCurrency\": \"USD\",\n      \"payments\": [],\n      \"paymentStatus\": \"Pending\",\n      \"createdAtUtc\": \"2026-08-04T10:35:22.123Z\",\n      \"classificationType\": \"Regular\"\n    }\n  ],\n  \"packageErrors\": [\n    {\n      \"code\": \"APP_HtsClassificationFailed\",\n      \"message\": \"The HTS classification could not be resolved for the item (status: needs_input; hts: '691200'; description: '')\",\n      \"referenceValue\": \"0198c5a0-7b3e-7f21-9c44-3d2a91b0c122\"\n    }\n  ],\n  \"genericErrors\": []\n}"},{"id":"e04a3569-5829-4d17-b9d9-3e29b6146a8d","name":"All Packages Failed","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n    \"packages\": [\n        {\n            \"trackingReference\": \"US123456789US\",\n            \"items\": [\n                {\n                    \"countryOfOrigin\": \"CN\",\n                    \"totalDeclaredValue\": 77.97,\n                    \"description\": \"Men's knitted cotton t-shirt, short sleeve\",\n                    \"htsCode\": \"6109.10.00.12\",\n                    \"quantity\": 3,\n                    \"customsQuantities\": [\n                        {\n                            \"value\": 0.6,\n                            \"unitOfMeasure\": \"Kg\"\n                        }\n                    ]\n                },\n                {\n                    \"countryOfOrigin\": \"JP\",\n                    \"totalDeclaredValue\": 91.0,\n                    \"description\": \"Ceramic coffee mug, hand painted\",\n                    \"htsCode\": \"6912.00.44.00\",\n                    \"quantity\": 2,\n                    \"singleUnitWeight\": {\n                        \"value\": 0.7,\n                        \"unitOfMeasure\": \"Kilograms\"\n                    }\n                }\n            ]\n        },\n        {\n            \"trackingReference\": \"CN987654321CN\",\n            \"items\": [\n                {\n                    \"countryOfOrigin\": \"DE\",\n                    \"declaredValue\": 75.0,\n                    \"description\": \"Leather wallet, bovine\",\n                    \"htsCode\": \"4202.31.60.00\",\n                    \"quantity\": 1,\n                    \"weight\": {\n                        \"value\": 0.2,\n                        \"unitOfMeasure\": \"Kilograms\"\n                    }\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/packages"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"packages\": [],\n  \"packageErrors\": [\n    {\n      \"code\": \"V_InvalidTrackingReferenceFormat\",\n      \"message\": \"Invalid tracking reference format\",\n      \"referenceValue\": \"INVALID_REF\"\n    },\n    {\n      \"code\": \"V_ExactlyOneValueRequired\",\n      \"message\": \"Exactly one of the mutually exclusive properties must be populated\",\n      \"referenceValue\": \"packages[0].items[0].declaredValue\"\n    },\n    {\n      \"code\": \"V_ValueMustBeWholeNumber\",\n      \"message\": \"Value must be a whole number\",\n      \"referenceValue\": \"packages[0].items[0].quantity\"\n    }\n  ],\n  \"genericErrors\": []\n}"}],"_postman_id":"42da45fe-770f-4c25-b704-67ff42fca79b"}],"id":"b0e0e8d2-1faf-48d0-a11e-a0f704b87c75","description":"<p>Package management operations for individual mail items with customs information.</p>\n","_postman_id":"b0e0e8d2-1faf-48d0-a11e-a0f704b87c75"},{"name":"Containers","item":[{"name":"Create Containers","id":"e3ca7a29-e8d8-422f-a8b4-9ff11671162e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n  \"containers\": [\n    {\n      \"trackingReference\": \"CONT001-AA1234\",\n      \"entryRoute\": {\n        \"flightOrTripNumber\": \"AA1234\",\n        \"transportType\": \"Air\",\n        \"carrierCode\": \"AA\",\n        \"arrivalPortCode\": \"4701\",\n        \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n      },\n      \"packages\": [\"US123456789US\", \"CN987654321CN\"]\n    },\n    {\n      \"trackingReference\": \"CONT002-DL53\",\n      \"entryRoute\": {\n        \"flightOrTripNumber\": \"DL53\",\n        \"transportType\": \"Air\",\n        \"carrierCode\": \"DL\",\n        \"arrivalPortCode\": \"4701\",\n        \"entryTimestamp\": \"2024-01-16T08:00:00Z\"\n      },\n      \"packages\": [\"DE456789123DE\"]\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/containers","description":"<h1 id=\"create-containers\">Create Containers</h1>\n<p>Creates multiple containers in a single operation, each with their own entry route information and package assignments.</p>\n<h2 id=\"request-body-fields\">Request Body Fields</h2>\n<h3 id=\"root-object\">Root Object</h3>\n<ul>\n<li><strong>containers</strong> (array, required): Collection of containers to create</li>\n</ul>\n<h3 id=\"container-object\">Container Object</h3>\n<ul>\n<li><p><strong>trackingReference</strong> (string, required): Unique identifier for the container</p>\n<ul>\n<li><p>Format: Alphanumeric string, max 50 characters</p>\n</li>\n<li><p>Example: <code>CONT001-AA1234</code>, <code>CONT002-DL53</code></p>\n</li>\n<li><p>Must be unique across all containers</p>\n</li>\n<li><p>Often includes flight/vessel reference for easy identification</p>\n</li>\n</ul>\n</li>\n<li><p><strong>packages</strong> (array, required): List of package tracking references</p>\n<ul>\n<li><p>Format: Array of strings</p>\n</li>\n<li><p>References must match existing packages created via <code>/packages</code> endpoint</p>\n</li>\n<li><p>Minimum: 1 package per container</p>\n</li>\n<li><p>Example: <code>[\"US123456789US\", \"CN987654321CN\"]</code></p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"entry-route-object\">Entry Route Object</h3>\n<ul>\n<li><p><strong>flightOrTripNumber</strong> (string, required): Transportation identifier</p>\n<ul>\n<li><p>For Air: Flight number (e.g., <code>AA1234</code>, <code>DL53</code>, <code>UA567</code>)</p>\n</li>\n<li><p>For Vessel: Voyage number (e.g., <code>MAEU-123</code>, <code>COSCO-456</code>)</p>\n</li>\n<li><p>For Ground: Trip/route number</p>\n</li>\n<li><p>Max length: 50 characters</p>\n</li>\n</ul>\n</li>\n<li><p><strong>transportType</strong> (string, required): Mode of transportation</p>\n<ul>\n<li><p>Values: <code>Air</code>, <code>Vessel</code>, <code>Ground</code></p>\n</li>\n<li><p>Case-sensitive enumeration</p>\n</li>\n<li><p>Used for compliance and routing decisions</p>\n</li>\n</ul>\n</li>\n<li><p><strong>carrierCode</strong> (string, required): Transportation company code</p>\n<ul>\n<li><p>Examples: <code>AA</code> (American Airlines), <code>DL</code> (Delta), <code>UA</code> (United)</p>\n</li>\n<li><p>Standard industry codes preferred</p>\n</li>\n<li><p>Max length: 10 characters</p>\n</li>\n</ul>\n</li>\n<li><p><strong>arrivalPortCode</strong> (string, required): CBP port of entry code</p>\n<ul>\n<li><p>Format: Standard CBP port codes</p>\n</li>\n<li><p>Example: <code>4701</code> for specific port locations</p>\n</li>\n<li><p>Used for customs processing and duty collection</p>\n</li>\n<li><p>Max length: 10 characters</p>\n</li>\n</ul>\n</li>\n<li><p><strong>entryTimestamp</strong> (string, required): Arrival date and time</p>\n<ul>\n<li><p>Format: ISO 8601 timestamp with timezone</p>\n</li>\n<li><p>Example: <code>2024-01-15T10:30:00Z</code></p>\n</li>\n<li><p>Used for scheduling and compliance reporting</p>\n</li>\n<li><p>Must be valid future or past timestamp</p>\n</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<p>Returns an array of created containers with:</p>\n<ul>\n<li><p>Container ID (system generated)</p>\n</li>\n<li><p>Tracking reference</p>\n</li>\n<li><p>Entry route information</p>\n</li>\n<li><p>Associated package references</p>\n</li>\n<li><p>Creation timestamp</p>\n</li>\n</ul>\n<h2 id=\"business-rules\">Business Rules</h2>\n<ul>\n<li><p>Container tracking references must be unique</p>\n</li>\n<li><p>All referenced packages must exist before container creation</p>\n</li>\n<li><p>Entry timestamp should align with actual arrival schedules</p>\n</li>\n<li><p>Port codes must be valid CBP locations</p>\n</li>\n</ul>\n","urlObject":{"path":["api","v1","containers"],"host":["https://dutycollection.safepackage.com"],"query":[],"variable":[]}},"response":[{"id":"bd288aef-0b4e-4e31-8abd-bab34c74f061","name":"Successful Container Creation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n  \"containers\": [\n    {\n      \"trackingReference\": \"CONT001-AA1234\",\n      \"entryRoute\": {\n        \"flightOrTripNumber\": \"AA1234\",\n        \"transportType\": \"Air\",\n        \"carrierCode\": \"AA\",\n        \"arrivalPortCode\": \"4701\",\n        \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n      },\n      \"packages\": [\"US123456789US\", \"CN987654321CN\"]\n    },\n    {\n      \"trackingReference\": \"CONT002-DL53\",\n      \"entryRoute\": {\n        \"flightOrTripNumber\": \"DL53\",\n        \"transportType\": \"Air\",\n        \"carrierCode\": \"DL\",\n        \"arrivalPortCode\": \"4701\",\n        \"entryTimestamp\": \"2024-01-16T08:00:00Z\"\n      },\n      \"packages\": [\"DE456789123DE\"]\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/containers"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"containers\": [\n    {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440100\",\n      \"trackingReference\": \"CONT001-AA1234\",\n      \"entryRoute\": {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n        \"flightOrTripNumber\": \"AA1234\",\n        \"transportType\": \"Air\",\n        \"carrierCode\": \"AA\",\n        \"arrivalPortCode\": \"4701\",\n        \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n      },\n      \"packages\": [\n        {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440001\",\n          \"trackingReference\": \"US123456789US\",\n          \"sender\": null,\n          \"entryRoute\": {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n            \"flightOrTripNumber\": \"AA1234\",\n            \"transportType\": \"Air\",\n            \"carrierCode\": \"AA\",\n            \"arrivalPortCode\": \"4701\",\n            \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n          },\n          \"totalDeclaredValue\": 71.49,\n          \"totalDutiesOwed\": 7.15,\n          \"fee\": 2.50,\n          \"items\": [\n            {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440011\",\n              \"name\": null,\n              \"declaredValue\": 25.99,\n              \"countryOfOrigin\": \"CN\",\n              \"tariffRatePercentage\": 10.0,\n              \"dutiesOwed\": 2.60\n            },\n            {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440012\",\n              \"name\": null,\n              \"declaredValue\": 45.50,\n              \"countryOfOrigin\": \"JP\",\n              \"tariffRatePercentage\": 10.0,\n              \"dutiesOwed\": 4.55\n            }\n          ],\n          \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n        },\n        {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440002\",\n          \"trackingReference\": \"CN987654321CN\",\n          \"sender\": null,\n          \"entryRoute\": {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n            \"flightOrTripNumber\": \"AA1234\",\n            \"transportType\": \"Air\",\n            \"carrierCode\": \"AA\",\n            \"arrivalPortCode\": \"4701\",\n            \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n          },\n          \"totalDeclaredValue\": 75.00,\n          \"totalDutiesOwed\": 7.50,\n          \"fee\": 2.50,\n          \"items\": [\n            {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440021\",\n              \"name\": null,\n              \"declaredValue\": 75.00,\n              \"countryOfOrigin\": \"DE\",\n              \"tariffRatePercentage\": 10.0,\n              \"dutiesOwed\": 7.50\n            }\n          ],\n          \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n        }\n      ],\n      \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n    },\n    {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440200\",\n      \"trackingReference\": \"CONT002-DL53\",\n      \"entryRoute\": {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440201\",\n        \"flightOrTripNumber\": \"DL53\",\n        \"transportType\": \"Air\",\n        \"carrierCode\": \"DL\",\n        \"arrivalPortCode\": \"4701\",\n        \"entryTimestamp\": \"2024-01-16T08:00:00Z\"\n      },\n      \"packages\": [\n        {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440003\",\n          \"trackingReference\": \"DE456789123DE\",\n          \"sender\": null,\n          \"entryRoute\": {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440201\",\n            \"flightOrTripNumber\": \"DL53\",\n            \"transportType\": \"Air\",\n            \"carrierCode\": \"DL\",\n            \"arrivalPortCode\": \"4701\",\n            \"entryTimestamp\": \"2024-01-16T08:00:00Z\"\n          },\n          \"totalDeclaredValue\": 125.00,\n          \"totalDutiesOwed\": 12.50,\n          \"fee\": 2.50,\n          \"items\": [\n            {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440031\",\n              \"name\": null,\n              \"declaredValue\": 125.00,\n              \"countryOfOrigin\": \"DE\",\n              \"tariffRatePercentage\": 10.0,\n              \"dutiesOwed\": 12.50\n            }\n          ],\n          \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n        }\n      ],\n      \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n    }\n  ],\n  \"containerErrors\": [],\n  \"genericErrors\": []\n}"},{"id":"c6ece96f-6b7d-4234-aab1-6c77d828fbc3","name":"Partial Success with Errors","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n  \"containers\": [\n    {\n      \"trackingReference\": \"CONT001-AA1234\",\n      \"entryRoute\": {\n        \"flightOrTripNumber\": \"AA1234\",\n        \"transportType\": \"Air\",\n        \"carrierCode\": \"AA\",\n        \"arrivalPortCode\": \"4701\",\n        \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n      },\n      \"packages\": [\"US123456789US\"]\n    },\n    {\n      \"trackingReference\": \"CONT001-AA1234\",\n      \"entryRoute\": {\n        \"flightOrTripNumber\": \"INVALID\",\n        \"transportType\": \"InvalidType\",\n        \"carrierCode\": \"\",\n        \"arrivalPortCode\": \"9999\",\n        \"entryTimestamp\": \"invalid-date\"\n      },\n      \"packages\": [\"NONEXISTENT_PACKAGE\"]\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/containers"},"status":"Multi-Status","code":207,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"containers\": [\n    {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440100\",\n      \"trackingReference\": \"CONT001-AA1234\",\n      \"entryRoute\": {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n        \"flightOrTripNumber\": \"AA1234\",\n        \"transportType\": \"Air\",\n        \"carrierCode\": \"AA\",\n        \"arrivalPortCode\": \"4701\",\n        \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n      },\n      \"packages\": [\n        {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440001\",\n          \"trackingReference\": \"US123456789US\",\n          \"sender\": null,\n          \"entryRoute\": {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n            \"flightOrTripNumber\": \"AA1234\",\n            \"transportType\": \"Air\",\n            \"carrierCode\": \"AA\",\n            \"arrivalPortCode\": \"4701\",\n            \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n          },\n          \"totalDeclaredValue\": 25.99,\n          \"totalDutiesOwed\": 2.60,\n          \"fee\": 2.50,\n          \"items\": [\n            {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440011\",\n              \"name\": null,\n              \"declaredValue\": 25.99,\n              \"countryOfOrigin\": \"CN\",\n              \"tariffRatePercentage\": 10.0,\n              \"dutiesOwed\": 2.60\n            }\n          ],\n          \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n        }\n      ],\n      \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n    }\n  ],\n  \"containerErrors\": [\n    {\n      \"trackingReference\": \"CONT001-AA1234\",\n      \"errors\": [\n        {\n          \"message\": \"Duplicate container tracking reference 'CONT001-AA1234'. Container tracking references must be unique.\"\n        },\n        {\n          \"message\": \"Invalid transport type 'InvalidType'. Must be one of: Air, Vessel, Ground.\"\n        },\n        {\n          \"message\": \"Carrier code cannot be empty.\"\n        },\n        {\n          \"message\": \"Invalid arrival port code '99999'. Must be a valid CBP port code.\"\n        },\n        {\n          \"message\": \"Invalid entry timestamp format. Must be a valid ISO 8601 date.\"\n        },\n        {\n          \"message\": \"Package 'NONEXISTENT_PACKAGE' not found. All packages must exist before container creation.\"\n        }\n      ]\n    }\n  ],\n  \"genericErrors\": []\n}"},{"id":"8f72fbfe-99b2-49c3-98da-4f249585e18f","name":"All Containers Failed","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n  \"containers\": [\n    {\n      \"trackingReference\": \"\",\n      \"entryRoute\": {\n        \"flightOrTripNumber\": \"\",\n        \"transportType\": \"InvalidType\",\n        \"carrierCode\": \"\",\n        \"arrivalPortCode\": \"INVALID\",\n        \"entryTimestamp\": \"not-a-date\"\n      },\n      \"packages\": []\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/containers"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"containers\": [],\n  \"containerErrors\": [\n    {\n      \"trackingReference\": \"\",\n      \"errors\": [\n        {\n          \"message\": \"Container tracking reference cannot be empty or null.\"\n        },\n        {\n          \"message\": \"Flight or trip number cannot be empty.\"\n        },\n        {\n          \"message\": \"Invalid transport type 'InvalidType'. Must be one of: Air, Vessel, Ground.\"\n        },\n        {\n          \"message\": \"Carrier code cannot be empty.\"\n        },\n        {\n          \"message\": \"Invalid arrival port code 'INVALID'. Must be a valid CBP port code.\"\n        },\n        {\n          \"message\": \"Invalid entry timestamp format. Must be a valid ISO 8601 date.\"\n        },\n        {\n          \"message\": \"Container must have at least one package.\"\n        }\n      ]\n    }\n  ],\n  \"genericErrors\": []\n}"}],"_postman_id":"e3ca7a29-e8d8-422f-a8b4-9ff11671162e"}],"id":"797c136c-b478-4ba1-b922-f5baef04a8b4","description":"<p>Container management for grouping packages with transport and entry route information.</p>\n","_postman_id":"797c136c-b478-4ba1-b922-f5baef04a8b4"},{"name":"Duties","item":[{"name":"Calculate Duties","id":"f740a432-625d-4e0c-b3c5-27d3a4c3aad5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n  \"items\": [\n    {\n      \"reference\": \"ITEM-001\",\n      \"countryCode\": \"CN\",\n      \"price\": 25.99,\n      \"quantity\": 3,\n      \"htsCode\": \"4908.90.00\"\n    },\n    {\n      \"reference\": \"ITEM-002\",\n      \"countryCode\": \"JP\",\n      \"price\": 89.99,\n      \"quantity\": 3,\n      \"htsCode\": \"4908.90.00\"\n    },\n    {\n      \"reference\": \"ITEM-003\",\n      \"countryCode\": \"DE\",\n      \"price\": 150.00,\n      \"quantity\": 3,\n      \"htsCode\": \"4908.90.00\"\n    }\n  ],\n  \"entryDate\": \"2024-01-15\"\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/duties/calculate","description":"<h1 id=\"calculate-duties\">Calculate Duties</h1>\n<p>Calculates customs duties for a collection of items based on their country of origin, declared value, and entry date.</p>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint provides duty calculation functionality without creating any persistent records. It's useful for:</p>\n<ul>\n<li>Pre-calculation of duties before package creation</li>\n<li>Cost estimation for international shipments</li>\n<li>Compliance planning and budgeting</li>\n<li>Integration with e-commerce checkout flows</li>\n</ul>\n<h2 id=\"request-body-fields\">Request Body Fields</h2>\n<h3 id=\"root-object\">Root Object</h3>\n<ul>\n<li><p><strong>items</strong> (array, required): Collection of items to calculate duties for</p>\n<ul>\n<li>Minimum: 1 item required</li>\n<li>Maximum: No system limit (practical limit ~100 items per request)</li>\n</ul>\n</li>\n<li><p><strong>entryDate</strong> (string, required): Date when items will enter the country</p>\n<ul>\n<li>Format: ISO 8601 date format (YYYY-MM-DD)</li>\n<li>Example: <code>2024-01-15</code></li>\n<li>Used to determine applicable tariff rates</li>\n<li>Cannot be more than 30 days in the past or future</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"item-object\">Item Object</h3>\n<ul>\n<li><p><strong>reference</strong> (string, required): Unique identifier for the item</p>\n<ul>\n<li>Format: Alphanumeric string, max 100 characters</li>\n<li>Example: <code>ITEM-001</code>, <code>SKU-ABC123</code>, <code>PRODUCT-456</code></li>\n<li>Used for tracking calculations in the response</li>\n<li>Must be unique within the request</li>\n</ul>\n</li>\n<li><p><strong>countryCode</strong> (string, required): ISO country code of item origin</p>\n<ul>\n<li>Format: 2-letter ISO 3166-1 alpha-2 country code</li>\n<li>Examples: <code>CN</code> (China), <code>JP</code> (Japan), <code>DE</code> (Germany), <code>US</code> (United States)</li>\n<li>Case-sensitive</li>\n<li>Used to determine applicable tariff rates</li>\n</ul>\n</li>\n<li><p><strong>price</strong> (number, required): Declared monetary value of the item</p>\n<ul>\n<li>Format: Decimal number with up to 2 decimal places</li>\n<li>Currency: USD (implied)</li>\n<li>Range: 0.01 to 999,999.99</li>\n<li>Examples: <code>25.99</code>, <code>150.00</code>, <code>1250.50</code></li>\n<li>Used as the basis for duty calculation</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"response-structure\">Response Structure</h2>\n<p>Returns calculated duty information for each item:</p>\n<ul>\n<li><strong>Item Reference</strong>: Original reference from request</li>\n<li><strong>Country Code</strong>: Country of origin</li>\n<li><strong>Price</strong>: Declared value</li>\n<li><strong>Entry Date</strong>: Entry date used for calculation</li>\n<li><strong>Tariff Rate Percentage</strong>: Applied tariff rate</li>\n<li><strong>Calculated Duty</strong>: Final duty amount in USD</li>\n</ul>\n<h2 id=\"business-rules\">Business Rules</h2>\n<ul>\n<li>Duty rates are determined by country of origin and current trade policies</li>\n<li>Entry date affects which tariff schedule is applied</li>\n<li>Minimum duty calculation is $0.01</li>\n<li>All calculations are in USD</li>\n<li>Results are valid for the specified entry date only</li>\n</ul>\n<h2 id=\"use-cases\">Use Cases</h2>\n<ul>\n<li><strong>E-commerce Integration</strong>: Calculate duties during checkout</li>\n<li><strong>Cost Estimation</strong>: Pre-shipment duty estimates</li>\n<li><strong>Compliance Planning</strong>: Budget planning for international trade</li>\n<li><strong>Rate Shopping</strong>: Compare duties across different entry dates</li>\n<li><strong>API Integration</strong>: Integrate duty calculations into existing systems</li>\n</ul>\n<h2 id=\"error-handling\">Error Handling</h2>\n<ul>\n<li>Invalid country codes will return validation errors</li>\n<li>Negative prices will be rejected</li>\n<li>Missing required fields will return detailed error messages</li>\n<li>Invalid date formats will be rejected</li>\n</ul>\n","urlObject":{"path":["api","v1","duties","calculate"],"host":["https://dutycollection.safepackage.com"],"query":[],"variable":[]}},"response":[{"id":"7a71bdee-b692-4033-8a1f-5ccdde43bac5","name":"Successful Duty Calculation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n  \"items\": [\n    {\n      \"reference\": \"ITEM-001\",\n      \"countryCode\": \"CN\",\n      \"price\": 25.99,\n      \"htsCode\": \"4908.90.00\"\n    },\n    {\n      \"reference\": \"ITEM-002\",\n      \"countryCode\": \"JP\",\n      \"price\": 89.99,\n      \"htsCode\": \"4908.90.00\"\n    },\n    {\n      \"reference\": \"ITEM-003\",\n      \"countryCode\": \"DE\",\n      \"price\": 150.00\n    }\n  ],\n  \"entryDate\": \"2025-11-15\"\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection-sandbox.safepackage.com/api/v1/duties/calculate"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"items\": [\n    {\n      \"itemReference\": \"ITEM-001\",\n      \"countryCode\": \"CN\",\n      \"price\": 25.99,\n      \"entryDate\": \"2024-01-15\",\n      \"tariffRatePercentage\": 10.0,\n      \"calculatedDuty\": 0,\n      \"htsCode\": \"4908.90.00\"\n    },\n    {\n      \"itemReference\": \"ITEM-002\",\n      \"countryCode\": \"JP\",\n      \"price\": 89.99,\n      \"entryDate\": \"2024-01-15\",\n      \"tariffRatePercentage\": 8.5,\n      \"calculatedDuty\": 7.65\n    },\n    {\n      \"itemReference\": \"ITEM-003\",\n      \"countryCode\": \"DE\",\n      \"price\": 150.00,\n      \"entryDate\": \"2024-01-15\",\n      \"tariffRatePercentage\": 5.0,\n      \"calculatedDuty\": 7.50\n    }\n  ],\n  \"totalTariffValue\": 15.15\n}"},{"id":"986e300d-cde5-4ece-bf3e-db2d07b7101e","name":"Validation Error","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n  \"items\": [\n    {\n      \"reference\": \"\",\n      \"countryCode\": \"XX\",\n      \"price\": -10.00\n    },\n    {\n      \"reference\": \"ITEM-002\",\n      \"countryCode\": \"USA\",\n      \"price\": 0\n    }\n  ],\n  \"entryDate\": \"invalid-date\"\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/duties/calculate"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"type\": \"https://tools.ietf.org/html/rfc7231#section-6.5.1\",\n  \"title\": \"One or more validation errors occurred.\",\n  \"status\": 400,\n  \"errors\": {\n    \"Items[0].Reference\": [\n      \"Reference is required and must be 50 characters or less.\"\n    ],\n    \"Items[0].CountryCode\": [\n      \"Country code is required and must be exactly 2 characters.\"\n    ],\n    \"Items[0].Price\": [\n      \"Price must be greater than 0.\"\n    ],\n    \"Items[1].CountryCode\": [\n      \"Country code is required and must be exactly 2 characters.\"\n    ],\n    \"Items[1].Price\": [\n      \"Price must be greater than 0.\"\n    ],\n    \"EntryDate\": [\n      \"The JSON value could not be converted to System.DateOnly.\"\n    ]\n  }\n}"}],"_postman_id":"f740a432-625d-4e0c-b3c5-27d3a4c3aad5"}],"id":"732aa7b7-8fce-490b-bcc1-028fbc7b2cc8","description":"<p>Duty calculation services for estimating customs duties without creating persistent records.</p>\n","_postman_id":"732aa7b7-8fce-490b-bcc1-028fbc7b2cc8"},{"name":"HTS","item":[{"name":"Get HTS Code Requirements","id":"7f76c3ff-c3ab-46fe-b150-f61d0b516a6f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://dutycollection.safepackage.com/api/v1/hts/6101.30.15.00/requirements","description":"<h1 id=\"get-hts-code-requirements\">Get HTS Code Requirements</h1>\n<p>Returns what an item classified under the given HTS code must carry when it is submitted: the data its duty calculation needs, and the PGA (Entry Type 13) data its filing needs. Query it before submitting packages to know up front which item fields to collect.</p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<ul>\n<li><p><strong>htsCode</strong> (string, required): the HTS code to query, dotted or plain digits (e.g. <code>6101.30.15.00</code> or <code>6101301500</code>)</p>\n<ul>\n<li>Codes that do not resolve to a tariff schedule entry return <code>404 Not Found</code></li>\n</ul>\n</li>\n</ul>\n<h2 id=\"response-fields\">Response Fields</h2>\n<ul>\n<li><p><strong>htsCode</strong> (string): the queried code in dotted form</p>\n</li>\n<li><p><strong>description</strong> (string): the full hierarchical tariff schedule description of the code</p>\n</li>\n</ul>\n<h3 id=\"dutycalculation\">dutyCalculation</h3>\n<ul>\n<li><p><strong>requiresSpecificQuantityUnit</strong> (boolean): true when a rate on the code bills per unit (e.g. ¢/kg), so an accurate duty needs the item quantity expressed in one of the required units</p>\n</li>\n<li><p><strong>requiredQuantityUnits</strong> (array of strings): the units a <code>customsQuantities</code> entry must supply (e.g. <code>Kg</code>)</p>\n</li>\n<li><p><strong>acceptedQuantityUnits</strong> (array of strings): all units the tariff schedule lists for the code</p>\n</li>\n<li><p><strong>requiredComponents</strong> (array of strings): component HTS classifications CBP declares separately (e.g. watch movements); items under the code must submit a <code>components</code> entry per listed code</p>\n</li>\n</ul>\n<h3 id=\"pga\">pga</h3>\n<p><code>null</code> when no PGA indicators are recorded for the code — no PGA data is needed. Otherwise:</p>\n<ul>\n<li><p><strong>indicators</strong> (array of strings): the PGA flag codes of the HTS code (e.g. <code>FD1</code>, <code>AL2</code>)</p>\n</li>\n<li><p><strong>approvedForShipping</strong> (string): <code>Approved</code>, <code>ConditionallyApproved</code>, <code>NotApproved</code> or <code>Undetermined</code> — once Entry Type 13 enforcement is on, only <code>Approved</code> and <code>ConditionallyApproved</code> codes are accepted</p>\n</li>\n<li><p><strong>requiresNotForMedicalUseAttestation</strong> (boolean): when true, items under the code must submit <code>notForMedicalUse: true</code></p>\n</li>\n<li><p><strong>requiredData</strong> (array of strings): the <code>pgaData</code> types an item under the code must submit (see the Create Packages documentation for the full type list)</p>\n</li>\n</ul>\n","urlObject":{"path":["api","v1","hts","6101.30.15.00","requirements"],"host":["https://dutycollection.safepackage.com"],"query":[],"variable":[]}},"response":[{"id":"331c9b9f-cf65-4d12-960f-49feafa2b110","name":"Requirements returned","originalRequest":{"method":"GET","header":[],"url":"https://dutycollection.safepackage.com/api/v1/hts/6101.30.15.00/requirements"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"htsCode\": \"6101.30.15.00\",\n  \"description\": \"Men's or boys' overcoats, carcoats, capes, cloaks, anoraks (including ski-jackets), windbreakers and similar articles, knitted or crocheted, other than those of heading 6103: Of man-made fibers: Containing 25 percent or more by weight of leather Men's (434)\",\n  \"dutyCalculation\": {\n    \"requiresSpecificQuantityUnit\": true,\n    \"requiredQuantityUnits\": [\n      \"Kg\"\n    ],\n    \"acceptedQuantityUnits\": [\n      \"Number\",\n      \"Kg\"\n    ],\n    \"requiredComponents\": []\n  },\n  \"pga\": {\n    \"indicators\": [\n      \"FD1\"\n    ],\n    \"approvedForShipping\": \"ConditionallyApproved\",\n    \"requiresNotForMedicalUseAttestation\": true,\n    \"requiredData\": [\n      \"IntendedUse\",\n      \"ProductCode\",\n      \"CountryOfProduction\",\n      \"TradeBrandName\",\n      \"ProductSpecificDescription\",\n      \"PackagingLevels\"\n    ]\n  }\n}"}],"_postman_id":"7f76c3ff-c3ab-46fe-b150-f61d0b516a6f"}],"id":"cd97aba3-25d6-4e34-83dd-ab2cd932f9d7","description":"<p>Query the tariff schedule for what an item under a given HTS code must carry at submission.</p>\n","_postman_id":"cd97aba3-25d6-4e34-83dd-ab2cd932f9d7"},{"name":"Shipments","item":[{"name":"Create Shipment (Complete Workflow)","id":"e1bc4070-d18b-4dc9-88ae-32d8e7ed8831","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n    \"containers\": [\n        {\n            \"trackingReference\": \"CONT001-AA1234\",\n            \"entryRoute\": {\n                \"flightOrTripNumber\": \"AA1234\",\n                \"transportType\": \"Air\",\n                \"carrierCode\": \"AA\",\n                \"arrivalPortCode\": \"4701\",\n                \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n            },\n            \"packages\": [\n                {\n                    \"trackingReference\": \"US123456789US\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"CN\",\n                            \"description\": \"Cotton t-shirt\",\n                            \"htsCode\": \"6109.10.00\",\n                            \"quantity\": 3,\n                            \"totalDeclaredValue\": 77.97,\n                            \"customsQuantities\": [\n                                {\n                                    \"value\": 1.5,\n                                    \"unitOfMeasure\": \"Kg\"\n                                }\n                            ]\n                        },\n                        {\n                            \"countryOfOrigin\": \"CN\",\n                            \"description\": \"Phone case\",\n                            \"htsCode\": \"3926.90.99\",\n                            \"quantity\": 2,\n                            \"totalDeclaredValue\": 31.0,\n                            \"customsQuantities\": [\n                                {\n                                    \"value\": 0.2,\n                                    \"unitOfMeasure\": \"Kg\"\n                                }\n                            ]\n                        }\n                    ]\n                },\n                {\n                    \"trackingReference\": \"JP456789012JP\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"JP\",\n                            \"description\": \"Ceramic mug\",\n                            \"htsCode\": \"6912.00.48\",\n                            \"quantity\": 1,\n                            \"totalDeclaredValue\": 89.99,\n                            \"customsQuantities\": [\n                                {\n                                    \"value\": 0.35,\n                                    \"unitOfMeasure\": \"Kg\"\n                                }\n                            ],\n                            \"pgaData\": [\n                                {\n                                    \"type\": \"IntendedUse\",\n                                    \"value\": \"Household tableware for hot beverages (food contact)\"\n                                },\n                                {\n                                    \"type\": \"ProductCode\",\n                                    \"value\": \"23FGH07\"\n                                },\n                                {\n                                    \"type\": \"CountryOfProduction\",\n                                    \"value\": \"JP\"\n                                },\n                                {\n                                    \"type\": \"TradeBrandName\",\n                                    \"value\": \"Sakura Ceramics\"\n                                },\n                                {\n                                    \"type\": \"ProductSpecificDescription\",\n                                    \"value\": \"Hand painted ceramic coffee mug, 350 ml\"\n                                },\n                                {\n                                    \"type\": \"PackagingLevels\",\n                                    \"value\": \"1 box containing 2 mugs\"\n                                }\n                            ],\n                            \"notForMedicalUse\": true\n                        }\n                    ]\n                }\n            ]\n        },\n        {\n            \"trackingReference\": \"CONT002-DL53\",\n            \"entryRoute\": {\n                \"flightOrTripNumber\": \"DL53\",\n                \"transportType\": \"Air\",\n                \"carrierCode\": \"DL\",\n                \"arrivalPortCode\": \"4701\",\n                \"entryTimestamp\": \"2024-01-15T14:20:00Z\"\n            },\n            \"packages\": [\n                {\n                    \"trackingReference\": \"DE789012345DE\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"DE\",\n                            \"description\": \"Leather wallet\",\n                            \"htsCode\": \"4202.31.60\",\n                            \"quantity\": 1,\n                            \"totalDeclaredValue\": 150.0,\n                            \"customsQuantities\": [\n                                {\n                                    \"value\": 0.2,\n                                    \"unitOfMeasure\": \"Kg\"\n                                }\n                            ]\n                        }\n                    ]\n                },\n                {\n                    \"trackingReference\": \"FR012345678FR\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"FR\",\n                            \"description\": \"Silk scarf\",\n                            \"htsCode\": \"6214.10.00\",\n                            \"quantity\": 1,\n                            \"totalDeclaredValue\": 75.25,\n                            \"customsQuantities\": [\n                                {\n                                    \"value\": 0.15,\n                                    \"unitOfMeasure\": \"Kg\"\n                                }\n                            ]\n                        },\n                        {\n                            \"countryOfOrigin\": \"IT\",\n                            \"description\": \"Glass vase\",\n                            \"htsCode\": \"7013.99.50\",\n                            \"quantity\": 1,\n                            \"totalDeclaredValue\": 42.8,\n                            \"customsQuantities\": [\n                                {\n                                    \"value\": 0.8,\n                                    \"unitOfMeasure\": \"Kg\"\n                                }\n                            ]\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/shipments","description":"<h1 id=\"create-shipment-complete-workflow\">Create Shipment (Complete Workflow)</h1>\n<p>API that processes complete shipments with multiple containers, packages, and items in a single operation.</p>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint creates a complete shipment workflow by:</p>\n<ol>\n<li><p>Creating all packages and their items</p>\n</li>\n<li><p>Creating containers with entry route information</p>\n</li>\n<li><p>Automatically associating packages with their containers</p>\n</li>\n<li><p>Calculating duties and taxes for all items</p>\n</li>\n</ol>\n<h2 id=\"request-body-fields\">Request Body Fields</h2>\n<h3 id=\"root-object\">Root Object</h3>\n<ul>\n<li><p><strong>containers</strong> (array, required): Collection of containers with their packages</p>\n<ul>\n<li><p>Minimum: 1 container required</p>\n</li>\n<li><p>Maximum: No system limit (practical limit ~100 containers per request)</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"container-object\">Container Object</h3>\n<ul>\n<li><p><strong>trackingReference</strong> (string, required): Unique container identifier</p>\n<ul>\n<li><p>Format: Alphanumeric, max 50 characters</p>\n</li>\n<li><p>Example: <code>CONT001-AA1234</code> (often includes flight/vessel reference)</p>\n</li>\n<li><p>Must be unique across ALL containers in the shipment</p>\n</li>\n<li><p>Best Practice: Include transport reference for easy identification</p>\n</li>\n</ul>\n</li>\n<li><p><strong>entryRoute</strong> (object, required): Transportation and entry information</p>\n</li>\n<li><p><strong>packages</strong> (array, required): Packages contained within this container</p>\n<ul>\n<li><p>Minimum: 1 package per container</p>\n</li>\n<li><p>Each container must have at least one package</p>\n</li>\n<li><p>Package tracking references must be unique across entire shipment</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"entry-route-object-container-level\">Entry Route Object (Container Level)</h3>\n<ul>\n<li><p><strong>flightOrTripNumber</strong> (string, required): Transportation identifier</p>\n<ul>\n<li><p><strong>Air Transport</strong>: Flight number (e.g., <code>AA1234</code>, <code>DL53</code>, <code>UA567</code>, <code>BA890</code>)</p>\n</li>\n<li><p><strong>Vessel Transport</strong>: Voyage/booking number (e.g., <code>MAEU-123</code>, <code>COSCO-456</code>)</p>\n</li>\n<li><p><strong>Ground Transport</strong>: Trip/route number (e.g., <code>FDX-456</code>, <code>UPS-789</code>)</p>\n</li>\n<li><p>Format: Alphanumeric, max 50 characters</p>\n</li>\n<li><p>Used for tracking and customs documentation</p>\n</li>\n</ul>\n</li>\n<li><p><strong>transportType</strong> (enum, required): Mode of transportation</p>\n<ul>\n<li><p><strong>Values</strong>: <code>Air</code>, <code>Vessel</code>, <code>Ground</code></p>\n</li>\n<li><p><strong>Case-sensitive</strong> - must match exactly</p>\n</li>\n<li><p>Determines applicable customs regulations and processing procedures</p>\n</li>\n</ul>\n</li>\n<li><p><strong>carrierCode</strong> (string, required): Transportation company identifier</p>\n<ul>\n<li><p><strong>Airlines</strong>: IATA codes preferred (<code>AA</code>, <code>UA</code>, <code>DL</code>, <code>BA</code>)</p>\n</li>\n<li><p><strong>Shipping Lines</strong>: Standard codes (<code>MSC</code>, <code>MAEU</code>, <code>COSCO</code>)</p>\n</li>\n<li><p><strong>Ground</strong>: Carrier identifiers (<code>FEDX</code>, <code>UPS</code>, <code>DHL</code>)</p>\n</li>\n<li><p>Format: Alphanumeric, max 10 characters</p>\n</li>\n<li><p>Used for carrier accountability and routing</p>\n</li>\n</ul>\n</li>\n<li><p><strong>arrivalPortCode</strong> (string, required): CBP port of entry</p>\n<ul>\n<li><p>Format: Standard CBP district/port codes</p>\n</li>\n<li><p><strong>Example</strong>: <code>4701</code> for specific port locations</p>\n</li>\n<li><p><strong>Critical</strong>: Must be valid CBP-recognized port code</p>\n</li>\n<li><p>Used for duty collection jurisdiction and compliance reporting</p>\n</li>\n<li><p>Max length: 10 characters</p>\n</li>\n</ul>\n</li>\n<li><p><strong>entryTimestamp</strong> (string, required): Scheduled arrival date/time</p>\n<ul>\n<li><p>Format: <strong>ISO 8601</strong> with timezone (<code>YYYY-MM-DDTHH:mm:ssZ</code>)</p>\n</li>\n<li><p>Example: <code>2024-01-15T10:30:00Z</code> (UTC timezone recommended)</p>\n</li>\n<li><p><strong>Important</strong>: Should align with actual transportation schedules</p>\n</li>\n<li><p>Used for entry processing windows and compliance deadlines</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"package-object-nested-in-container\">Package Object (Nested in Container)</h3>\n<ul>\n<li><p><strong>trackingReference</strong> (string, required): Unique package identifier</p>\n<ul>\n<li><p>Format: Alphanumeric, max 50 characters</p>\n</li>\n<li><p>Example: <code>US123456789US</code>, <code>CN987654321CN</code> (format: XX123456789XX where XX is country code)</p>\n</li>\n<li><p><strong>Must be unique</strong> across ALL packages in the entire shipment</p>\n</li>\n<li><p>Best Practice: Use standardized format for international tracking</p>\n</li>\n</ul>\n</li>\n<li><p><strong>items</strong> (array, required): Items contained within this package</p>\n<ul>\n<li><p>Minimum: 1 item per package</p>\n</li>\n<li><p>No maximum limit (practical limit ~50 items per package)</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"pga--entry-type-13-data\">PGA / Entry Type 13 Data</h3>\n<ul>\n<li><p><strong>pgaData</strong> (array, optional for now): PGA (Partner Government Agency) data elements for the item, driven by the item's HTS code</p>\n<ul>\n<li><p>Each entry carries a <strong>type</strong> (string enum) and a <strong>value</strong> (string, max 1000 characters)</p>\n</li>\n<li><p>A <strong>type</strong> may appear at most once per item</p>\n</li>\n<li><p><strong>type</strong> values: <code>IntendedUse</code>, <code>IntendedUseCode</code>, <code>ProductCode</code>, <code>CountryOfProduction</code>, <code>TradeBrandName</code>, <code>ProductSpecificDescription</code>, <code>ManufacturerFei</code>, <code>ImporterOfRecordFei</code>, <code>PointOfContact</code>, <code>ShipperFei</code>, <code>DeliveredToPartyFei</code>, <code>PackagingLevels</code>, <code>ProductId</code>, <code>CitationCodes</code>, <code>ManufactureDate</code>, <code>ManufacturePlace</code>, <code>ProductTestDate</code>, <code>TestingLaboratory</code>, <code>CountryOfHarvest</code>, <code>ScientificNameGenus</code>, <code>ScientificNameSpecies</code>, <code>CommonName</code>, <code>PermitNumber</code>, <code>ManufacturerId</code>, <code>TscaCertification</code></p>\n</li>\n<li><p>Which types are needed depends on the PGA indicators of the item's HTS code — e.g. FDA-flagged codes (food contact, cosmetics) call for <code>IntendedUse</code>, <code>ProductCode</code>, <code>CountryOfProduction</code>, <code>TradeBrandName</code>, <code>ProductSpecificDescription</code> and <code>PackagingLevels</code></p>\n</li>\n</ul>\n</li>\n<li><p><strong>notForMedicalUse</strong> (boolean, optional for now, defaults to <code>false</code>): attests the product is not intended for medical use</p>\n<ul>\n<li>Some HTS codes are approved for shipping only for non-medical products; items under those codes must submit <code>true</code></li>\n</ul>\n</li>\n<li><p>Once the Entry Type 13 requirement is enforced for your account, packages failing the PGA rules are rejected with error codes <code>V_PgaRequiredInformationMissing</code>, <code>V_HtsCodeNotApprovedForShipping</code> or <code>V_NotForMedicalUseAttestationRequired</code></p>\n</li>\n</ul>\n<h2 id=\"response-structure\">Response Structure</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Shipment created successfully\",\n  \"packageCount\": 4,\n  \"containerCount\": 2,\n  \"packages\": [\n    {\n      \"id\": \"uuid\",\n      \"trackingReference\": \"US123456789US\",\n      \"totalDeclaredValue\": 41.49,\n      \"totalDutiesOwed\": 4.15,\n      \"items\": [...],\n      \"createdAtUtc\": \"2024-01-15T10:35:00Z\"\n    }\n  ],\n  \"containers\": [\n    {\n      \"id\": \"uuid\",\n      \"trackingReference\": \"CONT001-AA1234\",\n      \"entryRoute\": {...},\n      \"packages\": [...],\n      \"createdAtUtc\": \"2024-01-15T10:35:00Z\"\n    }\n  ]\n}\n\n</code></pre>\n<h2 id=\"advanced-features\">Advanced Features</h2>\n<h3 id=\"multi-modal-shipments\">Multi-Modal Shipments</h3>\n<p>Supports complex shipping scenarios:</p>\n<ul>\n<li><p><strong>Mixed Transport Types</strong>: Air + Vessel + Ground in same shipment</p>\n</li>\n<li><p><strong>Multiple Carriers</strong>: Different airlines/shipping companies</p>\n</li>\n<li><p><strong>Multiple Arrival Times</strong>: Staggered arrivals</p>\n</li>\n<li><p><strong>Multiple Ports</strong>: Different entry points</p>\n</li>\n</ul>\n<h3 id=\"automatic-processing\">Automatic Processing</h3>\n<ul>\n<li><p>✅ <strong>Duty Calculation</strong>: Automatic based on origin country and value</p>\n</li>\n<li><p>✅ <strong>Tariff Application</strong>: Current trade policy enforcement</p>\n</li>\n<li><p>✅ <strong>Manifest Generation</strong>: CBP-compliant documentation</p>\n</li>\n<li><p>✅ <strong>Reference Validation</strong>: Ensures all references are unique</p>\n</li>\n<li><p>✅ <strong>Business Rules</strong>: Enforces regulatory compliance</p>\n</li>\n</ul>\n<h3 id=\"validation-rules\">Validation Rules</h3>\n<ol>\n<li><p><strong>Container Uniqueness</strong>: All container tracking references must be unique within shipment</p>\n</li>\n<li><p><strong>Package Uniqueness</strong>: All package tracking references must be globally unique within shipment</p>\n</li>\n<li><p><strong>Package Distribution</strong>: Each container must have at least one package</p>\n</li>\n<li><p><strong>Item Requirements</strong>: Each package must have at least one item</p>\n</li>\n<li><p><strong>Value Validation</strong>: All declared values must be positive numbers</p>\n</li>\n<li><p><strong>Country Codes</strong>: All origin countries must be valid ISO codes</p>\n</li>\n<li><p><strong>Transport Consistency</strong>: Transport type must align with carrier and flight/trip numbers</p>\n</li>\n</ol>\n<h2 id=\"business-benefits\">Business Benefits</h2>\n<ul>\n<li><p><strong>Efficiency</strong>: Process entire shipments in single API call</p>\n</li>\n<li><p><strong>Consistency</strong>: Ensures data integrity across packages and containers</p>\n</li>\n<li><p><strong>Compliance</strong>: Automatic CBP manifest generation and duty calculation</p>\n</li>\n<li><p><strong>Traceability</strong>: Complete audit trail from item to container to shipment</p>\n</li>\n<li><p><strong>Flexibility</strong>: Supports all transport modes and complex routing</p>\n</li>\n</ul>\n<h2 id=\"use-cases\">Use Cases</h2>\n<ol>\n<li><p><strong>Air Cargo Processing</strong>: Multiple flights with various packages</p>\n</li>\n<li><p><strong>International Flight Arrivals</strong>: Processing packages from commercial airlines</p>\n</li>\n<li><p><strong>Cross-Border E-commerce</strong>: Bulk processing of small packages via air</p>\n</li>\n<li><p><strong>Air Freight Consolidation</strong>: Multiple packages per flight</p>\n</li>\n<li><p><strong>Express Air Delivery</strong>: Consolidated packages from international hubs</p>\n</li>\n<li><p><strong>Trade Compliance</strong>: Ensure proper duty collection and documentation</p>\n</li>\n</ol>\n<h2 id=\"performance-considerations\">Performance Considerations</h2>\n<ul>\n<li><p><strong>Recommended</strong>: Max 50 containers per request for optimal performance</p>\n</li>\n<li><p><strong>Package Limit</strong>: Max 100 packages per container for reasonable response times</p>\n</li>\n<li><p><strong>Item Limit</strong>: Max 50 items per package for efficient processing</p>\n</li>\n<li><p><strong>Timeout</strong>: Large requests may take 30-60 seconds to process</p>\n</li>\n<li><p><strong>Retry Logic</strong>: Implement exponential backoff for timeout scenarios</p>\n</li>\n</ul>\n<h1 id=\"error-codes-reference\">Error Codes Reference</h1>\n<h2 id=\"error-response-format\">Error Response Format</h2>\n<p>All API errors are returned as an array of error objects with the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">  [\n    {\n      \"code\": \"ERROR_CODE\",\n      \"message\": \"Human-readable error message\"\n    }\n  ]\n\n</code></pre>\n<h2 id=\"error-categories\">Error Categories</h2>\n<p>Authentication Errors (AUTH-*)</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>AUTH-UnresolvableUser</td>\n<td>Could not resolve user from user claims</td>\n</tr>\n</tbody>\n</table>\n</div><p>Application Errors (APP-*)</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>APP-Generic</td>\n<td>Something went wrong. Please try again later. If the problem still persists, please contact the administrator.</td>\n</tr>\n<tr>\n<td>APP-ClientIdMismatch</td>\n<td>Client ID mismatch</td>\n</tr>\n<tr>\n<td>APP-InvalidJsonFormat</td>\n<td>Invalid JSON format</td>\n</tr>\n</tbody>\n</table>\n</div><p>Resource Not Found Errors (RM-*)</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>RM-InvoiceNotFound</td>\n<td>Invoice not found</td>\n</tr>\n<tr>\n<td>RM-ClientNotFound</td>\n<td>Client not found</td>\n</tr>\n<tr>\n<td>RM-ScanJobConfigurationNotFound</td>\n<td>Audit log scan job configuration not found</td>\n</tr>\n<tr>\n<td>RM-ContainerNotFound</td>\n<td>Container not found</td>\n</tr>\n<tr>\n<td>RM-PackageNotFound</td>\n<td>Package not found</td>\n</tr>\n<tr>\n<td>RM-CountryNotFound</td>\n<td>Country not found / The following countries were not found: {codes}</td>\n</tr>\n<tr>\n<td>RM-PaymentNotFound</td>\n<td>Payment not found</td>\n</tr>\n<tr>\n<td>RM-ClientEncryptionKeyNotFound</td>\n<td>Client encryption key not found</td>\n</tr>\n<tr>\n<td>RM-ExportConfigurationNotFound</td>\n<td>Export configuration not found</td>\n</tr>\n<tr>\n<td>RM-InvoiceReferenceConfigurationNotFound</td>\n<td>Invoice reference configuration not found</td>\n</tr>\n<tr>\n<td>RM-ManifestNotFound</td>\n<td>Manifest not found</td>\n</tr>\n</tbody>\n</table>\n</div><p>Validation Errors (V-*)</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>V-InvalidPageNumber</td>\n<td>Page number must be greater than or equal to 1</td>\n</tr>\n<tr>\n<td>V-InvalidPageSize</td>\n<td>Page size must be greater than or equal to 1</td>\n</tr>\n<tr>\n<td>V-ValueEmpty</td>\n<td>Value cannot be empty</td>\n</tr>\n<tr>\n<td>V-MaxLengthExceeded</td>\n<td>Max length exceeded</td>\n</tr>\n<tr>\n<td>V-InvalidCarrierCode</td>\n<td>Invalid carrier code format</td>\n</tr>\n<tr>\n<td>V-InvalidFlightOrTripNumber</td>\n<td>Invalid flight or trip code format</td>\n</tr>\n<tr>\n<td>V-InvalidCountryCode</td>\n<td>Invalid ISO2 country code</td>\n</tr>\n<tr>\n<td>V-ValueMustBeGreaterThanZero</td>\n<td>Value must be greater than zero</td>\n</tr>\n<tr>\n<td>V-ValueMustBeGreaterThanOrEqualToZero</td>\n<td>Value must be greater than or equal to zero</td>\n</tr>\n<tr>\n<td>V-InvalidEmail</td>\n<td>Invalid email format</td>\n</tr>\n<tr>\n<td>V-DuplicateValuesNotAllowed</td>\n<td>Duplicate values are not allowed</td>\n</tr>\n<tr>\n<td>V-EndDateMustBeAfterStartDate</td>\n<td>End date must be greater than or equal to start date</td>\n</tr>\n<tr>\n<td>V-InvalidPaymentProcessor</td>\n<td>Invalid payment processor</td>\n</tr>\n<tr>\n<td>V-InvalidCurrency</td>\n<td>Invalid currency</td>\n</tr>\n</tbody>\n</table>\n</div><p>Domain/Business Logic Errors (D-*)</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>D-UpdateNonDraftInvoice</td>\n<td>Cannot update non-draft invoice</td>\n</tr>\n<tr>\n<td>D-PackageClientMismatch</td>\n<td>Cannot add package belonging to a different client</td>\n</tr>\n<tr>\n<td>D-PackageEntryRouteMismatch</td>\n<td>Cannot add packages with a different route from that of the invoice</td>\n</tr>\n<tr>\n<td>D-EmptyInvoiceCollection</td>\n<td>Cannot summarize an empty invoice collection</td>\n</tr>\n<tr>\n<td>D-MalformedInvoiceSummary</td>\n<td>Invoice summary contains subtracted items, data is malformed or missing</td>\n</tr>\n<tr>\n<td>D-SummaryClientMismatch</td>\n<td>Cannot create invoice summary for different client</td>\n</tr>\n<tr>\n<td>D-SummaryEntryRouteMismatch</td>\n<td>Cannot create invoice summary for different entry route</td>\n</tr>\n<tr>\n<td>D-UpdateNonDraftManifest</td>\n<td>Can only update manifests in draft status</td>\n</tr>\n<tr>\n<td>D-PackageItemMismatch</td>\n<td>Package item does not belong to the specified package</td>\n</tr>\n<tr>\n<td>D-DuplicatePaymentProcessor</td>\n<td>Payment processor is already available for this client</td>\n</tr>\n<tr>\n<td>D-PaymentProcessorNotFound</td>\n<td>Payment processor is not available for this client</td>\n</tr>\n<tr>\n<td>D-OverlappingClientFees</td>\n<td>Fee period overlaps with an existing fee</td>\n</tr>\n<tr>\n<td>D-ClientFeeNotFound</td>\n<td>Fee not found for this client</td>\n</tr>\n<tr>\n<td>D-InvalidFeeAmount</td>\n<td>Fee amount must be greater than zero</td>\n</tr>\n<tr>\n<td>D-InvalidFeeDateRange</td>\n<td>Effective from date cannot be after effective to date</td>\n</tr>\n<tr>\n<td>D-NoApplicableTariff</td>\n<td>No applicable tariff found for the specified entry date</td>\n</tr>\n<tr>\n<td>D-OverlappingTariffRates</td>\n<td>Tariff period overlaps with an existing tariff</td>\n</tr>\n<tr>\n<td>D-TariffRateNotFound</td>\n<td>Tariff rate not found for this country</td>\n</tr>\n<tr>\n<td>D-InvalidPaymentAmount</td>\n<td>Payment amount must be greater than zero</td>\n</tr>\n<tr>\n<td>D-InvalidCurrency</td>\n<td>Currency cannot be null or empty</td>\n</tr>\n<tr>\n<td>D-InvalidTransactionId</td>\n<td>Transaction ID cannot be null or empty</td>\n</tr>\n<tr>\n<td>D-CannotExportNonDraftInvoice</td>\n<td>Cannot export invoice which is not in draft state</td>\n</tr>\n<tr>\n<td>D-CannotExportNonDraftManifest</td>\n<td>Cannot export manifest which is not in draft state</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example-error-responses\">Example Error Responses</h2>\n<h3 id=\"single-error\">Single Error</h3>\n<p>[<br />{<br />\"code\": \"RM-ClientNotFound\",<br />\"message\": \"Client not found\"<br />}<br />]</p>\n<h3 id=\"multiple-errors\">Multiple Errors</h3>\n<p>[<br />{<br />\"code\": \"V-InvalidEmail\",<br />\"message\": \"Invalid email format\"<br />},<br />{<br />\"code\": \"V-ValueEmpty\",<br />\"message\": \"Value cannot be empty\"<br />}<br />]</p>\n","urlObject":{"path":["api","v1","shipments"],"host":["https://dutycollection.safepackage.com"],"query":[],"variable":[]}},"response":[{"id":"a6a89728-257c-4cbb-b8cd-539905872e10","name":"Successful Shipment Creation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n    \"containers\": [\n        {\n            \"trackingReference\": \"CONT001-AA1234\",\n            \"entryRoute\": {\n                \"flightOrTripNumber\": \"AA1234\",\n                \"transportType\": \"Air\",\n                \"carrierCode\": \"AA\",\n                \"arrivalPortCode\": \"4701\",\n                \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n            },\n            \"packages\": [\n                {\n                    \"trackingReference\": \"US123456789US\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"CN\",\n                            \"declaredValue\": 25.99,\n                            \"description\": \"Cotton t-shirt\",\n                            \"htsCode\": \"3703.10.30\",\n                            \"quantity\": 3,\n                            \"unitOfMeasure\": \"Number\",\n                            \"singleUnitWeight\": {\n                                \"value\": 0.5,\n                                \"unitOfMeasure\": \"Kilograms\"\n                            }\n                        },\n                        {\n                            \"countryOfOrigin\": \"CN\",\n                            \"declaredValue\": 15.50,\n                            \"description\": \"Cotton tote bag\",\n                            \"htsCode\": \"6307.90.30\",\n                            \"quantity\": 2,\n                            \"unitOfMeasure\": \"Number\",\n                            \"singleUnitWeight\": {\n                                \"value\": 0.10,\n                                \"unitOfMeasure\": \"Kilograms\"\n                            }\n                        }\n                    ]\n                },\n                {\n                    \"trackingReference\": \"JP456789012JP\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"JP\",\n                            \"declaredValue\": 89.99,\n                            \"description\": \"Ceramic mug\",\n                            \"htsCode\": \"3703.10.30\",\n                            \"quantity\": 1,\n                            \"unitOfMeasure\": \"Number\",\n                            \"singleUnitWeight\": {\n                                \"value\": 0.35,\n                                \"unitOfMeasure\": \"Kilograms\"\n                            }\n                        }\n                    ]\n                }\n            ]\n        },\n        {\n            \"trackingReference\": \"CONT002-DL53\",\n            \"entryRoute\": {\n                \"flightOrTripNumber\": \"DL53\",\n                \"transportType\": \"Air\",\n                \"carrierCode\": \"DL\",\n                \"arrivalPortCode\": \"4701\",\n                \"entryTimestamp\": \"2024-01-15T14:20:00Z\"\n            },\n            \"packages\": [\n                {\n                    \"trackingReference\": \"DE789012345DE\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"DE\",\n                            \"declaredValue\": 150.00,\n                            \"description\": \"Leather wallet\",\n                            \"htsCode\": \"3703.10.30\",\n                            \"quantity\": 1,\n                            \"unitOfMeasure\": \"Number\",\n                            \"singleUnitWeight\": {\n                                \"value\": 0.20,\n                                \"unitOfMeasure\": \"Kilograms\"\n                            }\n                        }\n                    ]\n                },\n                {\n                    \"trackingReference\": \"FR012345678FR\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"FR\",\n                            \"declaredValue\": 75.25,\n                            \"description\": \"Silk scarf\",\n                            \"htsCode\": \"3703.10.30\",\n                            \"quantity\": 1,\n                            \"unitOfMeasure\": \"Number\",\n                            \"singleUnitWeight\": {\n                                \"value\": 0.15,\n                                \"unitOfMeasure\": \"Kilograms\"\n                            }\n                        },\n                        {\n                            \"countryOfOrigin\": \"IT\",\n                            \"declaredValue\": 42.80,\n                            \"description\": \"Glass vase\",\n                            \"htsCode\": \"3703.10.30\",\n                            \"quantity\": 1,\n                            \"unitOfMeasure\": \"Number\",\n                            \"singleUnitWeight\": {\n                                \"value\": 0.80,\n                                \"unitOfMeasure\": \"Kilograms\"\n                            }\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/shipments"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"packageResult\": {\n    \"packages\": [\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440001\",\n        \"trackingReference\": \"US123456789US\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n          \"flightOrTripNumber\": \"AA1234\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"AA\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n        },\n        \"totalDeclaredValue\": 41.49,\n        \"totalDutiesOwed\": 4.15,\n        \"fee\": 2.5,\n        \"items\": [\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440011\",\n            \"name\": null,\n            \"declaredValue\": 25.99,\n            \"countryOfOrigin\": \"CN\",\n            \"tariffRatePercentage\": 10.0,\n            \"dutiesOwed\": 2.6,\n            \"htsCode\": \"3703.10.30\"\n          },\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440012\",\n            \"name\": null,\n            \"declaredValue\": 15.5,\n            \"countryOfOrigin\": \"CN\",\n            \"tariffRatePercentage\": 0,\n            \"dutiesOwed\": 0,\n            \"htsCode\": \"6307.90.30\"\n          }\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      },\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440002\",\n        \"trackingReference\": \"JP456789012JP\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n          \"flightOrTripNumber\": \"AA1234\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"AA\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n        },\n        \"totalDeclaredValue\": 89.99,\n        \"totalDutiesOwed\": 9.0,\n        \"fee\": 2.5,\n        \"items\": [\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440021\",\n            \"name\": null,\n            \"declaredValue\": 89.99,\n            \"countryOfOrigin\": \"JP\",\n            \"tariffRatePercentage\": 10.0,\n            \"dutiesOwed\": 9.0\n          }\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      },\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440003\",\n        \"trackingReference\": \"DE789012345DE\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440201\",\n          \"flightOrTripNumber\": \"DL53\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"DL\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T14:20:00Z\"\n        },\n        \"totalDeclaredValue\": 150.0,\n        \"totalDutiesOwed\": 15.0,\n        \"fee\": 2.5,\n        \"items\": [\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440031\",\n            \"name\": null,\n            \"declaredValue\": 150.0,\n            \"countryOfOrigin\": \"DE\",\n            \"tariffRatePercentage\": 10.0,\n            \"dutiesOwed\": 15.0\n          }\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      },\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440004\",\n        \"trackingReference\": \"FR012345678FR\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440201\",\n          \"flightOrTripNumber\": \"DL53\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"DL\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T14:20:00Z\"\n        },\n        \"totalDeclaredValue\": 118.05,\n        \"totalDutiesOwed\": 11.8,\n        \"fee\": 2.5,\n        \"items\": [\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440041\",\n            \"name\": null,\n            \"declaredValue\": 75.25,\n            \"countryOfOrigin\": \"FR\",\n            \"tariffRatePercentage\": 10.0,\n            \"dutiesOwed\": 7.53\n          },\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440042\",\n            \"name\": null,\n            \"declaredValue\": 42.8,\n            \"countryOfOrigin\": \"IT\",\n            \"tariffRatePercentage\": 10.0,\n            \"dutiesOwed\": 4.28\n          }\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      }\n    ],\n    \"packageErrors\": [],\n    \"genericErrors\": []\n  },\n  \"containersResult\": {\n    \"containers\": [\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440100\",\n        \"trackingReference\": \"CONT001-AA1234\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n          \"flightOrTripNumber\": \"AA1234\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"AA\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n        },\n        \"packages\": [\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440001\",\n            \"trackingReference\": \"US123456789US\",\n            \"entryRoute\": {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n              \"flightOrTripNumber\": \"AA1234\",\n              \"transportType\": \"Air\",\n              \"carrierCode\": \"AA\",\n              \"arrivalPortCode\": \"4701\",\n              \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n            },\n            \"totalDeclaredValue\": 41.49,\n            \"totalDutiesOwed\": 4.15,\n            \"fee\": 2.5,\n            \"items\": [\n              {\n                \"id\": \"550e8400-e29b-41d4-a716-446655440011\",\n                \"name\": null,\n                \"declaredValue\": 25.99,\n                \"countryOfOrigin\": \"CN\",\n                \"tariffRatePercentage\": 10.0,\n                \"dutiesOwed\": 2.6\n              },\n              {\n                \"id\": \"550e8400-e29b-41d4-a716-446655440012\",\n                \"name\": null,\n                \"declaredValue\": 15.5,\n                \"countryOfOrigin\": \"CN\",\n                \"tariffRatePercentage\": 0,\n                \"dutiesOwed\": 0\n              }\n            ],\n            \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n          },\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440002\",\n            \"trackingReference\": \"JP456789012JP\",\n            \"entryRoute\": {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n              \"flightOrTripNumber\": \"AA1234\",\n              \"transportType\": \"Air\",\n              \"carrierCode\": \"AA\",\n              \"arrivalPortCode\": \"4701\",\n              \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n            },\n            \"totalDeclaredValue\": 89.99,\n            \"totalDutiesOwed\": 9.0,\n            \"fee\": 2.5,\n            \"items\": [\n              {\n                \"id\": \"550e8400-e29b-41d4-a716-446655440021\",\n                \"name\": null,\n                \"declaredValue\": 89.99,\n                \"countryOfOrigin\": \"JP\",\n                \"tariffRatePercentage\": 10.0,\n                \"dutiesOwed\": 9.0\n              }\n            ],\n            \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n          }\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      },\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440200\",\n        \"trackingReference\": \"CONT002-DL53\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440201\",\n          \"flightOrTripNumber\": \"DL53\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"DL\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T14:20:00Z\"\n        },\n        \"packages\": [\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440003\",\n            \"trackingReference\": \"DE789012345DE\",\n            \"entryRoute\": {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440201\",\n              \"flightOrTripNumber\": \"DL53\",\n              \"transportType\": \"Air\",\n              \"carrierCode\": \"DL\",\n              \"arrivalPortCode\": \"4701\",\n              \"entryTimestamp\": \"2024-01-15T14:20:00Z\"\n            },\n            \"totalDeclaredValue\": 150.0,\n            \"totalDutiesOwed\": 15.0,\n            \"fee\": 2.5,\n            \"items\": [\n              {\n                \"id\": \"550e8400-e29b-41d4-a716-446655440031\",\n                \"name\": null,\n                \"declaredValue\": 150.0,\n                \"countryOfOrigin\": \"DE\",\n                \"tariffRatePercentage\": 10.0,\n                \"dutiesOwed\": 15.0\n              }\n            ],\n            \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n          },\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440004\",\n            \"trackingReference\": \"FR012345678FR\",\n            \"entryRoute\": {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440201\",\n              \"flightOrTripNumber\": \"DL53\",\n              \"transportType\": \"Air\",\n              \"carrierCode\": \"DL\",\n              \"arrivalPortCode\": \"4701\",\n              \"entryTimestamp\": \"2024-01-15T14:20:00Z\"\n            },\n            \"totalDeclaredValue\": 118.05,\n            \"totalDutiesOwed\": 11.8,\n            \"fee\": 2.5,\n            \"items\": [\n              {\n                \"id\": \"550e8400-e29b-41d4-a716-446655440041\",\n                \"name\": null,\n                \"declaredValue\": 75.25,\n                \"countryOfOrigin\": \"FR\",\n                \"tariffRatePercentage\": 10.0,\n                \"dutiesOwed\": 7.53\n              },\n              {\n                \"id\": \"550e8400-e29b-41d4-a716-446655440042\",\n                \"name\": null,\n                \"declaredValue\": 42.8,\n                \"countryOfOrigin\": \"IT\",\n                \"tariffRatePercentage\": 10.0,\n                \"dutiesOwed\": 4.28\n              }\n            ],\n            \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n          }\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      }\n    ],\n    \"containerErrors\": [],\n    \"genericErrors\": []\n  }\n}"},{"id":"5eccf768-ffd0-431a-a117-dda9743fdac1","name":"Successful Shipment with PGA Data (Entry Type 13)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n    \"containers\": [\n        {\n            \"trackingReference\": \"CONT003-AF012\",\n            \"entryRoute\": {\n                \"flightOrTripNumber\": \"AF012\",\n                \"transportType\": \"Air\",\n                \"carrierCode\": \"AF\",\n                \"arrivalPortCode\": \"4701\",\n                \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n            },\n            \"packages\": [\n                {\n                    \"trackingReference\": \"FR555666777FR\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"FR\",\n                            \"totalDeclaredValue\": 60.0,\n                            \"description\": \"Matte lipstick, cosmetic lip make-up\",\n                            \"htsCode\": \"3304.10.00.00\",\n                            \"quantity\": 5,\n                            \"customsQuantities\": [\n                                {\n                                    \"value\": 0.1,\n                                    \"unitOfMeasure\": \"Kg\"\n                                }\n                            ],\n                            \"pgaData\": [\n                                {\n                                    \"type\": \"IntendedUse\",\n                                    \"value\": \"Cosmetic - lip make-up\"\n                                },\n                                {\n                                    \"type\": \"ProductCode\",\n                                    \"value\": \"53CBF03\"\n                                },\n                                {\n                                    \"type\": \"CountryOfProduction\",\n                                    \"value\": \"FR\"\n                                },\n                                {\n                                    \"type\": \"TradeBrandName\",\n                                    \"value\": \"Belle Rouge\"\n                                },\n                                {\n                                    \"type\": \"ProductSpecificDescription\",\n                                    \"value\": \"Matte lipstick, 4 g stick, shade 12\"\n                                },\n                                {\n                                    \"type\": \"PackagingLevels\",\n                                    \"value\": \"1 box containing 5 lipsticks\"\n                                }\n                            ]\n                        },\n                        {\n                            \"countryOfOrigin\": \"IN\",\n                            \"totalDeclaredValue\": 38.5,\n                            \"description\": \"Peppermint essential oil for aromatherapy diffusers\",\n                            \"htsCode\": \"3301.24.00.00\",\n                            \"quantity\": 2,\n                            \"customsQuantities\": [\n                                {\n                                    \"value\": 0.25,\n                                    \"unitOfMeasure\": \"Kg\"\n                                }\n                            ],\n                            \"pgaData\": [\n                                {\n                                    \"type\": \"IntendedUse\",\n                                    \"value\": \"Aromatherapy diffuser oil - not for medical use\"\n                                },\n                                {\n                                    \"type\": \"ProductCode\",\n                                    \"value\": \"40BEE01\"\n                                },\n                                {\n                                    \"type\": \"CountryOfProduction\",\n                                    \"value\": \"IN\"\n                                },\n                                {\n                                    \"type\": \"TradeBrandName\",\n                                    \"value\": \"Mentha Naturals\"\n                                },\n                                {\n                                    \"type\": \"ProductSpecificDescription\",\n                                    \"value\": \"Steam-distilled peppermint essential oil, 2 x 30 ml bottles\"\n                                },\n                                {\n                                    \"type\": \"PackagingLevels\",\n                                    \"value\": \"1 box containing 2 bottles\"\n                                }\n                            ],\n                            \"notForMedicalUse\": true\n                        },\n                        {\n                            \"countryOfOrigin\": \"FR\",\n                            \"totalDeclaredValue\": 24.0,\n                            \"description\": \"Reed diffuser refill, lavender room fragrance\",\n                            \"htsCode\": \"3307.49.00.00\",\n                            \"quantity\": 1,\n                            \"customsQuantities\": [\n                                {\n                                    \"value\": 0.3,\n                                    \"unitOfMeasure\": \"Kg\"\n                                }\n                            ],\n                            \"pgaData\": [\n                                {\n                                    \"type\": \"IntendedUse\",\n                                    \"value\": \"Room fragrance - reed diffuser refill\"\n                                },\n                                {\n                                    \"type\": \"ProductCode\",\n                                    \"value\": \"53FMF07\"\n                                },\n                                {\n                                    \"type\": \"CountryOfProduction\",\n                                    \"value\": \"FR\"\n                                },\n                                {\n                                    \"type\": \"TradeBrandName\",\n                                    \"value\": \"Maison Lavande\"\n                                },\n                                {\n                                    \"type\": \"ProductSpecificDescription\",\n                                    \"value\": \"Lavender reed diffuser refill, 200 ml bottle\"\n                                },\n                                {\n                                    \"type\": \"PackagingLevels\",\n                                    \"value\": \"1 box containing 1 bottle\"\n                                },\n                                {\n                                    \"type\": \"TscaCertification\",\n                                    \"value\": \"Positive certification - all chemical substances comply with TSCA\"\n                                }\n                            ]\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/shipments"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"packageResult\": {\n    \"packages\": [\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440001\",\n        \"trackingReference\": \"FR555666777FR\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n          \"flightOrTripNumber\": \"AF012\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"AF\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n        },\n        \"totalDeclaredValue\": 122.5,\n        \"totalDutiesOwed\": 3.06,\n        \"fee\": 2.5,\n        \"items\": [\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440021\",\n            \"name\": null,\n            \"declaredValue\": 60.0,\n            \"countryOfOrigin\": \"FR\",\n            \"tariffRatePercentage\": 0.0,\n            \"dutiesOwed\": 0.0,\n            \"htsCode\": \"3304100000\"\n          },\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440022\",\n            \"name\": null,\n            \"declaredValue\": 38.5,\n            \"countryOfOrigin\": \"IN\",\n            \"tariffRatePercentage\": 4.2,\n            \"dutiesOwed\": 1.62,\n            \"htsCode\": \"3301240000\"\n          },\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440023\",\n            \"name\": null,\n            \"declaredValue\": 24.0,\n            \"countryOfOrigin\": \"FR\",\n            \"tariffRatePercentage\": 6.0,\n            \"dutiesOwed\": 1.44,\n            \"htsCode\": \"3307490000\"\n          }\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      }\n    ],\n    \"packageErrors\": [],\n    \"genericErrors\": []\n  },\n  \"containersResult\": {\n    \"containers\": [\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440100\",\n        \"trackingReference\": \"CONT003-AF012\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n          \"flightOrTripNumber\": \"AA1234\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"AA\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n        },\n        \"packages\": [\n          \"FR555666777FR\"\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      }\n    ],\n    \"containerErrors\": [],\n    \"genericErrors\": []\n  }\n}"},{"id":"8d68f7c0-7d0b-4d00-a9bc-e71f8b8232d1","name":"Partial Success with Errors","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n    \"containers\": [\n        {\n            \"trackingReference\": \"CONT001-AA1234\",\n            \"entryRoute\": {\n                \"flightOrTripNumber\": \"AA1234\",\n                \"transportType\": \"Air\",\n                \"carrierCode\": \"AA\",\n                \"arrivalPortCode\": \"4701\",\n                \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n            },\n            \"packages\": [\n                {\n                    \"trackingReference\": \"US123456789US\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"CN\",\n                            \"declaredValue\": 25.99,\n                            \"description\": \"Cotton t-shirt\",\n                            \"htsCode\": \"6109.10.00\",\n                            \"quantity\": 3,\n                            \"unitOfMeasure\": \"Number\",\n                            \"singleUnitWeight\": {\n                                \"value\": 0.5,\n                                \"unitOfMeasure\": \"Kilograms\"\n                            }\n                        }\n                    ]\n                }\n            ]\n        },\n        {\n            \"trackingReference\": \"CONT001-AA1234\",\n            \"entryRoute\": {\n                \"flightOrTripNumber\": \"INVALID\",\n                \"transportType\": \"InvalidType\",\n                \"carrierCode\": \"\",\n                \"arrivalPortCode\": \"9999\",\n                \"entryTimestamp\": \"invalid-date\"\n            },\n            \"packages\": [\n                {\n                    \"trackingReference\": \"INVALID_PKG\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"XX\",\n                            \"declaredValue\": -10.00,\n                            \"description\": \"Unknown item\",\n                            \"htsCode\": \"0000.00.00\",\n                            \"quantity\": 1,\n                            \"unitOfMeasure\": \"Number\",\n                            \"singleUnitWeight\": {\n                                \"value\": 0.10,\n                                \"unitOfMeasure\": \"Kilograms\"\n                            }\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/shipments"},"status":"Multi-Status","code":207,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"packageResult\": {\n    \"packages\": [\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440001\",\n        \"trackingReference\": \"US123456789US\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n          \"flightOrTripNumber\": \"AA1234\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"AA\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n        },\n        \"totalDeclaredValue\": 25.99,\n        \"totalDutiesOwed\": 2.6,\n        \"fee\": 2.5,\n        \"items\": [\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440011\",\n            \"name\": null,\n            \"declaredValue\": 25.99,\n            \"countryOfOrigin\": \"CN\",\n            \"tariffRatePercentage\": 10.0,\n            \"dutiesOwed\": 2.6\n          }\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      }\n    ],\n    \"packageErrors\": [\n      {\n        \"trackingReference\": \"INVALID_PKG\",\n        \"errors\": [\n          {\n            \"message\": \"Invalid country code 'XX'. Must be a valid ISO 3166-1 alpha-2 country code.\"\n          },\n          {\n            \"message\": \"Declared value must be greater than 0. Received: -10.00\"\n          }\n        ]\n      }\n    ],\n    \"genericErrors\": []\n  },\n  \"containersResult\": {\n    \"containers\": [\n      {\n        \"id\": \"550e8400-e29b-41d4-a716-446655440100\",\n        \"trackingReference\": \"CONT001-AA1234\",\n        \"entryRoute\": {\n          \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n          \"flightOrTripNumber\": \"AA1234\",\n          \"transportType\": \"Air\",\n          \"carrierCode\": \"AA\",\n          \"arrivalPortCode\": \"4701\",\n          \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n        },\n        \"packages\": [\n          {\n            \"id\": \"550e8400-e29b-41d4-a716-446655440001\",\n            \"trackingReference\": \"US123456789US\",\n            \"entryRoute\": {\n              \"id\": \"550e8400-e29b-41d4-a716-446655440101\",\n              \"flightOrTripNumber\": \"AA1234\",\n              \"transportType\": \"Air\",\n              \"carrierCode\": \"AA\",\n              \"arrivalPortCode\": \"4701\",\n              \"entryTimestamp\": \"2024-01-15T10:30:00Z\"\n            },\n            \"totalDeclaredValue\": 25.99,\n            \"totalDutiesOwed\": 2.6,\n            \"fee\": 2.5,\n            \"items\": [\n              {\n                \"id\": \"550e8400-e29b-41d4-a716-446655440011\",\n                \"name\": null,\n                \"declaredValue\": 25.99,\n                \"countryOfOrigin\": \"CN\",\n                \"tariffRatePercentage\": 10.0,\n                \"dutiesOwed\": 2.6\n              }\n            ],\n            \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n          }\n        ],\n        \"createdAtUtc\": \"2024-01-15T10:35:22.123Z\"\n      }\n    ],\n    \"containerErrors\": [\n      {\n        \"trackingReference\": \"CONT001-AA1234\",\n        \"errors\": [\n          {\n            \"message\": \"Duplicate container tracking reference 'CONT001-AA1234'. Container tracking references must be unique.\"\n          },\n          {\n            \"message\": \"Invalid transport type 'InvalidType'. Must be one of: Air, Vessel, Ground.\"\n          },\n          {\n            \"message\": \"Carrier code cannot be empty.\"\n          },\n          {\n            \"message\": \"Invalid arrival port code '99999'. Must be a valid CBP port code.\"\n          },\n          {\n            \"message\": \"Invalid entry timestamp format. Must be a valid ISO 8601 date.\"\n          }\n        ]\n      }\n    ],\n    \"genericErrors\": []\n  }\n}"},{"id":"f2f70ca4-4c5b-4bb2-bf25-35a0b7b11fc1","name":"Complete Shipment Failure","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer "}],"body":{"mode":"raw","raw":"{\n    \"containers\": [\n        {\n            \"trackingReference\": \"\",\n            \"entryRoute\": {\n                \"flightOrTripNumber\": \"\",\n                \"transportType\": \"InvalidType\",\n                \"carrierCode\": \"\",\n                \"arrivalPortCode\": \"INVALID\",\n                \"entryTimestamp\": \"not-a-date\"\n            },\n            \"packages\": [\n                {\n                    \"trackingReference\": \"\",\n                    \"items\": [\n                        {\n                            \"countryOfOrigin\": \"XX\",\n                            \"declaredValue\": -5.00,\n                            \"description\": \"Unknown item\",\n                            \"htsCode\": \"0000.00.00\",\n                            \"quantity\": 1,\n                            \"unitOfMeasure\": \"Number\",\n                            \"singleUnitWeight\": {\n                                \"value\": 0.10,\n                                \"unitOfMeasure\": \"Kilograms\"\n                            }\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://dutycollection.safepackage.com/api/v1/shipments"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n  \"packageResult\": {\n    \"packages\": [],\n    \"packageErrors\": [\n      {\n        \"trackingReference\": \"\",\n        \"errors\": [\n          {\n            \"message\": \"Tracking reference cannot be empty or null.\"\n          },\n          {\n            \"message\": \"Invalid country code 'XX'. Must be a valid ISO 3166-1 alpha-2 country code.\"\n          },\n          {\n            \"message\": \"Declared value must be greater than 0. Received: -5.00\"\n          }\n        ]\n      }\n    ],\n    \"genericErrors\": []\n  },\n  \"containersResult\": {\n    \"containers\": [],\n    \"containerErrors\": [\n      {\n        \"trackingReference\": \"\",\n        \"errors\": [\n          {\n            \"message\": \"Container tracking reference cannot be empty or null.\"\n          },\n          {\n            \"message\": \"Flight or trip number cannot be empty.\"\n          },\n          {\n            \"message\": \"Invalid transport type 'InvalidType'. Must be one of: Air, Vessel, Ground.\"\n          },\n          {\n            \"message\": \"Carrier code cannot be empty.\"\n          },\n          {\n            \"message\": \"Invalid arrival port code 'INVALID'. Must be a valid CBP port code.\"\n          },\n          {\n            \"message\": \"Invalid entry timestamp format. Must be a valid ISO 8601 date.\"\n          }\n        ]\n      }\n    ],\n    \"genericErrors\": []\n  }\n}"}],"_postman_id":"e1bc4070-d18b-4dc9-88ae-32d8e7ed8831"}],"id":"664668dc-b7c8-485d-a4b2-3b787a8f95db","description":"<p>Complete shipment processing combining packages, containers, and manifest generation in a single operation.</p>\n","_postman_id":"664668dc-b7c8-485d-a4b2-3b787a8f95db"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// International Mail Duty Collection API - Auto Token Management","// This script automatically handles JWT token refresh for seamless API testing","","const tokenUrl = pm.environment.get('token_url') || pm.globals.get('token_url');","const clientId = pm.environment.get('client_id') || pm.globals.get('client_id');","const clientSecret = pm.environment.get('client_secret') || pm.globals.get('client_secret');","","// Skip token refresh for development environment","const baseUrl = pm.environment.get('base_url') || pm.globals.get('base_url');","if (baseUrl && baseUrl.includes('localhost')) {","    console.log('Development environment detected - skipping authentication');","    return;","}","","// Check if we need to refresh the token","const currentToken = pm.environment.get('access_token') || pm.globals.get('access_token');","const tokenExpiry = pm.environment.get('token_expiry') || pm.globals.get('token_expiry');","","const now = new Date().getTime();","const expiryTime = tokenExpiry ? parseInt(tokenExpiry) : 0;","","// Refresh token if expired or not present","if (!currentToken || now >= expiryTime) {","    if (!tokenUrl || !clientId || !clientSecret) {","        console.warn('Token credentials not configured. Set token_url, client_id, and client_secret in environment variables.');","        return;","    }","    ","    console.log('Refreshing access token...');","    ","    pm.sendRequest({","        url: tokenUrl,","        method: 'POST',","        header: {","            'Content-Type': 'application/x-www-form-urlencoded'","        },","        body: {","            mode: 'urlencoded',","            urlencoded: [","                { key: 'grant_type', value: 'client_credentials' },","                { key: 'client_id', value: clientId },","                { key: 'client_secret', value: clientSecret }","            ]","        }","    }, (err, res) => {","        if (err) {","            console.error('Token refresh failed:', err);","            return;","        }","        ","        if (res.code === 200) {","            const responseJson = res.json();","            const newToken = responseJson.access_token;","            const expiresIn = responseJson.expires_in || 3600;","            const newExpiry = new Date().getTime() + (expiresIn * 1000) - 60000; // 1 min buffer","            ","            pm.environment.set('access_token', newToken);","            pm.environment.set('token_expiry', newExpiry.toString());","            ","            console.log('Token refreshed successfully');","        } else {","            console.error('Token refresh failed with status:', res.code);","            console.error('Response:', res.text());","        }","    });","} else {","    console.log('Token is still valid');","}"],"id":"f6a6f360-b772-4f38-b7cb-71ad77d77a4f"}},{"listen":"test","script":{"type":"text/javascript","packages":{},"exec":[""],"id":"191ba1e0-dce4-4f52-98bc-26338e74b9e2"}}],"variable":[{"key":"base_url","value":"https://dutycollection.safepackage.com","description":"API Base URL - Production endpoint"},{"key":"token_url","value":"https://auth.dutycollection.safepackage.com/protocol/openid-connect/token","description":"OAuth2 token endpoint - Update with your actual realm"},{"key":"client_id","value":"","description":"OAuth2 client ID for API access"},{"key":"client_secret","value":"","description":"OAuth2 client secret - Keep secure!"},{"key":"access_token","value":"","description":"JWT access token - Auto-managed by pre-request script"},{"key":"token_expiry","value":"","description":"Token expiry timestamp - Auto-managed"}]}