/api/v2/cash-register/close-balance
Requires authentication
Rate limited by the `api-global` limiter
v2
Send a bearer token, plus the X-Client-Id and X-Client-Secret headers in the Authorization header.
Mbyll ditën e punës në pajisjen fiskale (TCR) të përdoruesit të token-it: nxjerr gjithë gjendjen nga arka dhe kthen shumën që doli.
Thirreni në fund të turnit, pa kontrolluar më parë nëse dita është e hapur: kur nuk është,
hapet vetë me 0 dhe mbyllet menjëherë. Kërkesa nuk ka body.
- Përdoruesi duhet të ketë një TCR.
balance është shuma në ALL që doli nga arka, me dy shifra pas presjes; 0 kur arka ishte
bosh. Dalja del te
GET /cash-register/actions si veprim MONEY_OUT me përshkrimin
"Mbyllje turni/xhiro ditore"; kur arka ishte bosh nuk regjistrohet asnjë dalje. Kur CIS-i
nuk arrihet, mbyllja ruhet dhe fiskalizohet vetë më vonë; përgjigja është e njëjtë.
URL-ja e plotë: https://fature.al/api/v2/cash-register/close-balance
Përgjigjet
200 Kur përdoruesi nuk ka pajisje fiskale ose kur mbyllja dështon, përgjigja kthehet me HTTP 200 dhe `status: false`; arsyeja është te `message`.
| Field | Tipi | Përshkrimi |
|---|---|---|
| status | boolean | |
| data | object | |
| data.balance | number | Shuma që doli nga arka, në lekë: gjendja e pajisjes fiskale (TCR) në momentin e mbylljes, e regjistruar si dalje `MONEY_OUT`. `0` kur arka ishte bosh; atëherë nuk regjistrohet asnjë dalje |
401 Unauthenticated
| Field | Tipi | Përshkrimi |
|---|---|---|
| message | string |
Shembull kërkese
curl -X POST 'https://fature.al/api/v2/cash-register/close-balance' \
-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',
])->post('https://fature.al/api/v2/cash-register/close-balance');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('POST', 'https://fature.al/api/v2/cash-register/close-balance', [
'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/v2/cash-register/close-balance', {
method: 'POST',
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();
Shembull përgjigjeje
{
"status": true,
"data": {
"balance": 23450.5
}
}
{
"message": "Unauthenticated."
}