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

Gjendja e arkes per nje dite

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

Send a bearer token in the Authorization header.

Gjendja e arkes fiskale per nje dite te vetme: hapja, mbyllja dhe mbyllja e pritur, bashke me shitjet sipas menyres se pageses dhe levizjet e parave.

Mbyllja e pritur eshte ajo qe duhet te kete arka po te jete regjistruar gjithcka. Diferenca me mbylljen reale eshte pikerisht ajo qe kerkohet ne rakordim.

Pa date merret dita e sotme. Formati eshte YYYY-MM-DD.

Full URL: https://fature.al/api/v1/reports/cash-register

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.expected_closing number
data.tcr string, nullable
data.operator string
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.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
curl -X GET 'https://fature.al/api/v1/reports/cash-register' \
  -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/cash-register');

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

$client = new Client();

$response = $client->request('GET', 'https://fature.al/api/v1/reports/cash-register', [
    '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/cash-register', {
  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": {
        "date": "date",
        "currency": "USD",
        "opening": 19.99,
        "closing": 19.99,
        "expected_closing": 19.99,
        "tcr": "tcr",
        "operator": "operator",
        "sales_by_method": [
            {
                "method": "method",
                "label": "label",
                "count": 3,
                "gross": 19.99,
                "net": 19.99,
                "vat": 19.99
            }
        ],
        "movements": {
            "deposits_count": 3,
            "deposits_total": 4200,
            "withdrawals_count": 3,
            "withdrawals_total": 4200
        }
    }
}
422
{
    "success": true,
    "message": "Hello there",
    "errors": []
}
429
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}
500
{
    "status": true,
    "message": "Hello there",
    "errors": [
        "errors"
    ]
}

Regjistrimi eshte falas.

Regjistrohu ne fature.al

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