/api/v1/cash-register/open-balance
Requires authentication
Rate limited by the `api-global` limiter
v1
Send a bearer token in the Authorization header.
Hap diten ne arken fiskale, hapi qe duhet para se te leshohet fatura e pare cash.
balanceeshte gjendja me te cilen nis dita. Pa te merret0.- Perdoruesi duhet te kete nje pajisje fiskale (TCR) te lidhur, perndryshe veprimi nuk ka ku te regjistrohet.
Hapja regjistrohet si veprim OPEN_DAY dhe del ne listen e veprimeve.
Full URL: https://fature.al/api/v1/cash-register/open-balance
Responses
200 Kur perdoruesi nuk ka pajisje fiskale, kur balanca eshte negative, ose kur ruajtja deshton, pergjigja kthehet me HTTP 200 dhe `status: false`.
201 Created
| Field | Type | Description |
|---|---|---|
| status | boolean | |
| data | object | |
| data.balance | number |
Example request
curl -X POST 'https://fature.al/api/v1/cash-register/open-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/v1/cash-register/open-balance');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('POST', 'https://fature.al/api/v1/cash-register/open-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/v1/cash-register/open-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();
Example response
{
"status": true,
"data": {
"balance": 19.99
}
}