fature.al është platforma e faturimit dhe fiskalizimit për bizneset në Shqipëri. Hap një llogari
Skip to content
fature.al API Menu

Listo kategoritë e produkteve

GET /api/v1/product/categories Requires authentication Rate limited by the `api-global` limiter v1

Send a bearer token, plus the X-Client-Id and X-Client-Secret headers in the Authorization header.

Kthen të gjitha kategoritë e produkteve të kompanisë në një përgjigje të vetme, pa pagination, secila me id, name dhe color.

Përdoreni për të marrë id-në që dërgoni si id_category kur filtroni GET /products ose kur krijoni një produkt. Lista ndryshon rrallë, ndaj mbajeni në cache.

Ky endpoint nuk kthen 429 as 500. Një kërkesë e dytë nga i njëjti token, ndërsa e para nuk ka mbaruar, si dhe çdo gabim i papritur, kthehen me HTTP 200 dhe status: false; arsyeja është te message. Lexoni status, jo vetëm kodin HTTP.

URL-ja e plotë: https://fature.al/api/v1/product/categories

Përgjigjet

200 Kategoritë e kompanisë te `data`, bosh kur nuk ka; ose `status: false` me arsyen te `message`.

Field Tipi Përshkrimi
status boolean
data array
data[].id integer Id-ja e kategorisë
data[].name string Emri i kategorisë
data[].color string, nullable Ngjyra në hex që përdor rrjeta e produkteve në POS

401 Unauthenticated

Field Tipi Përshkrimi
message string

Shembull kërkese

cURL
curl -X GET 'https://fature.al/api/v1/product/categories' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Client-Id: YOUR_CLIENT_ID' \
  -H 'X-Client-Secret: YOUR_CLIENT_SECRET' \
  -H 'Accept: application/json'
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',
])->get('https://fature.al/api/v1/product/categories');

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

$client = new Client();

$response = $client->request('GET', 'https://fature.al/api/v1/product/categories', [
    '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);
JavaScript
const response = await fetch('https://fature.al/api/v1/product/categories', {
  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();

Shembull përgjigjeje

200
{
    "status": true,
    "data": [
        {
            "id": 12,
            "name": "Shërbime",
            "color": "dd9f52"
        }
    ]
}
401
{
    "message": "Unauthenticated."
}

Regjistrimi është falas.

Regjistrohu në fature.al

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