---
title: "Regjistro kompani te re"
operation_id: "api.v1.register"
method: POST
path: "/api/v1/register"
group: "Regjistrimi"
api_version: "v1"
authenticated: true
canonical: "https://fature.al/api-reference/endpoints/api-v1-register.html"
---

# Regjistro kompani te re

Part of the [fature.al API](/api-reference/index.html) documentation.

## POST /api/v1/register

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`

API version: `v1`.

Authentication: required (bearer token).

### 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. |

### Example request

```bash
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": "admin@example.com",
    "issuerInVat": true,
    "lastNonCashEInvoiceNumber": 412
}'
```

### 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 |  |

```json
{
    "status": true,
    "data": {
        "user": {
            "token": "a1b2c3d4e5f6",
            "id": 1
        },
        "branch": {
            "id": 1,
            "name": "Jane Doe"
        }
    }
}
```

**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` |

```json
{
    "success": true,
    "message": "Hello there",
    "errors": []
}
```
