---
title: "Ngarko certifikaten elektronike"
operation_id: "api.v1.on-boarding.certificate"
method: POST
path: "/api/v1/on-boarding/certificate"
group: "Regjistrimi"
api_version: "v1"
authenticated: true
canonical: "https://fature.al/api-reference/endpoints/api-v1-on-boarding-certificate.html"
---

# Ngarko certifikaten elektronike

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

## POST /api/v1/on-boarding/certificate

Ngarkoni certifikaten elektronike (.p12 ose .pfx) per kompanine. Fjalekalimi duhet te jete i sakte dhe NIPT-i ne certifikate duhet te perputhet me NIPT-in e kompanise.

**Sandbox (DEMO):** ne instancen DEMO ky endpoint kthen `success` per cdo certifikate dhe cdo fjalekalim. `expiresAt` qe kthehet eshte +1 vit nga sot.

Full URL: `https://fature.al/api/v1/on-boarding/certificate`

API version: `v1`.

Authentication: required (bearer token).

### Body parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `certificate_file` | string<binary>, nullable | no | Certifikata elektronike si skedar, ne formatin PFX. Me te nenshkruhen faturat qe dergohen ne fiskalizim, prandaj pa nje certifikate te vlefshme nuk leshohet dot fature. |
| `password` | string, nullable | no | Fjalekalimi i skedarit PFX. Pa te certifikata nuk hapet dot dhe nenshkrimi deshton. |

### Example request

```bash
curl -X POST 'https://fature.al/api/v1/on-boarding/certificate' \
  -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 '{
    "certificate_file": "certificate file",
    "password": "correct-horse-battery"
}'
```

### Responses

**200** — Kur fjalekalimi eshte i gabuar ose NIPT-i i certifikates nuk perputhet me kompanine, pergjigja kthehet me HTTP 200 dhe `status: false`.

**201** — Created

| Field | Type | Description |
| --- | --- | --- |
| `status` | boolean |  |
| `data` | object |  |
| `data.cert` | object |  |
| `data.cert.expiresAt` | string |  |

```json
{
    "status": true,
    "data": {
        "cert": {
            "expiresAt": "expiresAt"
        }
    }
}
```

**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": []
}
```
