Skip to main content

Retrieve a Courier Rates

Endpoint
POST /v1/rates/couriers

Check your order history or tracking by orderId. You can get the Order ID from the Order API request.

API Parameters

origin_area_id string
OPTIONAL / REQUIRED
The origin area id. Area Id can be found using Maps API

destination_area_id string
OPTIONAL / REQUIRED
The destination area id. Area Id can be found using Maps API

origin_latitude number
OPTIONAL / REQUIRED
The origin latitude where items can be picked up from the shipper or seller.

origin_longitude number
OPTIONAL / REQUIRED
The origin longitude where items can be picked up from the shipper or seller.

destination_latitude number
OPTIONAL / REQUIRED
The destination latitude where items will be received by the end customer.

destination_longitude number
OPTIONAL / REQUIRED
The destination longitude where items will be received by the end customer.

origin_postal_code number
OPTIONAL / REQUIRED
Postal code for the origin location

destination_postal_code number
OPTIONAL / REQUIRED
Postal code for the destination location

type string
Optional
You can retrieve courier rates based on types. Currently there’s only one available type that can be used as follows: origin_suggestion_to_closest_destination Biteship will automatically select the nearest location based on your available location list

couriers string
REQUIRED
List of courier names which are available to query separated by commas. You can see list of available Biteship couriers in Courier API

items array
REQUIRED
The list of item you will send for delivery
Show child parameters
items.name
REQUIRED
Name of your package.

items.description
Optional
A description of your package. You can share the color, the details or any that help describing your item.

items.category
Optional
Categorization of your package, the value must be one of these table value. If empty, the default value will beothers
ValueDescription
fashionClothing, accessories, and personal adornments.
healthcareProducts related to health, wellness, and personal care.
food_and_drinkItems related to food and beverages.
electronicElectronic devices and accessories.
beautyBeauty products and cosmetics.
outdoor_gearEquipment and apparel for outdoor activities.
home_accessoriesItems that enhance the decor and functionality of the home.
hobbyProducts related to leisure and hobbies.
collectionItems that belong to a particular collection or set.
sparepartReplacement parts and accessories.
groceriesFood and household items typically purchased for regular consumption.
frozen_foodFood items preserved by freezing, such as frozen meals, meat, vegetables, and desserts.
othersMiscellaneous items that don't fit into the other categories.

items.sku
Optional
Item SKU if you have one.

items.value
REQUIRED
The value of the item.

items.quantity
REQUIRED
The total of the item.

items.weight
REQUIRED
The weight of the item in grams.

items.height
Optional
The height of the item in centimeters. Item dimensions can affect the weight of your item which can cause a price different.

items.length
Optional
The length of the item in centimeters. Item dimensions can affect the weight of your item which can cause a price different.

items.width
Optional
The width of the item in centimeters. Item dimensions can affect the weight of your item which can cause a price different.


courier_insurance number
Optional
The amount of the insurance value. This is optional if you want to insured your shipment. For example, if your item is valued at IDR 1.000.000, then you should put 1000000 for the value.

destination_cash_on_delivery number
Optional
State the COD Amount if you want to activate COD delivery. COD amount cannot exceed IDR 15.000.000. You must fill in destination_cash_on_delivery_type too.

destination_cash_on_delivery_type string
Optional
The COD disbursement window. Value can be 7_days, 5_days, or 3_days.
7_days you will receiver your money 7 days after the item is delivered.
5_days you will receiver your money 5 days after the item is delivered.
3_days you will receiver your money 3 days after the item is delivered.

Types of Request


Rates by Coordinates

Accuracy : Low

For Instant couriers such as Gojek, Grab, Paxel, Lalamove and Borzo require a coordinate to generate price.

For Example:
Coordinate
Lat: -2.918334
Lng: 104.77683

Pro
Can be used for instant delivery, integrated with Map services such as Google Map or OpenStreetMap. Can be used for instant delivery and also standard delivery rates.

Cons
This can consist of 2 different types of postal codes which are 30961 and 30161. This may result in price different between the courier and Biteship

JSON Body Request
{
"origin_latitude": -6.3031123,
"origin_longitude": 106.7794934999,
"destination_latitude": -6.2441792,
"destination_longitude": 106.783529,
"couriers": "grab,jne,tiki",
"items": [
{
"name": "Shoes",
"description": "Black colored size 45",
"value": 199000,
"length": 30,
"width": 15,
"height": 20,
"weight": 200,
"quantity": 2
}
]
}

Rates by Postal Code

Accuracy : Medium

For Example:
Postal code 30961 and 30161.

Pro
Easy to implement, customers can focus on input only postal code.

Cons
Both represent the same area but different districts. 30961 represent Gasing, Talang Kalapa, Banyuasin. While 30161 represent Sako Baru, Sako, Palembang.

There’s a chance that one postal code consist of two districts and the other way around

JSON Body Request
{
"origin_postal_code": 12440,
"destination_postal_code": 12240,
"couriers": "anteraja,jne,sicepat",
"items": [
{
"name": "Shoes",
"description": "Black colored size 45",
"value": 199000,
"length": 30,
"width": 15,
"height": 20,
"weight": 200,
"quantity": 2
}
]
}

Rates by Area ID

Accuracy : High

For Example:
IDNP33IDNC39IDND4653IDZ30961
Gasing, Talang Kalapa, Banyuasin
IDNP33IDNC325IDND3713IDZ30161
Sako Baru, Sako, Palembang.

Pro
Area Id is using district as its lowest area level, Most courier in Indonesia still uses District as their point of reference to determine its shipping rates.

Cons
Extra implementation to use Maps API to get the AreaID. Cannot show instant delivery services.

JSON Body Request
{
"origin_area_id": "IDNP6IDNC148IDND836IDZ12410",
"destination_area_id": "IDNP6IDNC148IDND836IDZ12430",
"couriers": "paxel,jne,sicepat",
"items": [
{
"name": "Shoes",
"description": "Black colored size 45",
"value": 199000,
"length": 30,
"width": 15,
"height": 20,
"weight": 200,
"quantity": 2
}
]
}

Rates by Mix

You can mix between postal code for origin and coordinate for destination (see example below) and the other way around. This also applicable if you want to use Area ID from Maps API and combine them with other origin or destination field.

JSON Body Request
{
"origin_postal_code": 12440,
"destination_latitude": -6.2441792,
"destination_longitude": 106.783529,
"couriers": "paxel,jne,sicepat",
"items": [
{
"name": "Shoes",
"description": "Black colored size 45",
"value": 199000,
"length": 30,
"width": 15,
"height": 20,
"weight": 200,
"quantity": 2
}
]
}

Rates by Type

tip

NOTE: Make sure you already have list of location saved on your profile. You can use Location API to insert your location data or go to https://dashboard.biteship.com/address

Type origin_suggestion_to_closest_destination will help you to find the nearest origin location from your destination.

JSON Body Request
{
"type": "origin_suggestion_to_closest_destination",
"destination_latitude": -6.2441792,
"destination_longitude": 106.783529,
"couriers": "paxel,jne,sicepat",
"items": [
{
"name": "Shoes",
"description": "Black colored size 45",
"value": 199000,
"length": 30,
"width": 15,
"height": 20,
"weight": 200,
"quantity": 2
}
]
}

Rates with Insurance Fee

Insert courier_insurance for the total insurance value. There will be insurance_fee field in the pricing response if the courier supports insurance.

JSON Body Request
{
"origin_postal_code": 12440,
"destination_postal_code": 12240,
"couriers": "sicepat,jne",
"courier_insurance": 199000,
"items": [
{
"name": "Shoes",
"description": "Black colored size 45",
"value": 199000,
"length": 30,
"width": 15,
"height": 20,
"weight": 200,
"quantity": 1
}
]
}

Rates with COD Fee

Insert destination_cash_on_delivery for the total COD amount and destination_cash_on_delivery_type for the COD disbursement window. There will be cash_on_delivery_fee field in the pricing response if the courier supports COD.

JSON Body Request
{
"origin_postal_code": 12440,
"destination_postal_code": 12240,
"couriers": "sicepat,jne",
"destination_cash_on_delivery": 199000,
"destination_cash_on_delivery_type": "7_days",
"items": [
{
"name": "Shoes",
"description": "Black colored size 45",
"value": 199000,
"length": 30,
"width": 15,
"height": 20,
"weight": 200,
"quantity": 1
}
]
}

API Response

If you have an active Custom Rate (configured in the dashboard), the pricing response will have an extra field either shipping_fee_discount or shipping_fee_surcharge, depending on the custom rate configuration.

For example, if you set a flat fee for a certain courier service in Custom Rate, and the original shipment_fee is below the flat fee, you would receive a shipping_fee_surcharge field as the price difference.

If you set a percentage discount for a certain courier service in Custom Rate, you would receive a shipping_fee_discount field as the absolute amount of the discount from the original shipment_fee.

The price field in each pricing option is the final price after applying the custom rate (discount/surcharge) and adding other fees if you have activated insurance or COD delivery.

Response
{
"success": true,
"object": "courier_pricing",
"message": "Success to retrieve courier pricing",
"code": 20001007,
"origin": {
"location_id": "5dad2bf246d52d72b87378f6",
"latitude": -6.3031123,
"longitude": 106.7794934999,
"postal_code": 12440,
"country_name": "Indonesia",
"country_code": "ID",
"administrative_division_level_1_name": "DKI Jakarta",
"administrative_division_level_1_type": "province",
"administrative_division_level_2_name": "Jakarta Selatan",
"administrative_division_level_2_type": "city",
"administrative_division_level_3_name": "Cilandak",
"administrative_division_level_3_type": "district",
"administrative_division_level_4_name": "Lebak bulus",
"administrative_division_level_4_type": "subdistrict",
"address": "Jl. RS. Fatmawati Raya No.29, RT.8/RW.4, Cilandak Bar., Kec. Cilandak, Kota Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12430, Indonesia"
},
"destination": {
"location_id": "5dad2bf246d52d72b87378f6",
"latitude": -6.2441792,
"longitude": 106.783529,
"postal_code": 12240,
"country_name": "Indonesia",
"country_code": "ID",
"administrative_division_level_1_name": "DKI Jakarta",
"administrative_division_level_1_type": "province",
"administrative_division_level_2_name": "Jakarta Selatan",
"administrative_division_level_2_type": "city",
"administrative_division_level_3_name": "Cilandak",
"administrative_division_level_3_type": "district",
"administrative_division_level_4_name": "Lebak bulus",
"administrative_division_level_4_type": "subdistrict",
"address": "Jl. RS. Fatmawati Raya No.29, RT.8/RW.4, Cilandak Bar., Kec. Cilandak, Kota Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12430, Indonesia"
},
"pricing": [
{
"available_collection_method": ["pickup"],
"available_for_cash_on_delivery": true,
"available_for_proof_of_delivery": true,
"available_for_instant_waybill_id": true,
"available_for_insurance": false,
"company": "jne",
"courier_name": "JNE",
"courier_code": "jne",
"courier_service_name": "City to City (CTC)",
"courier_service_code": "ctc",
"currency": "IDR",
"description": "Pengiriman city to city",
"duration": "2 - 3 days",
"shipment_duration_range": "2 - 3",
"shipment_duration_unit": "days",
"service_type": "standard",
"shipping_type": "parcel",
"shipping_fee": 9000,
"cash_on_delivery_fee": 2000,
"price": 11000,
"tax_lines": [],
"type": "ctc"
},
{
"available_collection_method": ["pickup"],
"available_for_cash_on_delivery": true,
"available_for_proof_of_delivery": false,
"available_for_instant_waybill_id": true,
"available_for_insurance": true,
"company": "sicepat",
"courier_name": "SiCepat",
"courier_code": "sicepat",
"courier_service_name": "Reguler",
"courier_service_code": "reg",
"currency": "IDR",
"description": "Layanan reguler",
"duration": "1 - 2 days",
"shipment_duration_range": "1 - 2",
"shipment_duration_unit": "days",
"service_type": "standard",
"shipping_type": "parcel",
"shipping_fee": 32000,
"insurance_fee": 1000,
"cash_on_delivery_fee": 2000,
"price": 35000,
"tax_lines": [],
"type": "reg"
},
{
"available_collection_method": ["pickup"],
"available_for_cash_on_delivery": true,
"available_for_proof_of_delivery": false,
"available_for_instant_waybill_id": true,
"available_for_insurance": true,
"company": "sicepat",
"courier_name": "SiCepat",
"courier_code": "sicepat",
"courier_service_name": "Besok Sampai Tujuan",
"courier_service_code": "best",
"description": "Besok sampai tujuan",
"duration": "1 days",
"shipment_duration_range": "1",
"shipment_duration_unit": "days",
"service_type": "overnight",
"shipping_type": "parcel",
"shipping_fee": 40000,
"shipping_fee_surcharge": 2000,
"insurance_fee": 1000,
"cash_on_delivery_fee": 2000,
"price": 45000,
"tax_lines": [],
"type": "best"
},
{
"available_collection_method": ["drop_off"],
"available_for_cash_on_delivery": false,
"available_for_proof_of_delivery": false,
"available_for_instant_waybill_id": true,
"available_for_insurance": true,
"company": "wahana",
"courier_name": "Wahana",
"courier_code": "wahana",
"courier_service_name": "Deno",
"courier_service_code": "deno",
"currency": "IDR",
"description": "Layanan reguler",
"duration": "2 - 3 days",
"shipment_duration_range": "2 - 3",
"shipment_duration_unit": "days",
"service_type": "standard",
"shipping_type": "parcel",
"shipping_fee": 4000,
"shipping_fee_discount": 4000,
"insurance_fee": 1000,
"price": 1000,
"tax_lines": [],
"type": "deno"
}
]
}