Method | URL | İçerik Türü |
---|---|---|
GET | carrier/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ı |
Parametre ismi | Değer | Açıklama |
---|---|---|
(*) limit | 20 | Bir sorguda gösterilecek kayıt sayısı |
Örnek İstek
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '__APIURL__/carrier/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,
}',
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": 9,
"carrier_name": "Sürat Kargo",
"tracking_url": "https://suratkargo.com.tr/KargoTakip/%s",
"short_name": "suratkargo",
"post_type": [
2,
3
],
"cod": 1
},
{
"id": 10,
"carrier_name": "Hepsijet",
"tracking_url": "https://www.hepsijet.com/gonderi-takibi/%s",
"short_name": "hepsijet",
"post_type": [
2
],
"cod": 0
},
{
"id": 11,
"carrier_name": "Kolay Gelsin",
"tracking_url": "https://esube.kolaygelsin.com/shipments?trackingId=%s&lang=TR",
"short_name": "kolaygelsin",
"post_type": [
1,
2
],
"cod": 1
},
{
"id": 12,
"carrier_name": "Scotty",
"tracking_url": "https://nerede.scotty.com.tr/kargom-nerede?tracking_code=%s",
"short_name": "scotty",
"post_type": [
2
],
"cod": 0
},
{
"id": 13,
"carrier_name": "Aras Kargo",
"tracking_url": "https://www.araskargo.com.tr/#!/takip",
"short_name": "araskargo",
"post_type": [
2,
3
],
"cod": 0
},
{
"id": 14,
"carrier_name": "Ptt Kargo",
"tracking_url": "https://gonderitakip.ptt.gov.tr/",
"short_name": "pttkargo",
"post_type": [
2,
3
],
"cod": 0
}
]
}
Servis Statü Kodları ve Anlamları
post_type | Açıklama |
---|---|
1 | Aynı Gün Teslimat |
2 | Standart Teslimat |
3 | İade Alımı |
cod | Açıklama |
---|---|
1 | Kapıda Ödeme Var |
0 | Kapıda Ödeme Yok |