Kargo Sağlayıcı Enumları
GET
/v1/shipments/providers/enums Detaylı Açıklama
Section titled “Detaylı Açıklama” GET
/v1/shipments/providers/enums Kargo firmalarının (Aras, Yurtiçi vb.) sistemde kullanılan enum kodlarını döner.
Parametreler
Section titled “Parametreler”| Parametre | Konum | Tip | Açıklama | Varsayılan | Örnek |
|---|---|---|---|---|---|
| Authorization * | header | string | Bearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...) | - | Bearer <TOKEN> |
Örnek Kod
Section titled “Örnek Kod”fetch('https://api.kargomucuz.com/v1/shipments/providers/enums', { 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/shipments/providers/enums');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": "Kargo servis sağlayıcı ile ilgili değerler getirildi.", "payload": { "data": { "providerEntity": [ "test", "ptt", "hepsijet", "yurtici", "mng", "surat", "aras", "kolaygelsin", "ups" ], "providerType": [ "test", "standart", "standart_2", "standart_3", "standart_special", "standart_own", "fixed_price", "fixed_price_special", "fixed_price_commission", "fixed_price_own" ], "providerServiceCode": [ "test", "ptt_standart", "ptt_standart_2", "ptt_fixed_price", "ptt_fixed_price_commission", "hepsijet_standart", "hepsijet_standart_2", "hepsijet_standart_3", "yurtici_standart", "mng_standart", "surat_standart", "surat_standart_2", "aras_standart", "kolaygelsin_standart", "kolaygelsin_standart_2", "kolaygelsin_standart_3", "ups_standart_2" ] } }, "code": 500}401: Yetkisiz
{ "status": false, "message": "Herhangi bir giriş sağlanmadı.", "code": 500}