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

Faturat e anulluara

GET /api/v1/reports/reversals Requires authentication Rate limited by the `api-global` limiter v1

Send a bearer token in the Authorization header.

Faturat e anulluara ne periudhe, secila e lidhur me faturen origjinale qe korrigjon.

limit pranon nga 1 deri ne 500. Perdoreni per te kontrolluar sa dhe pse anulohet, sepse nje numer i larte anulimesh eshte zakonisht shenje e nje problemi ne procesin e shitjes. * from dhe to jane te detyrueshme, ne formatin YYYY-MM-DD, dhe periudha kthehet e konfirmuar ne period te pergjigjes.

Full URL: https://fature.al/api/v1/reports/reversals

Responses

200 OK

Field Type Description
status boolean
data object
data.period object
data.period.from string Start date (YYYY-MM-DD), inclusive
data.period.to string End date (YYYY-MM-DD), inclusive
data.totals object
data.totals.count integer
data.totals.gross number
data.items array
data.items[].id integer
data.items[].number string
data.items[].type string
data.items[].reversed_at string, nullable
data.items[].original_invoice_id integer, nullable
data.items[].gross number
data.items[].operator string, nullable

422 Datat mungojne ose nuk jane ne formatin YYYY-MM-DD.

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: 30 raporte ne minute.

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 GET 'https://fature.al/api/v1/reports/reversals' \
  -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/reports/reversals');

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

$client = new Client();

$response = $client->request('GET', 'https://fature.al/api/v1/reports/reversals', [
    '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/reports/reversals', {
  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
{
    "status": true,
    "data": {
        "period": {
            "from": "from",
            "to": "to"
        },
        "totals": {
            "count": 3,
            "gross": 19.99
        },
        "items": [
            {
                "id": 1,
                "number": "number",
                "type": "type",
                "reversed_at": "reversed at",
                "original_invoice_id": 1,
                "gross": 19.99,
                "operator": "operator"
            }
        ]
    }
}
422
{
    "success": true,
    "message": "Hello there",
    "errors": []
}
429
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}

Regjistrimi eshte falas.

Regjistrohu ne fature.al

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