İçeriğe geç

Hesap Bilgilerini Getir

GET /v1/accounts/0

Belirtilen ID'ye sahip kullanıcının hesap ve profil detaylarını döndürür.

ParametreKonumTipAçıklamaVarsayılanÖrnek
Authorization * headerstringBearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...)-Bearer <TOKEN>
userID * pathstringİşlem yapan kullanıcının ID'si.--
fetch('https://api.kargomucuz.com/v1/accounts/0', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <YOUR_TOKEN>'
}
})
.then(response => response.json())
.then(data => console.log(data));
200: Kimlik doğrulaması başarılı olduğunda dönen yanıt.
{
"status": true,
"message": "Kullanıcı hesabı getirildi.",
"payload": {
"data": {
"wallet": {
"try": {
"currency": "try",
"balance": 6003.08,
"debt": 0,
"provision": 0
},
"usd": {
"currency": "usd",
"balance": 0,
"debt": 0
},
"eur": {
"currency": "eur",
"balance": 0,
"debt": 0
}
},
"others": {
"updated": "2024-10-12T13:59:26.204Z",
"created": "2024-10-12T13:59:26.204Z"
},
"resellerId": null,
"_id": "670a80beba9b41f347291c96",
"users": [
{
"private": {
"ID": "x-096f889c-a55a-4c05-a347-f58bd4706bcc-u"
},
"others": {
"bankAccountAd": null,
"verify": {
"platformProvisionAgreement": false,
"certificateOfResidence": false,
"electronicConfirmationText": true,
"userAgreement": true,
"general": false
},
"postalCheck": null,
"lastLogin": null,
"isActive": false,
"blocked": false,
"updated": "2024-10-12T13:59:26.115Z",
"created": "2024-10-12T13:59:26.115Z"
},
"resellerId": null,
"_id": "670a80beba9b41f347291c90",
"type": "individual",
"role": "member",
"name": "yasir",
"surname": "kaygusuz",
"date": {
"day": 24,
"month": 5,
"year": 2004
},
"gender": "male",
"username": "y.yasir.k",
"email": "yasoka@gmail.com",
"password": "$2b$10$QNBaneZAosgt/wQm/6aEnO7oub6fkwnJzJ/gdPITG6dfkhUPq.LcK",
"phone": {
"phoneCountryCode": "90",
"number": "541000000"
},
"profilePhotoURI": "67d28672351039eef56ed7af",
"IBAN": null,
"credentials": [
{
"type": "tr",
"number": "59788322262",
"name": "Yasir",
"surname": "KAYGUSUZ",
"verify": true,
"date": {
"day": 24,
"month": 5,
"year": 2004
}
}
],
"passports": [],
"__v": 0,
"pricingSettings": []
}
],
"__v": 0
},
"totalCount": 1
},
"code": 500
}
401: Kimlik doğrulaması (token) olmadan istek gönderildiğinde dönen yetkisiz erişim yanıtı.
{
"status": false,
"message": "Giriş sağlanmadı.",
"code": 500
}