{
    "openapi": "3.0.0",
    "info": {
        "description": "API REST Facturaci\u00f3n Electr\u00f3nica - APIsPERU. <br /> Si se siente m\u00e1s c\u00f3modo usando Swagger-UI, puede <a target='_blank' href='/doc/swagger/ui'>ingresar aqu\u00ed.</a>",
        "version": "1.3",
        "title": "API DE FACTURACI\u00d3N",
        "contact": {
            "name": "Apisperu",
            "email": "soporte@apisperu.com"
        },
        "x-logo": {
            "url": "/img/logoredoc.png",
            "altText": "Logo APIsPERU"
        }
    },
    "tags": [
        {
            "name": "user",
            "x-displayName": "Usuario",
            "description": "Inicie sesi\u00f3n y obtenga un token para luego proceder a configurar las empresas que emitir\u00e1n electr\u00f3nicamente. La duraci\u00f3n del token es de 24 horas."
        },
        {
            "name": "company",
            "x-displayName": "Empresa",
            "description": "Antes de emitir electr\u00f3nicamente debe configurar correctamente cada empresa, asignarle el certificado y una clave secundaria SUNAT. \n Cada empresa creada generar\u00e1 su propio token que no tiene fecha de caducidad, esto le permite usar ese token sin necesidad de iniciar sesi\u00f3n recurrentemente."
        },
        {
            "name": "invoice",
            "x-displayName": "Factura o Boleta",
            "description": "Realice facturas y boletas electr\u00f3nicas. La estructura es muy similar, solo considerar cambiar el tipoDoc. Puede revisar los ejemplos para mas detalles."
        },
        {
            "name": "note",
            "x-displayName": "Nota de cr\u00e9dito / d\u00e9bito",
            "description": "Nota de cr\u00e9dito / d\u00e9bito"
        },
        {
            "name": "summary",
            "x-displayName": "Resumen diario de boletas",
            "description": "Resumen diario de boletas, por este medio tambi\u00e9n se puede dar de baja a las boletas o a las notas que afectan boletas"
        },
        {
            "name": "voided",
            "x-displayName": "Comunicacion de bajas",
            "description": "La comunicaci\u00f3n de bajas se aplica a las facturas y a las notas que afectan facturas."
        },
        {
            "name": "despatch",
            "x-displayName": "Gu\u00eda de remisi\u00f3n",
            "description": "Gu\u00eda de Remisi\u00f3n. Para usar la nueva versi\u00f3n de las gu\u00edas de remisi\u00f3n necesitar\u00e1 configurar en el portal de SUNAT un client_id y client_secret. Siga este tutorial si no sabe como hacerlo: <a>Generar credenciales Nueva GRE</a> "
        },
        {
            "name": "retention",
            "x-displayName": "Retenci\u00f3n",
            "description": "Comprobante de Retenciones"
        },
        {
            "name": "perception",
            "x-displayName": "Percepci\u00f3n",
            "description": "Comprobante de Percepciones"
        },
        {
            "name": "reversion",
            "x-displayName": "Resumen de reversiones",
            "description": "Comunicacion de Reversiones"
        },
        {
            "name": "sale",
            "x-displayName": "Venta",
            "description": "Ventas en General"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "paths": {
        "/auth/login": {
            "post": {
                "tags": [
                    "user"
                ],
                "summary": "Iniciar Sesi\u00f3n",
                "description": "Una vez <a href=\"https://apisperu.com/servicios/facturacion\" target=\"_blank\">registrado</a> debe iniciar sesi\u00f3n y crear un token.\nCon este token podr\u00e1 emitir electr\u00f3nicamente",
                "operationId": "api_auth_login",
                "requestBody": {
                    "description": "Datos del usuario",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "username": {
                                        "description": "nombre de usuario o correo electr\u00f3nico",
                                        "type": "string"
                                    },
                                    "password": {
                                        "description": "contrase\u00f1a",
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "token": {
                                            "description": "token generado",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credenciales incorrectas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "code": {
                                            "description": "c\u00f3digo de error",
                                            "type": "integer"
                                        },
                                        "message": {
                                            "description": "mensaje de error",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/companies": {
            "get": {
                "tags": [
                    "company"
                ],
                "summary": "Obtiene el listado de empresas",
                "description": "Retorna la lista de empresas del usuario actual",
                "operationId": "company_index",
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    }
                }
            },
            "post": {
                "tags": [
                    "company"
                ],
                "summary": "Crear un nueva empresa",
                "description": "Crea una empresa nueva para el usuario actual.",
                "operationId": "company_new",
                "requestBody": {
                    "description": "Datos de la empresa",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "properties": {
                                            "plan": {
                                                "description": "Utilice una de estas opciones: 'free', 'premium'.",
                                                "type": "string"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    {
                                        "properties": {
                                            "environment": {
                                                "description": "Utilice una de estas opciones: 'beta', 'produccion', 'nubefact_beta' o 'nubefact_produccion'. <br> <b>beta</b>: utiliza los ambientes de prueba de la Sunat. <br> <b>produccion</b>: utiliza los ambientes de producci\u00f3n de la Sunat. <br> <b>nubefact_beta</b>: utiliza los ambientes de prueba de nubefact. <br> <b>nubefact_produccion</b>: utiliza los ambientes de producci\u00f3n de nubefact",
                                                "type": "string"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/MyCompany"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    }
                }
            }
        },
        "/companies/{companyId}": {
            "get": {
                "tags": [
                    "company"
                ],
                "summary": "Retorna una empresa",
                "description": "Obtiene una empresa en particular del usuario actual",
                "operationId": "company_show",
                "parameters": [
                    {
                        "name": "companyId",
                        "in": "path",
                        "required": true,
                        "description": "Id de la empresa",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "properties": {
                                                "id": {
                                                    "description": "",
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "properties": {
                                                "plan": {
                                                    "description": "",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "properties": {
                                                "environment": {
                                                    "description": "",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "$ref": "#/components/schemas/MyCompany"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "company"
                ],
                "summary": "Editar una empresa",
                "description": "Actualiza una empresa determinada",
                "operationId": "company_edit",
                "parameters": [
                    {
                        "name": "companyId",
                        "in": "path",
                        "required": true,
                        "description": "Id de la empresa",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Datos de la empresa",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "properties": {
                                            "plan": {
                                                "description": "Utilice una de estas opciones: 'free', 'premium'.",
                                                "type": "string"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    {
                                        "properties": {
                                            "environment": {
                                                "description": "Utilice una de estas opciones: 'beta', 'produccion'. <br> beta: utiliza los ambientes de prueba de la Sunat. <br> produccion: utiliza los ambientes de producci\u00f3n de la Sunat.",
                                                "type": "string"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/MyCompany"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "properties": {
                                                "id": {
                                                    "description": "",
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "properties": {
                                                "plan": {
                                                    "description": "",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "properties": {
                                                "environment": {
                                                    "description": "",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "$ref": "#/components/schemas/MyCompany"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "company"
                ],
                "summary": "Eliminar una empresa",
                "description": "Elimina una empresa determinada",
                "operationId": "company_delete",
                "parameters": [
                    {
                        "name": "companyId",
                        "in": "path",
                        "required": true,
                        "description": "Id de la empresa",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "properties": {
                                                "id": {
                                                    "description": "",
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "properties": {
                                                "plan": {
                                                    "description": "",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "properties": {
                                                "environment": {
                                                    "description": "",
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "$ref": "#/components/schemas/MyCompany"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/companies/certificate": {
            "post": {
                "tags": [
                    "company"
                ],
                "summary": "Convertir P12, PFX",
                "description": "Convertir un certificado P12 o PFX codificado en Base64 al formato PEM y CER. El resultado en Base64 se utiliza en la creaci\u00f3n de una empresa.",
                "operationId": "company_cert",
                "requestBody": {
                    "description": "Datos del certificado",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "cert": {
                                        "type": "string",
                                        "description": "Certificado P12 o PFX en formato Base64. Puede utilizar el endpoint <a href='/doc#tag/company/operation/company_file_base64'>/companies/file/base64</a> para convertir su archivo a base64"
                                    },
                                    "cert_pass": {
                                        "type": "string",
                                        "description": "Contrase\u00f1a del certificado"
                                    },
                                    "base64": {
                                        "type": "boolean",
                                        "description": "Indica si se debe retornar el certificado en formato Base64"
                                    }
                                },
                                "required": [
                                    "cert",
                                    "cert_pass"
                                ]
                            },
                            "examples": {
                                "example1": {
                                    "summary": "Ejemplo de solicitud",
                                    "value": {
                                        "cert": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7DQ2B6FEl5t1I4jjyD5kW...",
                                        "cert_pass": "mi_contrase\u00f1a_segura",
                                        "base64": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Certificados generados correctamente",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "cer": {
                                            "type": "string",
                                            "description": "Certificado CER en formato Base64 o texto plano"
                                        },
                                        "pem": {
                                            "type": "string",
                                            "description": "Certificado PEM en formato Base64 o texto plano"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error en la solicitud",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "description": "Descripci\u00f3n del error"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/companies/certificate/free": {
            "post": {
                "tags": [
                    "company"
                ],
                "summary": "Genera un certificado PFX gratuito para hacer pruebas",
                "description": "Esta ruta genera un certificado PFX gratuito, Usar solo para pruebas.",
                "operationId": "company_certificate_free",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "password": {
                                        "type": "string",
                                        "description": "La contrase\u00f1a para proteger el certificado PFX"
                                    },
                                    "ruc": {
                                        "type": "string",
                                        "description": "El RUC de la empresa."
                                    }
                                },
                                "required": [
                                    "password",
                                    "ruc"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Archivo PFX generado exitosamente",
                        "content": {
                            "application/x-pkcs12": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error en la solicitud, posiblemente debido a una contrase\u00f1a faltante o archivo demasiado grande"
                    },
                    "500": {
                        "description": "Error interno del servidor al generar el archivo PFX"
                    }
                }
            }
        },
        "/companies/file/base64": {
            "post": {
                "tags": [
                    "company"
                ],
                "summary": "Convertir archio (certificado, logo) a Base64",
                "description": "Convierte un archivo, ya sea un certificado o un logo, a formato Base64. El valor obtenido se utiliza en el proceso de creaci\u00f3n de la empresa.",
                "operationId": "company_file_base64",
                "requestBody": {
                    "description": "Datos del certificado",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "El archivo que se va a convertir en Base64. No debe exceder los 200KB."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "El archivo se ha convertido exitosamente en Base64.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "base64": {
                                            "type": "string",
                                            "description": "El contenido del archivo en formato Base64."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error de solicitud.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "description": "Mensaje de error."
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/companies/base64/file": {
            "post": {
                "tags": [
                    "company"
                ],
                "summary": "Decodifica un archivo Base64 y lo sirve como descarga",
                "description": "Recibe un archivo en formato Base64, lo decodifica y lo env\u00eda como archivo descargable. Puede especificar la extensi\u00f3n del archivo y un nombre de archivo opcional. Usarlo para el logo y certificado.",
                "operationId": "company_base64_file",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "base64": {
                                        "type": "string",
                                        "description": "El archivo codificado en Base64.",
                                        "example": "SGVsbG8gd29ybGQ="
                                    },
                                    "extension": {
                                        "type": "string",
                                        "description": "La extensi\u00f3n del archivo (ej. png, jpg, cer, pem, p12).",
                                        "example": "png"
                                    },
                                    "filename": {
                                        "type": "string",
                                        "description": "El nombre del archivo, sin extensi\u00f3n (opcional).",
                                        "example": "certificado"
                                    }
                                },
                                "required": [
                                    "base64",
                                    "extension"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Archivo convertido de Base64 a archivo y enviado como descarga",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error en la solicitud",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "description": "Error en la solicitud, como Base64 inv\u00e1lido o tama\u00f1o de archivo excedido."
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoice/send": {
            "post": {
                "tags": [
                    "invoice"
                ],
                "summary": "Enviar una Factura o Boleta",
                "description": "Retorna la respuesta de SUNAT y el XML firmado",
                "operationId": "sendInvoice",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Invoice"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DocumentResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoice/xml": {
            "post": {
                "tags": [
                    "invoice"
                ],
                "summary": "Generar el XML de una factura o boleta",
                "description": "Retorna el XML",
                "operationId": "getInvoiceXml",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Invoice"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "text/xml": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoice/pdf": {
            "post": {
                "tags": [
                    "invoice"
                ],
                "summary": "Generar el PDF de una factura o boleta",
                "description": "Retorna el Pdf",
                "operationId": "getInvoicePdf",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Invoice"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/invoice/status": {
            "get": {
                "tags": [
                    "invoice"
                ],
                "summary": "Obtiene el estado del CDR de una Factura o Boleta",
                "description": "Retorna el CDR desde SUNAT",
                "operationId": "getInvoiceStatus",
                "parameters": [
                    {
                        "name": "tipo",
                        "in": "query",
                        "description": "Tipo de comprobante (Ej. 01, 03)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "serie",
                        "in": "query",
                        "description": "Serie del comprobante (Ej. F001)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "numero",
                        "in": "query",
                        "description": "N\u00famero correlativo del comprobante",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "ruc",
                        "in": "query",
                        "description": "RUC de empresa (M\u00faltiples Empresas)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StatusResult"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/note/send": {
            "post": {
                "tags": [
                    "note"
                ],
                "summary": "Envia una nota de cr\u00e9dito o d\u00e9bito",
                "description": "Retorna la respuesta de SUNAT y el XML firmado",
                "operationId": "sendNote",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Note"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DocumentResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/note/xml": {
            "post": {
                "tags": [
                    "note"
                ],
                "summary": "Generar el XML de una nota de cr\u00e9dito o d\u00e9bito",
                "description": "Retorna el XML",
                "operationId": "getNoteXml",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Note"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "text/xml": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/note/pdf": {
            "post": {
                "tags": [
                    "note"
                ],
                "summary": "Generar el PDF de una nota de cr\u00e9dito o d\u00e9bito",
                "description": "Retorna el PDF",
                "operationId": "getNotePdf",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Note"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/summary/send": {
            "post": {
                "tags": [
                    "summary"
                ],
                "summary": "Enviar una Resumen diario de Boletas",
                "description": "Retorna la respuesta de SUNAT y el XML firmado",
                "operationId": "sendSummary",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Summary"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SummaryResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/summary/xml": {
            "post": {
                "tags": [
                    "summary"
                ],
                "summary": "Generar el XML de un resumen diario",
                "description": "Retorna el XML",
                "operationId": "getSummaryXml",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Summary"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "text/xml": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/summary/pdf": {
            "post": {
                "tags": [
                    "summary"
                ],
                "summary": "Generar el PDF de un resumen diario",
                "description": "Retorna el PDF",
                "operationId": "getSummaryPdf",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Summary"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/summary/status": {
            "get": {
                "tags": [
                    "summary"
                ],
                "summary": "Obtiene el estado del ticket",
                "description": "Retorna el XML",
                "operationId": "getSummaryStatus",
                "parameters": [
                    {
                        "name": "ticket",
                        "in": "query",
                        "description": "Ticket de Resumen diario",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "ruc",
                        "in": "query",
                        "description": "RUC de empresa (Multiples Empresas)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StatusResult"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/voided/send": {
            "post": {
                "tags": [
                    "voided"
                ],
                "summary": "Enviar una Comunicaci\u00f3n de Bajas",
                "description": "Retorna la respuesta de SUNAT y el XML firmado",
                "operationId": "sendVoided",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Voided"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SummaryResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/voided/xml": {
            "post": {
                "tags": [
                    "voided"
                ],
                "summary": "Generar el XML de una Comunicaci\u00f3n de Bajas",
                "description": "Retorna el XML",
                "operationId": "getVoidedXml",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Voided"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "text/xml": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/voided/pdf": {
            "post": {
                "tags": [
                    "voided"
                ],
                "summary": "Generar el PDF de una Comunicaci\u00f3n de Bajas",
                "description": "Retorna el PDF",
                "operationId": "getVoidedPdf",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Voided"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/voided/status": {
            "get": {
                "tags": [
                    "voided"
                ],
                "summary": "Obtiene el estado del ticket",
                "description": "Retorna el XML",
                "operationId": "getVoidedStatus",
                "parameters": [
                    {
                        "name": "ticket",
                        "in": "query",
                        "description": "Ticket de Comunicaci\u00f3n de baja",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "ruc",
                        "in": "query",
                        "description": "RUC de empresa (Multiples Empresas)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StatusResult"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/despatch/send": {
            "post": {
                "tags": [
                    "despatch"
                ],
                "summary": "Enviar una Gu\u00eda de Remisi\u00f3n",
                "description": "Retorna la respuesta de SUNAT y el XML firmado",
                "operationId": "sendDespatch",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Despatch"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SummaryResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/despatch/xml": {
            "post": {
                "tags": [
                    "despatch"
                ],
                "summary": "Generar el XML de una Gu\u00eda de Remisi\u00f3n",
                "description": "Retorna el XML",
                "operationId": "getDespatchXml",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Despatch"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "text/xml": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/despatch/status": {
            "get": {
                "tags": [
                    "despatch"
                ],
                "summary": "Obtiene el estado del ticket",
                "description": "Retorna el CDR",
                "operationId": "getDespatchStatus",
                "parameters": [
                    {
                        "name": "ticket",
                        "in": "query",
                        "description": "Ticket del comprobante",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "ruc",
                        "in": "query",
                        "description": "RUC de empresa (Multiples Empresas)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StatusResult"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/despatch/pdf": {
            "post": {
                "tags": [
                    "despatch"
                ],
                "summary": "Generar el Pdf de una Gu\u00eda de Remisi\u00f3n",
                "description": "Retorna el Pdf",
                "operationId": "getDespatchPdf",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Despatch"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/Pdf": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/retention/send": {
            "post": {
                "tags": [
                    "retention"
                ],
                "summary": "Enviar un Comprobante de Retencion",
                "description": "Retorna la respuesta de SUNAT y el XML firmado",
                "operationId": "sendRetention",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Retention"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DocumentResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/retention/xml": {
            "post": {
                "tags": [
                    "retention"
                ],
                "summary": "Generar el XML de un Comprobante de Retencion",
                "description": "Retorna el XML",
                "operationId": "getRetentionXml",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Retention"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "text/xml": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/retention/pdf": {
            "post": {
                "tags": [
                    "retention"
                ],
                "summary": "Generar el pdf de un Comprobante de Retencion",
                "description": "Retorna el pdf",
                "operationId": "getRetentionpdf",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Retention"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/perception/send": {
            "post": {
                "tags": [
                    "perception"
                ],
                "summary": "Enviar un Comprobante de Percepcion",
                "description": "Retorna la respuesta de SUNAT y el XML firmado",
                "operationId": "sendPerception",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Perception"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DocumentResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/perception/xml": {
            "post": {
                "tags": [
                    "perception"
                ],
                "summary": "Generar el XML de un Comprobante de Percepcion",
                "description": "Retorna el XML",
                "operationId": "getPerceptionXml",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Perception"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "text/xml": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/perception/pdf": {
            "post": {
                "tags": [
                    "perception"
                ],
                "summary": "Generar el pdf de un Comprobante de Percepcion",
                "description": "Retorna el pdf",
                "operationId": "getPerceptionpdf",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Perception"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/reversion/send": {
            "post": {
                "tags": [
                    "reversion"
                ],
                "summary": "Enviar un Resumen de Reversiones",
                "description": "Retorna la respuesta de SUNAT y el XML firmado",
                "operationId": "sendReversion",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Reversion"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SummaryResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/reversion/xml": {
            "post": {
                "tags": [
                    "reversion"
                ],
                "summary": "Generar el XML de un Resumen de Reversiones",
                "description": "Retorna el XML",
                "operationId": "getReversionXml",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Reversion"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "text/xml": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/reversion/pdf": {
            "post": {
                "tags": [
                    "reversion"
                ],
                "summary": "Generar el pdf de un Resumen de Reversiones",
                "description": "Retorna el pdf",
                "operationId": "getReversionpdf",
                "requestBody": {
                    "$ref": "#/components/requestBodies/Reversion"
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    },
                    "400": {
                        "description": "Error de Validaci\u00f3n",
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ValidationResponse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/reversion/status": {
            "get": {
                "tags": [
                    "reversion"
                ],
                "summary": "Obtiene el estado del ticket",
                "description": "Retorna el XML",
                "operationId": "getReversionStatus",
                "parameters": [
                    {
                        "name": "ticket",
                        "in": "query",
                        "description": "Ticket de Resumen de Reversiones",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "ruc",
                        "in": "query",
                        "description": "RUC de empresa (Multiples Empresas)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Operacion exitosa",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StatusResult"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/sale/qr": {
            "post": {
                "tags": [
                    "sale"
                ],
                "summary": "Generar el QR de una Venta",
                "description": "Retorna la imagen del QR",
                "operationId": "getSaleQr",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/QrParameter"
                            },
                            "examples": {
                                "example1": {
                                    "$ref": "#/components/examples/qr"
                                }
                            }
                        }
                    },
                    "description": "Comprobante",
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Operacion exitosa"
                    }
                }
            }
        }
    },
    "servers": [
        {
            "url": "https://facturacion.apisperu.com/api/v1"
        }
    ],
    "components": {
        "requestBodies": {
            "Note": {
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Note"
                        },
                        "examples": {
                            "example1": {
                                "$ref": "#/components/examples/notaCreditoBoleta"
                            },
                            "example2": {
                                "$ref": "#/components/examples/notaCredito"
                            },
                            "example3": {
                                "$ref": "#/components/examples/notaDebito"
                            }
                        }
                    }
                },
                "description": "Comprobante",
                "required": true
            },
            "Invoice": {
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Invoice"
                        },
                        "examples": {
                            "example1": {
                                "$ref": "#/components/examples/boleta"
                            },
                            "example2": {
                                "$ref": "#/components/examples/boletaICBPER"
                            },
                            "example3": {
                                "$ref": "#/components/examples/facturaAnticipos"
                            },
                            "example4": {
                                "$ref": "#/components/examples/facturaCompleja"
                            },
                            "example5": {
                                "$ref": "#/components/examples/facturaContingencia"
                            },
                            "example6": {
                                "$ref": "#/components/examples/facturaCredito"
                            },
                            "example7": {
                                "$ref": "#/components/examples/facturaDescuentoGlobal"
                            },
                            "example8": {
                                "$ref": "#/components/examples/facturaDescuentoLinea"
                            },
                            "example9": {
                                "$ref": "#/components/examples/facturaDescuentoNoBase"
                            },
                            "example10": {
                                "$ref": "#/components/examples/facturaDetraccion"
                            },
                            "example11": {
                                "$ref": "#/components/examples/facturaExonerado"
                            },
                            "example12": {
                                "$ref": "#/components/examples/facturaExportacion"
                            },
                            "example13": {
                                "$ref": "#/components/examples/facturaGratuita"
                            },
                            "example14": {
                                "$ref": "#/components/examples/facturaICBPERGratuita"
                            },
                            "example15": {
                                "$ref": "#/components/examples/facturaICBPER"
                            },
                            "example16": {
                                "$ref": "#/components/examples/facturaInafecta"
                            },
                            "example17": {
                                "$ref": "#/components/examples/facturaIsc"
                            },
                            "example18": {
                                "$ref": "#/components/examples/facturaIvap"
                            },
                            "example19": {
                                "$ref": "#/components/examples/facturaPercepcion"
                            },
                            "example20": {
                                "$ref": "#/components/examples/facturaRelGuiaRemision"
                            },
                            "example21": {
                                "$ref": "#/components/examples/factura"
                            },
                            "example22": {
                                "$ref": "#/components/examples/facturaRetencion"
                            }
                        }
                    }
                },
                "description": "Comprobante",
                "required": true
            },
            "Summary": {
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Summary"
                        },
                        "examples": {
                            "example1": {
                                "$ref": "#/components/examples/resumen"
                            },
                            "example2": {
                                "$ref": "#/components/examples/resumenContingencia"
                            },
                            "example3": {
                                "$ref": "#/components/examples/resumenUSD"
                            }
                        }
                    }
                },
                "description": "Comprobante",
                "required": true
            },
            "Voided": {
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Voided"
                        },
                        "examples": {
                            "example1": {
                                "$ref": "#/components/examples/baja"
                            }
                        }
                    }
                },
                "description": "Comprobante",
                "required": true
            },
            "Despatch": {
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Despatch"
                        },
                        "examples": {
                            "example1": {
                                "$ref": "#/components/examples/remision"
                            },
                            "example2": {
                                "$ref": "#/components/examples/remisionTransportista"
                            }
                        }
                    }
                },
                "description": "Comprobante",
                "required": true
            },
            "Retention": {
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Retention"
                        },
                        "examples": {
                            "example1": {
                                "$ref": "#/components/examples/retencion"
                            }
                        }
                    }
                },
                "description": "Comprobante",
                "required": true
            },
            "Perception": {
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Perception"
                        },
                        "examples": {
                            "example1": {
                                "$ref": "#/components/examples/percepcion"
                            }
                        }
                    }
                },
                "description": "Comprobante",
                "required": true
            },
            "Reversion": {
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Reversion"
                        },
                        "examples": {
                            "example1": {
                                "$ref": "#/components/examples/reversion"
                            }
                        }
                    }
                },
                "description": "Comprobante",
                "required": true
            }
        },
        "examples": {
            "boleta": {
                "summary": "Boleta de venta",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "03",
                    "serie": "B001",
                    "correlativo": "1",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 100,
                    "mtoIGV": 18,
                    "valorVenta": 100,
                    "totalImpuestos": 18,
                    "subTotal": 118,
                    "mtoImpVenta": 118,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 50,
                            "mtoValorVenta": 100,
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 18,
                            "igv": 18,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 18,
                            "mtoPrecioUnitario": 59
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON CIENTO DIECIOCHO CON 00/100 SOLES"
                        }
                    ]
                }
            },
            "boletaICBPER": {
                "summary": "Boleta de venta ICBPER",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "03",
                    "serie": "B001",
                    "correlativo": "1",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200.2,
                    "mtoIGV": 36.04,
                    "icbper": 0.8,
                    "valorVenta": 200.2,
                    "totalImpuestos": 36.84,
                    "subTotal": 237.04,
                    "redondeo": 0.04,
                    "mtoImpVenta": 237,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 118
                        },
                        {
                            "codProducto": "P002",
                            "unidad": "NIU",
                            "descripcion": "BOLSA DE PLASTICO",
                            "cantidad": 4,
                            "mtoValorUnitario": 0.05,
                            "mtoValorVenta": 0.2,
                            "mtoBaseIgv": 0.2,
                            "porcentajeIgv": 18,
                            "igv": 0.04,
                            "icbper": 0.8,
                            "factorIcbper": 0.2,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 0.84,
                            "mtoPrecioUnitario": 0.059
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SIETE CON 00/100 SOLES"
                        }
                    ]
                }
            },
            "baja": {
                "summary": "Comunicaci\u00f3n de baja",
                "value": {
                    "correlativo": "00111",
                    "fecGeneracion": "2021-01-27T00:00:00-05:00",
                    "fecComunicacion": "2021-01-29T00:00:00-05:00",
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "details": [
                        {
                            "tipoDoc": "01",
                            "serie": "F001",
                            "correlativo": "02132132",
                            "desMotivoBaja": "ERROR EN C\u00c1LCULOS"
                        },
                        {
                            "tipoDoc": "07",
                            "serie": "FC01",
                            "correlativo": "222",
                            "desMotivoBaja": "ERROR DE RUC"
                        }
                    ]
                }
            },
            "facturaAnticipos": {
                "summary": "Factura Anticipos",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 100,
                    "mtoIGV": 18,
                    "valorVenta": 200,
                    "totalImpuestos": 18,
                    "subTotal": 236,
                    "mtoImpVenta": 136,
                    "anticipos": [
                        {
                            "tipoDocRel": "02",
                            "nroDocRel": "F001-111",
                            "total": 100
                        }
                    ],
                    "descuentos": [
                        {
                            "codTipo": "04",
                            "factor": 1,
                            "monto": 100,
                            "montoBase": 100
                        }
                    ],
                    "totalAnticipos": 100,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 118
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SEIS CON OO/100 SOLES"
                        }
                    ]
                }
            },
            "facturaCompleja": {
                "summary": "Factura Compleja",
                "value": {
                    "ublVersion": "2.1",
                    "fecVencimiento": "2021-01-27T00:00:00-05:00",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "126",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoOperExoneradas": 100,
                    "mtoOperInafectas": 200,
                    "mtoOperGratuitas": 300,
                    "mtoIGV": 36,
                    "mtoIGVGratuitas": 18,
                    "totalImpuestos": 36,
                    "valorVenta": 500,
                    "subTotal": 536,
                    "mtoImpVenta": 536,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 118
                        },
                        {
                            "codProducto": "P002",
                            "unidad": "KG",
                            "descripcion": "PRODUCTO 2",
                            "cantidad": 2,
                            "mtoValorUnitario": 50,
                            "mtoValorVenta": 100,
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 0,
                            "igv": 0,
                            "tipAfeIgv": 20,
                            "totalImpuestos": 0,
                            "mtoPrecioUnitario": 50
                        },
                        {
                            "codProducto": "P003",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 3",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 0,
                            "igv": 0,
                            "tipAfeIgv": 30,
                            "totalImpuestos": 0,
                            "mtoPrecioUnitario": 100
                        },
                        {
                            "codProducto": "P004",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 4",
                            "cantidad": 1,
                            "mtoValorUnitario": 0,
                            "mtoValorGratuito": 100,
                            "mtoValorVenta": 100,
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 18,
                            "igv": 18,
                            "tipAfeIgv": 13,
                            "totalImpuestos": 18,
                            "mtoPrecioUnitario": 0
                        },
                        {
                            "codProducto": "P005",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 5",
                            "cantidad": 2,
                            "mtoValorUnitario": 0,
                            "mtoValorGratuito": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 0,
                            "igv": 0,
                            "tipAfeIgv": 32,
                            "totalImpuestos": 0,
                            "mtoPrecioUnitario": 0
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON QUINIENTOS TREINTA Y SEIS CON OO/100 SOLES"
                        },
                        {
                            "code": "1002",
                            "value": "TRANSFERENCIA GRATUITA DE UN BIEN Y/O SERVICIO PRESTADO GRATUITAMENTE"
                        }
                    ]
                }
            },
            "facturaContingencia": {
                "summary": "Factura Contingencia",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "0001",
                    "correlativo": "1",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoIGV": 36,
                    "totalImpuestos": 36,
                    "valorVenta": 200,
                    "subTotal": 236,
                    "mtoImpVenta": 236,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 118
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SEIS CON OO/100 SOLES"
                        }
                    ]
                }
            },
            "facturaCredito": {
                "summary": "Factura Credito",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Credito",
                        "monto": 236
                    },
                    "cuotas": [
                        {
                            "moneda": "PEN",
                            "monto": 100,
                            "fechaPago": "2021-02-05T11:39:00-05:00"
                        },
                        {
                            "moneda": "PEN",
                            "monto": 136,
                            "fechaPago": "2021-02-13T11:39:00-05:00"
                        }
                    ],
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoIGV": 36,
                    "totalImpuestos": 36,
                    "valorVenta": 200,
                    "subTotal": 236,
                    "mtoImpVenta": 236,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 118
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SEIS CON OO/100 SOLES"
                        }
                    ]
                }
            },
            "facturaDescuentoGlobal": {
                "summary": "Factura Descuento Global",
                "value": {
                    "tipoOperacion": "0101",
                    "fecVencimiento": "2021-01-27T00:00:00-05:00",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "80",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "descuentos": [
                        {
                            "codTipo": "02",
                            "montoBase": 3,
                            "factor": 1,
                            "monto": 3
                        }
                    ],
                    "mtoOperGravadas": 67,
                    "mtoIGV": 12.06,
                    "totalImpuestos": 12.06,
                    "valorVenta": 67,
                    "subTotal": 79.06,
                    "mtoImpVenta": 79.06,
                    "ublVersion": "2.1",
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "Caf\u00e9 Mendoza",
                            "cantidad": 10,
                            "mtoValorUnitario": 2,
                            "mtoValorVenta": 20,
                            "mtoBaseIgv": 20,
                            "porcentajeIgv": 18,
                            "igv": 3.6,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 3.6,
                            "mtoPrecioUnitario": 2.36
                        },
                        {
                            "codProducto": "P002",
                            "unidad": "NIU",
                            "descripcion": "Pasta Dental",
                            "cantidad": 1,
                            "mtoValorUnitario": 50,
                            "mtoValorVenta": 50,
                            "mtoBaseIgv": 50,
                            "porcentajeIgv": 18,
                            "igv": 9,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 9,
                            "mtoPrecioUnitario": 59
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON SETENTA Y NUEVE CON O6/100 SOLES"
                        }
                    ]
                }
            },
            "facturaDescuentoLinea": {
                "summary": "Factura Descuento Linea",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2019-10-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 66,
                    "mtoIGV": 11.88,
                    "totalImpuestos": 11.88,
                    "valorVenta": 66,
                    "subTotal": 77.88,
                    "mtoImpVenta": 77.88,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 10,
                            "descuentos": [
                                {
                                    "codTipo": "00",
                                    "montoBase": 20,
                                    "factor": 0.2,
                                    "monto": 4
                                }
                            ],
                            "mtoValorUnitario": 2,
                            "mtoValorVenta": 16,
                            "mtoBaseIgv": 16,
                            "porcentajeIgv": 18,
                            "igv": 2.88,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 2.88,
                            "mtoPrecioUnitario": 1.89
                        },
                        {
                            "codProducto": "P002",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 2",
                            "cantidad": 1,
                            "mtoValorUnitario": 50,
                            "mtoValorVenta": 50,
                            "mtoBaseIgv": 50,
                            "porcentajeIgv": 18,
                            "igv": 9,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 9,
                            "mtoPrecioUnitario": 59
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON SETENTA Y SIETE CON 88/100 SOLES"
                        }
                    ]
                }
            },
            "facturaDescuentoNoBase": {
                "summary": "Factura Descuento No Base",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2019-10-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "descuentos": [
                        {
                            "codTipo": "03",
                            "montoBase": 3,
                            "factor": 1,
                            "monto": 3
                        }
                    ],
                    "sumOtrosDescuentos": 7,
                    "mtoOperGravadas": 20,
                    "mtoIGV": 3.6,
                    "totalImpuestos": 3.6,
                    "valorVenta": 20,
                    "subTotal": 23.6,
                    "mtoImpVenta": 16.6,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 10,
                            "descuentos": [
                                {
                                    "codTipo": "01",
                                    "montoBase": 20,
                                    "factor": 0.2,
                                    "monto": 4
                                }
                            ],
                            "mtoValorUnitario": 2,
                            "mtoValorVenta": 20,
                            "mtoBaseIgv": 20,
                            "porcentajeIgv": 18,
                            "igv": 3.6,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 3.6,
                            "mtoPrecioUnitario": 1.96
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DIECISEIS CON 60/100 SOLES"
                        }
                    ]
                }
            },
            "facturaDetraccion": {
                "summary": "Factura Detracci\u00f3n",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "1001",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 800,
                    "mtoIGV": 144,
                    "totalImpuestos": 144,
                    "valorVenta": 800,
                    "subTotal": 944,
                    "mtoImpVenta": 944,
                    "detraccion": {
                        "codBienDetraccion": "014",
                        "codMedioPago": "001",
                        "ctaBanco": "0004-3342343243",
                        "percent": 4,
                        "mount": 37.76
                    },
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 4,
                            "mtoValorUnitario": 200,
                            "mtoValorVenta": 800,
                            "mtoBaseIgv": 800,
                            "porcentajeIgv": 18,
                            "igv": 144,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 144,
                            "mtoPrecioUnitario": 236
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON NOVECIENTOS CUARENTA Y CUATRO CON OO/100 SOLES"
                        },
                        {
                            "code": "2006",
                            "value": "Operaci\u00f3n sujeta a detracci\u00f3n"
                        }
                    ]
                }
            },
            "facturaExonerado": {
                "summary": "Factura Exonerado",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperExoneradas": 100,
                    "mtoIGV": 0,
                    "totalImpuestos": 0,
                    "valorVenta": 100,
                    "subTotal": 100,
                    "mtoImpVenta": 100,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 50,
                            "mtoValorVenta": 100,
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 0,
                            "igv": 0,
                            "tipAfeIgv": 20,
                            "totalImpuestos": 0,
                            "mtoPrecioUnitario": 50
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON CIEN CON OO/100 SOLES"
                        }
                    ]
                }
            },
            "facturaExportacion": {
                "summary": "Factura Exportaci\u00f3n",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0200",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "USD",
                    "client": {
                        "tipoDoc": "0",
                        "numDoc": "-",
                        "rznSocial": "EXTRANJERO 1"
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperExportacion": 100,
                    "mtoIGV": 0,
                    "totalImpuestos": 0,
                    "valorVenta": 100,
                    "subTotal": 100,
                    "mtoImpVenta": 100,
                    "details": [
                        {
                            "codProducto": "P001",
                            "codProdSunat": "44121618",
                            "unidad": "KG",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 50,
                            "mtoValorVenta": 100,
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 0,
                            "igv": 0,
                            "tipAfeIgv": 40,
                            "totalImpuestos": 0,
                            "mtoPrecioUnitario": 50
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON CIEN CON OO/100 SOLES"
                        }
                    ]
                }
            },
            "facturaGratuita": {
                "summary": "Factura Gratuita",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGratuitas": 200,
                    "mtoIGVGratuitas": 36,
                    "mtoIGV": 0,
                    "totalImpuestos": 0,
                    "valorVenta": 0,
                    "subTotal": 0,
                    "mtoImpVenta": 0,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 0,
                            "mtoValorGratuito": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 11,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 0
                        }
                    ],
                    "legends": [
                        {
                            "code": "1002",
                            "value": "TRANSFERENCIA GRATUITA DE UN BIEN Y/O SERVICIO PRESTADO GRATUITAMENTE"
                        }
                    ]
                }
            },
            "facturaICBPERGratuita": {
                "summary": "Factura ICBPER Gratuita",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoOperGratuitas": 0.1,
                    "mtoIGVGratuitas": 0.02,
                    "mtoIGV": 36,
                    "icbper": 0.4,
                    "totalImpuestos": 36.4,
                    "valorVenta": 200,
                    "subTotal": 236.4,
                    "mtoImpVenta": 236.4,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "cantidad": 2,
                            "descripcion": "PRODUCTO 1",
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "totalImpuestos": 36,
                            "tipAfeIgv": 10,
                            "mtoValorVenta": 200,
                            "mtoValorUnitario": 100,
                            "mtoPrecioUnitario": 118
                        },
                        {
                            "codProducto": "P002",
                            "unidad": "NIU",
                            "cantidad": 2,
                            "descripcion": "BOLSA DE PLASTICO",
                            "mtoValorUnitario": 0,
                            "mtoValorGratuito": 0.05,
                            "mtoValorVenta": 0.1,
                            "tipAfeIgv": 13,
                            "mtoBaseIgv": 0.1,
                            "porcentajeIgv": 18,
                            "igv": 0.02,
                            "factorIcbper": 0.2,
                            "icbper": 0.4,
                            "totalImpuestos": 0.42
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SIETE CON 00/100 SOLES"
                        }
                    ]
                }
            },
            "facturaICBPER": {
                "summary": "Factura ICBPER",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200.2,
                    "mtoIGV": 36.04,
                    "icbper": 0.8,
                    "totalImpuestos": 36.84,
                    "valorVenta": 200.2,
                    "subTotal": 237.04,
                    "redondeo": 0.04,
                    "mtoImpVenta": 237,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "cantidad": 2,
                            "descripcion": "PRODUCTO 1",
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "totalImpuestos": 36,
                            "tipAfeIgv": 10,
                            "mtoValorVenta": 200,
                            "mtoValorUnitario": 100,
                            "mtoPrecioUnitario": 118
                        },
                        {
                            "codProducto": "P002",
                            "unidad": "NIU",
                            "cantidad": 4,
                            "descripcion": "BOLSA DE PLASTICO",
                            "mtoValorUnitario": 0.05,
                            "mtoPrecioUnitario": 0.059,
                            "mtoValorVenta": 0.2,
                            "tipAfeIgv": 10,
                            "mtoBaseIgv": 0.2,
                            "porcentajeIgv": 18,
                            "igv": 0.04,
                            "icbper": 0.8,
                            "factorIcbper": 0.2,
                            "totalImpuestos": 0.84
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SIETE CON 00/100 SOLES"
                        }
                    ]
                }
            },
            "facturaInafecta": {
                "summary": "Factura Inafecta",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperInafectas": 100,
                    "mtoIGV": 0,
                    "totalImpuestos": 0,
                    "valorVenta": 100,
                    "subTotal": 100,
                    "mtoImpVenta": 100,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 50,
                            "mtoValorVenta": 100,
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 0,
                            "igv": 0,
                            "tipAfeIgv": 30,
                            "totalImpuestos": 0,
                            "mtoPrecioUnitario": 50
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON CIEN CON OO/100 SOLES"
                        }
                    ]
                }
            },
            "facturaIsc": {
                "summary": "Factura Isc",
                "value": {
                    "ublVersion": "2.1",
                    "fecVencimiento": "2021-01-27T00:00:00-05:00",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "127",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoIGV": 42.12,
                    "mtoBaseIsc": 200,
                    "mtoISC": 34,
                    "totalImpuestos": 76.12,
                    "valorVenta": 200,
                    "subTotal": 276.12,
                    "mtoImpVenta": 276.12,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PROD 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIsc": 200,
                            "tipSisIsc": "01",
                            "porcentajeIsc": 17,
                            "isc": 34,
                            "mtoBaseIgv": 234,
                            "porcentajeIgv": 18,
                            "igv": 42.12,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 76.12,
                            "mtoPrecioUnitario": 138.06
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS SETENTA Y SEIS CON 12/100 SOLES"
                        }
                    ]
                }
            },
            "facturaIvap": {
                "summary": "Factura Ivap",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoBaseIvap": 90000,
                    "mtoIvap": 3600,
                    "totalImpuestos": 3600,
                    "valorVenta": 90000,
                    "subTotal": 93600,
                    "mtoImpVenta": 93600,
                    "details": [
                        {
                            "codProducto": "A001",
                            "unidad": "SA",
                            "descripcion": "SACOS DE ARROZ",
                            "cantidad": 900,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 90000,
                            "mtoBaseIgv": 90000,
                            "porcentajeIgv": 4,
                            "igv": 3600,
                            "tipAfeIgv": 17,
                            "totalImpuestos": 3600,
                            "mtoPrecioUnitario": 104
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON NOVENTA Y TRES MIL SEISCIENTOS CON OO/100 SOLES"
                        },
                        {
                            "code": "2007",
                            "value": "Operaci\u00f3n sujeta al IVAP"
                        }
                    ]
                }
            },
            "facturaPercepcion": {
                "summary": "Factura Percepci\u00f3n",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "2001",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoIGV": 36,
                    "totalImpuestos": 36,
                    "valorVenta": 200,
                    "subTotal": 236,
                    "mtoImpVenta": 236,
                    "perception": {
                        "codReg": "51",
                        "porcentaje": 0.02,
                        "mtoBase": 200,
                        "mto": 4,
                        "mtoTotal": 204
                    },
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 118
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SEIS CON OO/100 SOLES"
                        },
                        {
                            "code": "2000",
                            "value": "COMPROBANTE DE PERCEPCI\u00d3N"
                        }
                    ]
                }
            },
            "facturaRelGuiaRemision": {
                "summary": "Factura Rel Guia Remisi\u00f3n",
                "value": {
                    "ublVersion": "2.1",
                    "fecVencimiento": "2021-01-27T00:00:00-05:00",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "guias": [
                        {
                            "tipoDoc": "09",
                            "nroDoc": "T001-2"
                        }
                    ],
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoIGV": 36,
                    "totalImpuestos": 36,
                    "valorVenta": 200,
                    "subTotal": 236,
                    "mtoImpVenta": 236,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 118
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SEIS CON OO/100 SOLES"
                        }
                    ]
                }
            },
            "factura": {
                "summary": "Factura",
                "value": {
                    "ublVersion": "2.1",
                    "fecVencimiento": "2021-01-27T00:00:00-05:00",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoOperExoneradas": 100,
                    "mtoIGV": 36,
                    "totalImpuestos": 36,
                    "valorVenta": 300,
                    "subTotal": 336,
                    "mtoImpVenta": 336,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "PRODUCTO 1",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 118
                        },
                        {
                            "codProducto": "P002",
                            "unidad": "KG",
                            "descripcion": "PRODUCTO 2",
                            "cantidad": 2,
                            "mtoValorUnitario": 50,
                            "mtoValorVenta": 100,
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 0,
                            "igv": 0,
                            "tipAfeIgv": 20,
                            "totalImpuestos": 0,
                            "mtoPrecioUnitario": 50
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON TRESCIENTOS TREINTA Y SEIS CON OO/100 SOLES"
                        }
                    ]
                }
            },
            "facturaRetencion": {
                "summary": "Factura Retenci\u00f3n",
                "value": {
                    "ublVersion": "2.1",
                    "tipoOperacion": "0101",
                    "tipoDoc": "01",
                    "serie": "F001",
                    "correlativo": "168",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "formaPago": {
                        "moneda": "PEN",
                        "tipo": "Contado"
                    },
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "descuentos": [
                        {
                            "codTipo": "62",
                            "montoBase": 236,
                            "factor": 0.03,
                            "monto": 7.08
                        }
                    ],
                    "mtoOperGravadas": 200,
                    "mtoIGV": 36,
                    "totalImpuestos": 36,
                    "valorVenta": 200,
                    "subTotal": 236,
                    "mtoImpVenta": 236,
                    "details": [
                        {
                            "codProducto": "P001",
                            "unidad": "NIU",
                            "descripcion": "Caf\u00e9 Mendoza",
                            "cantidad": 2,
                            "mtoValorUnitario": 100,
                            "mtoValorVenta": 200,
                            "mtoBaseIgv": 200,
                            "porcentajeIgv": 18,
                            "igv": 36,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 36,
                            "mtoPrecioUnitario": 118
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SEIS CON OO/100 SOLES"
                        }
                    ]
                }
            },
            "remision": {
                "summary": "Gu\u00eda de Remisi\u00f3n",
                "value": {
                    "version": 2022,
                    "tipoDoc": "09",
                    "serie": "T001",
                    "correlativo": "123",
                    "fechaEmision": "2024-01-17T00:00:00-05:00",
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "destinatario": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "EMPRESA A"
                    },
                    "tercero": {
                        "tipoDoc": "6",
                        "numDoc": 20000000003,
                        "rznSocial": "EMPRESA SA"
                    },
                    "observacion": "NOTA GUIA",
                    "docBaja": {
                        "tipoDoc": "09",
                        "nroDoc": "T001-00001"
                    },
                    "relDoc": {
                        "tipoDoc": "02",
                        "nroDoc": "213123"
                    },
                    "envio": {
                        "codTraslado": "01",
                        "desTraslado": "VENTA",
                        "modTraslado": "01",
                        "fecTraslado": "2024-01-17T00:00:00-05:00",
                        "fecEntregaBienes": "2024-01-17T00:00:00-05:00",
                        "codPuerto": "123",
                        "indTransbordo": false,
                        "pesoTotal": 12.5,
                        "undPesoTotal": "KGM",
                        "numContenedor": "XD-2232",
                        "llegada": {
                            "ubigueo": "150101",
                            "direccion": "AV LIMA"
                        },
                        "partida": {
                            "ubigueo": "150203",
                            "direccion": "AV ITALIA"
                        },
                        "transportista": {
                            "tipoDoc": "6",
                            "numDoc": "20000000002",
                            "rznSocial": "TRANSPORTES S.A.C",
                            "placa": "ABI-453",
                            "choferTipoDoc": "1",
                            "choferDoc": "40003344"
                        }
                    },
                    "details": [
                        {
                            "cantidad": 2,
                            "unidad": "ZZ",
                            "descripcion": "PRODUCTO 1",
                            "codigo": "PROD1"
                        }
                    ]
                }
            },
            "remisionTransportista": {
                "summary": "Gu\u00eda de Remisi\u00f3n Transportista",
                "value": {
                    "version": 2022,
                    "tipoDoc": "31",
                    "serie": "V001",
                    "correlativo": "123",
                    "fechaEmision": "2026-06-23T00:00:00-05:00",
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "destinatario": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "EMPRESA A"
                    },
                    "observacion": "detalles",
                    "envio": {
                        "codTraslado": "01",
                        "desTraslado": "VENTA",
                        "modTraslado": "01",
                        "fecTraslado": "2026-06-24T00:00:00-05:00",
                        "fecEntregaBienes": "2026-06-24T00:00:00-05:00",
                        "codPuerto": "123",
                        "indTransbordo": false,
                        "pesoTotal": 12.5,
                        "undPesoTotal": "KGM",
                        "numContenedor": "XD-2232",
                        "llegada": {
                            "ubigueo": "150101",
                            "direccion": "AV LIMA"
                        },
                        "partida": {
                            "ubigueo": "150203",
                            "direccion": "AV ITALIA"
                        },
                        "transportista": {
                            "tipoDoc": "6",
                            "numDoc": "20000000002",
                            "rznSocial": "TRANSPORTES S.A.C",
                            "placa": "ABI-453",
                            "choferTipoDoc": "1",
                            "choferDoc": "40003344"
                        },
                        "vehiculo": {
                            "placa": "ABITR564"
                        },
                        "choferes": [
                            {
                                "tipo": "Principal",
                                "tipoDoc": "1",
                                "nroDoc": "79214014",
                                "nombres": "lUIS",
                                "apellidos": "Garcia",
                                "licencia": "M46545654"
                            }
                        ]
                    },
                    "remitente": {
                        "tipoDoc": "6",
                        "numDoc": "20000000003",
                        "rznSocial": "EMPRESA B"
                    },
                    "details": [
                        {
                            "cantidad": 2,
                            "unidad": "ZZ",
                            "descripcion": "PRODUCTO 1",
                            "codigo": "PROD1"
                        }
                    ]
                }
            },
            "notaCreditoBoleta": {
                "summary": "Nota de Cr\u00e9dito Boleta",
                "value": {
                    "ublVersion": "2.1",
                    "tipoDoc": "07",
                    "serie": "BB01",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "tipDocAfectado": "03",
                    "numDocfectado": "B001-12",
                    "codMotivo": "01",
                    "desMotivo": "ANULACION DE LA OPERACION",
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoIGV": 36,
                    "totalImpuestos": 36,
                    "mtoImpVenta": 236,
                    "details": [
                        {
                            "codProducto": "C023",
                            "unidad": "NIU",
                            "cantidad": 2,
                            "descripcion": "PRODUCTO 1",
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 18,
                            "igv": 18,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 18,
                            "mtoValorVenta": 100,
                            "mtoValorUnitario": 50,
                            "mtoPrecioUnitario": 59
                        },
                        {
                            "codProducto": "C02",
                            "unidad": "NIU",
                            "cantidad": 2,
                            "descripcion": "PRODUCTO 2",
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 18,
                            "igv": 18,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 18,
                            "mtoValorVenta": 100,
                            "mtoValorUnitario": 50,
                            "mtoPrecioUnitario": 59
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SEIS CON 00/100 SOLES"
                        }
                    ]
                }
            },
            "notaCredito": {
                "summary": "Nota de Cr\u00e9dito",
                "value": {
                    "ublVersion": "2.1",
                    "tipoDoc": "07",
                    "serie": "FF01",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "tipDocAfectado": "01",
                    "numDocfectado": "F001-111",
                    "codMotivo": "07",
                    "desMotivo": "DEVOLUCION POR ITEM",
                    "tipoMoneda": "PEN",
                    "guias": [
                        {
                            "tipoDoc": "09",
                            "nroDoc": "0001-213"
                        }
                    ],
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoIGV": 36,
                    "totalImpuestos": 36,
                    "mtoImpVenta": 236,
                    "details": [
                        {
                            "codProducto": "C023",
                            "unidad": "NIU",
                            "cantidad": 2,
                            "descripcion": "PRODUCTO 1",
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 18,
                            "igv": 18,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 18,
                            "mtoValorVenta": 100,
                            "mtoValorUnitario": 50,
                            "mtoPrecioUnitario": 59
                        },
                        {
                            "codProducto": "C02",
                            "unidad": "NIU",
                            "cantidad": 2,
                            "descripcion": "PRODUCTO 2",
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 18,
                            "igv": 18,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 18,
                            "mtoValorVenta": 100,
                            "mtoValorUnitario": 50,
                            "mtoPrecioUnitario": 59
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SEIS CON 00/100 SOLES"
                        }
                    ]
                }
            },
            "notaDebito": {
                "summary": "Nota de D\u00e9bito",
                "value": {
                    "ublVersion": "2.1",
                    "tipDocAfectado": "01",
                    "numDocfectado": "F001-111",
                    "codMotivo": "02",
                    "desMotivo": "AUMENTO EN EL VALOR",
                    "tipoDoc": "08",
                    "serie": "FF01",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "correlativo": "123",
                    "tipoMoneda": "PEN",
                    "client": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "mtoOperGravadas": 200,
                    "mtoIGV": 36,
                    "totalImpuestos": 36,
                    "mtoImpVenta": 236,
                    "details": [
                        {
                            "codProducto": "C023",
                            "unidad": "NIU",
                            "cantidad": 2,
                            "descripcion": "PRODUCTO 1",
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 18,
                            "igv": 18,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 18,
                            "mtoValorVenta": 100,
                            "mtoValorUnitario": 50,
                            "mtoPrecioUnitario": 59
                        },
                        {
                            "codProducto": "C02",
                            "unidad": "NIU",
                            "cantidad": 2,
                            "descripcion": "PRODUCTO 2",
                            "mtoBaseIgv": 100,
                            "porcentajeIgv": 18,
                            "igv": 18,
                            "tipAfeIgv": 10,
                            "totalImpuestos": 18,
                            "mtoValorVenta": 100,
                            "mtoValorUnitario": 50,
                            "mtoPrecioUnitario": 59
                        }
                    ],
                    "legends": [
                        {
                            "code": "1000",
                            "value": "SON DOSCIENTOS TREINTA Y SEIS CON 00/100 SOLES"
                        }
                    ]
                }
            },
            "percepcion": {
                "summary": "Gu\u00eda de Remisi\u00f3n",
                "value": {
                    "serie": "P001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "observacion": "NOTA PRUEBA",
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "proveedor": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "impPercibido": 10,
                    "impCobrado": 210,
                    "regimen": "01",
                    "tasa": 2,
                    "details": [
                        {
                            "tipoDoc": "01",
                            "numDoc": "F001-1",
                            "fechaEmision": "2021-01-27T00:00:00-05:00",
                            "fechaPercepcion": "2021-01-27T00:00:00-05:00",
                            "moneda": "PEN",
                            "impTotal": 200,
                            "impCobrar": 210,
                            "impPercibido": 10,
                            "cobros": [
                                {
                                    "moneda": "PEN",
                                    "fecha": "2021-01-27T00:00:00-05:00",
                                    "importe": 100
                                }
                            ],
                            "tipoCambio": {
                                "fecha": "2021-01-27T00:00:00-05:00",
                                "factor": 1,
                                "monedaObj": "PEN",
                                "monedaRef": "PEN"
                            }
                        }
                    ]
                }
            },
            "resumenContingencia": {
                "summary": "Resumen diario contingencia",
                "value": {
                    "fecGeneracion": "2021-01-27T00:00:00-05:00",
                    "fecResumen": "2021-01-27T00:00:00-05:00",
                    "correlativo": "001",
                    "moneda": "PEN",
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "details": [
                        {
                            "tipoDoc": "03",
                            "serieNro": "0001-1",
                            "estado": "3",
                            "clienteTipo": "1",
                            "clienteNro": "00000000",
                            "total": 119.555,
                            "mtoOperGravadas": 20,
                            "mtoOperInafectas": 24.4,
                            "mtoOperExoneradas": 50,
                            "mtoOtrosCargos": 21.555,
                            "mtoIGV": 3.6
                        }
                    ]
                }
            },
            "resumenUSD": {
                "summary": "Resumen diario USD",
                "value": {
                    "fecGeneracion": "2021-01-27T00:00:00-05:00",
                    "fecResumen": "2021-01-27T00:00:00-05:00",
                    "correlativo": "211",
                    "moneda": "USD",
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "details": [
                        {
                            "tipoDoc": "03",
                            "serieNro": "B001-1",
                            "estado": "3",
                            "clienteTipo": "1",
                            "clienteNro": "00000000",
                            "total": 129,
                            "mtoOperGravadas": 20,
                            "mtoOperInafectas": 24.4,
                            "mtoOperExoneradas": 50,
                            "mtoOperExportacion": 10,
                            "mtoOtrosCargos": 21,
                            "mtoIGV": 3.6
                        }
                    ]
                }
            },
            "resumen": {
                "summary": "Resumen diario",
                "value": {
                    "fecGeneracion": "2021-01-27T00:00:00-05:00",
                    "fecResumen": "2021-01-27T00:00:00-05:00",
                    "correlativo": "001",
                    "moneda": "PEN",
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "details": [
                        {
                            "tipoDoc": "03",
                            "serieNro": "B001-1",
                            "estado": "3",
                            "clienteTipo": "1",
                            "clienteNro": "00000000",
                            "total": 129.555,
                            "mtoOperGravadas": 20,
                            "mtoOperInafectas": 24.4,
                            "mtoOperExoneradas": 50,
                            "mtoOperExportacion": 10.555,
                            "mtoOtrosCargos": 21,
                            "mtoIGV": 3.6
                        },
                        {
                            "tipoDoc": "07",
                            "serieNro": "B001-4",
                            "docReferencia": {
                                "tipoDoc": "03",
                                "nroDoc": "0001-122"
                            },
                            "estado": "1",
                            "clienteTipo": "1",
                            "clienteNro": "00000000",
                            "total": 200,
                            "mtoOperGravadas": 40,
                            "mtoOperExoneradas": 30,
                            "mtoOperInafectas": 120,
                            "mtoIGV": 7.2,
                            "mtoISC": 2.8
                        },
                        {
                            "tipoDoc": "03",
                            "serieNro": "B001-2",
                            "estado": "1",
                            "clienteTipo": "1",
                            "clienteNro": "00000000",
                            "percepcion": {
                                "codReg": "01",
                                "tasa": 2,
                                "mtoBase": 119,
                                "mto": 2,
                                "mtoTotal": 121.38
                            },
                            "total": 119,
                            "mtoOperGravadas": 20,
                            "mtoOperInafectas": 24.4,
                            "mtoOperExoneradas": 50,
                            "mtoOtrosCargos": 21,
                            "mtoIGV": 3.6
                        }
                    ]
                }
            },
            "retencion": {
                "summary": "Gu\u00eda de Remisi\u00f3n",
                "value": {
                    "serie": "R001",
                    "correlativo": "123",
                    "fechaEmision": "2021-01-27T00:00:00-05:00",
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "proveedor": {
                        "tipoDoc": "6",
                        "numDoc": 20000000002,
                        "rznSocial": "Cliente",
                        "address": {
                            "direccion": "Direccion cliente",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "observacion": "NOTA",
                    "impRetenido": 10,
                    "impPagado": 200,
                    "regimen": "01",
                    "tasa": 3,
                    "details": [
                        {
                            "tipoDoc": "01",
                            "numDoc": "F001-1",
                            "fechaEmision": "2021-01-27T00:00:00-05:00",
                            "fechaRetencion": "2021-01-27T00:00:00-05:00",
                            "moneda": "PEN",
                            "impTotal": 210,
                            "impPagar": 200,
                            "impRetenido": 10,
                            "pagos": [
                                {
                                    "moneda": "PEN",
                                    "importe": 100,
                                    "fecha": "2021-01-27T00:00:00-05:00"
                                }
                            ],
                            "tipoCambio": {
                                "fecha": "2021-01-27T00:00:00-05:00",
                                "factor": 1,
                                "monedaObj": "PEN",
                                "monedaRef": "PEN"
                            }
                        }
                    ]
                }
            },
            "reversion": {
                "summary": "Gu\u00eda de Remisi\u00f3n",
                "value": {
                    "correlativo": "001",
                    "fecGeneracion": "2021-01-27T00:00:00-05:00",
                    "fecComunicacion": "2021-01-29T00:00:00-05:00",
                    "company": {
                        "ruc": 20000000001,
                        "razonSocial": "Mi empresa",
                        "nombreComercial": "Mi empresa",
                        "address": {
                            "direccion": "Direccion empresa",
                            "provincia": "LIMA",
                            "departamento": "LIMA",
                            "distrito": "LIMA",
                            "ubigueo": "150101"
                        }
                    },
                    "details": [
                        {
                            "tipoDoc": "20",
                            "serie": "R001",
                            "correlativo": "122",
                            "desMotivoBaja": "ERROR DE SISTEMA"
                        },
                        {
                            "tipoDoc": "40",
                            "serie": "P001",
                            "correlativo": "111",
                            "desMotivoBaja": "ERROR DE RUC"
                        }
                    ]
                }
            },
            "qr": {
                "summary": "Gu\u00eda de Remisi\u00f3n",
                "value": {
                    "ruc": "20000000001",
                    "tipo": "01",
                    "serie": "F001",
                    "numero": "1",
                    "emision": "2019-10-27T00:00:00-05:00",
                    "igv": 18,
                    "total": 118,
                    "clienteTipo": "6",
                    "clienteNumero": "20000000002"
                }
            }
        },
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "description": "Value: Bearer {jwt}",
                "bearerFormat": "JWT",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "MyCompany": {
                "required": [
                    "ruc",
                    "razon_social",
                    "direccion",
                    "certificado",
                    "logo",
                    "sol_user",
                    "sol_pass",
                    "plan",
                    "environment"
                ],
                "properties": {
                    "sol_user": {
                        "description": "Usuario secundario SUNAT con permisos para emisi\u00f3n electr\u00f3nica. <br />Siga este tutorial para crear un usuario secundario SUNAT: <a href='https://youtu.be/9Q9rSKSL7Os' target='_blank'>https://youtu.be/9Q9rSKSL7Os</a>",
                        "type": "string"
                    },
                    "sol_pass": {
                        "description": "Contrase\u00f1a usuario secundario SUNAT. <br />Siga este tutorial para crear un usuario secundario SUNAT: <a href='https://youtu.be/9Q9rSKSL7Os' target='_blank'>https://youtu.be/9Q9rSKSL7Os</a>",
                        "type": "string"
                    },
                    "ruc": {
                        "type": "string"
                    },
                    "razon_social": {
                        "type": "string"
                    },
                    "direccion": {
                        "type": "string"
                    },
                    "certificado": {
                        "description": "Certificado PEM en formato Base64 String. <br />Puede usar la api <a href='/doc#operation/company_cert'>Convertir P12, PFX </a> para generar el archivo PEM en Base64. </a> Tama\u00f1o m\u00e1ximo permitido 200KB. <br /><br /> Si desea realizar pruebas puede generar un certificado gratuito desde el endpoint <a href='/doc#tag/company/operation/company_certificate_free'>/companies/certificate/free</a>",
                        "type": "string"
                    },
                    "logo": {
                        "description": "Logo png en formato Base64 String. Tama\u00f1o m\u00e1ximo permitido 200KB.",
                        "type": "string"
                    },
                    "client_id": {
                        "description": "Credencial generado en el portal de SUNAT. Revisar este tutorial: <a href='https://youtu.be/y_-qfGpYKGA?si=fiVfvdq8FVDXW-M9' target='_blank'>https://youtu.be/y_-qfGpYKGA?si=fiVfvdq8FVDXW-M9 </a>. Opcional si desea usar la API SUNAT (requerido para la nueva versi\u00f3n de gu\u00edas de remisi\u00f3n)",
                        "type": "string"
                    },
                    "client_secret": {
                        "description": "Credencial generado en el portal de SUNAT. Revisar este tutorial: <a href='https://youtu.be/y_-qfGpYKGA?si=fiVfvdq8FVDXW-M9' target='_blank'>https://youtu.be/y_-qfGpYKGA?si=fiVfvdq8FVDXW-M9 </a>. Opcional si desea usar la API SUNAT (requerido para la nueva versi\u00f3n de gu\u00edas de remisi\u00f3n)",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "MyPlan": [],
            "Address": {
                "type": "object",
                "properties": {
                    "ubigueo": {
                        "type": "string"
                    },
                    "codigoPais": {
                        "type": "string"
                    },
                    "departamento": {
                        "type": "string"
                    },
                    "provincia": {
                        "type": "string"
                    },
                    "distrito": {
                        "type": "string"
                    },
                    "urbanizacion": {
                        "type": "string"
                    },
                    "direccion": {
                        "type": "string"
                    },
                    "codLocal": {
                        "type": "string"
                    }
                }
            },
            "Client": {
                "type": "object",
                "properties": {
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 06</a>",
                        "type": "string"
                    },
                    "numDoc": {
                        "type": "string"
                    },
                    "rznSocial": {
                        "type": "string"
                    },
                    "address": {
                        "$ref": "#/components/schemas/Address"
                    },
                    "email": {
                        "type": "string"
                    },
                    "telephone": {
                        "type": "string"
                    }
                }
            },
            "Company": {
                "type": "object",
                "properties": {
                    "ruc": {
                        "type": "string"
                    },
                    "razonSocial": {
                        "type": "string"
                    },
                    "nombreComercial": {
                        "type": "string"
                    },
                    "address": {
                        "$ref": "#/components/schemas/Address"
                    },
                    "email": {
                        "type": "string"
                    },
                    "telephone": {
                        "type": "string"
                    }
                }
            },
            "Charge": {
                "type": "object",
                "properties": {
                    "codTipo": {
                        "description": "<a href='https://orientacion.sunat.gob.pe/sites/default/files/inline-files/AnexosIyII_Formato1.3.4.xlsx' target='_blank'>Cat\u00e1logo No. 53</a>",
                        "type": "string"
                    },
                    "factor": {
                        "type": "number",
                        "format": "float"
                    },
                    "monto": {
                        "type": "number",
                        "format": "float"
                    },
                    "montoBase": {
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "DetailAttribute": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "value": {
                        "type": "string"
                    },
                    "fecInicio": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "fecFin": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "duracion": {
                        "type": "integer"
                    }
                }
            },
            "SaleDetail": {
                "type": "object",
                "properties": {
                    "unidad": {
                        "description": "<a href='http://www.sunat.gob.pe/orientacion/amazon/ple/PLEAnexo3TABLASfinal.xls' target='_blank'>Tabla 6</a>",
                        "type": "string"
                    },
                    "cantidad": {
                        "type": "number",
                        "format": "float"
                    },
                    "codProducto": {
                        "type": "string"
                    },
                    "codProdSunat": {
                        "type": "string"
                    },
                    "codProdGS1": {
                        "type": "string"
                    },
                    "descripcion": {
                        "type": "string"
                    },
                    "mtoValorUnitario": {
                        "type": "number",
                        "format": "float"
                    },
                    "descuento": {
                        "type": "number",
                        "format": "float"
                    },
                    "igv": {
                        "type": "number",
                        "format": "float"
                    },
                    "tipAfeIgv": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 07</a>",
                        "type": "string"
                    },
                    "isc": {
                        "type": "number",
                        "format": "float"
                    },
                    "tipSisIsc": {
                        "type": "string"
                    },
                    "totalImpuestos": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoPrecioUnitario": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoValorVenta": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoValorGratuito": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoBaseIgv": {
                        "type": "number",
                        "format": "float"
                    },
                    "porcentajeIgv": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoBaseIsc": {
                        "type": "number",
                        "format": "float"
                    },
                    "porcentajeIsc": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoBaseOth": {
                        "type": "number",
                        "format": "float"
                    },
                    "porcentajeOth": {
                        "type": "number",
                        "format": "float"
                    },
                    "otroTributo": {
                        "type": "number",
                        "format": "float"
                    },
                    "icbper": {
                        "type": "number",
                        "format": "float"
                    },
                    "factorIcbper": {
                        "type": "number",
                        "format": "float"
                    },
                    "cargos": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Charge"
                        }
                    },
                    "descuentos": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Charge"
                        }
                    },
                    "atributos": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/DetailAttribute"
                        }
                    }
                }
            },
            "Legend": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "value": {
                        "type": "string"
                    }
                }
            },
            "Document": {
                "type": "object",
                "properties": {
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No.  21: Documentos Relacionados</a>",
                        "type": "string"
                    },
                    "nroDoc": {
                        "type": "string"
                    }
                }
            },
            "SalePerception": {
                "type": "object",
                "properties": {
                    "codReg": {
                        "type": "string"
                    },
                    "porcentaje": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoBase": {
                        "type": "number",
                        "format": "float"
                    },
                    "mto": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoTotal": {
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "Direction": {
                "type": "object",
                "properties": {
                    "ubigueo": {
                        "type": "string"
                    },
                    "direccion": {
                        "type": "string"
                    },
                    "codLocal": {
                        "type": "string"
                    },
                    "ruc": {
                        "type": "string"
                    }
                }
            },
            "EmbededDespatch": {
                "type": "object",
                "properties": {
                    "llegada": {
                        "$ref": "#/components/schemas/Direction"
                    },
                    "partida": {
                        "$ref": "#/components/schemas/Direction"
                    },
                    "transportista": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "nroLicencia": {
                        "type": "string"
                    },
                    "transpPlaca": {
                        "type": "string"
                    },
                    "transpCodeAuth": {
                        "type": "string"
                    },
                    "transpMarca": {
                        "type": "string"
                    },
                    "modTraslado": {
                        "type": "string"
                    },
                    "pesoBruto": {
                        "type": "number",
                        "format": "float"
                    },
                    "undPesoBruto": {
                        "type": "string"
                    }
                }
            },
            "Prepayment": {
                "type": "object",
                "properties": {
                    "tipoDocRel": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 12</a>",
                        "type": "string"
                    },
                    "nroDocRel": {
                        "type": "string"
                    },
                    "total": {
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "Detraction": {
                "type": "object",
                "properties": {
                    "percent": {
                        "type": "number",
                        "format": "float"
                    },
                    "mount": {
                        "type": "number",
                        "format": "float"
                    },
                    "ctaBanco": {
                        "type": "string"
                    },
                    "codMedioPago": {
                        "type": "string"
                    },
                    "codBienDetraccion": {
                        "type": "string"
                    },
                    "valueRef": {
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "Invoice": {
                "type": "object",
                "properties": {
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 01</a>",
                        "type": "string"
                    },
                    "serie": {
                        "type": "string"
                    },
                    "correlativo": {
                        "type": "string"
                    },
                    "fechaEmision": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "formaPago": {
                        "$ref": "#/components/schemas/PaymentTerms"
                    },
                    "cuotas": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Cuota"
                        }
                    },
                    "client": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "company": {
                        "$ref": "#/components/schemas/Company"
                    },
                    "tipoMoneda": {
                        "type": "string"
                    },
                    "sumOtrosCargos": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperGravadas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperInafectas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperExoneradas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperExportacion": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoIGV": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoIGVGratuitas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoISC": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOtrosTributos": {
                        "type": "number",
                        "format": "float"
                    },
                    "icbper": {
                        "type": "number",
                        "format": "float"
                    },
                    "valorVenta": {
                        "type": "number",
                        "format": "float"
                    },
                    "subTotal": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoImpVenta": {
                        "type": "number",
                        "format": "float"
                    },
                    "details": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/SaleDetail"
                        }
                    },
                    "legends": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 15</a>",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Legend"
                        }
                    },
                    "guias": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Document"
                        }
                    },
                    "relDocs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Document"
                        }
                    },
                    "observacion": {
                        "type": "string"
                    },
                    "compra": {
                        "type": "string"
                    },
                    "mtoBaseIsc": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoBaseOth": {
                        "type": "number",
                        "format": "float"
                    },
                    "totalImpuestos": {
                        "type": "number",
                        "format": "float"
                    },
                    "ublVersion": {
                        "type": "string"
                    },
                    "tipoOperacion": {
                        "description": "<a href='http://cpe.sunat.gob.pe/sites/default/files/inline-files/anexoV-340-2017.pdf' target='_blank'>Cat\u00e1logo No. 51</a>",
                        "type": "string"
                    },
                    "fecVencimiento": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "sumDsctoGlobal": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoDescuentos": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperGratuitas": {
                        "type": "number",
                        "format": "float"
                    },
                    "totalAnticipos": {
                        "type": "number",
                        "format": "float"
                    },
                    "perception": {
                        "$ref": "#/components/schemas/SalePerception"
                    },
                    "guiaEmbebida": {
                        "$ref": "#/components/schemas/EmbededDespatch"
                    },
                    "anticipos": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Prepayment"
                        }
                    },
                    "detraccion": {
                        "$ref": "#/components/schemas/Detraction"
                    },
                    "seller": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "direccionEntrega": {
                        "$ref": "#/components/schemas/Address"
                    },
                    "descuentos": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Charge"
                        }
                    },
                    "cargos": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Charge"
                        }
                    },
                    "mtoCargos": {
                        "type": "number",
                        "format": "float"
                    },
                    "sumOtrosDescuentos": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoBaseIvap": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoIvap": {
                        "type": "number",
                        "format": "float"
                    },
                    "redondeo": {
                        "type": "number",
                        "format": "float"
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "Note": {
                "type": "object",
                "properties": {
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 01</a>",
                        "type": "string"
                    },
                    "serie": {
                        "type": "string"
                    },
                    "correlativo": {
                        "type": "string"
                    },
                    "fechaEmision": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "formaPago": {
                        "$ref": "#/components/schemas/PaymentTerms"
                    },
                    "cuotas": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Cuota"
                        }
                    },
                    "client": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "company": {
                        "$ref": "#/components/schemas/Company"
                    },
                    "tipoMoneda": {
                        "type": "string"
                    },
                    "sumOtrosCargos": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperGravadas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperInafectas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperExoneradas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperExportacion": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoIGV": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoIGVGratuitas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoISC": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOtrosTributos": {
                        "type": "number",
                        "format": "float"
                    },
                    "icbper": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoImpVenta": {
                        "type": "number",
                        "format": "float"
                    },
                    "details": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/SaleDetail"
                        }
                    },
                    "legends": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 15</a>",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Legend"
                        }
                    },
                    "guias": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Document"
                        }
                    },
                    "relDocs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Document"
                        }
                    },
                    "compra": {
                        "type": "string"
                    },
                    "mtoBaseIsc": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoBaseOth": {
                        "type": "number",
                        "format": "float"
                    },
                    "totalImpuestos": {
                        "type": "number",
                        "format": "float"
                    },
                    "ublVersion": {
                        "type": "string"
                    },
                    "codMotivo": {
                        "type": "string"
                    },
                    "desMotivo": {
                        "type": "string"
                    },
                    "tipDocAfectado": {
                        "type": "string"
                    },
                    "numDocfectado": {
                        "type": "string"
                    },
                    "mtoOperGratuitas": {
                        "type": "number",
                        "format": "float"
                    },
                    "perception": {
                        "$ref": "#/components/schemas/SalePerception"
                    },
                    "valorVenta": {
                        "type": "number",
                        "format": "float"
                    },
                    "subTotal": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoBaseIvap": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoIvap": {
                        "type": "number",
                        "format": "float"
                    },
                    "redondeo": {
                        "type": "number",
                        "format": "float"
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "PaymentTerms": {
                "type": "object",
                "properties": {
                    "moneda": {
                        "type": "string"
                    },
                    "tipo": {
                        "type": "string"
                    },
                    "monto": {
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "Cuota": {
                "type": "object",
                "properties": {
                    "moneda": {
                        "type": "string"
                    },
                    "monto": {
                        "type": "number",
                        "format": "float"
                    },
                    "fechaPago": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "SummaryPerception": {
                "type": "object",
                "properties": {
                    "codReg": {
                        "type": "string"
                    },
                    "tasa": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoBase": {
                        "type": "number",
                        "format": "float"
                    },
                    "mto": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoTotal": {
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "SummaryDetail": {
                "type": "object",
                "properties": {
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 01</a>",
                        "type": "string"
                    },
                    "serieNro": {
                        "type": "string"
                    },
                    "clienteTipo": {
                        "type": "string"
                    },
                    "clienteNro": {
                        "type": "string"
                    },
                    "docReferencia": {
                        "$ref": "#/components/schemas/Document"
                    },
                    "percepcion": {
                        "$ref": "#/components/schemas/SummaryPerception"
                    },
                    "estado": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2019/anexoV-114-2019.pdf' target='_blank'>No. 04</a>",
                        "type": "string"
                    },
                    "total": {
                        "type": "number",
                        "format": "float"
                    },
                    "porcentajeIgv": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperGravadas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperInafectas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperExoneradas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperExportacion": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOperGratuitas": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOtrosCargos": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoIGV": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoIvap": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoIcbper": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoISC": {
                        "type": "number",
                        "format": "float"
                    },
                    "mtoOtrosTributos": {
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "Summary": {
                "type": "object",
                "properties": {
                    "correlativo": {
                        "type": "string"
                    },
                    "fecGeneracion": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "fecResumen": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "moneda": {
                        "type": "string"
                    },
                    "company": {
                        "$ref": "#/components/schemas/Company"
                    },
                    "details": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/SummaryDetail"
                        }
                    },
                    "xmlId": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "VoidedDetail": {
                "type": "object",
                "properties": {
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 01</a>",
                        "type": "string"
                    },
                    "serie": {
                        "type": "string"
                    },
                    "correlativo": {
                        "type": "string"
                    },
                    "desMotivoBaja": {
                        "type": "string"
                    }
                }
            },
            "Voided": {
                "type": "object",
                "properties": {
                    "correlativo": {
                        "type": "string"
                    },
                    "fecGeneracion": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "fecComunicacion": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "company": {
                        "$ref": "#/components/schemas/Company"
                    },
                    "details": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/VoidedDetail"
                        }
                    },
                    "xmlId": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "Reversion": {
                "type": "object",
                "properties": {
                    "correlativo": {
                        "type": "string"
                    },
                    "fecGeneracion": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "fecComunicacion": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "company": {
                        "$ref": "#/components/schemas/Company"
                    },
                    "details": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/VoidedDetail"
                        }
                    },
                    "xmlId": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "Payment": {
                "type": "object",
                "properties": {
                    "moneda": {
                        "type": "string"
                    },
                    "importe": {
                        "type": "number",
                        "format": "float"
                    },
                    "fecha": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "Exchange": {
                "type": "object",
                "properties": {
                    "monedaRef": {
                        "type": "string"
                    },
                    "monedaObj": {
                        "type": "string"
                    },
                    "factor": {
                        "type": "number",
                        "format": "float"
                    },
                    "fecha": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "PerceptionDetail": {
                "type": "object",
                "properties": {
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 01</a>",
                        "type": "string"
                    },
                    "numDoc": {
                        "type": "string"
                    },
                    "fechaEmision": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "impTotal": {
                        "type": "number",
                        "format": "float"
                    },
                    "moneda": {
                        "type": "string"
                    },
                    "cobros": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Payment"
                        }
                    },
                    "fechaPercepcion": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "impPercibido": {
                        "type": "number",
                        "format": "float"
                    },
                    "impCobrar": {
                        "type": "number",
                        "format": "float"
                    },
                    "tipoCambio": {
                        "$ref": "#/components/schemas/Exchange"
                    }
                }
            },
            "Perception": {
                "type": "object",
                "properties": {
                    "serie": {
                        "type": "string"
                    },
                    "correlativo": {
                        "type": "string"
                    },
                    "fechaEmision": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "company": {
                        "$ref": "#/components/schemas/Company"
                    },
                    "proveedor": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "regimen": {
                        "type": "string"
                    },
                    "tasa": {
                        "type": "number",
                        "format": "float"
                    },
                    "impPercibido": {
                        "type": "number",
                        "format": "float"
                    },
                    "impCobrado": {
                        "type": "number",
                        "format": "float"
                    },
                    "observacion": {
                        "type": "string"
                    },
                    "details": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PerceptionDetail"
                        }
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "RetentionDetail": {
                "type": "object",
                "properties": {
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 01</a>",
                        "type": "string"
                    },
                    "numDoc": {
                        "type": "string"
                    },
                    "fechaEmision": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "impTotal": {
                        "type": "number",
                        "format": "float"
                    },
                    "moneda": {
                        "type": "string"
                    },
                    "pagos": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Payment"
                        }
                    },
                    "fechaRetencion": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "impRetenido": {
                        "type": "number",
                        "format": "float"
                    },
                    "impPagar": {
                        "type": "number",
                        "format": "float"
                    },
                    "tipoCambio": {
                        "$ref": "#/components/schemas/Exchange"
                    }
                }
            },
            "Retention": {
                "type": "object",
                "properties": {
                    "serie": {
                        "type": "string"
                    },
                    "correlativo": {
                        "type": "string"
                    },
                    "fechaEmision": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "proveedor": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "company": {
                        "$ref": "#/components/schemas/Company"
                    },
                    "regimen": {
                        "type": "string"
                    },
                    "tasa": {
                        "type": "number",
                        "format": "float"
                    },
                    "impRetenido": {
                        "type": "number",
                        "format": "float"
                    },
                    "impPagado": {
                        "type": "number",
                        "format": "float"
                    },
                    "observacion": {
                        "type": "string"
                    },
                    "details": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/RetentionDetail"
                        }
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "Puerto": {
                "type": "object",
                "properties": {
                    "codigo": {
                        "type": "string"
                    },
                    "nombre": {
                        "type": "string"
                    }
                }
            },
            "Transportist": {
                "type": "object",
                "properties": {
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 06</a>",
                        "type": "string"
                    },
                    "numDoc": {
                        "type": "string"
                    },
                    "rznSocial": {
                        "type": "string"
                    },
                    "nroMtc": {
                        "type": "string"
                    },
                    "placa": {
                        "type": "string"
                    },
                    "choferTipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 06</a>",
                        "type": "string"
                    },
                    "choferDoc": {
                        "type": "string"
                    }
                }
            },
            "Vehicle": {
                "type": "object",
                "properties": {
                    "placa": {
                        "type": "string"
                    },
                    "nroCirculacion": {
                        "type": "string"
                    },
                    "codEmisor": {
                        "type": "string"
                    },
                    "nroAutorizacion": {
                        "type": "string"
                    },
                    "secundarios": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Vehicle"
                        }
                    }
                }
            },
            "Driver": {
                "type": "object",
                "properties": {
                    "tipo": {
                        "type": "string"
                    },
                    "tipoDoc": {
                        "type": "string"
                    },
                    "nroDoc": {
                        "type": "string"
                    },
                    "nombres": {
                        "type": "string"
                    },
                    "apellidos": {
                        "type": "string"
                    },
                    "licencia": {
                        "type": "string"
                    }
                }
            },
            "Shipment": {
                "type": "object",
                "properties": {
                    "codTraslado": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 20</a>",
                        "type": "string"
                    },
                    "desTraslado": {
                        "type": "string"
                    },
                    "sustentoPeso": {
                        "type": "string"
                    },
                    "indTransbordo": {
                        "type": "boolean"
                    },
                    "indicadores": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "pesoItems": {
                        "type": "number",
                        "format": "float"
                    },
                    "pesoTotal": {
                        "type": "number",
                        "format": "float"
                    },
                    "undPesoTotal": {
                        "type": "string"
                    },
                    "numBultos": {
                        "type": "integer"
                    },
                    "modTraslado": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 18</a>",
                        "type": "string"
                    },
                    "fecTraslado": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "fecEntregaBienes": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "numContenedor": {
                        "type": "string"
                    },
                    "contenedores": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "codPuerto": {
                        "type": "string"
                    },
                    "puerto": {
                        "$ref": "#/components/schemas/Puerto"
                    },
                    "aeropuerto": {
                        "$ref": "#/components/schemas/Puerto"
                    },
                    "transportista": {
                        "$ref": "#/components/schemas/Transportist"
                    },
                    "vehiculo": {
                        "$ref": "#/components/schemas/Vehicle"
                    },
                    "choferes": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Driver"
                        }
                    },
                    "llegada": {
                        "$ref": "#/components/schemas/Direction"
                    },
                    "partida": {
                        "$ref": "#/components/schemas/Direction"
                    }
                }
            },
            "AdditionalDoc": {
                "type": "object",
                "properties": {
                    "tipoDesc": {
                        "type": "string"
                    },
                    "tipo": {
                        "type": "string"
                    },
                    "nro": {
                        "type": "string"
                    },
                    "emisor": {
                        "type": "string"
                    }
                }
            },
            "DespatchDetail": {
                "type": "object",
                "properties": {
                    "codigo": {
                        "type": "string"
                    },
                    "descripcion": {
                        "type": "string"
                    },
                    "unidad": {
                        "description": "<a href='http://www.sunat.gob.pe/orientacion/amazon/ple/PLEAnexo3TABLASfinal.xls' target='_blank'>Tabla 6</a>",
                        "type": "string"
                    },
                    "cantidad": {
                        "type": "number",
                        "format": "float"
                    },
                    "codProdSunat": {
                        "type": "string"
                    },
                    "atributos": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/DetailAttribute"
                        }
                    }
                }
            },
            "Despatch": {
                "type": "object",
                "properties": {
                    "version": {
                        "type": "string"
                    },
                    "tipoDoc": {
                        "description": "<a href='http://www.sunat.gob.pe/legislacion/superin/2017/anexoVII-117-2017.pdf' target='_blank'>Cat\u00e1logo No. 01</a>",
                        "type": "string"
                    },
                    "serie": {
                        "type": "string"
                    },
                    "correlativo": {
                        "type": "string"
                    },
                    "observacion": {
                        "type": "string"
                    },
                    "fechaEmision": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "company": {
                        "$ref": "#/components/schemas/Company"
                    },
                    "destinatario": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "tercero": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "comprador": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "envio": {
                        "$ref": "#/components/schemas/Shipment"
                    },
                    "remitente": {
                        "$ref": "#/components/schemas/Client"
                    },
                    "docBaja": {
                        "$ref": "#/components/schemas/Document"
                    },
                    "relDoc": {
                        "$ref": "#/components/schemas/Document"
                    },
                    "addDocs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AdditionalDoc"
                        }
                    },
                    "details": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/DespatchDetail"
                        }
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "Error": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    }
                }
            },
            "CdrResponse": {
                "type": "object",
                "properties": {
                    "accepted": {
                        "type": "boolean",
                        "readOnly": true
                    },
                    "id": {
                        "type": "string"
                    },
                    "code": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "notes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "BillResult": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    },
                    "error": {
                        "$ref": "#/components/schemas/Error"
                    },
                    "cdrZip": {
                        "type": "string",
                        "format": "byte"
                    },
                    "cdrResponse": {
                        "$ref": "#/components/schemas/CdrResponse"
                    }
                }
            },
            "SummaryResult": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    },
                    "error": {
                        "$ref": "#/components/schemas/Error"
                    },
                    "ticket": {
                        "type": "string"
                    }
                }
            },
            "StatusResult": {
                "type": "object",
                "properties": {
                    "cdrZip": {
                        "type": "string",
                        "format": "byte"
                    },
                    "cdrResponse": {
                        "$ref": "#/components/schemas/CdrResponse"
                    },
                    "success": {
                        "type": "boolean"
                    },
                    "error": {
                        "$ref": "#/components/schemas/Error"
                    },
                    "code": {
                        "type": "string"
                    }
                }
            },
            "DocumentResponse": {
                "type": "object",
                "properties": {
                    "xml": {
                        "type": "string"
                    },
                    "hash": {
                        "type": "string",
                        "description": "Resumen de la Firma Digital"
                    },
                    "sunatResponse": {
                        "$ref": "#/components/schemas/BillResult"
                    }
                }
            },
            "SummaryResponse": {
                "type": "object",
                "properties": {
                    "xml": {
                        "type": "string"
                    },
                    "hash": {
                        "type": "string",
                        "description": "Resumen de la Firma Digital"
                    },
                    "sunatResponse": {
                        "$ref": "#/components/schemas/SummaryResult"
                    }
                }
            },
            "ValidationResponse": {
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "field": {
                        "type": "string"
                    }
                }
            },
            "FilesData": {
                "type": "object",
                "properties": {
                    "certificate": {
                        "type": "string",
                        "description": "certificado PEM en formato Base64"
                    },
                    "logo": {
                        "type": "string",
                        "description": "logo png en formato Base64"
                    }
                }
            },
            "QrParameter": {
                "type": "object",
                "properties": {
                    "ruc": {
                        "type": "string",
                        "description": "ruc del emisor"
                    },
                    "tipo": {
                        "type": "string",
                        "description": "tipo de comprobante"
                    },
                    "serie": {
                        "type": "string"
                    },
                    "numero": {
                        "type": "string"
                    },
                    "emision": {
                        "type": "string",
                        "format": "date",
                        "description": "fecha de emisi\u00f3n"
                    },
                    "igv": {
                        "type": "number",
                        "format": "float"
                    },
                    "total": {
                        "type": "number",
                        "format": "float",
                        "description": "total importe de venta"
                    },
                    "clienteTipo": {
                        "type": "string",
                        "description": "Tipo de documento del cliente"
                    },
                    "clienteNumero": {
                        "type": "string",
                        "description": "Numero de documento del cliente"
                    }
                }
            }
        }
    }
}