/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.
Kontrolloni Content-Type para se ta ruani si PDF: një EIC që nuk gjendet kthen tekstin
Document not found. me statusin 200 dhe text/html, jo një PDF.
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. Kontrolloni `Content-Type` para se ta ruani: një EIC që nuk gjendet kthehet po me statusin 200, por si `text/html`.
401 Unauthenticated
| 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."
}