Price Estimate API
Get shipping price estimates from multiple carriers.
Endpoint
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/label/price/estimate | Get price estimates |
Request
Headers:
Content-Type: application/jsonAuthorization: appToken {token}
Request Body:
json
{
"request_id": "req_20250303_001",
"from_address": {
"postcode": "10001",
"country_code": "US",
"province": "NY",
"city": "New York",
"suburb": "Manhattan",
"address_1": "123 Main St"
},
"dst_address": {
"postcode": "90001",
"country_code": "US",
"province": "CA",
"city": "Los Angeles",
"suburb": "Downtown",
"address_1": "456 Oak Ave"
},
"carrier_ids": ["dhl_express", "ups_ground", "fedex"],
"parcels": [
{
"length": { "length": 30, "unit": "cm" },
"width": { "length": 20, "unit": "cm" },
"height": { "length": 10, "unit": "cm" },
"weight": { "weight": 2.5, "unit": "kg" },
"package_type_code": "package"
}
]
}Field Description
| Field | Type | Required | Description |
|---|---|---|---|
request_id | string | Yes | Unique request ID (used for idempotency) |
from_address | object | Yes | Sender address |
dst_address | object | Yes | Recipient address |
carrier_ids | string[] | Yes | List of carrier IDs to query |
parcels | object[] | Yes | Package details |
Address Fields
| Field | Type | Required | Description |
|---|---|---|---|
postcode | string | Yes | Postal code |
country_code | string | Yes | ISO 2-letter country code (e.g., "US", "CN") |
province | string | Yes | State/Province |
city | string | Yes | City |
suburb | string | No | Suburb/District |
address_1 | string | Yes | Primary address |
Parcel Fields
| Field | Type | Required | Description |
|---|---|---|---|
length | object | Yes | {length: number, unit: "cm"} |
width | object | Yes | {length: number, unit: "cm"} |
height | object | Yes | {length: number, unit: "cm"} |
weight | object | Yes | {weight: number, unit: "kg"} |
package_type_code | string | Yes | Package type code |
Response
Success Response
json
{
"code": 200,
"msg": "success",
"data": {
"dhl_express": [
{
"ref_record_id": 123,
"price": {
"amount": 10.50,
"currency": "USD"
},
"carrier_id": "dhl_express",
"shipper_name": "DHL Express",
"shipper_code": "DHL",
"remark": "Estimated delivery in 3-5 days",
"estimated_time": "3-5 days"
}
],
"ups_ground": [
{
"ref_record_id": 123,
"price": {
"amount": 8.00,
"currency": "USD"
},
"carrier_id": "ups_ground",
"shipper_name": "UPS Ground",
"shipper_code": "UPS",
"remark": "Estimated delivery in 5-7 days",
"estimated_time": "5-7 days"
}
]
}
}Error Response
json
{
"code": 400,
"msg": "the price estimate task exist",
"data": null
}Notes
- Idempotency: Duplicate requests with the same
request_idwill return an error - Async Processing: Price estimation runs asynchronously across multiple carriers
- Address Storage: Address information is saved for future use