Adres Yönetimi Genel bakış
Adres Yönetimi - Genel Bakış Yeni Adres Oluştur Tüm Gönderici Adresleri Gönderici Adresi Detayı Kullanıcı Adreslerini Listele Kullanıcı Gönderici Adresleri Alıcı Adresi Detayı Varsayılan Adresleri Getir Adres Detayı Adres Güncelle Adres Sil Ülkeleri Listele Şehirleri Listele İlçeleri Listele Mahalleleri Listele Sokakları Listele
Kullanıcı Adreslerini Listele
Açıklama
Section titled “Açıklama” GET
/v1/addresses/0 Kullanıcının hesabına kayıtlı tüm alıcı ve gönderici adreslerini liste halinde sunar.
Parametreler
Section titled “Parametreler”| Parametre | Konum | Tip | Açıklama | Varsayılan | Örnek |
|---|---|---|---|---|---|
| Authorization * | header | string | Bearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...) | - | Bearer <TOKEN> |
| USER_ID * | path | string | İşlem yapan kullanıcının kimlik (ID) değeri. UUID formatındadır. | - | - |
Örnek Kod
Section titled “Örnek Kod”fetch('https://api.kargomucuz.com/v1/addresses/0', { 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/addresses/0');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ı adreslerini getirme başarılı.", "payload": { "data": [ { "others": { "tag": null, "latitude": null, "longitude": null, "isActive": false, "updated": "2026-02-23T20:16:31.969Z", "created": "2026-02-23T20:16:31.969Z" }, "_id": "699cb59fe3825f13041529b2", "type": "sender", "title": "Xristal", "explanation": null, "location": { "country": { "id": "298795", "title": "Türkiye", "code": "tr" }, "province": { "id": null, "title": null, "code": null }, "city": { "id": "55", "title": "Samsun", "code": null }, "district": { "id": "55015", "title": "Atakum", "code": null }, "neighborhood": { "id": null, "title": null, "code": null }, "street": { "id": null, "title": null, "code": null }, "address": { "line1": "Samsun Teknopark", "line2": null, "line3": null }, "postCode": null }, "by": { "phone1": { "phoneCountryCode": "90", "number": "3624575656" }, "phone2": { "phoneCountryCode": null, "number": null }, "phone3": { "phoneCountryCode": null, "number": null }, "entity": "Xristal", "email": null }, "__v": 0 }, { "others": { "tag": null, "latitude": null, "longitude": null, "isActive": false, "updated": "2026-02-23T20:17:17.178Z", "created": "2026-02-23T20:17:17.178Z" }, "_id": "699cb5cde3825f1304152ab0", "type": "receiver", "title": "Xristal", "explanation": null, "location": { "country": { "id": "298795", "title": "Türkiye", "code": "tr" }, "province": { "id": null, "title": null, "code": null }, "city": { "id": "55", "title": "Samsun", "code": null }, "district": { "id": "55015", "title": "Atakum", "code": null }, "neighborhood": { "id": null, "title": null, "code": null }, "street": { "id": null, "title": null, "code": null }, "address": { "line1": "Samsun Teknopark", "line2": null, "line3": null }, "postCode": null }, "by": { "phone1": { "phoneCountryCode": "90", "number": "3624575656" }, "phone2": { "phoneCountryCode": null, "number": null }, "phone3": { "phoneCountryCode": null, "number": null }, "entity": "Xristal", "email": null }, "__v": 0 } ], "totalCount": 2 }, "code": 500}401: Yetkisiz
{ "status": false, "message": "Herhangi bir giriş sağlanmadı.", "code": 500}