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

Krijo fatura pa para ne dore ne bllok (Bulk NonCash)

POST /api/v1/invoice/bulk-noncash Requires authentication Rate limited by the `api-global` limiter v1

Send a bearer token in the Authorization header.

Leshon shume fatura jo-cash me nje kerkese te vetme, e menduar per faturim periodik.

Pergjigja eshte nje objekt me nje hyrje per cdo internalId, dhe statusi mbetet 200 edhe kur ndonje fature brenda bllokut deshton. Prandaj:

  • mos u mbeshtetni tek kodi HTTP per te ditur nese gjithcka shkoi mire;
  • kontrolloni status brenda cdo hyrjeje me vete;
  • riprovoni vetem internalId qe deshtuan, jo te gjithe bllokun.

Full URL: https://fature.al/api/v1/invoice/bulk-noncash

Body parameters

Name Type Required Description
invoices array yes Faturat qe do te leshohen, secila me te njejtat fusha si trupi i `POST /invoice/noncash`, `internalId` perfshire. Nuk ka kufi ne numrin e tyre, por endpoint-i lejon vetem 3 kerkesa ne minute, prandaj dergoni blloqe te medha ne vend te shume blloqeve te vogla.

Responses

200 Kthen nje objekt me nje hyrje per cdo `internalId`. Nje fature qe deshton mban zarfin e gabimit brenda hyrjes se vet, dhe statusi i pergjigjes mbetet 200.

201 Created

Example request

cURL
curl -X POST 'https://fature.al/api/v1/invoice/bulk-noncash' \
  -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 '{
    "invoices": [
        "invoices"
    ]
}'
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/invoice/bulk-noncash', [
    'invoices' => [
        'invoices',
    ],
]);

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

$client = new Client();

$response = $client->request('POST', 'https://fature.al/api/v1/invoice/bulk-noncash', [
    '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' => [
        'invoices' => [
            'invoices',
        ],
    ],
]);

$data = json_decode((string) $response->getBody(), true);
JavaScript
const response = await fetch('https://fature.al/api/v1/invoice/bulk-noncash', {
  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({
      "invoices": [
          "invoices"
      ]
  })
});

const data = await response.json();

Example response

201
[]

Regjistrimi eshte falas.

Regjistrohu ne fature.al

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