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

Hyrje ne arke (Deposit)

POST /api/v1/cash-register/deposit Requires authentication Rate limited by the `api-global` limiter v1

Send a bearer token in the Authorization header.

Regjistron para qe hyjne ne arke pa qene shitje, si nje arketim nga klienti ose nje fond fillestar. Veprimi ruhet si MONEY_IN.

  • amount duhet te jete gjithmone me e madhe se 0. Per para qe dalin perdorni endpoint-in e daljes, jo nje vlere negative ketu.
  • description dhe pala e trete jane opsionale por ndihmojne ne rakordim.
  • Kerkon nje pajisje fiskale (TCR) te lidhur.

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

Body parameters

Name Type Required Description
amount number yes Vlera e veprimit, gjithmone me e madhe se 0.
description string, maxLength 255, nullable no Pershkrimi i veprimit.
third_party string, maxLength 255, nullable no Pala e trete per veprimin.
id_client integer, nullable no ID e nje klienti tuaj, per ta lidhur veprimin me te. Kthehet me pas ne listen e veprimeve. Nje ID qe nuk i perket kompanise suaj refuzohet.

Responses

200 Kur perdoruesi nuk ka pajisje fiskale ose arka nuk ka fonde te mjaftueshme, pergjigja kthehet me HTTP 200 dhe `status: false`.

201 Created

Field Type Description
status boolean
data object
data.id integer
data.action_type string
data.amount number
data.currency string
data.transaction_date string
data.transaction_no integer
data.cash_action_no string
data.fiscal_status string, nullable
data.fiscal_uuid string, nullable
data.fiscal_fic string, nullable
data.description string

422 Te dhenat nuk kaluan validimin. Kjo pergjigje perdor fushen `success`, jo `status`.

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`

Example request

cURL
curl -X POST 'https://fature.al/api/v1/cash-register/deposit' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Client-Id: YOUR_CLIENT_ID' \
  -H 'X-Client-Secret: YOUR_CLIENT_SECRET' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 1500,
    "description": "Arketim nga klienti",
    "third_party": "Klienti XYZ",
    "id_client": 42
}'
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',
    'Content-Type' => 'application/json',
])->post('https://fature.al/api/v1/cash-register/deposit', [
    'amount' => 1500,
    'description' => 'Arketim nga klienti',
    'third_party' => 'Klienti XYZ',
    'id_client' => 42,
]);

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

$client = new Client();

$response = $client->request('POST', 'https://fature.al/api/v1/cash-register/deposit', [
    'headers' => [
        'Authorization' => 'Bearer YOUR_TOKEN',
        'X-Client-Id' => 'YOUR_CLIENT_ID',
        'X-Client-Secret' => 'YOUR_CLIENT_SECRET',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
        'amount' => 1500,
        'description' => 'Arketim nga klienti',
        'third_party' => 'Klienti XYZ',
        'id_client' => 42,
    ],
]);

$data = json_decode((string) $response->getBody(), true);
JavaScript
const response = await fetch('https://fature.al/api/v1/cash-register/deposit', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'X-Client-Id': 'YOUR_CLIENT_ID',
    'X-Client-Secret': 'YOUR_CLIENT_SECRET',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "amount": 1500,
      "description": "Arketim nga klienti",
      "third_party": "Klienti XYZ",
      "id_client": 42
  })
});

const data = await response.json();

Example response

201
{
    "status": true,
    "data": {
        "id": 1,
        "action_type": "action type",
        "amount": 4200,
        "currency": "USD",
        "transaction_date": "transaction date",
        "transaction_no": 1,
        "cash_action_no": "cash action no",
        "fiscal_status": "fiscal status",
        "fiscal_uuid": "9f8c7b6a-5d4e-3f2a-1b0c-9d8e7f6a5b4c",
        "fiscal_fic": "fiscal fic",
        "description": "A short description."
    }
}
422
{
    "success": true,
    "message": "Hello there",
    "errors": []
}

Regjistrimi eshte falas.

Regjistrohu ne fature.al

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