İçeriğe geç

Alıcı Adres Detayı

GET /v1/addresses/receiver/0/0

Spesifik bir alıcı adresinin detaylarını getirir.

ParametreKonumTipAçıklamaVarsayılanÖrnek
Authorization * headerstringBearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...)-Bearer <TOKEN>
USER_ID * pathstringKullanıcı ID'si--
addressId * pathstringAdres ID'si--
fetch('https://api.kargomucuz.com/v1/addresses/receiver/0/0', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <YOUR_TOKEN>'
}
})
.then(response => response.json())
.then(data => console.log(data));
200: Başarılı kimlik doğrulamasına rağmen geçersiz ID parametresiyle istek gönderildiğinde dönen hata yanıtı.
{
"status": false,
"message": "Adres bulunamadı.",
"code": 500
}
200 - Başarılı kimlik doğrulaması ve geçerli ID parametresiyle istek gönderildiğinde dönen yanıt.: Başarılı kimlik doğrulaması ve geçerli ID parametresiyle istek gönderildiğinde dönen yanıt.
{
"status": true,
"message": "Tip ile kullanıcının adresi getirildi.",
"payload": {
"data": {
"others": {
"tag": null,
"latitude": null,
"longitude": null,
"isActive": false,
"updated": "2024-10-18T23:50:08.099Z",
"created": "2024-10-18T23:50:08.099Z"
},
"resellerId": null,
"_id": "6712f4300c3b87b34ff3cc19",
"type": "receiver",
"title": "Onur Karagöl",
"explanation": null,
"location": {
"country": {
"id": "298795",
"title": "türkiye",
"code": "tr"
},
"province": {
"id": null,
"title": null,
"code": null
},
"city": {
"title": "samsun",
"id": "samsun",
"code": null
},
"district": {
"title": "i̇lkadim",
"id": "i̇lkadım",
"code": null
},
"neighborhood": {
"id": null,
"title": null,
"code": null
},
"street": {
"id": null,
"title": null,
"code": null
},
"address": {
"line1": "Merkez ptt şubesi",
"line2": null,
"line3": null
},
"postCode": null
},
"by": {
"phone1": {
"phoneCountryCode": "90",
"number": "5337072010"
},
"phone2": {
"phoneCountryCode": null,
"number": null
},
"phone3": {
"phoneCountryCode": null,
"number": null
},
"entity": "Onur Karagöl",
"email": null
},
"invoice": {
"eInvoice": false,
"taxDepartment": null,
"taxNumber": null
},
"__v": 0
},
"totalCount": 1
},
"code": 500
}