NIR-uri (Beta)

Emite o Nota de Intrare Receptie (NIR) pe baza documentului primit de la furnizor.

⚠️ Deocamdata NIR-ul se emite doar ca ciorna. Se trimite status: "draft"; orice alta valoare este respinsa. NIR-ul ramane ciorna, fara numar alocat, pana la finalizarea din SmartBill Cloud. Emiterea directa a unui NIR finalizat va fi adaugata ulterior.

ℹ️ Deocamdata emiterea NIR-urilor prin API nu consuma din numarul de documente inclus in abonament. In curand, fiecare NIR emis prin API, inclusiv ciornele, va fi luat in calcul.

Drepturi necesare

Drepturile utilizatorului caruia ii apartine cheia API se seteaza din meniul Utilizatori in SmartBill Cloud, pe una din cele doua variante:

<details> <summary><strong>Drepturi simple (varianta Simplu)</strong></summary> <table class="sb-op-table"> <thead> <tr> <th>Drept</th> <th>Ce acopera</th> </tr> </thead> <tbody> <tr> <td><strong>Emitere</strong></td> <td>Emiterea NIR-ului si adaugarea produselor in nomenclator</td> </tr> </tbody> </table> </details> <details> <summary><strong>Drepturi avansate (varianta Detaliat)</strong></summary> <table class="sb-op-table"> <thead> <tr> <th>Sectiune</th> <th>Drept</th> </tr> </thead> <tbody> <tr> <td>Acces aplicatii</td> <td><strong>API / Magazin online</strong></td> </tr> <tr> <td>Generale</td> <td><strong>Are acces la gestiune</strong>, cu bifa pe fiecare gestiune folosita in <code>destination<span class="sb-brk"></span>Warehouse<span class="sb-brk"></span>Id</code></td> </tr> <tr> <td>Generale</td> <td><strong>Are acces la documente din trecut</strong> / <strong>din viitor</strong> - <code>issue<span class="sb-brk"></span>Date</code> trebuie sa se incadreze in limitele setate pentru utilizator</td> </tr> <tr> <td>Generale</td> <td><strong>Poate schimba preturile de vanzare</strong> - necesar la orice emitere, inclusiv ciorne, indiferent de tipul gestiunii sau de pretul de vanzare trimis</td> </tr> <tr> <td>Documente → Receptii</td> <td><strong>Emitere</strong> si <strong>Vizualizare</strong>, plus seria NIR in <strong>Acces la seriile</strong></td> </tr> <tr> <td>Nomenclatoare → Produse</td> <td><strong>Adaugare</strong> si <strong>Editare/stergere</strong> - necesare si cand toate produsele exista deja in nomenclator</td> </tr> <tr> <td>Nomenclatoare → Furnizori</td> <td><strong>Vizualizare</strong></td> </tr> </tbody> </table> </details>

Firma trebuie sa aiba si modulul de gestiune activ. Fara un drept necesar, fara acces la serie sau la o gestiune ori cu o data in afara limitelor utilizatorului, raspunsul este 403 insufficient_permissions, iar NIR-ul nu se creeaza; mesajul nu spune care drept lipseste.

ID-uri necesare

Pentru emiterea NIR-ului se trimit ID-ul furnizorului, ID-ul gestiunii si ID-urile cotelor de TVA. Toate se obtin din API V3:

IDCamp in cerereSe obtine din
ID-ul furnizoruluisupplierIdListare furnizori
ID-ul gestiuniiproducts[].destinationWarehouseIdListare gestiuni
ID-urile cotelor de TVAproducts[].purchaseVatRateId, products[].sellingVatRateIdListare cote TVA

Moneda si cursul de schimb

  • currency este moneda documentului furnizorului, de exemplu EUR. Daca lipseste, se foloseste RON.
  • Campurile care se termina in InDocumentCurrency sunt in moneda din currency.
  • Campurile care se termina in InRON sunt mereu in lei.
  • exchangeRate arata cati lei valoreaza 1 unitate din currency. Este obligatoriu pentru alte monede decat RON. Pentru RON se omite sau se trimite 1.

Exemplu: factura furnizorului este in euro, iar cursul este 5 lei pentru 1 euro.

Se trimiteRezultat
currency: "EUR", exchangeRate: 5NIR-ul este in euro, la cursul de 5 lei
purchasePriceWithoutVatInDocumentCurrency: 100100 EUR. Serverul calculeaza purchasePriceWithoutVatInRON: 500 (100 x 5)
sellingPriceWithoutVatInRON: 615615 lei. Nu se converteste

Valori calculate

Se trimit preturile unitare fara TVA; raspunsul adauga preturile cu TVA, preturile de achizitie in RON si totalurile NIR-ului:

<table class="sb-op-table sb-op-table--calc"> <thead> <tr> <th>Camp din raspuns</th> <th>Cum se obtine</th> <th>Exemplu (10 buc x 100 EUR, curs 5, TVA 21%)</th> </tr> </thead> <tbody> <tr> <td><code>products<span class="sb-brk"></span>[].purchase<span class="sb-brk"></span>Price<span class="sb-brk"></span>Without<span class="sb-brk"></span>Vat<span class="sb-brk"></span>In<span class="sb-brk"></span>RON</code></td> <td>pret in <code>currency</code> x <code>exchange<span class="sb-brk"></span>Rate</code></td> <td>100 x 5 = <code>500</code></td> </tr> <tr> <td><code>products<span class="sb-brk"></span>[].purchase<span class="sb-brk"></span>Price<span class="sb-brk"></span>With<span class="sb-brk"></span>Vat<span class="sb-brk"></span>In<span class="sb-brk"></span>Document<span class="sb-brk"></span>Currency</code></td> <td>pret fara TVA + TVA de achizitie</td> <td><code>121</code></td> </tr> <tr> <td><code>products<span class="sb-brk"></span>[].purchase<span class="sb-brk"></span>Price<span class="sb-brk"></span>With<span class="sb-brk"></span>Vat<span class="sb-brk"></span>In<span class="sb-brk"></span>RON</code></td> <td>pret cu TVA in RON</td> <td><code>605</code></td> </tr> <tr> <td><code>products<span class="sb-brk"></span>[].selling<span class="sb-brk"></span>Price<span class="sb-brk"></span>With<span class="sb-brk"></span>Vat<span class="sb-brk"></span>In<span class="sb-brk"></span>RON</code></td> <td>pret de vanzare + TVA de vanzare</td> <td>615 -> <code>744<span class="sb-brk"></span>.15</code></td> </tr> <tr> <td><code>total<span class="sb-brk"></span>Without<span class="sb-brk"></span>Vat<span class="sb-brk"></span>Calculated<span class="sb-brk"></span>In<span class="sb-brk"></span>Document<span class="sb-brk"></span>Currency</code></td> <td>suma pe produse</td> <td>10 x 100 = <code>1000</code></td> </tr> <tr> <td><code>total<span class="sb-brk"></span>Vat<span class="sb-brk"></span>Calculated<span class="sb-brk"></span>In<span class="sb-brk"></span>Document<span class="sb-brk"></span>Currency</code></td> <td>TVA pe produse</td> <td><code>210</code></td> </tr> <tr> <td><code>total<span class="sb-brk"></span>With<span class="sb-brk"></span>Vat<span class="sb-brk"></span>Calculated<span class="sb-brk"></span>In<span class="sb-brk"></span>Document<span class="sb-brk"></span>Currency</code></td> <td>total cu TVA</td> <td><code>1210</code></td> </tr> </tbody> </table>

Erori la emiterea NIR-ului

Erorile de autentificare si autorizare sunt comune tuturor endpoint-urilor V3. Pentru cheia API, drepturi, abonament sau formatul corpului JSON, detalii in Erori API V3. Mai jos sunt doar erorile specifice emiterii NIR-ului.

<details> <summary><strong>Structura cererii</strong></summary> <table class="sb-op-table sb-op-table--3"> <thead> <tr> <th>Situatie</th> <th>Eroare</th> <th>Sugestie</th> </tr> </thead> <tbody> <tr> <td>Corpul cererii este <code>null</code></td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The document is required.</span></td> <td>NIR-ul se trimite ca obiect JSON. Eroarea nu are <code>param</code>.</td> </tr> <tr> <td>Camp repetat in acelasi obiect JSON</td> <td><code>duplicate_<span class="sb-brk"></span>field</code><span class="sb-err-msg">Property 'products[0].receivedQuantity' must appear only once.</span></td> <td>Fiecare camp trebuie sa apara o singura data. Regula se aplica si campurilor necunoscute, chiar cu valori identice. <code>param</code> arata calea completa, de exemplu <code>acquisition<span class="sb-brk"></span>.number</code>.</td> </tr> <tr> <td>Valoare de alt tip decat cel asteptat</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>type</code><span class="sb-err-msg">Invalid type for property: 'precision'.</span></td> <td>Valoarea trebuie sa aiba tipul din schema: de exemplu, un text in loc de numar e respins, iar <code>precision</code> trebuie sa fie numar intreg (<code>2</code>, nu <code>2<span class="sb-brk"></span>.0</code>).</td> </tr> </tbody> </table> </details> <details> <summary><strong>Date NIR si serie</strong></summary> <table class="sb-op-table sb-op-table--3"> <thead> <tr> <th>Situatie</th> <th>Eroare</th> <th>Sugestie</th> </tr> </thead> <tbody> <tr> <td><code>status</code> lipsa</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The document status is required.</span></td> <td>Se trimite <code>status: "draft"</code>.</td> </tr> <tr> <td><code>status</code> diferit de <code>draft</code></td> <td><code>document_<span class="sb-brk"></span>status_<span class="sb-brk"></span>not_<span class="sb-brk"></span>allowed</code><span class="sb-err-msg">Invalid status. Allowed values: draft.</span></td> <td>Deocamdata NIR-ul se emite doar ca ciorna: se trimite <code>draft</code>, iar finalizarea se face din SmartBill Cloud.</td> </tr> <tr> <td><code>series<span class="sb-brk"></span>Name</code> lipsa</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The document series name is required.</span></td> <td>Denumirea seriei de NIR este obligatorie.</td> </tr> <tr> <td><code>series<span class="sb-brk"></span>Name</code> cu peste 50 de caractere</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The series name cannot be longer than 50 characters.</span></td> <td>Denumirea seriei are maximum 50 de caractere.</td> </tr> <tr> <td>Serie inexistenta sau de alt tip</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The document series is not valid.</span></td> <td>Se trimite denumirea completa a unei serii de tip NIR din cont. Literele mari si mici nu conteaza.</td> </tr> <tr> <td><code>issue<span class="sb-brk"></span>Date</code> lipsa</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The document issue date is required.</span></td> <td>Data NIR-ului este obligatorie.</td> </tr> <tr> <td>Data in format gresit</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">Invalid date format. Expected format: 'yyyy-MM-dd'.</span></td> <td><code>issue<span class="sb-brk"></span>Date</code>, <code>acquisition<span class="sb-brk"></span>.issue<span class="sb-brk"></span>Date</code> si <code>acquisition<span class="sb-brk"></span>.due<span class="sb-brk"></span>Date</code> se trimit in format <code><span class="sb-nobr">yyyy-MM-dd</span></code>, de exemplu <code><span class="sb-nobr">2026-10-01</span></code>.</td> </tr> <tr> <td>Data in afara intervalului 1970-01-01 – 9999-12-31</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The minimum issue date is '1970-01-01'.</span></td> <td>Datele acceptate sunt intre <code><span class="sb-nobr">1970-01-01</span></code> si <code><span class="sb-nobr">9999-12-31</span></code>, inclusiv. Pentru limita de sus mesajul este <code>The maximum issue date is '9999-12-31'.</code>; la documentul de achizitie mesajele numesc campul.</td> </tr> <tr> <td><code>precision</code> in afara intervalului</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The precision value must be between 2 and 4.</span></td> <td>Valori acceptate: <code>2</code>, <code>3</code> sau <code>4</code>. Daca lipseste, se foloseste <code>2</code>.</td> </tr> <tr> <td>Text prea lung in <code>mentions</code>, <code>observations</code> sau <code>committee</code></td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The mentions cannot be longer than 500 characters.</span></td> <td>Maximum 500 de caractere pentru <code>mentions</code> si <code>observations</code>, 200 pentru <code>committee</code>. Se numara si spatiile de la capete. Mesajul numeste campul.</td> </tr> </tbody> </table> </details> <details> <summary><strong>Moneda si curs</strong></summary> <table class="sb-op-table sb-op-table--3"> <thead> <tr> <th>Situatie</th> <th>Eroare</th> <th>Sugestie</th> </tr> </thead> <tbody> <tr> <td>Moneda inexistenta in firma</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The document currency is not valid.</span></td> <td>Se trimite simbolul unei monede disponibile firmei, de exemplu <code>RON</code> sau <code>EUR</code>.</td> </tr> <tr> <td>Simbolul monedei are peste 20 de caractere</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The currency symbol cannot be longer than 20 characters.</span></td> <td>Se trimite doar simbolul monedei.</td> </tr> <tr> <td>Moneda straina fara curs</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The exchange rate is required for currencies other than RON.</span></td> <td>Se trimite <code>exchange<span class="sb-brk"></span>Rate</code>: cati lei valoreaza o unitate din <code>currency</code>.</td> </tr> <tr> <td>RON cu un curs diferit de 1</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The document exchange rate must be 1 or missing when currency is RON.</span></td> <td>Pentru RON, <code>exchange<span class="sb-brk"></span>Rate</code> se omite sau se trimite <code>1</code>.</td> </tr> <tr> <td>Curs zero sau negativ</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The exchange rate must be greater than zero.</span></td> <td>Cursul trebuie sa fie strict pozitiv.</td> </tr> <tr> <td>Curs cu prea multe cifre</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The exchange rate must have at most 6 decimal digits.</span></td> <td>Maximum 8 cifre in partea intreaga si 6 zecimale.</td> </tr> </tbody> </table> </details> <details> <summary><strong>Furnizor si document de achizitie</strong></summary> <table class="sb-op-table sb-op-table--3"> <thead> <tr> <th>Situatie</th> <th>Eroare</th> <th>Sugestie</th> </tr> </thead> <tbody> <tr> <td><code>supplier<span class="sb-brk"></span>Id</code> lipsa</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The supplier ID is required.</span></td> <td>Se trimite id-ul furnizorului, din <a href="#api-1/tag/furnizori">Furnizori</a>.</td> </tr> <tr> <td><code>supplier<span class="sb-brk"></span>Id</code> cu prefix sau format gresit</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The 'supplierId' field must start with 'sup_'.</span></td> <td>Id-ul se trimite integral, cu prefixul <code>sup_</code>.</td> </tr> <tr> <td>Furnizor inexistent in firma</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The supplier with ID 'sup_01a0ee341fb17d8da8df382a41dcebaf' was not found.</span></td> <td>Id-ul trebuie sa apartina firmei din URL. Un id al altei firme nu e gasit.</td> </tr> <tr> <td><code>acquisition</code> fara <code>type</code></td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The acquisition document type is required. Allowed values: 'Invoice', 'Delivery note', 'Fiscal receipt', 'Sales booklet'.</span></td> <td>Se completeaza <code>acquisition<span class="sb-brk"></span>.type</code> sau se omite tot obiectul <code>acquisition</code>.</td> </tr> <tr> <td><code>acquisition<span class="sb-brk"></span>.type</code> necunoscut</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">Invalid acquisition type. Allowed values: 'Invoice', 'Delivery note', 'Fiscal receipt', 'Sales booklet'.</span></td> <td>Se foloseste una din valorile din mesaj. Pentru un NIR fara document de achizitie, <code>acquisition</code> se omite.</td> </tr> <tr> <td><code>acquisition</code> fara <code>issue<span class="sb-brk"></span>Date</code></td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The acquisition document issue date is required.</span></td> <td>Data documentului furnizorului este obligatorie.</td> </tr> <tr> <td>Scadenta inainte de data documentului</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The acquisition document due date must be on or after the issue date.</span></td> <td><code>acquisition<span class="sb-brk"></span>.due<span class="sb-brk"></span>Date</code> trebuie sa fie cel putin egala cu <code>acquisition<span class="sb-brk"></span>.issue<span class="sb-brk"></span>Date</code>.</td> </tr> <tr> <td>TVA-ul declarat mai mare decat totalul cu TVA</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The acquisition document total VAT cannot be greater than total with VAT.</span></td> <td>Totalurile trebuie sa corespunda documentului furnizorului. La un document de retur (ambele totaluri negative) se compara valorile absolute.</td> </tr> <tr> <td>Totaluri de achizitie cu prea multe cifre</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The acquisition document total with VAT must have at most 4 decimal digits.</span></td> <td>Maximum 15 cifre in partea intreaga si 4 zecimale.</td> </tr> <tr> <td>Text prea lung in <code>acquisition</code></td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The acquisition document number cannot be longer than 50 characters.</span></td> <td>Maximum 50 de caractere pentru <code>number</code> si <code>delegate<span class="sb-brk"></span>Vehicle<span class="sb-brk"></span>Registration</code>, 100 pentru <code>delegate<span class="sb-brk"></span>Name</code>. Mesajul numeste campul.</td> </tr> </tbody> </table> </details> <details> <summary><strong>Produse si cantitati</strong></summary> <table class="sb-op-table sb-op-table--3"> <thead> <tr> <th>Situatie</th> <th>Eroare</th> <th>Sugestie</th> </tr> </thead> <tbody> <tr> <td><code>products</code> lipsa sau gol</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The document must contain at least one product.</span></td> <td>Este necesar cel putin un produs. Lista goala intoarce acelasi mesaj, cu <code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code>.</td> </tr> <tr> <td>Element <code>null</code> in <code>products</code></td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The product details are required.</span></td> <td>Elementul <code>null</code> trebuie eliminat. <code>param</code> arata pozitia, de exemplu <code>products<span class="sb-brk"></span>[1]</code>.</td> </tr> <tr> <td>Peste 400 de pozitii</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">You can only add 400 products per document.</span></td> <td>Receptia se imparte in mai multe NIR-uri.</td> </tr> <tr> <td><code>name</code> sau <code>measuring<span class="sb-brk"></span>Unit<span class="sb-brk"></span>Name</code> lipsa</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The product name is required.</span></td> <td>Denumirea (maximum 5.000 de caractere) si unitatea de masura (maximum 200) sunt obligatorii.</td> </tr> <tr> <td>Cod lipsa cand firma foloseste coduri</td> <td><code>product_<span class="sb-brk"></span>code_<span class="sb-brk"></span>required</code><span class="sb-err-msg">The product 'Widget' does not have a specified code.</span></td> <td><code>code</code> este obligatoriu la fiecare produs si serviciu.</td> </tr> <tr> <td>Cod cu peste 100 de caractere</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The product code cannot be longer than 100 characters.</span></td> <td>Codul are maximum 100 de caractere.</td> </tr> <tr> <td>Cantitate lipsa</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The product received quantity is required.</span></td> <td>Sunt obligatorii atat <code>document<span class="sb-brk"></span>Quantity</code>, cat si <code>received<span class="sb-brk"></span>Quantity</code>.</td> </tr> <tr> <td>Cantitate zero</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The received quantity cannot be zero.</span></td> <td>Cantitatile trebuie sa fie diferite de zero. Pentru retur se folosesc valori negative.</td> </tr> <tr> <td>Cantitate cu prea multe cifre</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The received quantity must have at most 4 decimal digits.</span></td> <td>Maximum 15 cifre in partea intreaga si 4 zecimale.</td> </tr> <tr> <td>Unitate de masura fara factor de conversie</td> <td><code>product_<span class="sb-brk"></span>measuring_<span class="sb-brk"></span>unit_<span class="sb-brk"></span>conversion_<span class="sb-brk"></span>missing</code><span class="sb-err-msg">Measuring unit 'set' for product 'Widget' does not have a conversion factor. ...</span></td> <td>Se foloseste unitatea configurata pentru produs, scrisa exact (case-sensitive), sau se defineste conversia in Nomenclatoare &gt; Produse.</td> </tr> <tr> <td>Conversia face cantitatea zero</td> <td><code>product_<span class="sb-brk"></span>converted_<span class="sb-brk"></span>measuring_<span class="sb-brk"></span>unit_<span class="sb-brk"></span>quantity_<span class="sb-brk"></span>rounds_<span class="sb-brk"></span>to_<span class="sb-brk"></span>zero</code><span class="sb-err-msg">For product 'Widget', rounding the quantity expressed in measuring unit 'set' to 4 decimal places results in an invalid quantity of zero ...</span></td> <td>Factorii de conversie ai unitatii de masura trebuie verificati.</td> </tr> <tr> <td>Produsul nu poate fi identificat</td> <td><code>product_<span class="sb-brk"></span>with_<span class="sb-brk"></span>name_<span class="sb-brk"></span>not_<span class="sb-brk"></span>found</code><span class="sb-err-msg">Product 'Widget' was not found.</span></td> <td><code>name</code>, <code>code</code> si <code>is<span class="sb-brk"></span>Service</code> trebuie sa corespunda nomenclatorului.</td> </tr> <tr> <td>Produsul corespunde mai multor inregistrari</td> <td><code>duplicate_<span class="sb-brk"></span>stock_<span class="sb-brk"></span>product</code><span class="sb-err-msg">Product 'Widget' has multiple stock entries on the document.</span></td> <td>Nomenclatorul de produse contine dubluri care trebuie eliminate.</td> </tr> </tbody> </table> </details> <details> <summary><strong>Preturi si TVA</strong></summary> <table class="sb-op-table sb-op-table--3"> <thead> <tr> <th>Situatie</th> <th>Eroare</th> <th>Sugestie</th> </tr> </thead> <tbody> <tr> <td>Pret de achizitie lipsa</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The product purchase price is required.</span></td> <td><code>purchase<span class="sb-brk"></span>Price<span class="sb-brk"></span>Without<span class="sb-brk"></span>Vat<span class="sb-brk"></span>In<span class="sb-brk"></span>Document<span class="sb-brk"></span>Currency</code> este obligatoriu la fiecare pozitie.</td> </tr> <tr> <td>Pret de achizitie negativ</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The product purchase price must be greater than or equal to zero.</span></td> <td>Pretul ramane pozitiv si la retur (linie cu cantitate negativa); semnul se da prin cantitate.</td> </tr> <tr> <td>Pret cu mai multe zecimale decat <code>precision</code></td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">Price cannot have more than 2 decimal places for this document.</span></td> <td>Pretul se rotunjeste sau se mareste <code>precision</code>. <code>param</code> arata pozitia si campul.</td> </tr> <tr> <td>Pret de vanzare lipsa pe gestiune en detail</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The selling price must be provided for a retail destination warehouse.</span></td> <td><code>selling<span class="sb-brk"></span>Price<span class="sb-brk"></span>Without<span class="sb-brk"></span>Vat<span class="sb-brk"></span>In<span class="sb-brk"></span>RON</code> este obligatoriu pentru produsele receptionate in gestiuni en detail. Serviciile si liniile cu cantitate negativa (retur) il pot omite.</td> </tr> <tr> <td>Pret de vanzare negativ</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The product selling price must be greater than or equal to zero.</span></td> <td>Pretul de vanzare trebuie sa fie pozitiv sau zero. Regula se aplica serviciilor (inclusiv la retur) si produselor cu cantitate pozitiva, pe orice tip de gestiune.</td> </tr> <tr> <td>Pret de vanzare sub pretul de achizitie (firma platitoare de TVA)</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The selling price without VAT must be greater than or equal to the purchase price without VAT.</span></td> <td>Pe gestiune en detail, pretul de vanzare fara TVA al unui produs trebuie sa fie cel putin pretul de achizitie fara TVA convertit in RON. Nu se aplica serviciilor.</td> </tr> <tr> <td>Pret de vanzare sub pretul de achizitie (firma neplatitoare de TVA)</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The selling price must be greater than or equal to the purchase price with VAT.</span></td> <td>Pe gestiune en detail, pretul de vanzare al unui produs trebuie sa fie cel putin pretul de achizitie cu TVA-ul furnizorului, convertit in RON. Nu se aplica serviciilor.</td> </tr> <tr> <td>Preturi de vanzare diferite pentru acelasi produs</td> <td><code>product_<span class="sb-brk"></span>selling_<span class="sb-brk"></span>price_<span class="sb-brk"></span>inconsistent</code><span class="sb-err-msg">Product 'Widget' cannot have multiple selling prices in warehouse 'Main' on the same document.</span></td> <td>Pozitiile aceluiasi produs din aceeasi gestiune en detail trebuie sa aiba acelasi pret de vanzare.</td> </tr> <tr> <td>Cote TVA de vanzare diferite pentru acelasi produs</td> <td><code>product_<span class="sb-brk"></span>vat_<span class="sb-brk"></span>rate_<span class="sb-brk"></span>inconsistent</code><span class="sb-err-msg">Product 'Widget' cannot have multiple VAT rates in warehouse 'Main' on the same document.</span></td> <td>Se foloseste aceeasi cota de vanzare pe pozitiile aceluiasi produs din aceeasi gestiune en detail.</td> </tr> <tr> <td>Cota de achizitie lipsa (furnizor platitor de TVA)</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The purchase VAT rate is required.</span></td> <td>Se trimite <code>purchase<span class="sb-brk"></span>Vat<span class="sb-brk"></span>Rate<span class="sb-brk"></span>Id</code>, din <a href="#api-1/tag/cote-tva">Cote TVA</a>.</td> </tr> <tr> <td>Cota de vanzare lipsa (firma platitoare de TVA)</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The selling VAT rate is required.</span></td> <td><code>selling<span class="sb-brk"></span>Vat<span class="sb-brk"></span>Rate<span class="sb-brk"></span>Id</code> este obligatoriu pe fiecare pozitie, inclusiv pe gestiuni en gros, servicii si linii cu cantitate negativa.</td> </tr> <tr> <td>Cota cu taxare inversa peste 0% la vanzare, pe gestiune global-valorica</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The selling VAT rate cannot be a reverse-charge rate with the reverse charge percentage greater than 0.</span></td> <td>Pe gestiunile global-valorice, la vanzare se foloseste o cota fara taxare inversa sau cota cu taxare inversa care are <code>reverse<span class="sb-brk"></span>Charge<span class="sb-brk"></span>Percentage</code> 0. Cotele cu taxare inversa de 5%, 11%, 21% etc. se folosesc doar la achizitie.</td> </tr> <tr> <td>Cota TVA inexistenta in firma</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The purchase VAT rate could not be found.</span></td> <td>Id-ul trebuie sa existe in <a href="#api-1/tag/cote-tva">Cote TVA</a>. Pentru cota de vanzare mesajul este <code>The selling VAT rate could not be found<span class="sb-brk"></span>.</code></td> </tr> <tr> <td>Id de cota cu prefix gresit</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The 'products[0].purchaseVatRateId' field must start with 'vat_'.</span></td> <td>Id-ul se trimite integral, cu prefixul <code>vat_</code>.</td> </tr> </tbody> </table> </details> <details> <summary><strong>Gestiuni si stoc</strong></summary> <table class="sb-op-table sb-op-table--3"> <thead> <tr> <th>Situatie</th> <th>Eroare</th> <th>Sugestie</th> </tr> </thead> <tbody> <tr> <td><code>destination<span class="sb-brk"></span>Warehouse<span class="sb-brk"></span>Id</code> lipsa</td> <td><code>missing_<span class="sb-brk"></span>required_<span class="sb-brk"></span>field</code><span class="sb-err-msg">The product destination warehouse ID is required.</span></td> <td>Gestiunea este obligatorie pe fiecare pozitie, inclusiv la servicii.</td> </tr> <tr> <td>Id de gestiune cu prefix gresit</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The 'products[0].destinationWarehouseId' field must start with 'ware_'.</span></td> <td>Id-ul se trimite integral, cu prefixul <code>ware_</code>.</td> </tr> <tr> <td>Gestiune inexistenta in firma</td> <td><code>invalid_<span class="sb-brk"></span>field_<span class="sb-brk"></span>value</code><span class="sb-err-msg">The warehouse with ID 'ware_01a0ee341fb17d8da8df382a41dcebaf' was not found.</span></td> <td>Id-ul trebuie sa existe in <a href="#api-1/tag/gestiuni">Gestiuni</a>.</td> </tr> <tr> <td>Data inaintea importului de stoc initial</td> <td><code>document_<span class="sb-brk"></span>date_<span class="sb-brk"></span>before_<span class="sb-brk"></span>initial_<span class="sb-brk"></span>stock</code><span class="sb-err-msg">The document date cannot precede the initial stock import. Initial stock was imported into warehouse 'Main' on 2026-09-01.</span></td> <td><code>issue<span class="sb-brk"></span>Date</code> trebuie sa fie ulterioara importului de stoc initial in gestiunile folosite.</td> </tr> <tr> <td>Linie cu cantitate negativa (retur) pe gestiune en gros cu CMP, fara cost mediu ponderat</td> <td><code>reversal_<span class="sb-brk"></span>weighted_<span class="sb-brk"></span>average_<span class="sb-brk"></span>cost_<span class="sb-brk"></span>not_<span class="sb-brk"></span>found</code><span class="sb-err-msg">Product 'Widget' has no weighted average cost in warehouse 'Main' on 2026-09-03, so it cannot be reversed.</span></td> <td>Produsul trebuie sa aiba o intrare pe un document finalizat si neanulat in acea gestiune, cel tarziu la data NIR-ului.</td> </tr> <tr> <td>Fara metoda de evaluare a stocului la data NIR-ului</td> <td><code>stock_<span class="sb-brk"></span>mode_<span class="sb-brk"></span>not_<span class="sb-brk"></span>found</code><span class="sb-err-msg">The company does not have a stock valuation method configured for the document date.</span></td> <td>Configurarea gestiunii firmei din SmartBill Cloud trebuie verificata.</td> </tr> </tbody> </table> </details>

Tipuri de emitere

<details> <summary><strong>1. Emitere NIR pe gestiune global-valorica</strong></summary>

NIR pe o gestiune global-valorica, care apare cu type: "en detail" in Listare gestiuni. Pe acest tip de gestiune sellingPriceWithoutVatInRON este obligatoriu si trebuie sa fie cel putin pretul de achizitie convertit in RON. Raspunsul calculeaza si pretul de vanzare cu TVA.

{
  "status": "draft",
  "seriesName": "NIR",
  "issueDate": "2026-10-01",
  "currency": "RON",
  "supplierId": "sup_019f0000000070008000000000000001",
  "acquisition": {
    "type": "Invoice",
    "number": "FURN1024",
    "issueDate": "2026-10-01",
    "dueDate": "2026-10-31",
    "totalWithVatInDocumentCurrency": 1210,
    "totalVatInDocumentCurrency": 210
  },
  "products": [
    {
      "name": "Produs exemplu",
      "code": "PROD-001",
      "measuringUnitName": "buc",
      "documentQuantity": 10,
      "receivedQuantity": 10,
      "purchasePriceWithoutVatInDocumentCurrency": 100,
      "sellingPriceWithoutVatInRON": 150,
      "isService": false,
      "destinationWarehouseId": "ware_019f0000000070008000000000000002",
      "purchaseVatRateId": "vat_019f0000000070008000000000000003",
      "sellingVatRateId": "vat_019f0000000070008000000000000003"
    }
  ]
}
</details> <details> <summary><strong>2. Emitere NIR pe gestiune cantitativ-valorica</strong></summary>

Aceeasi factura, pe o gestiune cantitativ-valorica, care apare cu type: "en gros" in Listare gestiuni. Pretul de vanzare nu se trimite: pe acest tip de gestiune nu se foloseste, iar in raspuns ambele preturi de vanzare sunt null. sellingVatRateId ramane obligatoriu daca firma este platitoare de TVA.

{
  "status": "draft",
  "seriesName": "NIR",
  "issueDate": "2026-10-01",
  "currency": "RON",
  "supplierId": "sup_019f0000000070008000000000000001",
  "acquisition": {
    "type": "Invoice",
    "number": "FURN1024",
    "issueDate": "2026-10-01",
    "dueDate": "2026-10-31",
    "totalWithVatInDocumentCurrency": 1210,
    "totalVatInDocumentCurrency": 210
  },
  "products": [
    {
      "name": "Produs exemplu",
      "code": "PROD-001",
      "measuringUnitName": "buc",
      "documentQuantity": 10,
      "receivedQuantity": 10,
      "purchasePriceWithoutVatInDocumentCurrency": 100,
      "isService": false,
      "destinationWarehouseId": "ware_019f0000000070008000000000000005",
      "purchaseVatRateId": "vat_019f0000000070008000000000000003",
      "sellingVatRateId": "vat_019f0000000070008000000000000003"
    }
  ]
}
</details> <details> <summary><strong>3. Emitere NIR in valuta</strong></summary>

NIR pentru o factura de furnizor in EUR, pe o gestiune global-valorica. Pretul de achizitie se trimite in currency, pretul de vanzare in RON, iar exchangeRate face conversia. Exemplul completeaza si delegatul, mentiunile si observatiile.

{
  "status": "draft",
  "seriesName": "NIR",
  "issueDate": "2026-09-16",
  "currency": "EUR",
  "precision": 2,
  "exchangeRate": 5,
  "mentions": "Receptie conform facturii furnizorului",
  "observations": "Marfa verificata la descarcare",
  "committee": "Comisia de receptie",
  "supplierId": "sup_01a0d9032d8c782d91ddf1d151aec44c",
  "acquisition": {
    "type": "Invoice",
    "number": "FACT123",
    "issueDate": "2026-09-18",
    "dueDate": "2026-10-18",
    "totalWithVatInDocumentCurrency": 1210,
    "totalVatInDocumentCurrency": 210,
    "delegateName": "Ion Popescu",
    "delegateVehicleRegistration": "B-123-ABC"
  },
  "products": [
    {
      "name": "Example product",
      "code": "PROD-001",
      "measuringUnitName": "buc",
      "documentQuantity": 10,
      "receivedQuantity": 10,
      "purchasePriceWithoutVatInDocumentCurrency": 100,
      "sellingPriceWithoutVatInRON": 615,
      "isService": false,
      "destinationWarehouseId": "ware_01a0d9042da672d58723cba68ab04d8b",
      "purchaseVatRateId": "vat_01a0af2cdabd7c39a0750098e11b9960",
      "sellingVatRateId": "vat_01a0af2cdabd7c39a0750098e11b9960"
    }
  ]
}
</details>
post/v3/companies/{cif}/goods-receipts

Request

Path parameters

cifstring required

CIF-ul firmei tale, fara spatii.

Request body

status'draft' required

Starea NIR-ului emis. Deocamdata se accepta doar draft; orice alta valoare este respinsa.

seriesNamestring required

Denumirea completa a unei serii de tip NIR din SmartBill. Literele mari si mici nu conteaza.

issueDatestring date required

Data NIR-ului, in format YYYY-MM-DD, intre 1970-01-01 si 9999-12-31.

currencystring

Moneda documentului de achizitie. Campurile ...InDocumentCurrency sunt in aceasta moneda.

precision2 | 3 | 4

Numarul de zecimale folosit pentru preturi. Se trimite ca numar intreg - 2, nu 2.0.

exchangeRatenumber

Cati lei valoreaza o unitate din currency (5 = 1 EUR = 5 RON). Obligatoriu pentru alte monede decat RON. Pentru RON se poate omite sau se trimite 1.

mentionsstring

Mentiuni afisate pe document.

observationsstring

Observatii vizibile doar in contul SmartBill, nu apar pe document.

committeestring

Comisia de receptie.

supplierIdstring required

ID-ul furnizorului, din Furnizori.

Example request

{
  "status": "draft",
  "seriesName": "NIR",
  "issueDate": "2026-09-16",
  "currency": "EUR",
  "precision": 2,
  "exchangeRate": 5,
  "mentions": "Receptie conform facturii furnizorului",
  "observations": "Marfa verificata la descarcare",
  "committee": "Comisia de receptie",
  "supplierId": "sup_01a0d9032d8c782d91ddf1d151aec44c",
  "acquisition": {
    "type": "Invoice",
    "number": "FACT123",
    "issueDate": "2026-09-18",
    "dueDate": "2026-10-18",
    "totalWithVatInDocumentCurrency": 1210,
    "totalVatInDocumentCurrency": 210,
    "delegateName": "Ion Popescu",
    "delegateVehicleRegistration": "B-123-ABC"
  },
  "products": [
    {
      "name": "Example product",
      "code": "PROD-001",
      "measuringUnitName": "buc",
      "documentQuantity": 10,
      "receivedQuantity": 10,
      "purchasePriceWithoutVatInDocumentCurrency": 100,
      "sellingPriceWithoutVatInRON": 615,
      "destinationWarehouseId": "ware_01a0d9042da672d58723cba68ab04d8b",
      "purchaseVatRateId": "vat_01a0af2cdabd7c39a0750098e11b9960",
      "sellingVatRateId": "vat_01a0af2cdabd7c39a0750098e11b9960"
    }
  ]
}

Response

NIR creat ca ciorna. number este gol pana la finalizarea NIR-ului.

idstring

ID unic NIR

status'active' | 'draft' | 'annulled'

Starea NIR-ului

seriesNamestring

Denumirea seriei NIR

numberstring

Numarul NIR-ului. Gol ("") la o ciorna nenumerotata. Trebuie tratat ca text, nu ca numar.

issueDatestring date

Data NIR-ului

currencystring

Moneda documentului

precisioninteger

Precizia documentului pentru preturi si totaluri, in zecimale

exchangeRatenumber

Cursul in RON pentru o unitate din moneda documentului, cu maximum 6 zecimale

mentionsstring

Mentiuni; "" daca nu sunt completate

observationsstring

Observatii; "" daca nu sunt completate

committeestring

Comisia de receptie; "" daca nu e completata

totalWithoutVatCalculatedInDocumentCurrencynumber

Total calculat fara TVA, in moneda documentului

totalWithVatCalculatedInDocumentCurrencynumber

Total calculat cu TVA, in moneda documentului

totalVatCalculatedInDocumentCurrencynumber

TVA total calculat, in moneda documentului

Example response

{
  "id": "gr_019f0000000070008000000000000004",
  "status": "active",
  "seriesName": "NIR",
  "number": "1024",
  "issueDate": "2026-09-29",
  "currency": "RON",
  "precision": 2,
  "exchangeRate": 1,
  "mentions": "Receptie conform facturii furnizorului",
  "committee": "Comisia de receptie",
  "totalWithoutVatCalculatedInDocumentCurrency": 1000,
  "totalWithVatCalculatedInDocumentCurrency": 1210,
  "totalVatCalculatedInDocumentCurrency": 210,
  "supplier": {
    "name": "Furnizor Exemplu SRL",
    "vatCode": "RO44444444",
    "regCom": "J40/9999/2021",
    "code": "FURN003",
    "address": "Str. Exemplu 10",
    "city": "Bucuresti",
    "county": "Bucuresti",
    "country": "Romania",
    "bank": "Banca Exemplu",
    "iban": "RO49AAAA1B31007593840000",
    "email": "supplier@example.com",
    "contact": "Maria Ionescu",
    "phone": "0722000003",
    "isVatPayer": true
  },
  "acquisition": {
    "type": "Invoice",
    "number": "FACT123",
    "issueDate": "2026-09-18",
    "dueDate": "2026-10-18",
    "totalWithVatInDocumentCurrency": 1210,
    "totalVatInDocumentCurrency": 210,
    "delegateName": "Ion Popescu",
    "delegateVehicleRegistration": "B-123-ABC"
  },
  "products": [
    {
      "name": "Produs exemplu",
      "code": "PROD-001",
      "measuringUnitName": "buc",
      "documentQuantity": 10,
      "receivedQuantity": 10,
      "purchasePriceWithoutVatInDocumentCurrency": 100,
      "purchasePriceWithVatInDocumentCurrency": 121,
      "purchasePriceWithoutVatInRON": 100,
      "purchasePriceWithVatInRON": 121,
      "sellingPriceWithoutVatInRON": 150,
      "sellingPriceWithVatInRON": 181.5,
      "destinationWarehouseId": "ware_019f0000000070008000000000000002",
      "purchaseVatRateId": "vat_019f0000000070008000000000000003",
      "sellingVatRateId": "vat_019f0000000070008000000000000003"
    }
  ]
}

Changes