Fatura Detayı Getir
Açıklama
Section titled “Açıklama” GET
/v1/invoices/0/0 Spesifik bir faturanın detaylarını getirir.
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 | Kullanıcı ID'si | - | - |
| invoiceId * | path | string | Fatura ID'si | - | - |
Örnek Kod
Section titled “Örnek Kod”fetch('https://api.kargomucuz.com/v1/invoices/0/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/invoices/0/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: Giriş yapıldı id yanlış
{ "status": false, "message": "Fatura bulunamadı.", "code": 500}