---
title: "Verificare facturare proforma"
method: GET
path: "/estimate/invoices"
tags: ["Proforme"]
---

# Verificare facturare proforma

`GET /estimate/invoices`

Verifica daca o proforma a fost transformata in factura. Parametrii se trimit in URL (query string).

Raspunsul contine:
- `areInvoicesCreated` - `true` daca proforma a fost facturata, altfel `false`.
- `invoices` - lista facturilor generate din proforma (`series`, `number`), prezenta cand `areInvoicesCreated` e `true`.

**Facturile ciorna apar si ele in lista, cu `number` gol.** O factura salvata in ciorna nu are inca numar, deci intrarea arata ca `{"series": "API", "number": ""}`, iar `areInvoicesCreated` devine `true` chiar daca singura factura generata din proforma e o ciorna. Daca te interesau doar facturile emise, ignora intrarile cu `number` gol.

**Cum interpretezi raspunsul**

Verifica mai intai statusul HTTP, apoi `areInvoicesCreated`. Pe acest endpoint, `errorText` poate fi completat si la un raspuns `200`, cand proforma exista dar nu este inca facturata.

- `200` + `areInvoicesCreated: true` - proforma a fost facturata.
- `200` + `areInvoicesCreated: false` - proforma exista, dar nu a fost facturata.
- `400` sau `410` - verifica eroarea returnata.

**Ai primit o eroare la verificarea facturarii?**

**Erorile de autentificare si autorizare sunt comune tuturor endpoint-urilor V1.** Pentru email/token, `cif`, drepturi pe firma sau pe serie, vezi [Erori API V1](#api-1/description/erori-api-v1). Mai jos gasesti doar erorile specifice acestui endpoint.

<details>
<summary><strong>Erori la verificarea facturarii</strong></summary>

<table>
  <thead>
    <tr>
      <th>Situatie</th>
      <th>Eroare</th>
      <th>Sugestie</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code>number</code> lipseste din URL</td>
      <td><code>Numarul proformei trebuie specificat in url in parametrul 'number'!</code></td>
      <td>Adauga `number` in query string cu numarul proformei, de exemplu `number=0226`.</td>
    </tr>
    <tr>
      <td>Proforma nu exista</td>
      <td><code>Proforma cu seria pro si numarul 99999999 nu a fost gasita.</code></td>
      <td>Verifica `seriesname` si `number`. Combinatia serie plus numar trebuie sa existe in cont.</td>
    </tr>
  </tbody>
</table>

</details>

## Query parameters

- `cif` string, required
- `seriesname` string, required
- `number` string, required

## Response `200`

Proforma exista. Verifica `areInvoicesCreated` ca sa afli daca a fost facturata.

- object
  - `errorText` string
  - `areInvoicesCreated` boolean — true daca proforma a fost transformata in factura
  - `invoices` object[] — Facturile generate din proforma (prezent cand areInvoicesCreated e true)
    - `series` string
    - `number` string

## Other responses

- `400` — Parametru lipsa in URL
- `401` — Autentificare esuata
- `410` — Proforma nu exista

---

[API](https://skmtc.dev/smartbill/apis/smartbill-api.md) · [All operations](https://skmtc.dev/smartbill/apis/smartbill-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/smartbill/smartbill-api/revisions/29940a27d41c/schema)
