Raw schema
{
"type": "object",
"properties": {
"series_name": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Document series name exactly as configured in SmartBill Cloud (smartbill_list_series lists them)."
},
"client": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "Client name (company or person)."
},
"vat_code": {
"description": "Client CUI/CIF or foreign VAT code.",
"type": "string",
"maxLength": 30
},
"is_tax_payer": {
"description": "Client is a VAT payer (default false: stored as non-payer).",
"type": "boolean"
},
"reg_com": {
"description": "Trade register number.",
"type": "string",
"maxLength": 50
},
"address": {
"type": "string",
"maxLength": 255
},
"city": {
"description": "City. When county is Bucuresti this must be Sector 1 - Sector 6, or e-Factura will not validate in SPV.",
"type": "string",
"maxLength": 100
},
"county": {
"description": "County (or region/state for foreign clients).",
"type": "string",
"maxLength": 100
},
"country": {
"description": "Country name or usual code (default Romania).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"email": {
"type": "string",
"maxLength": 254
},
"phone": {
"type": "string",
"maxLength": 50
},
"contact": {
"description": "Contact person.",
"type": "string",
"maxLength": 100
},
"iban": {
"type": "string",
"maxLength": 50
},
"bank": {
"type": "string",
"maxLength": 100
},
"save_to_db": {
"description": "Also save the client in the SmartBill client list when new (default false).",
"type": "boolean"
}
},
"required": [
"name"
],
"description": "The client the document is issued to."
},
"products": {
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "Product or service name."
},
"code": {
"description": "Product code (SKU); required when the account has \"use product code\" enabled.",
"type": "string",
"maxLength": 100
},
"description": {
"description": "Extra description.",
"type": "string",
"maxLength": 1000
},
"is_service": {
"description": "True for a service.",
"type": "boolean"
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000,
"description": "Quantity, greater than 0 (the API itself accepts 0 and negatives; this server does not)."
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Unit of measure as configured in SmartBill, e.g. buc, ora, kg."
},
"price": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Unit price: WITHOUT VAT unless is_tax_included is true."
},
"is_tax_included": {
"description": "The price already includes VAT (default false).",
"type": "boolean"
},
"tax_name": {
"description": "VAT rate name as in the account (smartbill_list_taxes), e.g. Normala.",
"type": "string",
"maxLength": 100
},
"tax_percentage": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "VAT percentage of the line, e.g. 21, 11, 0."
}
},
"required": [
"name",
"quantity",
"unit",
"price",
"tax_percentage"
]
},
"description": "1-200 lines."
},
"currency": {
"description": "Document currency (default RON).",
"type": "string",
"enum": [
"RON",
"EUR",
"USD",
"GBP",
"CAD",
"AUD",
"CHF",
"TRY",
"CZK",
"DKK",
"HUF",
"MDL",
"SEK",
"NOK",
"JPY",
"EGP",
"PLN",
"RUB",
"AED",
"BRL",
"CNY",
"HRK",
"INR",
"KRW",
"MXN",
"NZD",
"RSD",
"THB",
"UAH",
"XDR",
"ZAR"
]
},
"exchange_rate": {
"description": "Exchange rate to RON (default: SmartBill's rate for the date).",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000
},
"issue_date": {
"description": "Issue date yyyy-mm-dd (default today).",
"type": "string"
},
"due_date": {
"description": "Due date yyyy-mm-dd.",
"type": "string"
},
"language": {
"description": "Document language (default RO).",
"type": "string",
"enum": [
"RO",
"EN",
"DE",
"FR",
"IT",
"ES"
]
},
"observations": {
"description": "Observations shown on the document.",
"type": "string",
"maxLength": 2000
},
"mentions": {
"description": "Mentions shown on the document.",
"type": "string",
"maxLength": 2000
},
"draft": {
"description": "Default TRUE: the document is saved as a draft without a number, to be finalized in SmartBill Cloud. Pass false ONLY when the user explicitly wants it ISSUED now: that takes the next number of the series, cannot be undone from the API, and may be transmitted to e-Factura / ANAF depending on the account setup.",
"type": "boolean"
}
},
"required": [
"series_name",
"client",
"products"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}