POST
/
customs-duty
/
calculate-customs-duty
curl --request POST \
  --url https://base_url/api/v1/customs-duty/calculate-customs-duty \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "corporation_id": "b6d009b0-d174-463f-b030-94643c28e209",
  "invoice_currency": "USD",
  "subtotal": 10.99,
  "discount": 0.99,
  "shipping_and_handling": 0,
  "origin_country": "US",
  "destination_country": "US",
  "line_items": {
    "items": [
      {
        "amount": 25.23,
        "quantity": 155,
        "item_details": {
          "customs_code": "4905.90.20.00",
          "product_id": "b6d009b0-d174-463f-b030-94643c28e209",
          "weight_in_kg": 3.5,
          "volume_in_liters": 3.5
        }
      }
    ]
  }
}'
{
  "data": {
    "customs_rate": [
      {
        "customs_code": "4905.90.20.00",
        "product_id": "b6d009b0-d174-463f-b030-94643c28e209",
        "percentage_rate": 10.25,
        "per_kilogram_rate": 2.5,
        "per_liter_rate": 1.75
      }
    ],
    "customs_duty_amount": 1.03,
    "customs_duty_currency": "USD"
  },
  "message": "Successfully calculated tax."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
corporation_id
string
required

The unique identifier for the corporation to calculate an import duty rate for.

Example:

"b6d009b0-d174-463f-b030-94643c28e209"

invoice_currency
string
required

ISO 4217 alpha-3 currency code for the transaction.

Example:

"USD"

subtotal
number
required

Total amount before tax, shipping, handling, and discounts.

Example:

10.99

origin_country
string
required

ISO 3166 2-letter country code. Ex: US, IN, GB.

Example:

"US"

destination_country
string
required

ISO 3166 2-letter country code. Ex: US, IN, GB.

Example:

"US"

line_items
object
required
discount
number

Total discount amount applied to the subtotal.

Example:

0.99

shipping_and_handling
number

Total shipping and handling charges.

Example:

0

Response

200
application/json
Successful customs duty calculation
data
object
message
string
Example:

"Successfully calculated tax."