/api/v1/reports/cash-register/closing
Requires authentication
Rate limited by the `api-global` limiter
v1
Send a bearer token in the Authorization header.
Raporti i fundit i dites, ai qe printohet kur mbyllet turni: totalet e shitjeve, produktet e shitura dhe levizjet e parave.
Ndryshimi nga gjendja e arkes eshte fokusi: ky raport i perket turnit qe u mbyll, jo dites si periudhe.
Pa date merret dita e sotme. Formati eshte YYYY-MM-DD.
Full URL: https://fature.al/api/v1/reports/cash-register/closing
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| date | string<date>, nullable | no | Dita e raportit. Pa te merret sot. |
Responses
200 OK
| Field | Type | Description |
|---|---|---|
| status | boolean | |
| data | object | |
| data.date | string | |
| data.currency | string | |
| data.opening | number | |
| data.closing | number | |
| data.closing_total | number | |
| data.expected_closing | number | |
| data.opened_at | string, nullable | |
| data.closed_at | string, nullable | |
| data.tcr | string, nullable | |
| data.operator | string | |
| data.sales | object | |
| data.sales.invoice_count | integer | |
| data.sales.gross_total | number | |
| data.sales.net_total | number | |
| data.sales.vat_total | number | |
| data.sales_by_method | array | |
| data.sales_by_method[].method | string | |
| data.sales_by_method[].label | string | |
| data.sales_by_method[].count | integer | |
| data.sales_by_method[].gross | number | |
| data.sales_by_method[].net | number | |
| data.sales_by_method[].vat | number | |
| data.products_sold | array | |
| data.products_sold[].product_name | string | |
| data.products_sold[].product_code | string, nullable | |
| data.products_sold[].quantity | number | |
| data.products_sold[].unit | string, nullable | |
| data.products_sold[].unit_price | number | |
| data.products_sold[].gross | number | |
| data.movements | object | |
| data.movements.deposits_count | integer | |
| data.movements.deposits_total | number | |
| data.movements.withdrawals_count | integer | |
| data.movements.withdrawals_total | number |
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` |
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` |
Example request
curl -X GET 'https://fature.al/api/v1/reports/cash-register/closing' \
-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/v1/reports/cash-register/closing');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://fature.al/api/v1/reports/cash-register/closing', [
'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/v1/reports/cash-register/closing', {
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
{
"status": true,
"data": {
"date": "date",
"currency": "USD",
"opening": 19.99,
"closing": 19.99,
"closing_total": 4200,
"expected_closing": 19.99,
"opened_at": "opened at",
"closed_at": "closed at",
"tcr": "tcr",
"operator": "operator",
"sales": {
"invoice_count": 3,
"gross_total": 4200,
"net_total": 4200,
"vat_total": 4200
},
"sales_by_method": [
{
"method": "method",
"label": "label",
"count": 3,
"gross": 19.99,
"net": 19.99,
"vat": 19.99
}
],
"products_sold": [
{
"product_name": "Jane Doe",
"product_code": "product code",
"quantity": 2,
"unit": "unit",
"unit_price": 1999,
"gross": 19.99
}
],
"movements": {
"deposits_count": 3,
"deposits_total": 4200,
"withdrawals_count": 3,
"withdrawals_total": 4200
}
}
}
{
"success": true,
"message": "Hello there",
"errors": []
}
{
"status": true,
"message": "Hello there",
"errors": [
"errors"
]
}
{
"status": true,
"message": "Hello there",
"errors": [
"errors"
]
}