POST
/
invoices
Create an invoice
curl --request POST \
  --url https://api.contazen.ro/v1/invoices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "client_id": "<string>",
  "client_data": {
    "type": "b2b",
    "name": "<string>",
    "email": "jsmith@example.com",
    "phone": "<string>",
    "cui": "<string>",
    "rc": "<string>",
    "address": "<string>",
    "city": "<string>",
    "county": "<string>",
    "country": "RO",
    "postal_code": "<string>",
    "iban": "<string>",
    "bank": "<string>",
    "contact_person": "<string>"
  },
  "series_id": "<string>",
  "date": "2023-12-25",
  "due_date": "2023-12-25",
  "currency": "RON",
  "currency_rate": 123,
  "document_type": "fiscal",
  "is_draft": 0,
  "efactura_enabled": 1,
  "spv_environment": "test",
  "with_vat_inverted": 0,
  "payment_method": "<string>",
  "payment_type": "<string>",
  "payment_installments": 123,
  "send_email": false,
  "email_address": "jsmith@example.com",
  "with_delegate": 0,
  "delegate": {
    "delegate_name": "<string>",
    "delegate_ci": "<string>",
    "delegate_transport": "<string>",
    "delegate_date": "2023-12-25",
    "delegate_time": "<string>"
  },
  "info": "<string>",
  "observations": "<string>",
  "notes": "<string>",
  "items": [
    {
      "product_czuid": "<string>",
      "description": "<string>",
      "description_extended": "<string>",
      "quantity": 1.01,
      "price": 123,
      "vat_rate": 19,
      "vat_key": 123,
      "unit": "buc",
      "ubl_um": "<string>",
      "ubl_nc": "<string>",
      "ubl_cpv": "<string>",
      "save_as_product": false
    }
  ]
}'
{
  "success": true,
  "data": {
    "id": "inv_1a2b3c4d5e",
    "object": "invoice",
    "number": "<string>",
    "series": "<string>",
    "full_number": "<string>",
    "date": "2023-12-25",
    "due_date": "2023-12-25",
    "client_id": "<string>",
    "client": {
      "id": "cli_1a2b3c4d5e",
      "object": "client",
      "name": "<string>",
      "type": "company",
      "email": "jsmith@example.com",
      "phone": "<string>",
      "cui": "<string>",
      "cui_prefix": "RO",
      "rc": "<string>",
      "address": "<string>",
      "city": "<string>",
      "county": "<string>",
      "country": "RO",
      "postal_code": "<string>",
      "iban": "<string>",
      "bank_name": "<string>",
      "contact_person": "<string>",
      "notes": "<string>",
      "is_active": true,
      "is_firm": true,
      "created_at": "2023-11-07T05:31:56Z",
      "modified_at": "2023-11-07T05:31:56Z"
    },
    "currency": "RON",
    "exchange_rate": 123,
    "subtotal": 123,
    "vat_amount": 123,
    "total": 123,
    "subtotal_ron": 123,
    "vat_amount_ron": 123,
    "total_ron": 123,
    "items": [
      {
        "id": 123,
        "product_id": "<string>",
        "description": "<string>",
        "description_extended": "<string>",
        "quantity": 123,
        "price": 123,
        "vat_rate": 19,
        "vat_key": 123,
        "unit": "buc",
        "ubl_um": "H87",
        "ubl_nc": "<string>",
        "ubl_cpv": "<string>",
        "subtotal": 123,
        "vat_amount": 123,
        "total": 123,
        "save_as_product": true
      }
    ],
    "payments": [
      {
        "id": "<string>",
        "amount": 123,
        "payment_date": "2023-12-25",
        "payment_method": "<string>",
        "observations": "<string>",
        "created_at": "2023-11-07T05:31:56Z"
      }
    ],
    "is_paid": true,
    "paid_at": "2023-12-25",
    "is_void": true,
    "voided_at": "2023-11-07T05:31:56Z",
    "void_reason": "<string>",
    "is_draft": true,
    "is_storno": true,
    "storno_for": "<string>",
    "document_type": "fiscal",
    "payment_method": "<string>",
    "notes": "<string>",
    "observations": "<string>",
    "efactura_enabled": true,
    "efactura_status": "pending",
    "efactura_submission_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "modified_at": "2023-11-07T05:31:56Z"
  },
  "meta": {
    "version": "v1",
    "request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "response_time": "23.45ms"
  }
}

Authorizations

Authorization
string
header
required

Use your API key (sk_live_xxx or sk_test_xxx)

Body

application/json
client_id
string
required

Existing client CzUid (required if client_data not provided)

items
object[]
required
Minimum length: 1
client_data
object

Inline client creation (required if client_id not provided)

series_id
string

Invoice series CzUid

date
string<date>

Invoice date (defaults to today)

due_date
string<date>

Payment due date

currency
string
default:RON
currency_rate
number

Exchange rate to RON (required for foreign currency)

document_type
enum<string>
default:fiscal
Available options:
fiscal,
proforma,
receipt
is_draft
enum<integer>
default:0

1 to save as draft without invoice number

Available options:
0,
1
efactura_enabled
enum<integer>
default:1

Whether to submit to e-Factura (Romanian e-invoicing)

Available options:
0,
1
spv_environment
enum<string>

e-Factura environment (test for SPV testing)

Available options:
test,
live
with_vat_inverted
enum<integer>
default:0

1 for reverse charge (taxare inversă)

Available options:
0,
1
payment_method
string
payment_type
string
payment_installments
integer
send_email
boolean
default:false

Automatically send invoice by email after creation

email_address
string<email>

Override recipient email (uses client email if not specified)

with_delegate
enum<integer>

Include delegate information

Available options:
0,
1
delegate
object
info
string

Additional invoice information

observations
string

Internal notes

notes
string

Customer-visible notes

Response

Invoice created

success
boolean
data
object
meta
object