Method | URL | İçerik Türü |
---|---|---|
GET | address-book/getAll | application/json |
Açıklama
Servise Gönderilmesi gereken zorunlu başlıklar
Parametre ismi | Tip | Zorunluluk | Açıklama |
---|---|---|---|
Authorization | Bearer | evet | auth/login metodundan aldığınız token |
Servise Gönderilmesi gereken parametreler
Parametre ismi | Tip | Zorunluluk | Açıklama |
---|---|---|---|
limit (*)
|
integer | evet | Kayıt Sayısı |
page (*)
|
integer | hayır | Sayfa Konumu |
filters.address_type
|
string | evet | Adres Konum Türü |
Parametre ismi | Değer | Açıklama |
---|---|---|
(*) limit | 20 | Bir sorguda gösterilecek kayıt sayısı |
(*) page | 1 | Kayıt sayısına bağlı olarak gösterilecek sayfa. Örn: 100 kayıt var ise 5 sayfa oluşacaktır. |
(*) filters.address_type | sender - recipient | Gönderici için sender Alıcı için recipient |
Örnek İstek
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '__APIURL__/address-book/getAll',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{
"limit": 20,
"page": 1,
"filters": {
"address_type": "sender"
}
}',
CURLOPT_HTTPHEADER => array(
'X-localization: tr',
'Content-Type: application/json',
'Authorization: Bearer __TOKEN__'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Örnek Servis Cevapları
{
"status": true,
"message": null,
"data": [
{
"id": 159,
"customer_id": 136,
"customer_name": "Navlungo Test Account",
"address_type": "sender",
"location_name": "John Depo 2",
"address_name": "John Doe",
"address_email": "john@doe.com",
"address_phone": "+90 531234567",
"address_line": "Deneme Mahallesi Ural Sokak No:999",
"address_country": "tr",
"address_city": "İstanbul",
"address_district": "Kadıköy",
"address_post_code": null,
"address_latitude": null,
"address_longitude": null,
"is_main_warehouse": 1,
"created_at": "2024-10-24 20:28:23",
"updated_at": "2024-10-24 20:28:23"
},
{
"id": 157,
"customer_id": 136,
"customer_name": "Navlungo Test Account",
"address_type": "sender",
"location_name": "John Depo",
"address_name": "John Doe",
"address_email": "john@doe.com",
"address_phone": "+90 531234567",
"address_line": "Deneme Mahallesi Ural Sokak No:999",
"address_country": "tr",
"address_city": "İstanbul",
"address_district": "Kadıköy",
"address_post_code": null,
"address_latitude": null,
"address_longitude": null,
"is_main_warehouse": 1,
"created_at": "2024-10-21 20:59:48",
"updated_at": "2024-10-21 20:59:48"
},
{
"id": 156,
"customer_id": 136,
"customer_name": "Navlungo Test Account",
"address_type": "sender",
"location_name": null,
"address_name": "John Doe",
"address_email": "john@doe.com",
"address_phone": "+90 531234567",
"address_line": "Deneme Mahallesi Ural Sokak No:999",
"address_country": "tr",
"address_city": "İstanbul",
"address_district": "Kadıköy",
"address_post_code": null,
"address_latitude": null,
"address_longitude": null,
"is_main_warehouse": 1,
"created_at": "2024-10-21 20:54:13",
"updated_at": "2024-10-21 20:54:13"
},
{
"id": 154,
"customer_id": 136,
"customer_name": "Navlungo Test Account",
"address_type": "sender",
"location_name": "Ana Depo",
"address_name": "John Doe",
"address_email": "john@doe.com",
"address_phone": "+90 531234567",
"address_line": "Deneme Mahallesi Ural Sokak No:999",
"address_country": "tr",
"address_city": "İstanbul",
"address_district": "Kadıköy",
"address_post_code": null,
"address_latitude": null,
"address_longitude": null,
"is_main_warehouse": 0,
"created_at": "2024-10-21 20:51:11",
"updated_at": "2024-10-21 21:38:52"
}
]
}