Profile
API ini digunakan untuk menampilkan informasi profil pelanggan yang terdaftar pada sistem.
URL Endpoint
Gunakan metode POST untuk mengakses endpoint berikut:
/accountHeaders
Pastikan untuk menyertakan header berikut pada request:
| Key | Value |
|---|---|
| Content-Type | application/x-www-form-urlencoded |
Body Request
Masukkan parameter berikut pada body request:
| Field | Type | Wajib | Deskripsi |
|---|---|---|---|
| key | string | Ya | API Key yang digunakan untuk mengautentikasi permintaan. |
| sign | string | Ya | Signature MD5 dengan format md5(uid.key."account"). |
Contoh Request
<?php
$key = "YOUR_API_KEY";
$uid = "YOUR_UID";
$postdata = [
"key" => $key,
"sign" => md5($uid.$key."account")
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://yobistore.com/api/account",
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($postdata),
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Contoh Response
{
"status": true,
"message": "success",
"data": {
"user_name": "John Doe",
"user_email": "johndoe@gmail.com",
"user_phone": "081234567890",
"user_balance": 50000,
"user_role": "Member",
"user_joined": "2026-06-23 19:30:00"
}
}Field Response
| Field | Type | Deskripsi |
|---|---|---|
| user_name | string | Nama pelanggan. |
| user_email | string | Email pelanggan. |
| user_phone | string | Nomor telepon pelanggan. |
| user_balance | integer | Saldo pelanggan. |
| user_role | string | Role akun pelanggan. |
| user_joined | string | Tanggal akun dibuat. |
Status Response
| Status | Deskripsi |
|---|---|
| true | Permintaan berhasil diproses. |
| false | Permintaan gagal diproses. |
[!TIP]
Nilai
signwajib menggunakan format:md5(uid.key."account")