Skip to content

Create a shipment

POST
/api/shipments/

Submit a cross-border shipment for duty and fee calculation. Returns the full fee breakdown, resolved HS codes, and a payment link for the consignee.

object
brand_id
Brand Id

Brand ID or slug. Required when using an organization-level API key; optional when the key is brand-scoped.

string | null
currency
required
Currency

ISO 4217 currency code for the shipment

string
items
required
Items

List of items in the shipment. At least one item is required.

Array<object>
object
description
required
Description

Product description for customs classification. Used together with the HS code to validate and refine the item’s classification for the destination country.

string
<= 500 characters
declared_value
required
Declared Value

Declared value of a single unit in the shipment currency

number | string
country_of_origin
required
Country Of Origin

ISO 3166-1 alpha-2 country code where the item was manufactured

string
quantity
Quantity

Number of units of this item

integer
default: 1 >= 1
hs_code
required
Hs Code

6-10 digit Harmonized System code. Used together with the description for tariff calculation.

string
<= 20 characters
total_value
Total Value

Total value for all units. If omitted, calculated as declared_value * quantity.

number | string | null
shipping_cost
Shipping Cost

Shipping cost for this line item, regardless of quantity. Added to the duty/tax base by the customs engine. Internal — not shown to the consignee.

number | string | null
reference
Reference

Your internal reference number for this shipment. Must be unique within the brand. When left empty or null, Duty Pro generates one automatically.

string | null
<= 200 characters
tracking_link
Tracking Link

Optional carrier tracking URL for this shipment. When omitted, the brand’s (or, as a fallback, the organization’s) tracking link template is used: a URL containing a {reference} placeholder that is substituted with this shipment’s reference, e.g. https://track.example.com/{reference}. If no template is configured either, no tracking link is set.

string | null
<= 500 characters
ioss_registered
Ioss Registered

EU IOSS registration for VAT (EU destinations only). When true, import VAT is not charged at the border. Omit to use the brand’s default setting.

boolean | null
sender
required

Sender (shipper) details identifying the shipment’s origin.

object
name
required
Name

Full name of the sender

string
<= 200 characters
address1
Address1

Sender street address line 1

string | null
<= 300 characters
address2
Address2

Sender street address line 2

string | null
<= 300 characters
city
required
City

Sender city

string
<= 100 characters
state
State

Sender state or province (2-letter code for US). When omitted for a US address, the state is auto-resolved from the ZIP code.

string | null
<= 100 characters
zip
required
Zip

Sender postal / ZIP code

string
<= 20 characters
country
required
Country

ISO 3166-1 alpha-2 origin country code

string
consignee
required

Consignee (recipient) details identifying the destination and the contact for payment notifications.

object
name
required
Name

Full name of the consignee (recipient)

string
<= 200 characters
email
Email

Consignee email address for payment notifications

string | null format: email
<= 200 characters
phone
Phone

Consignee phone number for SMS notifications

string | null
<= 50 characters
address1
Address1

Consignee street address line 1

string | null
<= 300 characters
address2
Address2

Consignee street address line 2

string | null
<= 300 characters
city
required
City

Consignee city

string
<= 100 characters
state
State

Consignee state or province (2-letter code for US). When omitted for a US address, the state is auto-resolved from the ZIP code.

string | null
<= 100 characters
zip
required
Zip

Consignee postal / ZIP code

string
<= 20 characters
country
required
Country

ISO 3166-1 alpha-2 destination country code

string

Successful Response

object
id
required
Id

Unique shipment identifier

string format: uuid
brand_id
required
Brand Id

Brand that owns this shipment

string format: uuid
brand_slug
Brand Slug

Brand slug identifier

string | null
reference
required
Reference

Your internal reference number

string | null
is_test
required
Is Test

Whether this shipment was created with a test API key

boolean
ioss_registered
Ioss Registered

Per-shipment EU IOSS registration. Null when the brand default was used.

boolean | null
currency
required
Currency

Shipment currency (ISO 4217)

string
total_duties
required
Total Duties

Total duty amount across all items

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
total_taxes
required
Total Taxes

Total tax amount across all items

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
total_additional_country_charges
required
Total Additional Country Charges

Destination-country surcharges imposed in addition to duties and taxes

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
total_additional_fees
required
Total Additional Fees

Total additional fees

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
total_amount
required
Total Amount

Grand total: duties + taxes + additional country charges + additional fees

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
payment_status
required

Current payment status (pending, paid, expired, etc.)

string
Allowed values: PENDING PAID FAILED EXPIRED EXEMPT REFUNDED
created
required
Created

Shipment creation timestamp (UTC)

string format: date-time
items
required
Items

Line items with duty/tax breakdown

Array<object>
object
description
required
Description

Original item description as submitted

string | null
description_resolved
required
Description Resolved

Resolved item description after customs classification

string | null
hs_code
required
Hs Code

HS code as submitted

string | null
hs_code_resolved
required
Hs Code Resolved

HS code resolved by Duty Pro for the destination country

string | null
hs_code_resolved_import
required
Hs Code Resolved Import

Resolved import HS code for the destination country

string | null
hs_code_resolved_export
required
Hs Code Resolved Export

Resolved export HS code for the origin country

string | null
country_of_origin
required
Country Of Origin

Country of origin (ISO 3166-1 alpha-2)

string
declared_value
required
Declared Value

Declared value per unit

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
quantity
required
Quantity

Number of units

integer
total_value
required
Total Value

Total value for all units

string | null
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
shipping_cost
required
Shipping Cost

Shipping cost for this line item, regardless of quantity

string | null
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
duty_amount
required
Duty Amount

Calculated duty amount for this item

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
tax_amount
required
Tax Amount

Calculated tax amount for this item

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
fees
required
Fees

Additional fees applied to the shipment

Array<object>
object
fee_type
required
Fee Type

Fee type identifier

string
display_name
required
Display Name

Human-readable fee name shown to the consignee

string
amount
required
Amount

Fee amount in the shipment currency

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
original_amount
required
Original Amount

Fee amount in its original currency before conversion

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
original_currency
required
Original Currency

Original currency of the fee before conversion

string
payment_link
required
Payment Link

URL for the consignee payment page. Null if no communication has been sent.

string | null
tracking_link
Tracking Link

Carrier tracking URL for the consignee. Null if neither a shipment override nor a brand/organization template is configured.

string | null

Validation Error

object
detail
Detail
Array<object>
object
loc
required
Location
Array<string | integer>
msg
required
Message
string
type
required
Error Type
string