{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"88f8bc35-761d-4f3d-8ef7-52cae6de90d3","name":"International Mail Duty Collection API","description":"# International Mail Duty Collection API Documentation\n\n## Entry Type 13 PGA Data: required from January 20, 2027\n\nCBP's **Entry Type 13** filing needs **PGA (Partner Government Agency)** data for package items whose HTS code is regulated by a government agency. The package submission endpoints (`/packages` and `/shipments`) accept it in the item-level field:\n\n- **pgaDataset**: the item's PGA data\n    - **statements**: product-use statements (e.g. `NotForMedicalUse`, `NotForFoodContact`) that confirm a shipping condition or rule an agency out\n    - **fda**: FDA filing (Food Contact or Cosmetics program)\n    - **cpsc**: CPSC certificate (registry reference or full certificate)\n    - **laceyAct**: APHIS Lacey Act declaration (plant products)\n    - **aphisCore**: APHIS Core declaration (plant and animal health)\n    - **tsca**: EPA Toxic Substances Control Act certification\n    - **fishAndWildlife**: U.S. Fish and Wildlife Service declaration\n\nThe field is **optional today** and **becomes required on January 20, 2027, depending on the HTS code of the item**:\n\n- an agency the HTS code marks as **required** needs its filing\n- an agency the HTS code marks as **conditional** needs either its filing or one of the statement sets that rule the agency out\n- indicators of agencies without a filing section (for example USDA organic or DEA) are cleared with the matching statements\n- HTS codes that are only **conditionally approved** for shipping need the listed product-use statements; codes that are **not approved** (including codes with an open antidumping or countervailing duty case) are rejected\n\nFrom that date, packages whose items miss the data their HTS code needs are rejected. Use the **Get HTS Code Requirements** endpoint (`GET /api/v1/hts/{htsCode}/requirements`) to see exactly what a code needs, see the field documentation on **Create Packages** for the field shape, and start sending the data now to avoid disruption when the requirement takes effect.\n\n## Overview\n\nThe 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.\n\n**Getting Started:** For additional help, please email us at [<b>support@safepackage.com</b>](mailto:support@safepackage.com).\n\n**Account Setup:** To request API access, please email [<b>api-access@safepackage.com</b>](mailto:api-access@safepackage.com) with your business information and integration requirements. Our team will provision your account and provide the necessary credentials for authentication.\n\n## Endpoints and Services\n\n**Package Management**  \nCreate and manage individual mail packages with detailed customs information including country of origin, declared values, and item details.\n\n**Container Operations**  \nGroup packages into containers with comprehensive entry route information including flight numbers, vessel details, transport types, carrier codes, and port of entry data.\n\n**Shipment Processing**  \nProcess 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.\n\n**Package Lookup and Labels**  \nLook up one of your packages by package id or tracking number, and generate the shipping label of a package (Japan Post accounts), receiving the label PDF directly.\n\n**HTS Code Requirements and Duty Estimates**  \nCheck what an HTS code needs before submitting (quantity units, components, shipping approval and PGA data), and calculate duties for items without creating packages.\n\n## Authentication and Security\n\nThe International Mail Duty Collection API uses JWT Bearer token authentication via OAuth2 integration. All API requests require proper authentication using JWT Bearer tokens.\n\n**Authentication Setup**  \nObtain your JWT tokens with the OAuth2 client credentials flow from the token endpoint of your environment (see **API Information** below), e.g. [https://auth.dutycollection.safepackage.com/realms/SafePackage/protocol/openid-connect/token](https://auth.dutycollection.safepackage.com/realms/SafePackage/protocol/openid-connect/token) in production. Configure your application with the client credentials provided during account setup and send the token as `Authorization: Bearer <token>` on every request.\n\n## Duty Calculation and Compliance\n\n**Automatic Duty Calculation**  \nThe API automatically calculates duties and tariffs based on country of origin, declared values, current trade policy and tariff rates.\n\n## API Information\n\n**Production Environment**\n\n- **Base URL**: [https://dutycollection.safepackage.com](https://dutycollection.safepackage.com)\n\n- **Authentication URL (token endpoint)**: [https://auth.dutycollection.safepackage.com/realms/SafePackage/protocol/openid-connect/token](https://auth.dutycollection.safepackage.com/realms/SafePackage/protocol/openid-connect/token)\n\n\n**Sandbox Environment**\n\n- **Base URL**: [https://dutycollection-sandbox.safepackage.com](https://dutycollection-sandbox.safepackage.com)\n\n- **Authentication URL (token endpoint)**: [https://auth.dutycollection-sandbox.safepackage.com/realms/SafePackage/protocol/openid-connect/token](https://auth.dutycollection-sandbox.safepackage.com/realms/SafePackage/protocol/openid-connect/token)\n    \n\n## Support and Resources\n\n**Getting Help**\n\n- **Email Support**: [support@safepackage.com](mailto:support@safepackage.com)\n    \n- **Account Setup**: Email [api-access@safepackage.com](mailto:api-access@safepackage.com) for account provisioning\n    \n- **Integration Assistance**: Custom implementation support available\n    \n\n## Duty-exempt HTS codes\n\nThe 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.\n\n| HTS Code Prefix |\n| --- |\n| 3704.00.00 |\n| 3705.00.00 |\n| 3706 |\n| Chapter 49 (HTS codes starting with 49) |\n| 5807 |\n| 6307.90.30 |\n| 6307.90.85 |\n| 8310 |\n| 8523.29 |\n| 8523.41 |\n| 8523.49 |\n| 8523.80.10 |\n| 9405.61 |\n| 9405.69 |\n| 9701 |\n| 9702 |\n| 9703 |\n| 9704 |\n| 9705 |\n| 9903.01.03 |\n| 9903.01.12 |\n| 9903.01.22 |\n| 9903.01.31 |\n\n2 separate HTS codes can also be used to claim tax exemption, but are part of specific cases:\n\n- 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\n    \n- 9801.00.10 - Returns, items whose country of origin is the US which are being returned to the country","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"48610445","team":5478190,"collectionId":"88f8bc35-761d-4f3d-8ef7-52cae6de90d3","publishedId":"2sBYHaMw8M","public":true,"publicUrl":"https://docs.dutycollection.safepackage.com","privateUrl":"https://go.postman.co/documentation/48610445-88f8bc35-761d-4f3d-8ef7-52cae6de90d3","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"BA2D53"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"BA2D53"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"BA2D53"}}]}},"version":"8.12.12","publishDate":"2026-11-11T12:32:53.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/t_team_logo_pubdoc/v1/team/6a1ffc52eb77a6ab256c4805fd6f58a01d860f8ec177f7ac31d4bd8ec860ed57","favicon":"https://safepackage.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://docs.dutycollection.safepackage.com/view/metadata/2sBYHaMw8M"}