Hesap Bilgilerini Getir
GET
/v1/accounts/{userID} Detaylı Açıklama
Section titled “Detaylı Açıklama” GET
/v1/accounts/{userID} Belirtilen ID'ye sahip kullanıcının hesap ve profil detaylarını döndürür.
Parametreler
Section titled “Parametreler”| Parametre | Konum | Tip | Açıklama | Varsayılan | Örnek |
|---|---|---|---|---|---|
| Authorization * | header | string | Bearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...) | - | Bearer <TOKEN> |
| userID * | path | string | İşlem yapan kullanıcının ID'si. | - | - |
Örnek Kod
Section titled “Örnek Kod”fetch('https://api.kargomucuz.com/v1/accounts/{userID}', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <YOUR_TOKEN>' }}).then(response => response.json()).then(data => console.log(data));$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.kargomucuz.com/v1/accounts/{userID}');curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$headers = array();$headers[] = 'Content-Type: application/json';$headers[] = 'Authorization: Bearer <YOUR_TOKEN>';curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);if (curl_errno($ch)) { echo 'Error:' . curl_error($ch);}curl_close($ch);echo $result;Yanıtlar
Section titled “Yanıtlar”200: Başarılı
{ "status": true, "message": "Kullanıcı hesabı getirildi.", "payload": { "data": { "wallet": { "try": { "balance": 0, "debt": 0 }, "usd": { "balance": 0, "debt": 0 }, "eur": { "balance": 0, "debt": 0 } }, "others": { "updated": "2026-02-21T15:10:36.867Z", "created": "2026-02-21T15:10:36.867Z" }, "_id": "6999caece3825f1304033d2d", "users": [ { "private": { "ID": "x-b7cebcd1-b6a8-4339-811b-062b94ef0599-u" }, "others": { "verify": { "platformProvisionAgreement": false, "certificateOfResidence": false, "electronicConfirmationText": true, "userAgreement": true, "general": false }, "postalCheck": null, "bankAccountAd": null, "lastLogin": null, "isActive": false, "blocked": false, "updated": "2026-02-21T15:10:36.858Z", "created": "2026-02-21T15:10:36.858Z" }, "_id": "6999caece3825f1304033d27", "type": "individual", "role": "member", "name": "Aziz Uğur", "surname": "Tuksal", "date": { "day": 10, "month": 10, "year": 2006 }, "gender": "male", "username": "akiremis", "email": "aziztuksal@gmail.com", "password": "$2b$10$ALoWY8wnQTHxq7fWPYxYZu4kUm9/d2YyIcoy0alMQ.k4a8q9uhZ26", "phone": { "phoneCountryCode": null, "number": null }, "profilePhotoURI": null, "IBAN": null, "credentials": [ { "type": "tr", "number": "11759932412", "name": "Aziz Uğur", "surname": "Tuksal", "verify": true, "date": { "day": 10, "month": 10, "year": 2006 } } ], "passports": [], "__v": 0 } ], "__v": 0 }, "totalCount": 1 }, "code": 500}401: Yetkisiz
{ "status": false, "message": "Herhangi bir giriş sağlanmadı.", "code": 500}