/api/v1/on-boarding/bank-account
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.
Ruan një llogari bankare të kompanisë. Llogaria shkruhet në faturat jo-cash dhe në e-faturat si vendi ku pritet pagesa, prandaj duhet para faturës së parë jo-cash.
ibandhecurrency(kodi i monedhës, p.sh.ALL) janë ato që përcaktojnë llogarinë;name,holder,swiftdhenotesjanë përshkruese.- Hapësirat në
ibanhiqen dhe shkronjat bëhen të mëdha para ruajtjes. - Një IBAN që kompania e ka tashmë nuk krijon llogari të dytë: kthehet ajo ekzistuese.
- Një monedhë që nuk njihet refuzohet me
200dhestatus: false.
Ruani id-në që kthehet: me të, ose me IBAN-in, zgjidhet llogaria në faturat jo-cash dhe në
e-faturat.
URL-ja e plotë: https://fature.al/api/v1/on-boarding/bank-account
Body parameters
| Name | Tipi | E detyrueshme | Përshkrimi |
|---|---|---|---|
| name | string, nullable | no | Emri i bankës, ai që shfaqet në faturë krahas IBAN-it. |
| holder | string, nullable | no | Mbajtësi i llogarisë, zakonisht emri i kompanisë. |
| iban | string, nullable | no | IBAN-i i llogarisë, ai që shfaqet në faturë që blerësi të paguajë. |
| swift | string, nullable | no | Kodi SWIFT/BIC i bankës, i nevojshëm për pagesa nga jashtë. |
| currency | string, nullable | no | Monedha e llogarisë, kod ISO 4217. Një llogari mban një monedhë të vetme. |
| notes | string, nullable | no | Shënime që shoqërojnë llogarinë në faturë. |
Përgjigjet
200 Kur monedha nuk njihet, ose kur ruajtja dështon, përgjigja kthehet me HTTP 200 dhe `status: false`; arsyeja është te `message` ose te `errors`.
| Field | Tipi | Përshkrimi |
|---|---|---|
| status | boolean | |
| data | object | |
| data.bankAccount | object | |
| data.bankAccount.id | integer | Id-ja e llogarisë bankare; me të, ose me IBAN-in, zgjidhet llogaria në faturat jo-cash dhe në e-faturat |
| data.bankAccount.iban | string | IBAN-i siç u ruajt: pa hapësira dhe me shkronja të mëdha |
401 Unauthenticated
| Field | Tipi | Përshkrimi |
|---|---|---|
| message | string |
422 Të dhënat nuk kaluan validimin. Kjo përgjigje përdor fushën `success`, jo `status`, dhe `errors` është objekt sipas fushës.
| Field | Tipi | Përshkrimi |
|---|---|---|
| success | boolean | Gjithmonë false |
| message | string | Një rresht përmbledhës, i njëjtë për çdo dështim validimi |
| errors | object | Fushat që nuk kaluan validimin, secila me mesazhet e veta. Çelësat me pikë tregojnë brenda objekteve dhe elementëve të array-ve, p.sh. `lines.0.quantity` |
Shembull kërkese
curl -X POST 'https://fature.al/api/v1/on-boarding/bank-account' \
-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 '{
"name": "BKT",
"holder": "Ei3 Software Solution shpk",
"iban": "AL35202111090000000001234567",
"swift": "NCBAALTX",
"currency": "ALL",
"notes": "notes"
}'
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/on-boarding/bank-account', [
'name' => 'BKT',
'holder' => 'Ei3 Software Solution shpk',
'iban' => 'AL35202111090000000001234567',
'swift' => 'NCBAALTX',
'currency' => 'ALL',
'notes' => 'notes',
]);
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('POST', 'https://fature.al/api/v1/on-boarding/bank-account', [
'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' => [
'name' => 'BKT',
'holder' => 'Ei3 Software Solution shpk',
'iban' => 'AL35202111090000000001234567',
'swift' => 'NCBAALTX',
'currency' => 'ALL',
'notes' => 'notes',
],
]);
$data = json_decode((string) $response->getBody(), true);
const response = await fetch('https://fature.al/api/v1/on-boarding/bank-account', {
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({
"name": "BKT",
"holder": "Ei3 Software Solution shpk",
"iban": "AL35202111090000000001234567",
"swift": "NCBAALTX",
"currency": "ALL",
"notes": "notes"
})
});
const data = await response.json();
Shembull përgjigjeje
{
"status": true,
"data": {
"bankAccount": {
"id": 5,
"iban": "AL35202111090000000001234567"
}
}
}
{
"message": "Unauthenticated."
}
{
"success": false,
"message": "Te dhena jo te sakta",
"errors": []
}