POST
/api/v1/invoice/wtn
Requires authentication
Rate limited by the `api-global` limiter
v1
Send a bearer token in the Authorization header.
Fleta shoqeruese nuk eshte shitje: shoqeron mall qe leviz nga nje pike ne tjetren, dhe kerkohet nga ligji edhe kur asgje nuk shitet.
Rreshtat quhen invoice_lines, jo lines si tek faturat.
Fushat e detyrueshme#
vehPlates, targa e automjetit;valueOfGoods, vlera e mallit qe udheton;invoice_lines, te pakten nje rresht.
Vlerat e lejuara#
| Fusha | Vlerat |
|---|---|
type |
WTN, SALE |
transaction |
TRANSFER, EXAMINATION, SALES, DOOR |
vehOwnership |
OWNER, THIRDPARTY |
startPoint, destinPoint |
ANOTHER, CUSTOMS, EXHIBITION, OTHER, SALE, STORE, WAREHOUSE |
carrier_id_type |
NUIS, ID |
Full URL: https://fature.al/api/v1/invoice/wtn
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| vehPlates | string | yes | Targa e automjetit. |
| valueOfGoods | number | yes | Vlera e mallrave, ne ALL. |
| invoice_lines | array | yes | Rreshtat e mallit, minimumi nje rresht. |
| invoice_lines[].product_name | string, maxLength 255 | yes | Emri ose pershkrimi i mallit. |
| invoice_lines[].product_code | string, maxLength 50 | yes | Kodi i mallit. |
| invoice_lines[].unit | string, maxLength 50 | yes | Njesia matese. |
| invoice_lines[].quantity | number | yes | Sasia, gjithmone me e madhe se 0. |
| startCity | string, nullable | no | Qyteti i nisjes. |
| startAddr | string, nullable | no | Adresa e nisjes. |
| destinCity | string, nullable | no | Qyteti i destinacionit. |
| destinAddr | string, nullable | no | Adresa e destinacionit. |
| carrier_id_num | string, nullable | no | ID ose NIPT i transportuesit. |
| carrier_name | string, nullable | no | Emri i transportuesit. |
| carrier_town | string, nullable | no | Qyteti i transportuesit. |
| carrier_address | string, nullable | no | Adresa e transportuesit. |
Responses
201 Created
| Field | Type | Description |
|---|---|---|
| status | boolean | |
| message | any |
Example request
curl -X POST 'https://fature.al/api/v1/invoice/wtn' \
-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 '{
"vehPlates": "AA123BB",
"valueOfGoods": 10000,
"invoice_lines": [
{
"product_name": "Kafe",
"product_code": "K1",
"unit": "cope",
"quantity": 5
}
],
"startCity": "Tirane",
"startAddr": "Rruga X",
"destinCity": "Durres",
"destinAddr": "Rruga Y",
"carrier_id_num": "L01234567A",
"carrier_name": "Transport SHPK",
"carrier_town": "Tirane",
"carrier_address": "Rruga Z"
}'
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/wtn', [
'vehPlates' => 'AA123BB',
'valueOfGoods' => 10000,
'invoice_lines' => [
[
'product_name' => 'Kafe',
'product_code' => 'K1',
'unit' => 'cope',
'quantity' => 5,
],
],
'startCity' => 'Tirane',
'startAddr' => 'Rruga X',
'destinCity' => 'Durres',
'destinAddr' => 'Rruga Y',
'carrier_id_num' => 'L01234567A',
'carrier_name' => 'Transport SHPK',
'carrier_town' => 'Tirane',
'carrier_address' => 'Rruga Z',
]);
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('POST', 'https://fature.al/api/v1/invoice/wtn', [
'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' => [
'vehPlates' => 'AA123BB',
'valueOfGoods' => 10000,
'invoice_lines' => [
[
'product_name' => 'Kafe',
'product_code' => 'K1',
'unit' => 'cope',
'quantity' => 5,
],
],
'startCity' => 'Tirane',
'startAddr' => 'Rruga X',
'destinCity' => 'Durres',
'destinAddr' => 'Rruga Y',
'carrier_id_num' => 'L01234567A',
'carrier_name' => 'Transport SHPK',
'carrier_town' => 'Tirane',
'carrier_address' => 'Rruga Z',
],
]);
$data = json_decode((string) $response->getBody(), true);
const response = await fetch('https://fature.al/api/v1/invoice/wtn', {
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({
"vehPlates": "AA123BB",
"valueOfGoods": 10000,
"invoice_lines": [
{
"product_name": "Kafe",
"product_code": "K1",
"unit": "cope",
"quantity": 5
}
],
"startCity": "Tirane",
"startAddr": "Rruga X",
"destinCity": "Durres",
"destinAddr": "Rruga Y",
"carrier_id_num": "L01234567A",
"carrier_name": "Transport SHPK",
"carrier_town": "Tirane",
"carrier_address": "Rruga Z"
})
});
const data = await response.json();
Example response
{
"status": false,
"message": "Hello there"
}