Raw schema
{
"type": "object",
"properties": {
"cif": {
"type": "string",
"pattern": "^[A-Za-z0-9]{2,20}$",
"description": "CIF of YOUR company in Oblio (from oblio_list_companies), for example RO37311090."
},
"client": {
"description": "The client. Required unless reference_document is given (then Oblio takes it from the referenced document).",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "Client name (person) or company name."
},
"cif": {
"description": "Company CIF or the person's CNP.",
"type": "string",
"maxLength": 40
},
"rc": {
"description": "Trade register number.",
"type": "string",
"maxLength": 60
},
"code": {
"description": "Your client code.",
"type": "string",
"maxLength": 60
},
"address": {
"type": "string",
"maxLength": 500
},
"state": {
"description": "County (judet).",
"type": "string",
"maxLength": 100
},
"city": {
"type": "string",
"maxLength": 100
},
"country": {
"type": "string",
"maxLength": 100
},
"iban": {
"type": "string",
"maxLength": 60
},
"bank": {
"type": "string",
"maxLength": 100
},
"email": {
"type": "string",
"maxLength": 254
},
"phone": {
"type": "string",
"maxLength": 40
},
"contact": {
"description": "Contact person.",
"type": "string",
"maxLength": 200
},
"vat_payer": {
"description": "Whether the client is a VAT payer.",
"type": "boolean"
},
"save": {
"description": "true = update this client's saved data in Oblio. Default false (the document uses the data, the client record is not changed).",
"type": "boolean"
},
"autocomplete": {
"description": "true = fill the data of a Romanian company from its CIF automatically.",
"type": "boolean"
}
},
"required": [
"name"
]
},
"series_name": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"description": "Document series name (from oblio_list_series), for example FCT."
},
"products": {
"description": "1-200 lines: products/services (name + price) or discounts (name + discount). Required unless reference_document is given.",
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"price": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"description": "Unit price."
},
"code": {
"description": "Product code.",
"type": "string",
"maxLength": 60
},
"description": {
"type": "string",
"maxLength": 2000
},
"measuring_unit": {
"description": "Unit of measure (default \"buc\").",
"type": "string",
"maxLength": 30
},
"currency": {
"description": "Currency of the line when it differs from the document's.",
"type": "string",
"pattern": "^[A-Za-z]{3}$"
},
"exchange_rate": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000
},
"vat_name": {
"description": "VAT rate name from oblio_list_vat_rates, for example \"Normala\".",
"type": "string",
"maxLength": 60
},
"vat_percentage": {
"description": "VAT percentage from oblio_list_vat_rates, for example 19.",
"type": "number",
"minimum": 0,
"maximum": 100
},
"vat_included": {
"description": "true (default) = price already includes VAT.",
"type": "boolean"
},
"quantity": {
"description": "Quantity (default 1).",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000
},
"product_type": {
"type": "string",
"enum": [
"Marfa",
"Materii prime",
"Materiale consumabile",
"Semifabricate",
"Produs finit",
"Produs rezidual",
"Produse agricole",
"Animale si pasari",
"Ambalaje",
"Obiecte de inventar",
"Serviciu"
]
},
"management": {
"description": "Stock management name (only with stock enabled, not for services).",
"type": "string",
"maxLength": 100
},
"save_price": {
"description": "true = also store this price as the product's list price in Oblio. Default false.",
"type": "boolean"
}
},
"required": [
"name",
"price"
]
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "Text shown next to the discount."
},
"discount": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Discount value."
},
"discount_type": {
"description": "procentual (percent) or valoric (amount, default).",
"type": "string",
"enum": [
"procentual",
"valoric"
]
},
"discount_all_above": {
"description": "true = applies to all lines above that have no discount yet; false (default) = only the line directly above.",
"type": "boolean"
}
},
"required": [
"name",
"discount"
]
}
]
}
},
"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 code from oblio_list_languages (default \"RO\").",
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"currency": {
"description": "Document currency (default \"RON\").",
"type": "string",
"pattern": "^[A-Za-z]{3}$"
},
"exchange_rate": {
"description": "Exchange rate for a foreign-currency document (default: the company's setting).",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000
},
"precision": {
"description": "Decimals, 2 to 4 (default 2).",
"type": "integer",
"minimum": 2,
"maximum": 4
},
"issuer_name": {
"description": "Prepared by (intocmit de).",
"type": "string",
"maxLength": 100
},
"internal_note": {
"description": "Internal note, not visible to the client.",
"type": "string",
"maxLength": 1000
},
"mentions": {
"description": "Mentions printed on the document.",
"type": "string",
"maxLength": 2000
},
"order_number": {
"description": "Order number (BT-13).",
"type": "string",
"maxLength": 100
},
"work_station": {
"description": "Work point (only with stock enabled; default \"Sediu\").",
"type": "string",
"maxLength": 100
},
"idempotency_key": {
"type": "string",
"minLength": 8,
"maxLength": 64,
"pattern": "^[A-Za-z0-9._:-]+$",
"description": "REQUIRED unique key for this invoice (for example a UUID) so Oblio drops a duplicate of the same request."
},
"delivery_date": {
"description": "Delivery date yyyy-mm-dd.",
"type": "string"
},
"collect_date": {
"description": "Collection date yyyy-mm-dd.",
"type": "string"
},
"reference_document": {
"description": "Base the invoice on a proforma or notice, or reverse an invoice.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Factura",
"Proforma",
"Aviz"
],
"description": "Type of the document this invoice is based on."
},
"series_name": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"number": {
"type": "string",
"pattern": "^\\d{1,12}$",
"description": "Document number within the series, digits only (0055 and 55 are the same)."
},
"refund": {
"description": "For a Factura reference (storno): also delete the collection tied to the reversed invoice.",
"type": "boolean"
}
},
"required": [
"type",
"series_name",
"number"
]
},
"collect": {
"description": "Record the payment together with the invoice.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Chitanta",
"Bon fiscal",
"Bon fiscal card",
"Alta incasare numerar",
"Ordin de plata",
"Mandat postal",
"Card",
"CEC",
"Bilet ordin",
"Alta incasare banca",
"Ramburs"
],
"description": "How the payment was received."
},
"receipt_series_name": {
"description": "Receipt series name; required when type is Chitanta.",
"type": "string",
"maxLength": 40
},
"document_number": {
"description": "Payment document number (for example the bank order number); required unless type is Chitanta.",
"type": "string",
"maxLength": 60
},
"value": {
"description": "Amount collected (default: the invoice total).",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000
},
"issue_date": {
"description": "Collection date yyyy-mm-dd (default today).",
"type": "string"
},
"mentions": {
"type": "string",
"maxLength": 500
}
},
"required": [
"type"
]
},
"use_stock": {
"description": "Take the goods out of stock (only with stock enabled).",
"type": "boolean"
},
"confirm": {
"description": "Must be true. Set it only after the user has confirmed this exact action in this conversation.",
"type": "boolean"
}
},
"required": [
"cif",
"series_name",
"idempotency_key"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}