fature.al eshte platforma e faturimit dhe fiskalizimit per bizneset ne Shqiperi. Hap nje llogari
Skip to content
fature.al API Menu

Regjistro kompani te re

POST /api/v1/register Requires authentication Rate limited by the `api-global` limiter v1

Send a bearer token in the Authorization header.

Regjistron nje kompani te re ne fature.al. Kerkon token special te autorizuar nga fature.al. Kthen token API per perdoruesin e krijuar dhe ID e njesise se biznesit.

Sandbox (DEMO): ne instancen DEMO, dergimi i NIPT-it L62221018T aktivizon rrjedhen sandbox: nuk krijohet kompani e re, por krijohet nje perdorues + njesi biznesi nen kompanine ekzistuese sandbox dhe ju kthehet nje api_token real qe e perdorni per hapat e tjere te onboarding-ut. Email-i shtohet me sufiks +sandbox-XXXXXXXX qe te lejojme thirrje te perseritura me te njejtin email. Ne PRODUCTION ky NIPT trajtohet normalisht.

Full URL: https://fature.al/api/v1/register

Body parameters

Name Type Required Description
name string, maxLength 255 yes Emri tregtar i kompanise qe po regjistrohet.
address string, maxLength 255 yes Adresa e selise se kompanise, ashtu sic eshte regjistruar.
administrator string, maxLength 255 yes Emri i administratorit te kompanise.
phone string, maxLength 50 yes Telefoni i kontaktit i kompanise.
email string<email>, maxLength 255 yes Email-i i perdoruesit te pare, ai qe do te administroje llogarine.
issuerInVat boolean, nullable no A eshte kompania e regjistruar per TVSH. Percakton nese faturat dalin me TVSH.
lastNonCashEInvoiceNumber string, maxLength 50, nullable no Numri i fundit i perdorur ne sistemin e meparshem, qe numerimi te vazhdoje nga aty dhe te mos rifilloje nga 1.

Responses

200 Kur llogaria nuk eshte e autorizuar per onboarding, kur NIPT-i eshte i regjistruar tashme, ose kur nuk gjendet ne regjistrin fiskal, pergjigja kthehet me HTTP 200 dhe `status: false`.

201 Created

Field Type Description
status boolean
data object
data.user object
data.user.token string
data.user.id integer
data.branch object
data.branch.id integer
data.branch.name string

422 Te dhenat nuk kaluan validimin. 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`

Example request

cURL
curl -X POST 'https://fature.al/api/v1/register' \
  -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": "Ei3 Software Solution shpk",
    "address": "Rruga e Kavajes 12, Tirane",
    "administrator": "Festim Peposhi",
    "phone": "+355 69 000 0000",
    "email": "[email protected]",
    "issuerInVat": true,
    "lastNonCashEInvoiceNumber": 412
}'
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',
    'Content-Type' => 'application/json',
])->post('https://fature.al/api/v1/register', [
    'name' => 'Ei3 Software Solution shpk',
    'address' => 'Rruga e Kavajes 12, Tirane',
    'administrator' => 'Festim Peposhi',
    'phone' => '+355 69 000 0000',
    'email' => '[email protected]',
    'issuerInVat' => true,
    'lastNonCashEInvoiceNumber' => 412,
]);

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

$client = new Client();

$response = $client->request('POST', 'https://fature.al/api/v1/register', [
    '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' => 'Ei3 Software Solution shpk',
        'address' => 'Rruga e Kavajes 12, Tirane',
        'administrator' => 'Festim Peposhi',
        'phone' => '+355 69 000 0000',
        'email' => '[email protected]',
        'issuerInVat' => true,
        'lastNonCashEInvoiceNumber' => 412,
    ],
]);

$data = json_decode((string) $response->getBody(), true);
JavaScript
const response = await fetch('https://fature.al/api/v1/register', {
  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": "Ei3 Software Solution shpk",
      "address": "Rruga e Kavajes 12, Tirane",
      "administrator": "Festim Peposhi",
      "phone": "+355 69 000 0000",
      "email": "[email protected]",
      "issuerInVat": true,
      "lastNonCashEInvoiceNumber": 412
  })
});

const data = await response.json();

Example response

201
{
    "status": true,
    "data": {
        "user": {
            "token": "a1b2c3d4e5f6",
            "id": 1
        },
        "branch": {
            "id": 1,
            "name": "Jane Doe"
        }
    }
}
422
{
    "success": true,
    "message": "Hello there",
    "errors": []
}

Regjistrimi eshte falas.

Regjistrohu ne fature.al

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