GET
Get Customer by Phone Number
Mengambil data profil pelanggan terverifikasi beserta informasi depo operasionalnya berdasarkan nomor handphone.
Endpoint URL
/api/integrasi/customers
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| no_hp * | String | Nomor handphone pelanggan yang dicari. Sistem mendukung otomatis normalisasi dari format berikut:
|
💡 Aturan Bisnis (Duplikasi Data)
- Sistem mencari pelanggan berdasarkan nomor handphone (
no_hpdanno_hp_goovi). - Apabila ditemukan lebih dari satu pelanggan menggunakan nomor yang sama, sistem akan memprioritaskan:
- Memiliki transaksi dalam 30 hari terakhir.
- Jumlah transaksi terbanyak dalam 30 hari terakhir.
- Tanggal transaksi terakhir paling baru.
- Data pelanggan yang dibuat paling baru.
🔒 Notes:
- Seluruh response menggunakan format JSON.
- Nomor handphone akan dinormalisasi secara otomatis ke format
+62xxxxxxxxxx. - API Key dan Client ID diberikan oleh tim KlikOrder atau tim IT PT. Harmoni Niaga Bersama.
- Seluruh komunikasi dilakukan melalui protokol HTTPS.
Example Request HTTP
GET /api/integrasi/customers?no_hp=08123456789
Host: api-tokoordert5v8c1w7b2k3.satriamitra.website
X-API-Client: MEKARI
X-API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxx
Accept: application/jsonSuccess Response
200 OK
{
"success": true,
"message": "Data pelanggan berhasil ditemukan.",
"data": {
"id": 4832,
"kode": "PEL-mbre36zt-Z7K52",
"nama": "Winda WINNNN",
"nama_pemilik": "Winda",
"kontak_person": "Winda",
"no_hp": "+6281521979154",
"no_hp_goovi": null,
"status_pelanggan": "Verif",
"keperluan_pelanggan": "Pribadi",
"latitude": "-7.669444",
"longitude": "110.838317",
"alamat_lengkap": "GXH8+JVJ, Semitau Hilir",
"kelurahan": "Semitau Hilir",
"kecamatan": "Semitau",
"kota": "Kapuas Hulu Regency",
"provinsi": "Kalimantan Barat",
"depo": {
"id": 30,
"kode": "DPS30",
"nama": "Depo Pontianak"
}
}
}Error Responses
Customer Not Found
404 Not Found
{
"success": false,
"message": "Pelanggan tidak ditemukan."
}Validation Error
422 Unprocessable Entity
{
"success": false,
"message": "Validasi gagal.",
"errors": {
"no_hp": [
"The no hp field is required."
]
}
}Unauthorized
401 Unauthorized
{
"success": false,
"message": "Unauthorized."
}