/api/v1/client/search
Requires authentication
Rate limited by the `api-global` limiter
v1
Send a bearer token in the Authorization header.
Kerkon nje kompani ne regjistrin fiskal me NIPT/NUIS dhe kthen te dhenat e saj.
Perdoreni per te mbushur vete formularin e nje klienti te ri: kerkoni nje fushe te vetme nga perdoruesi dhe merrni emrin, adresen dhe qytetin nga regjistri. Nje NIPT i gabuar kapet ketu, para se te dale ne nje fature.
Fusha verified thote nese kompania u gjet e konfirmuar ne regjister.
Dalloni dy pergjigjet qe duken te ngjashme:
404, NIPT-i nuk ekziston ne regjister;503, regjistri nuk u arrit, pra NIPT-i mbeti i pakontrolluar. Provoni perseri.
Full URL: https://fature.al/api/v1/client/search
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| nuis | string | yes | NIPT/NUIS i kompanise per te kerkuar, ne formatin X00000000X. |
Responses
200 OK
| Field | Type | Description |
|---|---|---|
| status | boolean | |
| data | object | |
| data.client | object | |
| data.client.nuis | string | |
| data.client.name | string | |
| data.client.address | string | |
| data.client.city | string | |
| data.client.country | integer | |
| data.client.country_code | string | |
| data.client.verified | boolean |
404 NIPT-i nuk gjendet ne regjistrin fiskal.
| 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 NIPT-i mungon ose nuk eshte ne formatin X00000000X. 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` |
503 Regjistri fiskal nuk u arrit, keshtu qe NIPT-i mbeti i pakontrolluar. Provoni perseri.
| 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/client/search?nuis=L91806031A' \
-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/client/search?nuis=L91806031A');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://fature.al/api/v1/client/search?nuis=L91806031A', [
'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/client/search?nuis=L91806031A', {
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": {
"client": {
"nuis": "nuis",
"name": "Jane Doe",
"address": "1 Example Street",
"city": "Berlin",
"country": 1,
"country_code": "US",
"verified": true
}
}
}
{
"status": true,
"message": "Hello there",
"errors": [
"errors"
]
}
{
"success": true,
"message": "Hello there",
"errors": []
}
{
"status": true,
"message": "Hello there",
"errors": [
"errors"
]
}