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

Krijo fature permbledhese (Summary)

POST /api/v1/invoice/summary Requires authentication Rate limited by the `api-global` limiter v1

Send a bearer token in the Authorization header.

Mbyll pagesen e nje ose me shume faturave porosi me nje dokument te vetem.

  • order_invoices mban IIC-te e porosive qe po mbyllen, te pakten nje.
  • Rreshtat nuk dergohen: merren nga vete porosite.
  • payment_method pranon vetem BANKNOTE ose CARD.
  • Zbritja e tavolines vendoset ketu, me invoice_discount_type dhe invoice_discount_value.

Pergjigja i liston porosite e mbyllura ne settledOrderInvoices.

Full URL: https://fature.al/api/v1/invoice/summary

Body parameters

Name Type Required Description
internalId string yes ID unike e fatures ne sistemin tuaj. Sherben edhe si celes idempotence: i njejti `internalId` brenda te njejtit vit kthen `409` ne vend qe te leshoje nje fature te dyte, prandaj nje riprovim pas nje lidhjeje qe u nderpre eshte i sigurt.
order_invoices array yes IIC-te e faturave porosi qe po mbyllen, te pakten nje. Rreshtat e permbledhëses merren nga keto porosi, prandaj nuk dergohen ne kerkese.
currency string, nullable no Monedha e fatures. Pa te merret ALL.
exchange_rate number, nullable no Sa leke vlen nje njesi e monedhes se fatures. Pa te merret 1.
supply_start_date string, nullable no Fillimi i periudhes se furnizimit, per fatura qe mbulojne nje interval.
supply_end_date string, nullable no Fundi i periudhes se furnizimit.
invoice_discount_type string, one of percent, amount, nullable no Si lexohet `invoice_discount_value`: `percent` si perqindje, `amount` si vlere fikse me TVSH. Zbritja mbi te gjithe faturen i perket permbledhëses, jo porosive, sepse porosia nuk e pranon fare. Zbritjet per rresht vijne bashke me rreshtat qe kopjohen nga porosite. Punon vetem ne cift me `invoice_discount_value`.
invoice_discount_value number, min 0, nullable no Vlera e zbritjes, e lexuar sipas `invoice_discount_type`: perqindje kur tipi eshte `percent`, e kufizuar ne 100; vlere me TVSH ne monedhen e fatures kur tipi eshte `amount`, e kufizuar ne totalin e permbledhëses.

Responses

201 Created

Field Type Description
status boolean
data object
data.invoice object
data.invoice.isSummaryInvoice boolean Always true. The key marks the invoice as a Summary
data.invoice.settledOrderInvoices array
data.invoice.settledOrderInvoices[].id integer
data.invoice.settledOrderInvoices[].number string, nullable
data.invoice.settledOrderInvoices[].date string When the order was issued (YYYY-MM-DD HH:MM:SS)
data.invoice.settledOrderInvoices[].amountGross number
data.invoice.settledOrderInvoices[].currency string, nullable

400 Te dhena te paplota ose te pavlefshme. `errors` thote sakte cfare duhet plotesuar.

Field Type Description
status boolean Always false. A successful response carries `status: true` and a `data` object instead
message string The exception message. Empty when the failure carries no exception of its own
errors array Messages to show the operator or to log. Absent when the failure has nothing to add beyond `message`

403 Abonimi ka mbaruar, ose veprimi nuk lejohet per kete llogari.

Field Type Description
status boolean Always false. A successful response carries `status: true` and a `data` object instead
message string The exception message. Empty when the failure carries no exception of its own
errors array Messages to show the operator or to log. Absent when the failure has nothing to add beyond `message`

409 Nje fature me kete `internalId` po procesohet ose ekziston tashme per kete vit.

Field Type Description
status boolean Always false. A successful response carries `status: true` and a `data` object instead
message string The exception message. Empty when the failure carries no exception of its own
errors array Messages to show the operator or to log. Absent when the failure has nothing to add beyond `message`

422 Te dhenat nuk kaluan validimin. Kjo pergjigje perdor fushen `success`, jo `status`. `internalId` qe mungon kthehet me zarfin standard te gabimit.

Field Type Description
success boolean Always false
message string A single summary line, the same for every validation failure
errors object The failing fields, each with the messages for it. Dotted keys point into nested objects and array items, e.g. `lines.0.quantity`

429 Kufiri i kerkesave u arrit. Kufiri per endpoint kthen zarfin standard te gabimit; kufiri i pergjithshem kthen vetem `message` bashke me header-in `Retry-After`.

Field Type Description
status boolean Always false. A successful response carries `status: true` and a `data` object instead
message string The exception message. Empty when the failure carries no exception of its own
errors array Messages to show the operator or to log. Absent when the failure has nothing to add beyond `message`

500 Gabim i papritur ne server.

Field Type Description
status boolean Always false. A successful response carries `status: true` and a `data` object instead
message string The exception message. Empty when the failure carries no exception of its own
errors array Messages to show the operator or to log. Absent when the failure has nothing to add beyond `message`

503 Sherbimi i fiskalizimit eshte i paarritshem. Fatura ruhet dhe fiskalizohet automatikisht me vone.

Field Type Description
status boolean Always false. A successful response carries `status: true` and a `data` object instead
message string The exception message. Empty when the failure carries no exception of its own
errors array Messages to show the operator or to log. Absent when the failure has nothing to add beyond `message`

Example request

cURL
curl -X POST 'https://fature.al/api/v1/invoice/summary' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Client-Id: YOUR_CLIENT_ID' \
  -H 'X-Client-Secret: YOUR_CLIENT_SECRET' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "internalId": "SUMMARY-2026-000021",
    "order_invoices": [
        "8FE72E2ACD1C500A83F8C89B4E2E3E1D"
    ],
    "currency": "ALL",
    "exchange_rate": 100.5,
    "supply_start_date": "2026-09-01",
    "supply_end_date": "2026-09-30",
    "invoice_discount_type": "percent",
    "invoice_discount_value": 10
}'
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',
    'Content-Type' => 'application/json',
])->post('https://fature.al/api/v1/invoice/summary', [
    'internalId' => 'SUMMARY-2026-000021',
    'order_invoices' => [
        '8FE72E2ACD1C500A83F8C89B4E2E3E1D',
    ],
    'currency' => 'ALL',
    'exchange_rate' => 100.5,
    'supply_start_date' => '2026-09-01',
    'supply_end_date' => '2026-09-30',
    'invoice_discount_type' => 'percent',
    'invoice_discount_value' => 10,
]);

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

$client = new Client();

$response = $client->request('POST', 'https://fature.al/api/v1/invoice/summary', [
    'headers' => [
        'Authorization' => 'Bearer YOUR_TOKEN',
        'X-Client-Id' => 'YOUR_CLIENT_ID',
        'X-Client-Secret' => 'YOUR_CLIENT_SECRET',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
        'internalId' => 'SUMMARY-2026-000021',
        'order_invoices' => [
            '8FE72E2ACD1C500A83F8C89B4E2E3E1D',
        ],
        'currency' => 'ALL',
        'exchange_rate' => 100.5,
        'supply_start_date' => '2026-09-01',
        'supply_end_date' => '2026-09-30',
        'invoice_discount_type' => 'percent',
        'invoice_discount_value' => 10,
    ],
]);

$data = json_decode((string) $response->getBody(), true);
JavaScript
const response = await fetch('https://fature.al/api/v1/invoice/summary', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'X-Client-Id': 'YOUR_CLIENT_ID',
    'X-Client-Secret': 'YOUR_CLIENT_SECRET',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "internalId": "SUMMARY-2026-000021",
      "order_invoices": [
          "8FE72E2ACD1C500A83F8C89B4E2E3E1D"
      ],
      "currency": "ALL",
      "exchange_rate": 100.5,
      "supply_start_date": "2026-09-01",
      "supply_end_date": "2026-09-30",
      "invoice_discount_type": "percent",
      "invoice_discount_value": 10
  })
});

const data = await response.json();

Example response

201
{
    "status": true,
    "data": {
        "invoice": {
            "isSummaryInvoice": true,
            "settledOrderInvoices": [
                {
                    "id": 1,
                    "number": "number",
                    "date": "date",
                    "amountGross": 4200,
                    "currency": "USD"
                }
            ]
        }
    }
}
400
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
403
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
409
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
422
{
    "success": true,
    "message": "Hello there",
    "errors": []
}
429
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
500
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
503
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}

Regjistrimi eshte falas.

Regjistrohu ne fature.al

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