---
title: "Krijo fature permbledhese (Summary)"
operation_id: "post-api-v1-invoice-summary"
method: POST
path: "/api/v1/invoice/summary"
group: "Faturat"
api_version: "v1"
authenticated: true
canonical: "https://fature.al/api-reference/endpoints/post-api-v1-invoice-summary.html"
---

# Krijo fature permbledhese (Summary)

Part of the [fature.al API](/api-reference/index.html) documentation.

## POST /api/v1/invoice/summary

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`

API version: `v1`.

Authentication: required (bearer token).

### 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. |

### Example request

```bash
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
}'
```

### 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 |  |

```json
{
    "status": true,
    "data": {
        "invoice": {
            "isSummaryInvoice": true,
            "settledOrderInvoices": [
                {
                    "id": 1,
                    "number": "number",
                    "date": "date",
                    "amountGross": 4200,
                    "currency": "USD"
                }
            ]
        }
    }
}
```

**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` |

```json
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
```

**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` |

```json
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
```

**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` |

```json
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
```

**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` |

```json
{
    "success": true,
    "message": "Hello there",
    "errors": []
}
```

**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` |

```json
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
```

**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` |

```json
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
```

**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` |

```json
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
```
