EkspedisiKu

API reference

All endpoints use the same URLs. Choose the logistics provider with the carrier field (body or query). One Bearer token works for every supported carrier.

Check rates (cek ongkir)

POST a JSON body to EkspedisiKu. The server forwards the request to the carrier tariff API (query parameters where applicable).

POST /api/rates

lion_parcel

Origin/destination hub codes and package dimensions (same POST /api/rates URL).

POST http://localhost/api/rates

application/json

POST http://localhost/api/rates
Content-Type: application/json
Authorization: Bearer <token>

{
  "origin": "CGK",
  "destination": "CGK",
  "weight": 1,
  "commodity": "ABR036",
  "length": 10,
  "width": 10,
  "height": 10
}

lalamove

Pickup and dropoff require lat/lng. Response services may include quotation_id (valid ~5 minutes for booking with carrier lalamove).

{
  "pickup": {
    "lat": "-6.2088",
    "lng": "106.8456",
    "address": "Jakarta Pusat, DKI Jakarta"
  },
  "dropoff": {
    "lat": "-6.9175",
    "lng": "107.6191",
    "address": "Bandung, Jawa Barat"
  },
  "service_type": "MOTORCYCLE"
}

Response is normalized by EkspedisiKu so every carrier uses the same structure.

Example response

application/json

{
  "success": true,
  "query": { "origin": "CGK", "destination": "CGK", "weight": 1 },
  "carriers": [
    {
      "id": "lion_parcel",
      "label": "Lion Parcel",
      "available": true,
      "status": 200,
      "message": "OK",
      "services": [
        { "code": "REGPACK", "name": "REGPACK", "price": 18000, "currency": "IDR", "etd": "1 - 1 Hari" }
      ]
    }
  ]
}