Overview
The Label Compliance API enables clients to continue using their existing label generation workflows while leveraging OpenBorder to ensure international shipping compliance. Designed for carriers, label providers, and other fulfillment partners, the API validates commercial invoice values, preserves HS codes from checkout through billing, and ensures shipments meet destination-country tax requirements using OpenBorder’s Tax ID. This allows merchants to maintain a Delivered Duty Paid (DDP) experience while continuing to use their preferred shipping infrastructure. Built to integrate seamlessly into existing label generation workflows, the API returns compliance results almost instantly, helping ensure duties and taxes are calculated correctly while reducing the risk of customs delays, billing discrepancies, and other cross-border compliance issues.Workflow Example
The Label Compliance API is designed to integrate directly into a client’s existing label generation workflow. A typical implementation follows the steps below.1
Prerequisite
The merchant must have the OpenBorder Checkout Block installed on their e-commerce platform (e.g.,, Shopify, BigCommerce, etc.). This enables OpenBorder to calculate and display the correct duties and taxes during checkout.
2
Customer Checkout
When the customer proceeds to checkout, OpenBorder’s Tax Engine calculates the applicable shipping costs, duties, and taxes for the order in real time.
3
Order Placement
After the customer places their order, the order is automatically ingested into the OpenBorder Order Management System (OMS), where all required compliance data is stored. This includes the commercial invoice value, product HS codes, duties, and taxes.
4
Preparing for Label Generation
Before generating the shipping label, the client makes a single call to the Label Compliance API using the order ID. OpenBorder retrieves the corresponding order and returns the compliance data required for label generation, ensuring the shipment remains consistent with the duties and taxes calculated during checkout.
5
Label Generation
After receiving the compliance data, the client continues with its existing label generation workflow, using the values returned by OpenBorder to generate the final shipping label.

Authentication
The Label Compliance API uses an API Key for authentication. A valid API key must be included in thex-openborder-api-key header of every request.
Production API credentials are provided by OpenBorder. To obtain a production API key, contact your OpenBorder representative.
For testing purposes, you may use the following sandbox API key:
partnerId path parameter in every request so OpenBorder can identify your integration.
For testing purposes, use the following Partner ID:
Request
Replace
{partnerId} with the Partner ID issued to you by OpenBorder.
Merchant ID
Many OpenBorder clients manage multiple merchants or brands. Therefore, every request must include a unique merchant code in themerchant_id field.
Each merchant is assigned a unique Merchant ID by OpenBorder during onboarding. When a new merchant is onboarded, OpenBorder will provide the corresponding Merchant ID for use in API requests.
Order References
When a request is made, OpenBorder must be able to match the order to the corresponding order in our system. The API supports several order reference types. The two most commonly used identifiers are:- Shopify Order ID (
SHOPIFY_ORDER_ID) – The 13-digit numerical ID at the end of the Shopify order URL. For example, for the order:the Shopify Order ID is: - Shopify Order Number (
SHOPIFY_ORDER_NUMBER) – The customer-facing order number displayed at the top of the Shopify order page (for example,#340056).
Example Request
Response
Upon a successful request, the API returns the order’s Commercial Invoice (CI) value, the HS codes for each SKU, the unit price for each SKU, and a Tax ID (when applicable).- 400 Bad Request
- 422 Unprocessable Entity
Split Shipments
The Label Compliance API supports split shipments natively. This allows clients to request compliance data for partial fulfillments, where a single order is shipped across multiple packages and each package requires its own shipping label. To create a split shipment, include only the SKUs and quantities that will be fulfilled in the current shipment. OpenBorder will automatically detect that the request represents a partial fulfillment and return:- A prorated Commercial Invoice (CI) value for the shipment.
- A
parcel_itemsarray containing only the SKUs included in the request.
OpenBorder does not track the fulfillment status of an order or which SKUs have already been processed. It is the client’s responsibility to track which items and quantities have been submitted for each shipment.The Label Compliance API is idempotent, so repeated requests with the same payload will always return the same compliance values.
Testing
The following sandbox credentials can be used to test the Label Compliance API.Sample Request
Sample cURL
Replace the sample values with your production Partner ID, Merchant ID, and API key when moving to production.
