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.

Create shipment (booking)

POST — use EkspedisiKu booking payload. Choose the carrier with the "carrier" field. EkspedisiKu will map your payload to the upstream carrier format.

POST /api/shipments

lion_parcel

POST http://localhost/api/shipments

application/json

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

{
  "carrier": "lion_parcel",
  "shipment": {
    "origin": "KEBON JERUK, JAKARTA BARAT",
    "destination": "KEBON JERUK, JAKARTA BARAT",
    "reference": "INV-001",
    "sender": {
      "name": "Lio Lio",
      "phone": "+628965009090",
      "address": "Jl. Manchester City, District Old Trafford"
    },
    "recipient": {
      "name": "Liona",
      "phone": "0896793939321",
      "address": "Jl. King Manchester United, Santiago Bernabeu",
      "email": "tester@gmail.com"
    },
    "package": {
      "service_code": "REGPACK",
      "commodity_code": "ABR036",
      "insurance_type": "free",
      "goods_value": 100000,
      "is_cod": false,
      "cod_amount": 0,
      "is_woodpacking": false,
      "pieces": [
        { "length": 10, "width": 10, "height": 10, "weight": 1 }
      ]
    },
    "documents": {
      "cipls": [
        { "commodity_name": "ABR036", "item_detail": "Electronics", "quantity": 1, "item_price": 100000 }
      ],
      "recipient_identity_number": "321321313213213",
      "recipient_tax_number": "3213131321321321",
      "identity_card_file": "https://dummyimage.com/300x300/000000/000000.jpg",
      "tax_number_file": "https://dummyimage.com/300x300/000000/000000.jpg",
      "package_before_packing_file": "https://dummyimage.com/300x300/000000/000000.jpg",
      "package_after_packing_file": "https://dummyimage.com/300x300/000000/000000.jpg"
    }
  },
  "items": [ { "name": "Case HP iPhone", "variant": "Merah", "qty": 1 } ]
}

lalamove

Set carrier to lalamove. Use quotation_id from rates, or omit it to create quotation + order in one request.

{
  "carrier": "lalamove",
  "shipment": {
    "quotation_id": "1514140994227007571",
    "sender": { "name": "Toko A", "phone": "+6281234567890" },
    "recipient": { "name": "Budi", "phone": "+6289876543210" },
    "pickup": {
      "lat": "-6.2088",
      "lng": "106.8456",
      "address": "Jakarta Pusat"
    },
    "dropoff": {
      "lat": "-6.9175",
      "lng": "107.6191",
      "address": "Bandung"
    }
  }
}

If you need special documents (e.g. INTERPACK), send them in shipment.documents. EkspedisiKu will forward the required upstream fields for the carrier.

Example response

application/json

{
  "success": true,
  "carrier": { "id": "lion_parcel", "label": "Lion Parcel" },
  "message": "OK",
  "data": {
    "id": 1,
    "stt_number": "99LP1776579587711",
    "origin": "…",
    "destination": "…",
    "status": "created",
    "created_at": "…"
  }
}