Skip to main content

LandedcostService

A list of all methods in the LandedcostService service. Click on the method name to view detailed information about that method.

MethodsDescription
landed_costThe Landed Cost Quote API allows you to estimate the all-inclusive cost of international shipments - including applicable duties, VAT, taxes, brokerage fees, and other fees. Required parameters include the currency and shipment details, such as the commodity ID, price, quantity, and country code of origin.

landed_cost

The Landed Cost Quote API allows you to estimate the all-inclusive cost of international shipments - including applicable duties, VAT, taxes, brokerage fees, and other fees. Required parameters include the currency and shipment details, such as the commodity ID, price, quantity, and country code of origin.

  • HTTP Method: POST
  • Endpoint: /landedcost/{version}/quotes

Parameters

NameTypeRequiredDescription
request_bodyLandedCostRequestThe request body.
versionstrVersion of the API.
trans_idstrAn identifier unique to the request. Length: 32
transaction_srcstrAn identifier of the client/source application that is making the request. Length: 512
account_numberstrThe UPS account number.

Return Type

LandedCostResponse

Example Usage Code Snippet

from ups_landedcost_client import UpsLandedcostClient, Environment
from ups_landedcost_client.models import LandedCostRequest

sdk = UpsLandedcostClient(
username="YOUR_USERNAME",
password="YOUR_PASSWORD",
base_url=Environment.DEFAULT.value
)

request_body = LandedCostRequest(
currency_code="USD, CAD, EUR",
trans_id="LCUAT20220208053048_197985278292494",
allow_partial_landed_cost_result=True,
alversion="1, 2, 3",
shipment={
"id_": "fugiat ullamco ex officia Ut",
"import_country_code": "US, MX, CA",
"import_province": "Alberta, Ontario, North Frontier Zone",
"ship_date": "2022-02-28",
"incoterms": "FOB, CFR",
"export_country_code": "DE, CN, JP",
"trans_modes": "dolore",
"transport_cost": 100.6,
"shipment_type": "Duis voluptate sint eiusmo",
"shipment_items": [
{
"commodity_id": "velit dolor adipisicing ipsum cillum",
"gross_weight": 10.34,
"gross_weight_unit": "KG",
"price_each": 346.32,
"commodity_currency_code": "USD, CAD, EUR",
"quantity": 0,
"uom": "KILOGRAM, BAG",
"hs_code": "0901.90.00.10",
"description": "sit veniam",
"origin_country_code": "US, CA, JP, MX"
}
]
}
)

result = sdk.landedcost.landed_cost(
request_body=request_body,
version="v1",
trans_id="transId",
transaction_src="testing",
account_number="AccountNumber"
)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →