Overview
AntarPaket API = satu REST API untuk banyak ekspedisi. Kamu tidak perlu kredensial kurir — tarif, booking, tracking, dan webhook semuanya lewat AntarPaket.
Base URL
| Environment | Base URL |
|---|---|
| Production | https://antarpaket.id/api/v1 |
| Test (sandbox) | https://antarpaket.id/api/v1 dengan key ap_test_… |
Sandbox dan production memakai host yang sama; pemisahan ada di jenis API key. Key ap_test_… memakai provider simulator internal — tidak pernah menyentuh kurir asli.
Quick Start — dari nol ke tarif pertama
- Daftar → buka Dashboard → API Keys.
- Buat key TEST, salin secret (hanya tampil sekali).
- Panggil
GET /api/v1/couriersuntuk melihat kurir & layanan. - Panggil
POST /api/v1/ratesdengan area & berat. - Buat quote → buat shipment → bayar → terima resi via webhook.
curl https://antarpaket.id/api/v1/couriers \
-H "Authorization: Bearer ap_test_xxxxxxxx"Endpoint Reference
| Method | Path | Deskripsi |
|---|---|---|
| GET | /api/v1/couriers | Daftar kurir aktif + capabilities |
| GET | /api/v1/services | Daftar layanan per kurir (filter ?courier=) |
| POST | /api/v1/rates | Cek tarif multi-kurir |
| POST | /api/v1/quotes | Kunci harga (TTL 15 menit) |
| GET | /api/v1/quotes/{id} | Detail quote |
| POST | /api/v1/shipments | Buat shipment dari quote_id (Idempotency-Key) |
| GET | /api/v1/shipments | Daftar shipment (page/limit/status) |
| GET | /api/v1/shipments/{id} | Detail shipment |
| POST | /api/v1/shipments/{id}/pay | Bayar shipment |
| POST | /api/v1/shipments/{id}/cancel | Batalkan shipment |
| GET | /api/v1/tracking/{awb} | Tracking timeline |
| POST | /api/v1/pickups | Request pickup (shipment BOOKED) |
| GET | /api/v1/pickups | Daftar pickup |
| GET | /api/v1/pickups/{id} | Detail pickup |
| GET | /api/v1/balance | Saldo wallet |
| GET | /api/v1/transactions | Mutasi wallet |
| GET/POST | /api/v1/webhooks | Kelola webhook endpoint |
| GET/PATCH/DELETE | /api/v1/webhooks/{id} | Detail/update/hapus webhook |
| POST | /api/v1/webhooks/{id}/rotate | Rotasi signing secret |
| POST | /api/v1/webhooks/{id}/test | Kirim event webhook.test |
Detail request/response tiap endpoint: Endpoints Reference. OpenAPI: /api/openapi.json.
Webhooks
Terima notifikasi status pengiriman secara otomatis (ber-HMAC SHA-256, retry backoff, at-least-once). Panduan lengkap: Webhooks.