/api/v1/invoice/details/{internalId}
Requires authentication
Rate limited by the `api-global` limiter
v1
Send a bearer token in the Authorization header.
Merr detajet e nje fature duke perdorur ID-ne tuaj interne.
Full URL: https://fature.al/api/v1/invoice/details/{internalId}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| internalId | string | yes | ID juaj interne, e derguar kur u krijua fatura. |
Responses
201 Created
| Field | Type | Description |
|---|---|---|
| status | boolean | |
| data | object | |
| data.invoice | object | |
| data.invoice.id | integer | Fatureal invoice id. Store it next to your own internalId |
| data.invoice.number | string, nullable | Fiscal invoice number |
| data.invoice.iic | string, nullable | IIC / NSLF |
| data.invoice.fic | string, nullable | FIC / NIVF. Null while the invoice waits for a deferred fiscalisation |
| data.invoice.tcrCode | string, nullable | TCR code of the fiscal device that issued it |
| data.invoice.businessCode | string, nullable | Business unit code the invoice was issued under |
| data.invoice.operatorCode | string, nullable | Operator code the invoice was issued under |
| data.invoice.fiscalizedAt | string | Creation timestamp (YYYY-MM-DD HH:MM:SS) |
| data.invoice.verifyURL | string, nullable | Government verification URL, the one behind the QR code |
| data.invoice.pdf | string | Direct download URL for the document. On an e-invoice that already has an EIC this points at the official e-invoice PDF instead of ours |
| data.invoice.eic | string, nullable | EIC. The key is present only on an e-invoice that already has one, so treat it as absent rather than null on every other invoice |
404 Nuk u gjet asnje fature me kete `internalId`.
| 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` |
422 `internalId` eshte bosh.
| 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 -X POST 'https://fature.al/api/v1/invoice/details/CASH-001' \
-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/invoice/details/CASH-001');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('POST', 'https://fature.al/api/v1/invoice/details/CASH-001', [
'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/invoice/details/CASH-001', {
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": {
"invoice": {
"id": 1,
"number": "number",
"iic": "iic",
"fic": "fic",
"tcrCode": "tcrCode",
"businessCode": "businessCode",
"operatorCode": "operatorCode",
"fiscalizedAt": "fiscalizedAt",
"verifyURL": "https://example.com",
"pdf": "pdf",
"eic": "eic"
}
}
}
{
"status": true,
"message": "Hello there",
"errors": [
"errors"
]
}
{
"status": true,
"message": "Hello there",
"errors": [
"errors"
]
}
{
"status": true,
"message": "Hello there",
"errors": [
"errors"
]
}