/api/v2/invoice/print-eic/{eic}
Requires authentication
Rate limited by the `api-global` limiter
v2
Send a bearer token, plus the X-Client-Id and X-Client-Secret headers in the Authorization header.
Kthen PDF-në zyrtare të e-faturës nga platforma e e-faturave, sipas kodit EIC që ju ktheu lëshimi.
Çdo dështim kthehet me statusin e vet dhe me message në JSON, kurrë si PDF:
| Statusi | Kur |
|---|---|
404 |
Platforma e e-faturave u përgjigj, por nuk ka dokument me këtë EIC. |
422 |
Platforma e e-faturave e refuzoi kërkesën; message thotë pse. |
503 |
Platforma e e-faturave nuk po përgjigjet. Provoni sërish pas Retry-After sekondash. |
Kur platforma nuk përgjigjet dhe EIC i përket një e-fature tuajës në fature.al, nuk kthehet
503 por PDF-ja rezervë, e njëjta si te shkarkimi sipas id. Header-i X-Document-Source
thotë cilën morët: official nga platforma, stored kopja e ruajtur nga një shkarkim i
mëparshëm, local dokumenti i gjeneruar nga fature.al.
URL-ja e plotë: https://fature.al/api/v2/invoice/print-eic/{eic}
Path parameters
| Name | Tipi | E detyrueshme | Përshkrimi |
|---|---|---|---|
| eic | string | yes | Kodi EIC i e-faturës, një UUID. |
Përgjigjet
200 PDF-ja e e-faturës. `X-Document-Source` thotë nëse është ajo zyrtare (`official`), kopja e ruajtur (`stored`) apo dokumenti i fature.al (`local`).
401 Unauthenticated
| Field | Tipi | Përshkrimi |
|---|---|---|
| message | string |
404 Platforma e e-faturave nuk ka dokument me këtë EIC.
| Field | Tipi | Përshkrimi |
|---|---|---|
| message | string |
422 Platforma e e-faturave e refuzoi kërkesën.
| Field | Tipi | Përshkrimi |
|---|---|---|
| message | string |
503 Platforma e e-faturave nuk po përgjigjet. Provoni sërish pas `Retry-After` sekondash.
| Field | Tipi | Përshkrimi |
|---|---|---|
| message | string |
Shembull kërkese
curl -X GET 'https://fature.al/api/v2/invoice/print-eic/2e9b6f31-d712-4c45-8cc0-9faf24c805a3' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'X-Client-Id: YOUR_CLIENT_ID' \
-H 'X-Client-Secret: YOUR_CLIENT_SECRET' \
-H 'Accept: application/json'
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'Bearer YOUR_TOKEN',
'X-Client-Id' => 'YOUR_CLIENT_ID',
'X-Client-Secret' => 'YOUR_CLIENT_SECRET',
'Accept' => 'application/json',
])->get('https://fature.al/api/v2/invoice/print-eic/2e9b6f31-d712-4c45-8cc0-9faf24c805a3');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://fature.al/api/v2/invoice/print-eic/2e9b6f31-d712-4c45-8cc0-9faf24c805a3', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
'X-Client-Id' => 'YOUR_CLIENT_ID',
'X-Client-Secret' => 'YOUR_CLIENT_SECRET',
'Accept' => 'application/json',
],
]);
$data = json_decode((string) $response->getBody(), true);
const response = await fetch('https://fature.al/api/v2/invoice/print-eic/2e9b6f31-d712-4c45-8cc0-9faf24c805a3', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'X-Client-Id': 'YOUR_CLIENT_ID',
'X-Client-Secret': 'YOUR_CLIENT_SECRET',
'Accept': 'application/json'
}
});
const data = await response.json();
Shembull përgjigjeje
example
{
"message": "Unauthenticated."
}
{
"message": "Hello there"
}
{
"message": "Hello there"
}
{
"message": "Hello there"
}