{"openapi":"3.1.0","info":{"title":"AntarPaket Developer API","version":"1.0.0","description":"Integrasi cek ongkir, quote, pengiriman, dan tracking. Mulai dari [panduan](/docs). Semua nominal uang adalah rupiah. API key wajib disimpan di backend. Sandbox memakai tarif simulasi, tanpa kurir atau pemotongan saldo. Tracking berasal dari sinkronisasi internal; tidak menjamin real-time. Playground hanya mendukung sandbox. Pengaturan dashboard membatasi kurir/layanan dan menentukan harga tampilan sebelum atau sesudah diskon. Pembayaran tetap memakai harga setelah diskon; lihat payableGrandTotal pada rates/quote."},"servers":[{"url":"https://sb.antarpaket.id/v1","description":"Sandbox — TEST key, tanpa transaksi sungguhan"},{"url":"https://kecapi.antarpaket.id/v1","description":"Produksi — LIVE key, bayar melalui saldo"}],"security":[{"ApiKey":[]}],"tags":[{"name":"Wilayah"},{"name":"Ongkir"},{"name":"Pengiriman"},{"name":"Tracking"}],"paths":{"/areas":{"get":{"operationId":"searchAreas","summary":"Cari kode kecamatan","description":"Izin API key: `areas.read`.","tags":["Wilayah"],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","properties":{"areas":{"type":"array","items":{"$ref":"#/components/schemas/Area"}}}},"request_id":{"type":"string"}}}}}},"400":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key tidak valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Izin/IP tidak sesuai","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Konflik atau request masih diproses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Kuota terlampaui; lihat Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Gangguan sementara atau rekonsiliasi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":80},"example":"Kebon Jeruk"}]}},"/rates":{"post":{"operationId":"checkRates","summary":"Cek ongkir","description":"Izin API key: `rates.read`.","tags":["Ongkir"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateInput"}}}},"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","properties":{"rates":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}},"sandbox":{"type":"boolean"},"partial":{"type":"boolean"}}},"request_id":{"type":"string"}}}}}},"400":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key tidak valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Izin/IP tidak sesuai","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Konflik atau request masih diproses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Kuota terlampaui; lihat Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Gangguan sementara atau rekonsiliasi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/quotes":{"post":{"operationId":"createQuote","summary":"Kunci pilihan tarif menjadi quote","description":"Izin API key: `rates.read`.","tags":["Ongkir"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteInput"}}}},"responses":{"201":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Quote"},"request_id":{"type":"string"}}}}}},"400":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key tidak valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Izin/IP tidak sesuai","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Konflik atau request masih diproses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Kuota terlampaui; lihat Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Gangguan sementara atau rekonsiliasi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shipments":{"post":{"operationId":"createShipment","summary":"Buat pengiriman","description":"Izin `shipments.write`. Bayar dari saldo untuk LIVE. Rute, deskripsi barang, dan COD harus sesuai quote yang dibuat dengan key yang sama. Simpan Idempotency-Key sebelum mengirim; pengulangan key dan body yang sama tidak membuat pesanan baru. Jangan mengganti key saat request timeout atau booking belum terkonfirmasi. Tidak ada retry booking otomatis melalui API.","tags":["Pengiriman"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentInput"}}}},"responses":{"201":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Shipment"},"request_id":{"type":"string"}}}}}},"202":{"description":"Pengiriman yang sudah ada ditemukan; cek status dan jangan membuat ulang.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Shipment"},"request_id":{"type":"string"}}}}}},"400":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key tidak valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Izin/IP tidak sesuai","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Konflik atau request masih diproses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Kuota terlampaui; lihat Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Gangguan sementara atau rekonsiliasi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,100}$"},"example":"order-toko-20261009-0001"}]},"get":{"operationId":"listShipments","summary":"Daftar pengiriman akun","description":"Izin API key: `shipments.read`.","tags":["Pengiriman"],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","properties":{"shipments":{"type":"array","items":{"$ref":"#/components/schemas/Shipment"}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"}}}}},"request_id":{"type":"string"}}}}}},"400":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key tidak valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Izin/IP tidak sesuai","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Konflik atau request masih diproses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Kuota terlampaui; lihat Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Gangguan sementara atau rekonsiliasi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":10000,"default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}]}},"/shipments/{id}":{"get":{"operationId":"getShipment","summary":"Detail pengiriman","description":"Izin API key: `shipments.read`.","tags":["Pengiriman"],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Shipment"},"request_id":{"type":"string"}}}}}},"400":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key tidak valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Izin/IP tidak sesuai","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Konflik atau request masih diproses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Kuota terlampaui; lihat Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Gangguan sementara atau rekonsiliasi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":100},"description":"ID pengiriman milik akun, dari response create/list."}]}},"/shipments/{id}/tracking":{"get":{"operationId":"trackShipment","summary":"Timeline status pengiriman","description":"Izin API key: `tracking.read`.","tags":["Tracking"],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","properties":{"shipment":{"$ref":"#/components/schemas/Shipment"},"events":{"type":"array","maxItems":200,"items":{"type":"object","properties":{"status":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"}}}}}},"request_id":{"type":"string"}}}}}},"400":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key tidak valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Izin/IP tidak sesuai","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Konflik atau request masih diproses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Kuota terlampaui; lihat Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Gangguan sementara atau rekonsiliasi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":100},"description":"ID pengiriman milik akun, dari response create/list."}]}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"API key ap_test_… untuk sandbox atau ap_live_… untuk produksi."}},"schemas":{"RateInput":{"type":"object","properties":{"originDistrictCode":{"type":"string","pattern":"^\\d{1,12}$"},"destDistrictCode":{"type":"string","pattern":"^\\d{1,12}$"},"weightGram":{"type":"integer","minimum":100,"maximum":150000},"lengthCm":{"default":10,"type":"integer","minimum":1,"maximum":300},"widthCm":{"default":10,"type":"integer","minimum":1,"maximum":300},"heightCm":{"default":10,"type":"integer","minimum":1,"maximum":300},"declaredValue":{"default":0,"type":"integer","minimum":0,"maximum":500000000},"cod":{"default":false,"type":"boolean"},"insurance":{"default":false,"type":"boolean"}},"required":["originDistrictCode","destDistrictCode","weightGram","lengthCm","widthCm","heightCm","declaredValue","cod","insurance"],"additionalProperties":false,"example":{"originDistrictCode":"123","destDistrictCode":"456","weightGram":1000,"lengthCm":10,"widthCm":10,"heightCm":10,"declaredValue":100000,"cod":false,"insurance":false}},"QuoteInput":{"type":"object","properties":{"originDistrictCode":{"type":"string","pattern":"^\\d{1,12}$"},"destDistrictCode":{"type":"string","pattern":"^\\d{1,12}$"},"weightGram":{"type":"integer","minimum":100,"maximum":150000},"lengthCm":{"default":10,"type":"integer","minimum":1,"maximum":300},"widthCm":{"default":10,"type":"integer","minimum":1,"maximum":300},"heightCm":{"default":10,"type":"integer","minimum":1,"maximum":300},"declaredValue":{"default":0,"type":"integer","minimum":0,"maximum":500000000},"cod":{"default":false,"type":"boolean"},"insurance":{"default":false,"type":"boolean"},"courierCode":{"type":"string","pattern":"^[A-Z0-9_]{2,20}$"},"serviceCode":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,20}$"},"itemDescription":{"type":"string","minLength":3,"maxLength":200}},"required":["originDistrictCode","destDistrictCode","weightGram","lengthCm","widthCm","heightCm","declaredValue","cod","insurance","courierCode","serviceCode","itemDescription"],"additionalProperties":false,"example":{"originDistrictCode":"123","destDistrictCode":"456","weightGram":1000,"courierCode":"SANDBOX","serviceCode":"REG","itemDescription":"Baju katun"}},"ShipmentInput":{"type":"object","properties":{"quoteId":{"type":"string","minLength":10,"maxLength":100},"sender":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"phone":{"type":"string","pattern":"^\\+?[0-9]{9,16}$"},"addressLine":{"type":"string","minLength":10,"maxLength":500},"province":{"type":"string","minLength":2,"maxLength":100},"city":{"type":"string","minLength":2,"maxLength":100},"district":{"type":"string","minLength":2,"maxLength":100},"districtCode":{"type":"string","pattern":"^\\d{1,12}$"},"village":{"type":"string","maxLength":100},"postalCode":{"type":"string","pattern":"^\\d{5}$"},"notes":{"type":"string","maxLength":300},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["name","phone","addressLine","province","city","district","districtCode"],"additionalProperties":false},"recipient":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"phone":{"type":"string","pattern":"^\\+?[0-9]{9,16}$"},"addressLine":{"type":"string","minLength":10,"maxLength":500},"province":{"type":"string","minLength":2,"maxLength":100},"city":{"type":"string","minLength":2,"maxLength":100},"district":{"type":"string","minLength":2,"maxLength":100},"districtCode":{"type":"string","pattern":"^\\d{1,12}$"},"village":{"type":"string","maxLength":100},"postalCode":{"type":"string","pattern":"^\\d{5}$"},"notes":{"type":"string","maxLength":300},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["name","phone","addressLine","province","city","district","districtCode"],"additionalProperties":false},"itemDescription":{"type":"string","minLength":3,"maxLength":200},"itemCategory":{"default":"00","type":"string","pattern":"^[0-9]{2}$"},"quantity":{"default":1,"type":"integer","minimum":1,"maximum":1000},"codAmount":{"default":0,"type":"integer","minimum":0,"maximum":500000000}},"required":["quoteId","sender","recipient","itemDescription","itemCategory","quantity","codAmount"],"additionalProperties":false,"example":{"quoteId":"GANTI_DENGAN_QUOTE_ID","sender":{"name":"Toko Contoh","phone":"081234567890","addressLine":"Jalan Contoh nomor 10","province":"DKI Jakarta","city":"Jakarta Barat","district":"Kebon Jeruk","districtCode":"123"},"recipient":{"name":"Penerima Contoh","phone":"081234567891","addressLine":"Jalan Tujuan nomor 20","province":"Jawa Barat","city":"Bandung","district":"Coblong","districtCode":"456"},"itemDescription":"Baju katun","quantity":1,"codAmount":0}},"Area":{"type":"object","properties":{"districtCode":{"type":"string"},"province":{"type":"string"},"city":{"type":"string"},"district":{"type":"string"},"village":{"type":["string","null"]},"postalCode":{"type":["string","null"]}}},"Rate":{"type":"object","properties":{"courierCode":{"type":"string"},"courierName":{"type":"string"},"serviceCode":{"type":"string"},"serviceName":{"type":"string"},"serviceType":{"type":"string"},"finalPrice":{"type":"string","pattern":"^[0-9]+$","description":"Harga ongkir tampilan sesuai priceDisplayMode."},"grandTotal":{"type":"string","pattern":"^[0-9]+$","description":"Total tampilan termasuk biaya tambahan sesuai aturan COD/asuransi."},"priceDisplayMode":{"type":"string","enum":["BEFORE_DISCOUNT","AFTER_DISCOUNT"]},"priceBeforeDiscount":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"priceAfterDiscount":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"discountAmount":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"payableGrandTotal":{"type":"string","pattern":"^[0-9]+$","description":"Total pembayaran AntarPaket setelah diskon akun, termasuk biaya tambahan. Mode tampilan tidak mengubah pembayaran."},"minSla":{"type":["integer","null"]},"maxSla":{"type":["integer","null"]},"slaText":{"type":["string","null"]},"chargeableWeightKg":{"type":"number"},"codSupported":{"type":"boolean"},"codFee":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"codFeeMode":{"type":"string","enum":["SETTLEMENT","CHECKOUT"]},"insuranceSupported":{"type":"boolean"},"insuranceApplied":{"type":"boolean"},"insuranceFee":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"pickupSupported":{"type":"boolean"}}},"Quote":{"allOf":[{"$ref":"#/components/schemas/Rate"},{"type":"object","properties":{"quoteId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"}}}]},"Shipment":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"awb":{"type":["string","null"]},"status":{"type":"string"},"courierCode":{"type":"string"},"serviceCode":{"type":"string"},"shippingPrice":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"insuranceFee":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"charged":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"}}},"Error":{"type":"object","required":["error","request_id"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}},"webhooks":{"shipmentEvent":{"post":{"summary":"shipment.created / shipment.updated","description":"Daftarkan URL di dashboard. Verifikasi HMAC-SHA256(secret, event_id + '.' + timestamp + '.' + raw_body) dengan perbandingan constant-time, timestamp ±5 menit, dan deduplikasi event ID. Signature header berformat v1=hex. Lihat /docs#webhook.","parameters":[{"name":"X-AntarPaket-Event-ID","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-AntarPaket-Timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-AntarPaket-Signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["shipment.created","shipment.updated","webhook.test"]},"createdAt":{"type":"string","format":"date-time"},"environment":{"type":"string","enum":["sandbox","live"]},"data":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"status":{"type":"string"},"awb":{"type":["string","null"]},"courierCode":{"type":"string"},"serviceCode":{"type":"string"},"shippingPrice":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"insuranceFee":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"charged":{"type":"string","pattern":"^[0-9]+$","description":"Rupiah sebagai string bilangan bulat."},"message":{"type":"string"}}}}}}}},"responses":{"200":{"description":"Event sudah disimpan secara durabel oleh penerima."}}}}}}