fature.al eshte platforma e faturimit dhe fiskalizimit per bizneset ne Shqiperi. Hap nje llogari
Skip to content
fature.al API Menu

Shkarko PDF te fatures sipas ID

GET /api/v1/invoice/print/{id} Requires authentication Rate limited by the `api-global` limiter v1

Send a bearer token in the Authorization header.

Kthen dokumentin e fatures. Pa parametra kthehet formati i paracaktuar per tipin e fatures: kupon termik per faturat Cash (sipas gjeresise 58/80mm te konfiguruar te perdoruesi), dokument A4 per faturat NonCash dhe Estimate, dhe PDF-ja zyrtare e marre nga sistemi qeveritar per faturat elektronike.

Me parametrin format merrni te njejtat versione printimi qe ofron edhe paneli i fature.al:

format Tipi i fatures Rezultati Content-Type
a4 Cash Dokument A4 i fatures application/pdf
thermal NonCash Kupon termik application/pdf
v2 NonCash, Estimate Dokument A4, versioni i gjere application/pdf
receipt Estimate Kupon termik application/pdf
local EInvoice Dokument A4 i gjeneruar nga fature.al, pa e kerkuar PDF-ne zyrtare application/pdf
local-thermal EInvoice Kupon termik i gjeneruar nga fature.al application/pdf
html Cash Kuponi termik si HTML, per ta derguar vete ne printer text/html
json te gjitha Te dhenat e dokumentit ne JSON, per ta formatuar vete faturen application/json

Parametri lang (en, it, de) e perkthen dokumentin A4 te faturave NonCash, Estimate dhe EInvoice, dhe kombinohet me format. Pa te, dokumenti kthehet shqip. Kuponat termike dhe faturat Cash mbeten gjithmone shqip, sepse jane dokumente fiskale.

Per faturat Cash, parametri copy_only=1 kthen kopjen e kuponit ne HTML ne vend te origjinalit.

Nje format qe nuk vlen per tipin e fatures nuk kthen gabim: kthehet formati i paracaktuar i atij tipi.

Full URL: https://fature.al/api/v1/invoice/print/{id}

Path parameters

Name Type Required Description
id integer yes ID e fatures ne fature.al.

Query parameters

Name Type Required Description
format string no Versioni i dokumentit sipas tabeles me siper: a4, thermal, v2, receipt, local, local-thermal, html, json.
lang string no Gjuha e dokumentit A4: en, it, de. Pa te dokumenti kthehet shqip.
copy_only integer no Vetem per faturat Cash: kthen kopjen e kuponit ne vend te origjinalit.

Responses

200 Tipi i permbajtjes varet nga `format`: PDF si parazgjedhje, `text/html` me `format=html`, dhe dokumenti i fatures ne JSON me `format=json`, gati per ta formatuar vete.

Field Type Description
logo string, nullable The company logo as base64, or null when none is set
title string Document title in the account language, e.g. "Faturë Tatimore"
company object
company.name string
company.nuis string, nullable Seller NUIS
company.address string, nullable Address of the business unit that issued the invoice
client object
client.name string
client.id object
client.id.type string, nullable Identifier type, e.g. NUIS, ID, PASSPORT
client.id.id string, nullable The identifier value
client.addres string, nullable Buyer street address
client.city string, nullable
client.country string ISO 3166-1 alpha-3 country code. ALB when the buyer has none
transporter object
transporter.name string, nullable
transporter.plate string, nullable Vehicle plate
transporter.address string, nullable
transporter.city string, nullable
invoice object
invoice.type string Invoice type, e.g. CASH, NONCASH, EINVOICE
invoice.payment_method string, nullable
invoice.payment_method_label string, nullable The payment method spelled out in the account language, ready to print
invoice.bank_account object, nullable Bank account to print as payment instructions, or null
invoice.bank_account.id integer
invoice.bank_account.bank_name string, nullable
invoice.bank_account.iban string, nullable
invoice.bank_account.swift string, nullable
invoice.bank_account.currency string, nullable ISO 4217 currency code
invoice.bank_account.notes string, nullable
invoice.issueDate string, nullable Issue date (YYYY-MM-DD HH:MM:SS)
invoice.businessCode string, nullable
invoice.operatorCode string, nullable
invoice.operatorName string, nullable The operator resolved to a name and shortened to "Ana H.", when we know one
invoice.deviceCode string, nullable TCR code of the fiscal device
invoice.currency string, nullable Invoice currency, null when it is ALL
invoice.exchangeRate number, nullable Rate to ALL, null when the invoice is already in ALL
invoice.number string, nullable
invoice.lines array
invoice.lines[].name string
invoice.lines[].unit string, nullable
invoice.lines[].quantity number
invoice.lines[].unitPrice number Unit price before any line discount
invoice.lines[].total number Gross line total
invoice.amounts object
invoice.amounts.net number
invoice.amounts.gross number
invoice.amounts.vat number
invoice.amounts.discount number
invoice.amounts.net_all number
invoice.amounts.gross_all number
invoice.amounts.vat_all number
invoice.amounts.discount_all number
invoice.iic string, nullable IIC / NSLF
invoice.fic string, nullable FIC / NIVF
invoice.eic string, nullable EIC, for e-invoices
invoice.process string, nullable
invoice.doc_type string, nullable
invoice.notes string, nullable
invoice.verifyUrl string, nullable Government verification URL, the one to render as a QR code
invoice.footer array Lines to print under the total, already ordered

404 Fatura nuk u gjet, ose nuk i perket kompanise suaj.

Field Type Description
message string

Example request

cURL
curl -X GET 'https://fature.al/api/v1/invoice/print/403' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Client-Id: YOUR_CLIENT_ID' \
  -H 'X-Client-Secret: YOUR_CLIENT_SECRET' \
  -H 'Accept: application/json'
PHP (Laravel)
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/v1/invoice/print/403');

$data = $response->json();
PHP (Guzzle)
use GuzzleHttp\Client;

$client = new Client();

$response = $client->request('GET', 'https://fature.al/api/v1/invoice/print/403', [
    '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);
JavaScript
const response = await fetch('https://fature.al/api/v1/invoice/print/403', {
  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();

Example response

200
{
    "logo": "logo",
    "title": "Quarterly report",
    "company": {
        "name": "Jane Doe",
        "nuis": "nuis",
        "address": "1 Example Street"
    },
    "client": {
        "name": "Jane Doe",
        "id": {
            "type": "type",
            "id": "id"
        },
        "addres": "addres",
        "city": "Berlin",
        "country": "US"
    },
    "transporter": {
        "name": "Jane Doe",
        "plate": "plate",
        "address": "1 Example Street",
        "city": "Berlin"
    },
    "invoice": {
        "type": "type",
        "payment_method": "payment method",
        "payment_method_label": "payment method label",
        "bank_account": {
            "id": 1,
            "bank_name": "Jane Doe",
            "iban": "iban",
            "swift": "swift",
            "currency": "USD",
            "notes": "notes"
        },
        "issueDate": "issueDate",
        "businessCode": "businessCode",
        "operatorCode": "operatorCode",
        "operatorName": "Jane Doe",
        "deviceCode": "deviceCode",
        "currency": "USD",
        "exchangeRate": 19.99,
        "number": "number",
        "lines": [
            {
                "name": "Jane Doe",
                "unit": "unit",
                "quantity": 2,
                "unitPrice": 1999,
                "total": 4200
            }
        ],
        "amounts": {
            "net": 19.99,
            "gross": 19.99,
            "vat": 19.99,
            "discount": 3,
            "net_all": 19.99,
            "gross_all": 19.99,
            "vat_all": 19.99,
            "discount_all": 3
        },
        "iic": "iic",
        "fic": "fic",
        "eic": "eic",
        "process": "process",
        "doc_type": "doc type",
        "notes": "notes",
        "verifyUrl": "https://example.com",
        "footer": [
            "footer"
        ]
    }
}
404
{
    "message": "Hello there"
}

Regjistrimi eshte falas.

Regjistrohu ne fature.al

This page as Markdown, or the whole API as OpenAPI.