/api/v1/invoice/{id}/details
Requires authentication
Rate limited by the `api-global` limiter
v1
Send a bearer token in the Authorization header.
Merrni detajet e plota te nje fature sipas ID-se ne sistem.
Full URL: https://fature.al/api/v1/invoice/{id}/details
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | yes | ID e fatures ne fature.al. |
Responses
200 OK
| Field | Type | Description |
|---|---|---|
| status | boolean | |
| data | object | |
| data.invoice | object, nullable | |
| data.invoice.lines | array | |
| data.invoice.lines[].name | string | |
| data.invoice.lines[].product_code | string, nullable | Internal product code, when the line is a mapped product |
| data.invoice.lines[].unit | string, nullable | |
| data.invoice.lines[].unit_code | string, nullable | |
| data.invoice.lines[].quantity | number | |
| data.invoice.lines[].unitPrice | number | Unit price with the line discount already taken off, major units |
| data.invoice.lines[].vat_rate | number, nullable | VAT rate percent |
| data.invoice.lines[].vat_exempt_type | string, nullable | VAT exemption type, when the line is exempt |
| data.invoice.lines[].discount_rate | number, nullable | Line discount percent, as sent in `lines[].discount` when the line was discounted |
| data.invoice.lines[].discount | number, nullable | Line discount amount, net-denominated, major units |
| data.invoice.lines[].amount_net | number | |
| data.invoice.lines[].amount_vat | number | |
| data.invoice.lines[].total | number | Gross line total, major units |
429 Kufiri i kerkesave u arrit. Kufiri per endpoint kthen zarfin standard te gabimit; kufiri i pergjithshem kthen vetem `message` bashke me header-in `Retry-After`.
| 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 GET 'https://fature.al/api/v1/invoice/403/details' \
-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',
])->get('https://fature.al/api/v1/invoice/403/details');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://fature.al/api/v1/invoice/403/details', [
'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/403/details', {
method: 'GET',
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": {
"lines": [
{
"name": "Jane Doe",
"product_code": "product code",
"unit": "unit",
"unit_code": "unit code",
"quantity": 2,
"unitPrice": 1999,
"vat_rate": 19.99,
"vat_exempt_type": "vat exempt type",
"discount_rate": 3,
"discount": 3,
"amount_net": 4200,
"amount_vat": 4200,
"total": 4200
}
]
}
}
}
{
"status": true,
"message": "Hello there",
"errors": [
"errors"
]
}
{
"status": true,
"message": "Hello there",
"errors": [
"errors"
]
}