Property Name | Data Type | Required | Notes |
---|---|---|---|
origin | Number | Yes | ID of the origin region (subdistrict). |
destination | Number | Yes | ID of the destination region (subdistrict). |
items | Array<Object> | Yes | List of items in the shipment. See items object structure below. |
cod | String | No | Indicates if COD is requested. Allowed values: "0" (No) or "1" (Yes). |
insurance | String | No | Indicates if insurance is requested. Allowed values: "0" (No) or "1" (Yes). |
cod_amount | Number | No | Custom COD amount. If provided, this value overrides the item value calculation. |
items
Object FieldsProperty Name | Data Type | Required | Notes |
---|---|---|---|
name | String | Yes | Name or description of the item. |
weight | Number | Yes | Weight of a single item in grams. |
width | Number | Yes | Width of a single item in centimeters. |
height | Number | Yes | Height of a single item in centimeters. |
length | Number | Yes | Length of a single item in centimeters. |
quantity | Number | Yes | Number of items of this type. |
value | Number | No | Price of a single item. Required if cod or insurance is set to "1". |
nextday
, regular
, sameday
).data
Objectdata
object contains the following properties, each an array of B2bCourierItem
objects:nextday
regular
sameday
cargo
B2bCourierItem
ObjectProperty Name | Data Type | Description |
---|---|---|
courier_name | String | Name of the courier (e.g., "AnterAja"). |
courier_code | String | Unique code for the courier (e.g., "anteraja"). |
dimension | String | The final dimension of the package used for calculation. |
service | String | Type of service (e.g., "Nextday"). |
code_service | String | Unique code for the service (e.g., "ND"). |
mapping_service | String | Internal service mapping (e.g., "nextday"). |
etd | String | Estimated time of delivery (e.g., "1-1 Days"). |
base_tariff | Number | Base shipping price. |
discount | Number | Discount amount. |
total | Number | Final shipping price (base_tariff - discount + insurance_detail.insurance if insurance is enabled). |
is_cod | Boolean | Indicates if COD is available for this service. |
is_pickup | Boolean | Indicates if pickup service is available. |
is_dropoff | Boolean | Indicates if drop-off service is available. |
weight | Number | The chargeable weight of the package in kilograms. |
matrix_volume_weight | Number | The calculated volumetric weight. |
actual_weight | Number | The actual weight of the package. |
unit_weight | String | Unit of weight ("kg" or "g"). |
cod_detail | Object | Details of the COD calculation. Only present if cod was requested and is available. |
insurance_detail | Object | Details of the insurance calculation. Only present if insurance was requested. |
CodDetail
ObjectProperty Name | Data Type | Description |
---|---|---|
cod_fee | Number | The calculated COD fee. |
cod_fee_percent | Number | The COD fee percentage used. |
cod_billed | Number | The total amount billed for COD. |
cod_disbursement | Number | The amount to be disbursed to the client. |
InsuranceDetail
ObjectProperty Name | Data Type | Description |
---|---|---|
insurance_percent | Number | The insurance premium percentage. |
insurance_minimum | Number | The minimum insurance fee. |
insurance | Number | The calculated insurance fee. |
curl --location --request POST '/tariff/express' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{ "origin": 3571020010,// id_region
"destination": 3171020004,// id_region
"cod": "1", //optional // 1 = Yes | 0 = No
// "insurance":"1", //optional // 1 = Yes | 0 = No
"items": [
{
"name": "Contoh Barang 1",
"length": 10, //cm
"width": 10, //cm
"height": 10, //cm
"weight": 5000, //gram
"quantity": 1,
"value":2000//optional
}, {
"name": "Contoh Barang 1",
"length": 10, //cm
"width": 10, //cm
"height": 10, //cm
"weight": 5000, //gram
"quantity": 1,
"value":2000//optional
}
]
}'
{
"success": true,
"message": "success",
"data": {
"nextday": [
{
"courier_name": "Paxel",
"courier_code": "paxel",
"dimension": "20x10x10",
"service": "Nextday",
"code_service": "NEXTDAY",
"mapping_service": "nextday",
"etd": "1 - 2 Days",
"base_tariff": 27000,
"discount": 540,
"total": 27660,
"is_cod": false,
"is_pickup": true,
"is_dropoff": false,
"weight": 4,
"matrix_volume_weight": 0.5,
"actual_weight": 4,
"unit_weight": "kg",
"insurance_detail": {
"insurance_percent": 0.3,
"insurance_minimum": 0,
"insurance": 1200
}
}
],
"regular": [
{
"courier_name": "JNT",
"courier_code": "jnt",
"dimension": "20x10x10",
"service": "EZ",
"code_service": "EZ",
"mapping_service": "reguler",
"etd": "2 - 3 Days",
"base_tariff": 52000,
"discount": 7800,
"total": 45400,
"is_cod": true,
"is_pickup": true,
"is_dropoff": false,
"weight": 4,
"matrix_volume_weight": 0.33,
"actual_weight": 4,
"unit_weight": "kg",
"cod_detail": {
"cod_billed": 461511,
"cod_disbursement": 400000,
"cod_fee": 16111,
"cod_fee_percent": 3.5,
"cod_custom": 0,
"is_cod": true
},
"insurance_detail": {
"insurance_percent": 0.3,
"insurance_minimum": 0,
"insurance": 1200
}
},
{
"courier_name": "ID Express",
"courier_code": "idx",
"dimension": "20x10x10",
"service": "Standard",
"code_service": "STD",
"mapping_service": "regular",
"etd": "1 - 3 Days",
"base_tariff": 58000,
"discount": 11600,
"total": 47600,
"is_cod": true,
"is_pickup": true,
"is_dropoff": true,
"weight": 4,
"matrix_volume_weight": 0.33,
"actual_weight": 4,
"unit_weight": "kg",
"cod_detail": {
"cod_billed": 463791,
"cod_disbursement": 400000,
"cod_fee": 16191,
"cod_fee_percent": 3.5,
"cod_custom": 0,
"is_cod": true
},
"insurance_detail": {
"insurance_percent": 0.3,
"insurance_minimum": 0,
"insurance": 1200
}
},
{
"courier_name": "AnterAja",
"courier_code": "anteraja",
"dimension": "20x10x10",
"service": "Regular",
"code_service": "REG",
"mapping_service": "regular",
"etd": "2-4 Day",
"base_tariff": 70800,
"discount": 3540,
"total": 68460,
"is_cod": false,
"is_pickup": true,
"is_dropoff": true,
"weight": 4,
"matrix_volume_weight": 0.33,
"actual_weight": 4,
"unit_weight": "kg",
"insurance_detail": {
"insurance_percent": 0.3,
"insurance_minimum": 0,
"insurance": 1200
}
},
{
"courier_name": "Ninja",
"courier_code": "ninja",
"dimension": "20x10x10",
"service": "Standard",
"code_service": "Standard",
"mapping_service": "regular",
"etd": "1-3 Days",
"base_tariff": 48000,
"discount": 9600,
"total": 41400,
"is_cod": true,
"is_pickup": false,
"is_dropoff": false,
"weight": 4,
"matrix_volume_weight": 0.33,
"actual_weight": 4,
"unit_weight": "kg",
"cod_detail": {
"cod_billed": 454959,
"cod_disbursement": 400000,
"cod_fee": 13559,
"cod_fee_percent": 3,
"cod_custom": 0,
"is_cod": true
},
"insurance_detail": {
"insurance_percent": 0.3,
"insurance_minimum": 3000,
"insurance": 3000
}
}
],
"sameday": [],
"cargo": [
{
"courier_name": "ID Express",
"courier_code": "idx",
"dimension": "20x10x10",
"service": "Kargo",
"code_service": "iDtruck",
"mapping_service": "kargo",
"etd": "3 - 5 Days",
"base_tariff": 50000,
"discount": 5000,
"total": 46200,
"is_cod": true,
"is_pickup": false,
"is_dropoff": false,
"weight": 4,
"matrix_volume_weight": 0.33,
"actual_weight": 4,
"unit_weight": "kg",
"cod_detail": {
"cod_billed": 462340,
"cod_disbursement": 400000,
"cod_fee": 16140,
"cod_fee_percent": 3.5,
"cod_custom": 0,
"is_cod": true
},
"insurance_detail": {
"insurance_percent": 0.3,
"insurance_minimum": 0,
"insurance": 1200
}
},
{
"courier_name": "Ninja",
"courier_code": "ninja",
"dimension": "20x10x10",
"service": "Cargo",
"code_service": "Cargo",
"mapping_service": "cargo",
"etd": "1-3 Days",
"base_tariff": 58300,
"discount": 11660,
"total": 49640,
"is_cod": true,
"is_pickup": false,
"is_dropoff": false,
"weight": 4,
"matrix_volume_weight": 0.33,
"actual_weight": 4,
"unit_weight": "kg",
"cod_detail": {
"cod_billed": 463454,
"cod_disbursement": 400000,
"cod_fee": 13814,
"cod_fee_percent": 3,
"cod_custom": 0,
"is_cod": true
},
"insurance_detail": {
"insurance_percent": 0.3,
"insurance_minimum": 3000,
"insurance": 3000
}
}
]
},
"timestamp": "2025-08-28T08:45:13.381Z"
}