Skip to main content
POST
Calculate Landed Cost

Headers

x-openborder-direct-api-key
string
required

OpenBorder merchant API token

Body

application/json

This API uses JSON.

The required fields ensure accurate and guaranteed landed cost calculations.

All keys below must be included for a guaranteed calculation.

ship_to
object
required

Destination address.

caller_app
string
required

Identifier for your app/service (e.g., "checkout-service").

currency_code
string
required

ISO 4217 currency code (e.g., USD, EUR).

order_discount
number
required

Total order-level discount in major currency units (e.g., 10.00 means $10 off). Discount is split proportionally across products for duties/taxes.

shipments
object[]
required

One or more shipments to calculate landed costs for. A shipment groups the items sent from a specific origin warehouse to the order's destination address.

external_reference_id
string | null

External ID for traceability, like a cart ID or checkout session ID.

custom_properties
object | null

Any custom metadata your system wants to store (max 4 KB).

Response

Landed cost successfully calculated

landedcost_request_id
string
required

Unique ID for this tax calculation request, must be submitted with the final order — store this for auditing or support.

currency_code
string
required

ISO 4217 currency code used for all amounts (e.g., "CAD").

external_reference_id
string | null
required

Your original reference ID (e.g., cart or session ID) — helps link this calculation back to your system.

created_at
string
required

ISO timestamp showing when the calculation was processed.

usd_conversion_rate
number
required

Conversion rate from the returned currency to USD at the time of calculation — useful for reporting.

shipments
object[]
required

List of results for each shipment you submitted.

hs_codes
object[]
required

The HS Code each product has been classified to. Availability Note: This field is conditionally populated in the response body. It will only be included if your merchant configuration requires the HS Code for proper processing (ex. international shipping or customs declaration). If the field is not required for your integration, a null value will be returned.