Raw schema
{
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": [
"test",
"production"
],
"description": "SRI environment. \"test\" (default) = ambiente 1, a sandbox invoice with NO fiscal/legal effect. \"production\" = ambiente 2, a REAL invoice transmitted to the SRI. You must set this to \"production\" explicitly to bill a real customer."
},
"emisor_ruc": {
"type": "string",
"description": "Your company RUC — exactly 13 digits (cédula + 001). REQUIRED. This is the issuing taxpayer registered in your Datil account."
},
"emisor_razon_social": {
"type": "string",
"description": "Your company legal name (razón social). REQUIRED."
},
"emisor_direccion": {
"type": "string",
"description": "Your establishment (matriz) street address. REQUIRED by the SRI."
},
"emisor_nombre_comercial": {
"type": "string",
"description": "Your trade name (nombre comercial). Optional; defaults to the razón social."
},
"establecimiento": {
"type": "string",
"description": "Establishment code, 3 digits (e.g. \"001\"). Default \"001\"."
},
"punto_emision": {
"type": "string",
"description": "Emission point code, 3 digits (e.g. \"001\"). Default \"001\"."
},
"secuencial": {
"type": "string",
"description": "Sequential invoice number (1–999999999) for this establecimiento/punto_emision. REQUIRED and must be unique/monotonic — you manage it (the SRI rejects duplicates)."
},
"obligado_contabilidad": {
"type": "string",
"enum": [
"SI",
"NO"
],
"description": "Whether you are required to keep accounting records. Default \"NO\"."
},
"customer_identification": {
"type": "string",
"description": "Buyer ID number. For a RUC use 13 digits, cédula 10 digits, passport free text. Optional — defaults to the generic final consumer 9999999999999."
},
"customer_identification_type": {
"type": "string",
"enum": [
"cedula",
"ruc",
"pasaporte",
"consumidor_final"
],
"description": "Buyer ID type (SRI codes: cedula=05, ruc=04, pasaporte=06, consumidor_final=07). Default consumidor_final."
},
"customer_name": {
"type": "string",
"description": "Buyer name / razón social. Default \"CONSUMIDOR FINAL\"."
},
"customer_email": {
"type": "string",
"description": "Buyer email (Datil emails them the invoice if provided). Optional."
},
"customer_address": {
"type": "string",
"description": "Buyer address. Optional."
},
"customer_phone": {
"type": "string",
"description": "Buyer phone. Optional."
},
"currency": {
"type": "string",
"description": "Currency label sent to the SRI. Default \"DOLAR\" (Ecuador uses USD)."
},
"payment_method": {
"type": "string",
"description": "SRI forma de pago code (tabla 24), e.g. \"01\" cash, \"16\" debit card, \"19\" credit card, \"20\" other via financial system. Default \"01\"."
},
"items": {
"type": "array",
"minItems": 1,
"description": "Line items. Each: description, price (NET unit price in USD), optional quantity (default 1), optional tax_rate (15 or 0; default 15).",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Item description (descripcion)."
},
"price": {
"type": "number",
"description": "NET unit price in USD (2 decimals). IVA is added on top."
},
"quantity": {
"type": "number",
"description": "Default 1."
},
"tax_rate": {
"type": "number",
"enum": [
0,
15
],
"description": "IVA rate for this item: 15 (default) or 0 (exempt/zero-rated)."
}
},
"required": [
"description",
"price"
]
}
}
},
"required": [
"emisor_ruc",
"emisor_razon_social",
"emisor_direccion",
"secuencial",
"items"
]
}