FE-NC

mail@pastecode.io avatar
unknown
json
a year ago
54 kB
1
Indexable
Never
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Nota de Crédito Electrónica",
    "type": "object",
    "properties": {
        "identificacion" : {
            "description" : "Identificación",
            "type" : "object",
            "properties" : {
                "version" : {
                    "type" : "integer",
                    "description" : "Versión",
                    "const" : 3
                },
                "ambiente" : {
                    "type" : "string",
                    "description" : "Ambiente de destino",
                    "enum" : [
                        "00",
                        "01"
                    ]
                },
                "tipoDte" : {
                    "type" : "string",
                    "description" : "Tipo de Documento",
                    "const" : "05"
                },
                "numeroControl" : {
                    "type" : "string",
                    "description" : "Número de Control",
                    "maxLength" : 31,
                    "minLength" : 31,
                    "pattern" : "^DTE-05-[A-Z0-9]{8}-[0-9]{15}$"
                },
                "codigoGeneracion" : {
                    "type" : "string",
                    "description" : "Código de Generación",
                    "maxLength" : 36,
                    "minLength" : 36,
                    "pattern" : "^[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}$"
                },
                "tipoModelo" : {
                    "type" : "number",
                    "description" : "Modelo de Facturación",
                    "enum" : [
                        1,
                        2
                    ]
                },
                "tipoOperacion" : {
                    "type" : "integer",
                    "description" : "Tipo de Transmisión",
                    "enum" : [
                        1,
                        2
                    ]
                },
                "tipoContingencia" : {
                    "description" : "Tipo de Contingencia",
                    "type" : [
                        "integer",
                        "null"
                    ],
                    "enum" : [
                        null,
                        1,
                        2,
                        3,
                        4,
                        5
                    ]
                },
                "motivoContin" : {
                    "description" : "Motivo de Contingencia",
                    "type" : [
                        "string",
                        "null"
                    ],
                    "maxLength" : 150,
                    "minLength" : 1
                },
                "fecEmi" : {
                    "type" : "string",
                    "description" : "Fecha de Generación",
                    "format" : "date"
                },
                "horEmi" : {
                    "type" : "string",
                    "description" : "Hora de Generación",
                    "pattern" : "^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]?$"
                },
                "tipoMoneda" : {
                    "type" : "string",
                    "description" : "Tipo de Moneda",
                    "enum" : [
                        "USD"
                    ]
                }
            },
            "allOf" : [
                {
                    "if" : {
                        "properties" : {
                            "tipoOperacion" : {
                                "const" : 1
                            }
                        }
                    },
                    "then" : {
                        "properties" : {
                            "tipoModelo" : {
                                "const" : 1
                            },
                            "tipoContingencia" : {
                                "type" : "null"
                            },
                            "motivoContin" : {
                                "type" : "null"
                            }
                        }
                    },
                    "else" : {
                        "properties" : {
                            "tipoModelo" : {
                                "enum" : [
                                    2
                                ]
                            }
                        }
                    }
                },
                {
                    "if" : {
                        "properties" : {
                            "tipoOperacion" : {
                                "const" : 2
                            }
                        }
                    },
                    "then" : {
                        "properties" : {
                            "tipoContingencia" : {
                                "type" : "integer"
                            }
                        }
                    }
                },
                {
                    "if" : {
                        "properties" : {
                            "tipoContingencia" : {
                                "const" : 5
                            }
                        }
                    },
                    "then" : {
                        "properties" : {
                            "motivoContin" : {
                                "type" : "string"
                            }
                        }
                    }
                }
            ],
            "additionalProperties" : false,
            "required" : [
                "version",
                "ambiente",
                "tipoDte",
                "numeroControl",
                "codigoGeneracion",
                "tipoModelo",
                "tipoOperacion",
                "tipoContingencia",
                "motivoContin",
                "fecEmi",
                "horEmi",
                "tipoMoneda"
            ]
        },
        "documentoRelacionado" : {
            "description" : "Documentos Relacionados",
            "type" : "array",
            "items" : {
                "type" : "object",
                "properties" : {
                    "tipoDocumento" : {
                        "type" : "string",
                        "description" : "Tipo de Documento Tributario Relacionado",
                        "enum" : [
                            "03",
                            "07"
                        ]
                    },
                    "tipoGeneracion" : {
                        "type" : "integer",
                        "description" : "Tipo de Generación del Documento Tributario relacionado",
                        "enum" : [
                            1,
                            2
                        ]
                    },
                    "numeroDocumento" : {
                        "description" : "Número de documento relacionado",
                        "type" : "string",
                        "minLength" : 1,
                        "maxLength" : 36
                    },
                    "fechaEmision" : {
                        "description" : "Fecha de Generación del Documento Relacionado",
                        "type" : "string",
                        "format" : "date"
                    }
                },
                "allOf" : [
                    {
                        "if" : {
                            "properties" : {
                                "tipoGeneracion" : {
                                    "const" : 2
                                }
                            }
                        },
                        "then" : {
                            "properties" : {
                                "numeroDocumento" : {
                                    "pattern" : "^[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}$"
                                }
                            }
                        }
                    }
                ],
                "additionalProperties" : false,
                "required" : [
                    "tipoDocumento",
                    "tipoGeneracion",
                    "numeroDocumento",
                    "fechaEmision"
                ]
            },
            "minItems" : 1,
            "maxItems" : 50
        },
        "emisor" : {
            "type" : "object",
            "description" : "Emisor",
            "properties" : {
                "nit" : {
                    "description" : "NIT (Emisor)",
                    "type" : "string",
                    "pattern" : "^([0-9]{14}|[0-9]{9})$"
                },
                "nrc" : {
                    "description" : "NRC (Emisor)",
                    "type" : "string",
                    "pattern" : "^[0-9]{1,8}$"
                },
                "nombre" : {
                    "type" : "string",
                    "description" : "Nombre, denominación o razón social del contribuyente (Emisor)",
                    "maxLength" : 200,
                    "minLength" : 3
                },
                "codActividad" : {
                    "type" : "string",
                    "description" : "Código de Actividad Económica (Emisor)",
                    "pattern" : "^[0-9]{2,6}$"
                },
                "descActividad" : {
                    "type" : "string",
                    "description" : "Actividad Económica (Emisor)",
                    "maxLength" : 150,
                    "minLength" : 1
                },
                "nombreComercial" : {
                    "description" : "Nombre Comercial (Emisor)",
                    "type" : [
                        "string",
                        "null"
                    ],
                    "maxLength" : 150,
                    "minLength" : 1
                },
                "tipoEstablecimiento" : {
                    "type" : "string",
                    "description" : "Tipo de establecimiento (Emisor)",
                    "enum" : [
                        "01",
                        "02",
                        "04",
                        "07",
                        "20"
                    ]
                },
                "direccion" : {
                    "type" : "object",
                    "description" : "Dirección (Emisor)",
                    "properties" : {
                        "departamento" : {
                            "type" : "string",
                            "description" : "Dirección Departamento (Emisor)",
                            "pattern" : "^0[1-9]|1[0-4]$"
                        },
                        "municipio" : {
                            "type" : "string",
                            "description" : "Dirección Municipio (Emisor)",
                            "pattern" : "^[0-9]{2}$"
                        },
                        "complemento" : {
                            "type" : "string",
                            "description" : "Dirección complemento (Emisor)",
                            "maxLength" : 200,
                            "minLength" : 1
                        }
                    },
                    "allOf" : [
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "01"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-2]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "enum" : [
                                            "02",
                                            "10"
                                        ]
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-3]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "enum" : [
                                            "03",
                                            "07"
                                        ]
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-6]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "04"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|[12][0-9]|3[0-3]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "enum" : [
                                            "05",
                                            "08"
                                        ]
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]|2[0-2]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "06"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "09"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "11"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]|2[0-3]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "12"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]|20$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "13"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]|2[0-6]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "14"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-8]$"
                                    }
                                }
                            }
                        }
                    ],
                    "additionalProperties" : false,
                    "required" : [
                        "departamento",
                        "municipio",
                        "complemento"
                    ]
                },
                "telefono" : {
                    "type" : "string",
                    "description" : "Teléfono (Emisor)",
                    "minLength" : 8,
                    "maxLength" : 30
                },
                "correo" : {
                    "type" : "string",
                    "description" : "Correo electrónico (Emisor)",
                    "format" : "email",
                    "maxLength" : 100,
                    "minLength" : 3
                }
            },
            "additionalProperties" : false,
            "required" : [
                "nit",
                "nrc",
                "nombre",
                "codActividad",
                "descActividad",
                "nombreComercial",
                "tipoEstablecimiento",
                "telefono",
                "correo",
                "direccion"
            ]
        },
        "receptor" : {
            "type" : "object",
            "description" : "Receptor",
            "properties" : {
                "nit" : {
                    "type" : "string",
                    "description" : "NIT (Receptor)",
                    "pattern" : "^([0-9]{14}|[0-9]{9})$"
                },
                "nrc" : {
                    "type" : "string",
                    "description" : "NRC (Receptor)",
                    "pattern" : "^[0-9]{1,8}$"
                },
                "nombre" : {
                    "type" : "string",
                    "description" : "Nombre, denominación o razón social del contribuyente (Receptor)",
                    "maxLength" : 250,
                    "minLength" : 1
                },
                "codActividad" : {
                    "type" : "string",
                    "description" : "Código de Actividad Económica (Receptor)",
                    "pattern" : "^[0-9]{2,6}$"
                },
                "descActividad" : {
                    "type" : "string",
                    "description" : "Actividad Económica (Receptor)",
                    "maxLength" : 150,
                    "minLength" : 1
                },
                "nombreComercial" : {
                    "description" : "Nombre Comercial (Receptor)",
                    "type" : [
                        "string",
                        "null"
                    ],
                    "maxLength" : 150,
                    "minLength" : 1
                },
                "direccion" : {
                    "type" : "object",
                    "description" : "Dirección (Receptor)",
                    "properties" : {
                        "departamento" : {
                            "type" : "string",
                            "description" : "Dirección: Departamento (Receptor)",
                            "pattern" : "^0[1-9]|1[0-4]$"
                        },
                        "municipio" : {
                            "type" : "string",
                            "description" : "Dirección: Municipio (Receptor)",
                            "pattern" : "^[0-9]{2}$"
                        },
                        "complemento" : {
                            "type" : "string",
                            "description" : "Dirección: complemento (Receptor)",
                            "maxLength" : 200,
                            "minLength" : 1
                        }
                    },
                    "allOf" : [
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "01"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-2]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "enum" : [
                                            "02",
                                            "10"
                                        ]
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-3]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "enum" : [
                                            "03",
                                            "07"
                                        ]
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-6]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "04"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|[12][0-9]|3[0-3]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "enum" : [
                                            "05",
                                            "08"
                                        ]
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]|2[0-2]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "06"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "09"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "11"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]|2[0-3]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "12"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]|20$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "13"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-9]|2[0-6]$"
                                    }
                                }
                            }
                        },
                        {
                            "if" : {
                                "properties" : {
                                    "departamento" : {
                                        "const" : "14"
                                    }
                                }
                            },
                            "then" : {
                                "properties" : {
                                    "municipio" : {
                                        "pattern" : "^0[1-9]|1[0-8]$"
                                    }
                                }
                            }
                        }
                    ],
                    "additionalProperties" : false,
                    "required" : [
                        "departamento",
                        "municipio",
                        "complemento"
                    ]
                },
                "telefono" : {
                    "type" : [
                        "string",
                        "null"
                    ],
                    "description" : "Teléfono (Receptor)",
                    "minLength" : 8,
                    "maxLength" : 30
                },
                "correo" : {
                    "type" : "string",
                    "description" : "Correo electrónico (Receptor)",
                    "format" : "email",
                    "maxLength" : 100
                }
            },
            "additionalProperties" : false,
            "required" : [
                "nit",
                "nrc",
                "nombre",
                "codActividad",
                "descActividad",
                "nombreComercial",
                "direccion",
                "telefono",
                "correo"
            ]
        },
        "ventaTercero" : {
            "description" : "Ventas por cuenta de terceros",
            "type" : [
                "object",
                "null"
            ],
            "properties" : {
                "nit" : {
                    "type" : "string",
                    "description" : "NIT por cuenta de Terceros",
                    "pattern" : "^([0-9]{14}|[0-9]{9})$"
                },
                "nombre" : {
                    "type" : "string",
                    "description" : "Nombre, denominación o razón social del Tercero",
                    "maxLength" : 200,
                    "minLength" : 3
                }
            },
            "additionalProperties" : false,
            "required" : [
                "nit",
                "nombre"
            ]
        },
        "cuerpoDocumento" : {
            "type" : "array",
            "description" : "Cuerpo del Documento",
            "items" : {
                "type" : "object",
                "properties" : {
                    "numItem" : {
                        "type" : "integer",
                        "description" : "N° de ítem",
                        "minimum" : 1,
                        "maximum" : 2000
                    },
                    "tipoItem" : {
                        "type" : "integer",
                        "description" : "Tipo de ítem",
                        "enum" : [
                            1,
                            2,
                            3,
                            4
                        ]
                    },
                    "numeroDocumento" : {
                        "description" : "Número de documento relacionado",
                        "type" : "string",
                        "minLength" : 1,
                        "maxLength" : 36
                    },
                    "cantidad" : {
                        "type" : "number",
                        "description" : "Cantidad",
                        "exclusiveMaximum" : 100000000000,
                        "exclusiveMinimum" : 0,
                        "multipleOf" : 0.00000001
                    },
                    "codigo" : {
                        "description" : "Código",
                        "type" : [
                            "string",
                            "null"
                        ],
                        "maxLength" : 25,
                        "minLength" : 1
                    },
                    "codTributo" : {
                        "description" : "Tributo sujeto a cálculo de IVA",
                        "type" : [
                            "string",
                            "null"
                        ],
                        "enum" : [
                            null,
                            "A8",
                            "57",
                            "90",
                            "D4",
                            "D5",
                            "25",
                            "A6"
                        ],
                        "maxLength" : 2,
                        "minLength" : 2
                    },
                    "uniMedida" : {
                        "type" : "integer",
                        "description" : "Unidad de Medida",
                        "minimum" : 1,
                        "maximum" : 99
                    },
                    "descripcion" : {
                        "description" : "Descripción",
                        "type" : [
                            "string",
                            "null"
                        ],
                        "maxLength" : 1000
                    },
                    "precioUni" : {
                        "type" : "number",
                        "description" : "Precio Unitario",
                        "exclusiveMaximum" : 100000000000,
                        "multipleOf" : 0.00000001
                    },
                    "montoDescu" : {
                        "type" : "number",
                        "description" : "Descuento, Bonificación, Rebajas por ítem",
                        "minimum" : 0,
                        "exclusiveMaximum" : 100000000000,
                        "multipleOf" : 0.00000001
                    },
                    "ventaNoSuj" : {
                        "type" : "number",
                        "description" : "Ventas no Sujetas",
                        "minimum" : 0,
                        "exclusiveMaximum" : 100000000000,
                        "multipleOf" : 0.00000001
                    },
                    "ventaExenta" : {
                        "type" : "number",
                        "description" : "Ventas Exentas",
                        "minimum" : 0,
                        "exclusiveMaximum" : 100000000000,
                        "multipleOf" : 0.00000001
                    },
                    "ventaGravada" : {
                        "type" : "number",
                        "description" : "Ventas Gravadas",
                        "minimum" : 0,
                        "exclusiveMaximum" : 100000000000,
                        "multipleOf" : 0.00000001
                    },
                    "tributos" : {
                        "description" : "Código del Tributo",
                        "type" : [
                            "array",
                            "null"
                        ],
                        "items" : {
                            "type" : "string",
                            "maxLength" : 2,
                            "minLength" : 2
                        },
                        "minItems" : 1,
                        "uniqueItems" : true
                    }
                },
                "allOf" : [
                    {
                        "if" : {
                            "properties" : {
                                "ventaGravada" : {
                                    "maximum" : 0
                                }
                            }
                        },
                        "then" : {
                            "properties" : {
                                "tributos" : {
                                    "type" : "null"
                                }
                            }
                        },
                        "else" : {
                            "properties" : {
                                "tributos" : {
                                    "type" : "array",
                                    "minItems" : 1
                                }
                            }
                        }
                    },
                    {
                        "if" : {
                            "properties" : {
                                "tipoItem" : {
                                    "const" : 4
                                }
                            }
                        },
                        "then" : {
                            "properties" : {
                                "uniMedida" : {
                                    "const" : 99
                                },
                                "codTributo" : {
                                    "type" : "string"
                                },
                                "tributos" : {
                                    "type" : "array",
                                    "items" : {
                                        "const" : "20"
                                    }
                                }
                            }
                        },
                        "else" : {
                            "properties" : {
                                "codTributo" : {
                                    "type" : "null"
                                },
                                "tributos" : {
                                    "items" : {
                                        "enum" : [
                                            "20",
                                            "C3",
                                            "59",
                                            "71",
                                            "D1",
                                            "C8",
                                            "D5",
                                            "D4"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                ],
                "additionalProperties" : false,
                "required" : [
                    "numItem",
                    "tipoItem",
                    "numeroDocumento",
                    "codigo",
                    "codTributo",
                    "descripcion",
                    "cantidad",
                    "uniMedida",
                    "precioUni",
                    "montoDescu",
                    "ventaNoSuj",
                    "ventaExenta",
                    "ventaGravada",
                    "tributos"
                ]
            },
            "minItems" : 1,
            "maxItems" : 2000
        },
        "resumen" : {
            "type" : "object",
            "description" : "Resumen",
            "properties" : {
                "totalNoSuj" : {
                    "type" : "number",
                    "description" : "Total de Operaciones no sujetas",
                    "minimum" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "totalExenta" : {
                    "type" : "number",
                    "description" : "Total de Operaciones exentas",
                    "minimum" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "totalGravada" : {
                    "type" : "number",
                    "description" : "Total de Operaciones Gravadas",
                    "minimum" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "subTotalVentas" : {
                    "type" : "number",
                    "description" : "Suma de operaciones sin impuestos",
                    "exclusiveMonimun" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "descuNoSuj" : {
                    "type" : "number",
                    "description" : "Monto global de Descuento, Bonificación, Rebajas y otros a ventas no sujetas",
                    "exclusiveMaximum" : 100000000000,
                    "minimum" : 0,
                    "multipleOf" : 0.01
                },
                "descuExenta" : {
                    "type" : "number",
                    "description" : "Monto global de Descuento, Bonificación, Rebajas y otros a ventas exentas",
                    "exclusiveMaximum" : 100000000000,
                    "minimum" : 0,
                    "multipleOf" : 0.01
                },
                "descuGravada" : {
                    "type" : "number",
                    "description" : "Monto global de Descuento, Bonificación, Rebajas y otros a ventas gravadas",
                    "exclusiveMaximum" : 100000000000,
                    "minimum" : 0,
                    "multipleOf" : 0.01
                },
                "totalDescu" : {
                    "type" : "number",
                    "description" : "Total del monto de Descuento, Bonificación, Rebajas",
                    "minimum" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "tributos" : {
                    "type" : [
                        "array",
                        "null"
                    ],
                    "uniqueItems":true,
                    "description" : "Resumen de Tributos",
                    "items" : {
                        "type" : "object",
                        "properties" : {
                            "codigo" : {
                                "description" : "Resumen Código de Tributo",
                                "type" : "string",
                                "minLength" : 2,
                                "maxLength" : 2
                            },
                            "descripcion" : {
                                "description" : "Nombre del Tributo",
                                "type" : "string",
                                "minLength" : 2,
                                "maxLength" : 150
                            },
                            "valor" : {
                                "description" : "Valor del Tributo",
                                "type" : "number",
                                "minimum" : 0,
                                "exclusiveMaximum" : 100000000000,
                                "multipleOf" : 0.01
                            }
                        },
                        "additionalProperties" : false,
                        "required" : [
                            "codigo",
                            "descripcion",
                            "valor"
                        ]
                    }
                },
                "subTotal" : {
                    "type" : "number",
                    "description" : "Sub-Total",
                    "minimum" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "ivaPerci1" : {
                    "type" : "number",
                    "description" : "IVA Percibido",
                    "minimum" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "ivaRete1" : {
                    "type" : "number",
                    "description" : "IVA Retenido",
                    "minimum" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "reteRenta" : {
                    "type" : "number",
                    "description" : "Retención Renta",
                    "minimum" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "montoTotalOperacion" : {
                    "type" : "number",
                    "description" : "Monto Total de la Operación",
                    "exclusiveMinimum" : 0,
                    "exclusiveMaximum" : 100000000000,
                    "multipleOf" : 0.01
                },
                "totalLetras" : {
                    "type" : "string",
                    "description" : "Valor en Letras",
                    "maxLength" : 200
                },
                "condicionOperacion" : {
                    "type" : "number",
                    "description" : "Condición de la Operación",
                    "enum" : [
                        1,
                        2,
                        3
                    ]
                }
            },
            "allOf" : [
                {
                    "if" : {
                        "properties" : {
                            "totalGravada" : {
                                "maximum" : 0
                            }
                        }
                    },
                    "then" : {
                        "properties" : {
                            "ivaPerci1" : {
                                "maximum" : 0
                            },
                            "ivaRete1" : {
                                "maximum" : 0
                            }
                        }
                    }
                }
            ],
            "additionalProperties" : false,
            "required" : [
                "totalNoSuj",
                "totalExenta",
                "totalGravada",
                "subTotalVentas",
                "descuNoSuj",
                "descuExenta",
                "descuGravada",
                "totalDescu",
                "tributos",
                "subTotal",
                "ivaPerci1",
                "ivaRete1",
                "reteRenta",
                "montoTotalOperacion",
                "totalLetras",
                "condicionOperacion"
            ]
        },
        "extension" : {
            "type" : ["object","null"],
            "description" : "Extensión",
            "properties" : {
                "nombEntrega" : {
                    "description" : "Nombre del responsable que Genera el DTE",
                    "type" : [
                        "string",
                        "null"
                    ],
                    "maxLength" : 100,
                    "minLength" : 1
                },
                "docuEntrega" : {
                    "description" : "Documento de identificación de quien genera el DTE",
                    "type" : [
                        "string",
                        "null"
                    ],
                    "maxLength" : 25,
                    "minLength" : 1
                },
                "nombRecibe" : {
                    "description" : "Nombre del responsable de la operación por parte del receptor",
                    "type" : [
                        "string",
                        "null"
                    ],
                    "maxLength" : 100,
                    "minLength" : 1
                },
                "docuRecibe" : {
                    "description" : "Documento de identificación del responsable de la operación por parte del receptor",
                    "type" : [
                        "string",
                        "null"
                    ],
                    "maxLength" : 25,
                    "minLength" : 1
                },
                "observaciones" : {
                    "description" : "Observaciones",
                    "type" : [
                        "string",
                        "null"
                    ],
                    "maxLength" : 3000
                }
            },
            "additionalProperties" : false,
            "required" : [
                "nombEntrega",
                "docuEntrega",
                "nombRecibe",
                "docuRecibe",
                "observaciones"
            ]
        },
        "apendice" : {
            "description" : "Apéndice",
            "type" : [
                "array",
                "null"
            ],
            "items" : {
                "type" : "object",
                "properties" : {
                    "campo" : {
                        "type" : "string",
                        "description" : "Nombre del campo",
                        "maxLength" : 25,
                        "minLength" : 2
                    },
                    "etiqueta" : {
                        "type" : "string",
                        "description" : "Descripción",
                        "maxLength" : 50,
                        "minLength" : 3
                    },
                    "valor" : {
                        "type" : "string",
                        "description" : "Valor/Dato",
                        "maxLength" : 150,
                        "minLength" : 1
                    }
                },
                "additionalProperties" : false,
                "required" : [
                    "campo",
                    "etiqueta",
                    "valor"
                ]
            },
            "minItems" : 1,
            "maxItems" : 10
        }
    },
    "additionalProperties" : false,
    "required" : [
        "identificacion",
        "documentoRelacionado",
        "emisor",
        "receptor",
        "ventaTercero",
        "cuerpoDocumento",
        "resumen",
        "extension",
        "apendice"
    ]
}