Courier Rates V2
Rates from many couriers at once, by district code.
Base URL
https://use.api.co.id
Call GET /courier/v2/rates with the origin & destination district codes and the package weight (kg), plus the x-api-co-id header. Optional: item value, insurance, and package dimensions. The response contains a list of couriers and services with price, estimate, cheapest/fastest flags, and a quote_id.
District codes
Get district codes from the location endpoints, in order:
GET /courier/v1/locations/provincesGET /courier/v1/locations/cities?province=GET /courier/v1/locations/districts?city=
Pricing
- Rp 5 per successful call to
GET /courier/v2/rates(pay-as-you-go, deducted from your balance). - Failed calls are not charged; an insufficient balance returns
402. - The location and courier list endpoints are free.
Ordering (pickup)
Order creation (pickup) is coming soon. The ordering endpoint is being prepared for the next release. The quote_id from this rate check is the first step of that flow.
Replaces the previous version
This version replaces Courier Rates V1, which is based on village codes. V2 uses district codes and returns a quote_id.
Cek Ongkir
Cek Ongkir (v2)
Hitung tarif pengiriman dari kecamatan asal ke kecamatan tujuan untuk semua kurir yang tersedia. Mengembalikan quote_id (untuk langkah pemesanan berikutnya) dan daftar rates.
Harga: Rp 5 per panggilan sukses (dipotong dari saldo, hanya jika tarif berhasil dikembalikan).
### Query Parameters
- origin_district_code (required): kode kecamatan asal
- destination_district_code (required): kode kecamatan tujuan
- weight (required): berat paket dalam kilogram (> 0)
- item_value (optional): nilai barang (IDR), untuk perhitungan asuransi
- insurance (optional): sertakan biaya asuransi per kurir
- length / width / height (optional): dimensi paket (cm)
| Name | Type | Description |
|---|---|---|
origin_district_codeRequired | string | Kode kecamatan asal (ambil dari /courier/v1/locations/districts) Example: 317405 |
destination_district_codeRequired | string | Kode kecamatan tujuan Example: 317305 |
weightRequired | number | Berat paket dalam kilogram (> 0) Example: 1 |
item_valueOptional | integer | Nilai barang (IDR), dipakai untuk perhitungan asuransi Example: 100000 |
insuranceOptional | boolean | Sertakan biaya asuransi per kurir Example: false |
lengthOptional | integer | Panjang paket (cm) |
widthOptional | integer | Lebar paket (cm) |
heightOptional | integer | Tinggi paket (cm) |
| Name | Type | Description |
|---|---|---|
is_successOptional | boolean | Example: true |
messageOptional | string | Example: Success |
dataOptional | object | |
data.quote_idOptional | string | |
data.ratesOptional | object[] | |
data.rates[].courier_codeOptional | string | |
data.rates[].courier_nameOptional | string | |
data.rates[].courier_imageOptional | string | |
data.rates[].service_codeOptional | string | |
data.rates[].service_nameOptional | string | |
data.rates[].service_typeOptional | string | |
data.rates[].etdOptional | string | |
data.rates[].estOptional | integer | |
data.rates[].is_codOptional | boolean | |
data.rates[].normal_priceOptional | integer | |
data.rates[].is_cheapestOptional | boolean | |
data.rates[].is_fastestOptional | boolean | |
data.rates[].priceOptional | integer | |
data.rates[].handling_feeOptional | integer | |
data.rates[].insurance_feeOptional | integer | |
data.rates[].total_priceOptional | integer |
curl -X GET "https://use.api.co.id/courier/v2/rates?origin_district_code=317405&destination_district_code=317305&weight=1" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "quote_id": "q_8f3c1a9e2b7d4c05", "rates": [ { "courier_code": "jne", "courier_name": "JNE Express", "courier_image": "https://use.api.co.id/couriers/jne.png", "service_code": "REG", "service_name": "Reguler", "service_type": "Standard", "etd": "1-3", "est": 3, "is_cod": false, "normal_price": 12000, "is_cheapest": false, "is_fastest": false, "price": 10000, "handling_fee": 500, "insurance_fee": 0, "total_price": 10500 }, { "courier_code": "ninja", "courier_name": "Ninja Express", "courier_image": null, "service_code": "NSTD", "service_name": "Standard", "service_type": "Regular", "etd": "1-4", "est": 4, "is_cod": false, "normal_price": 5000, "is_cheapest": true, "is_fastest": false, "price": 4900, "handling_fee": 0, "insurance_fee": 0, "total_price": 4900 } ] }}Lokasi
Daftar Provinsi
Daftar provinsi (gratis). Dipakai untuk menelusuri kode kecamatan.
curl -X GET "https://use.api.co.id/courier/v1/locations/provinces" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "31", "name": "DKI Jakarta" } ]}Daftar Kota/Kabupaten
Daftar kota/kabupaten dalam sebuah provinsi (gratis).
| Name | Type | Description |
|---|---|---|
provinceRequired | string | Kode provinsi Example: 31 |
curl -X GET "https://use.api.co.id/courier/v1/locations/cities?province=31" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "3174", "name": "Jakarta Selatan" } ]}Daftar Kecamatan
Daftar kecamatan dalam sebuah kota/kabupaten (gratis). code di sini yang dipakai sebagai origin_district_code / destination_district_code.
| Name | Type | Description |
|---|---|---|
cityRequired | string | Kode kota/kabupaten Example: 3174 |
curl -X GET "https://use.api.co.id/courier/v1/locations/districts?city=3174" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "317405", "name": "Kebayoran Lama" } ]}Kurir
Daftar Kurir
Daftar kurir yang tersedia (gratis).
curl -X GET "https://use.api.co.id/courier/v1/couriers" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "jne", "name": "JNE Express", "logo": "https://use.api.co.id/couriers/jne.png", "cod": true }, { "code": "ninja", "name": "Ninja Express", "logo": null, "cod": false } ]}