Quotation API
POST /apiQuoteFull endpoint: https://app.thainexus.co.th/functions/apiQuote
Returns shipping quotes from all active couriers for a given package. Uses the internal rate table database with the 9-step pricing formula. Formula: Volumetric Weight = (L x W x H) / 5000, Chargeable Weight = max(actual, volumetric). Destination TH / THAILAND is supported when rate tables include it. Unlike the public shipping calculator, this API does not suppress domestic Thailand quotes.
Auth: Pass api_token in the request body (from Profile Settings)
Request fields
| Field | Description |
|---|---|
api_token | string - Your API token |
country | string - ISO code (US, GB, TH, JP) or full name (UNITED STATES, THAILAND). TH is not suppressed. |
actual_weight_kg | number - Actual weight in kg |
length_cm | number - Package length in cm |
width_cm | number - Package width in cm |
height_cm | number - Package height in cm |
is_document | boolean - Optional (default false). If true, returns only document-type quotes. If false, excludes document quotes. |
Example request
{
"api_token": "tnx_XXXXXXXX_XXXXXXXX_XXXXXXXX_XXXXXXXX",
"country": "US",
"actual_weight_kg": 2.5,
"length_cm": 30,
"width_cm": 20,
"height_cm": 15,
"is_document": false
}cURL example
curl -X POST https://app.thainexus.co.th/functions/apiQuote \
-H "Content-Type: application/json" \
-d '{
"api_token": "tnx_XXXXXXXX_XXXXXXXX_XXXXXXXX_XXXXXXXX",
"country": "US",
"actual_weight_kg": 2.5,
"length_cm": 30,
"width_cm": 20,
"height_cm": 15,
"is_document": false
}'Example response
{
"success": true,
"country": "US",
"package": {
"actual_weight_kg": 2.5,
"length_cm": 30,
"width_cm": 20,
"height_cm": 15
},
"quotes_count": 3,
"quotes": [
{
"courier_name": "flex_dap",
"display_name": "Flex DAP",
"delivery_type": "pickup",
"estimated_days": "5-10",
"final_price_thb": 1250,
"currency": "THB",
"chargeable_weight_kg": 2.5,
"weight_used": "actual",
"volumetric_weight_kg": 1.8,
"is_oversize": false
}
]
}Response fields
| Field | Description |
|---|---|
courier_name | Internal courier ID |
display_name | Human-readable name |
final_price_thb | Total price in THB |
estimated_days | Delivery estimate (e.g. "5-10") |
chargeable_weight_kg | Weight used for pricing |
weight_used | "actual" or "volumetric" |
- Unlike the public calculator, domestic Thailand quotes are not suppressed.
- Live testing is available in the client app under Integrations / API documentation.
- For pre-production testing, call the same path on https://uat-dev.thainexus.co.th/functions with a uat_tnx_... key (contact us for a UAT key).
