/api/v1/currencies
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 monedhat e konfiguruara për kompaninë, me ALL gjithmonë të parën dhe të tjerat sipas
kodit.
Përdoreni për të mbushur zgjedhjen e monedhës në sistemin tuaj: code është kodi ISO 4217 që
dërgoni si currency te faturat dhe te produktet. Pa currency merret ALL. Për kursin e
ditës thirrni GET /exchange-rates.
idështë id-ja e monedhës në fature.al;namemban të njëjtën vlerë sicode.- Lista ndryshon vetëm kur biznesi shton një monedhë nga paneli, ndaj mbajeni në cache.
URL-ja e plotë: https://fature.al/api/v1/currencies
Përgjigjet
200 Monedhat e konfiguruara për kompaninë, me `ALL` të parën dhe të tjerat sipas kodit.
| Field | Tipi | Përshkrimi |
|---|---|---|
| status | boolean | |
| data | object | |
| data.currencies | array | |
| data.currencies[].id | integer | Id-ja e monedhës në fature.al |
| data.currencies[].code | string | Kodi ISO 4217 i monedhës; vlera për `currency` te faturat dhe te produktet |
| data.currencies[].name | string | E njëjta vlerë si `code`; fature.al nuk mban emër tjetër për monedhën |
401 Unauthenticated
| Field | Tipi | Përshkrimi |
|---|---|---|
| message | string |
Shembull kërkese
curl -X GET 'https://fature.al/api/v1/currencies' \
-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/currencies');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://fature.al/api/v1/currencies', [
'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/currencies', {
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
{
"status": true,
"data": {
"currencies": [
{
"id": 2,
"code": "EUR",
"name": "EUR"
}
]
}
}
{
"message": "Unauthenticated."
}