{
    "openapi": "3.1.0",
    "info": {
        "title": "Facxius API \u2013 Documenta\u00e7\u00e3o",
        "version": "1.0.0",
        "description": "# Facxius API\n\nAPI REST p\u00fablica para integraci\u00f3n con el sistema de facturaci\u00f3n electr\u00f3nica **Facxius**.\n\n## Autenticaci\u00f3n\n\nTodas las rutas requieren autenticaci\u00f3n mediante **API Key** en el header:\n\n```\nAuthorization: Bearer fxk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n```\n\nLas API Keys se generan desde el panel de control en **Configuraci\u00f3n \u2192 API Keys**.\n\n## Ambientes\n\n| Ambiente | Prefijo de la Key | L\u00edmite de tasa |\n|---|---|---|\n| Pruebas | `fxk_test_` | 60 req\/min |\n| Producci\u00f3n | `fxk_live_` | 300 req\/min |\n\n## Errores\n\nLa API retorna errores en formato JSON:\n\n```json\n{\n  \"error\": \"codigo_del_error\",\n  \"message\": \"Descripci\u00f3n legible del error.\"\n}\n```"
    },
    "servers": [
        {
            "url": "https:\/\/facxius.com\/api\/v1"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/me": {
            "get": {
                "operationId": "v1.me",
                "summary": "GET \/api\/v1\/me\nRetorna la informaci\u00f3n de la empresa autenticada y los datos de la API Key en uso",
                "tags": [
                    "Auth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "empresa": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "ruc": {
                                                    "type": "string"
                                                },
                                                "razon_social": {
                                                    "type": "string"
                                                },
                                                "nombre_comercial": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ambiente": {
                                                    "type": "string"
                                                },
                                                "regimen": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "ruc",
                                                "razon_social",
                                                "nombre_comercial",
                                                "ambiente",
                                                "regimen"
                                            ]
                                        },
                                        "api_key": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "nombre": {
                                                    "type": "string"
                                                },
                                                "ambiente": {
                                                    "type": "string"
                                                },
                                                "permisos": {
                                                    "type": "string"
                                                },
                                                "ultimo_uso": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "nombre",
                                                "ambiente",
                                                "permisos",
                                                "ultimo_uso"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "empresa",
                                        "api_key"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/clientes": {
            "get": {
                "operationId": "v1.clientes.index",
                "summary": "GET \/api\/v1\/clientes\nLista los clientes de la empresa (paginado, con b\u00fasqueda opcional)",
                "tags": [
                    "Cliente"
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ClienteResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ClienteResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.clientes.store",
                "summary": "POST \/api\/v1\/clientes\nCrea un nuevo cliente",
                "tags": [
                    "Cliente"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreClienteRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`ClienteResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ClienteResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/clientes\/{cliente}": {
            "get": {
                "operationId": "v1.clientes.show",
                "summary": "GET \/api\/v1\/clientes\/{cliente}\nDetalle de un cliente",
                "tags": [
                    "Cliente"
                ],
                "parameters": [
                    {
                        "name": "cliente",
                        "in": "path",
                        "required": true,
                        "description": "The cliente ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ClienteResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ClienteResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.clientes.update",
                "summary": "PUT \/api\/v1\/clientes\/{cliente}\nActualiza un cliente",
                "tags": [
                    "Cliente"
                ],
                "parameters": [
                    {
                        "name": "cliente",
                        "in": "path",
                        "required": true,
                        "description": "The cliente ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateClienteRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`ClienteResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ClienteResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.clientes.destroy",
                "summary": "DELETE \/api\/v1\/clientes\/{cliente}\nElimina un cliente (soft-delete)",
                "tags": [
                    "Cliente"
                ],
                "parameters": [
                    {
                        "name": "cliente",
                        "in": "path",
                        "required": true,
                        "description": "The cliente ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Cliente eliminado correctamente."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/documentos": {
            "get": {
                "operationId": "v1.documentos.index",
                "description": "Query params: tipo, estado, fecha_inicio, fecha_fin, q",
                "summary": "GET \/api\/v1\/documentos\nLista los documentos con filtros opcionales",
                "tags": [
                    "Documento"
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `DocumentoResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/DocumentoResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/documentos\/{documento}": {
            "get": {
                "operationId": "v1.documentos.show",
                "summary": "GET \/api\/v1\/documentos\/{documento}\nDetalle completo de un documento (items, formas de pago)",
                "tags": [
                    "Documento"
                ],
                "parameters": [
                    {
                        "name": "documento",
                        "in": "path",
                        "required": true,
                        "description": "The documento ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`DocumentoResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentoResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/documentos\/{documento}\/emitir": {
            "post": {
                "operationId": "v1.documentos.emitir",
                "description": "Retorna 200 si fue autorizado, 202 si est\u00e1 en procesamiento,\n422 si fue devuelto o no autorizado por el SRI.",
                "summary": "POST \/api\/v1\/documentos\/{documento}\/emitir\nEjecuta el flujo de emisi\u00f3n SRI para un documento en estado CREADO",
                "tags": [
                    "Documento"
                ],
                "parameters": [
                    {
                        "name": "documento",
                        "in": "path",
                        "required": true,
                        "description": "The documento ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "const": "estado_invalido"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/documentos\/{documento}\/pdf": {
            "get": {
                "operationId": "v1.documentos.pdf",
                "description": "Solo disponible para documentos en estado AUTORIZADO.",
                "summary": "GET \/api\/v1\/documentos\/{documento}\/pdf\nDescarga el RIDE en formato PDF",
                "tags": [
                    "Documento"
                ],
                "parameters": [
                    {
                        "name": "documento",
                        "in": "path",
                        "required": true,
                        "description": "The documento ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/pdf": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "headers": {
                            "Transfer-Encoding": {
                                "required": true,
                                "schema": {
                                    "type": "string",
                                    "enum": [
                                        "chunked"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": "El PDF solo est\u00e1 disponible para documentos autorizados."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/documentos\/{documento}\/xml": {
            "get": {
                "operationId": "v1.documentos.xml",
                "description": "Solo disponible para documentos en estado AUTORIZADO.",
                "summary": "GET \/api\/v1\/documentos\/{documento}\/xml\nDescarga el XML autorizado del documento",
                "tags": [
                    "Documento"
                ],
                "parameters": [
                    {
                        "name": "documento",
                        "in": "path",
                        "required": true,
                        "description": "The documento ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/xml": {
                                "schema": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Content-Disposition": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/facturas": {
            "post": {
                "operationId": "v1.facturas.store",
                "description": "Crea una factura y opcionalmente la emite al SRI en una sola llamada.",
                "summary": "POST \/api\/v1\/facturas",
                "tags": [
                    "Factura"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreFacturaRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`DocumentoResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentoResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/productos": {
            "get": {
                "operationId": "v1.productos.index",
                "summary": "GET \/api\/v1\/productos\nLista los productos de la empresa (paginado, con b\u00fasqueda opcional)",
                "tags": [
                    "Producto"
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ProductoResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ProductoResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.productos.store",
                "summary": "POST \/api\/v1\/productos\nCrea un nuevo producto o servicio",
                "tags": [
                    "Producto"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreProductoRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`ProductoResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductoResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/productos\/{producto}": {
            "get": {
                "operationId": "v1.productos.show",
                "summary": "GET \/api\/v1\/productos\/{producto}\nDetalle de un producto",
                "tags": [
                    "Producto"
                ],
                "parameters": [
                    {
                        "name": "producto",
                        "in": "path",
                        "required": true,
                        "description": "The producto ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ProductoResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductoResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.productos.update",
                "summary": "PUT \/api\/v1\/productos\/{producto}\nActualiza un producto",
                "tags": [
                    "Producto"
                ],
                "parameters": [
                    {
                        "name": "producto",
                        "in": "path",
                        "required": true,
                        "description": "The producto ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateProductoRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`ProductoResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductoResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.productos.destroy",
                "summary": "DELETE \/api\/v1\/productos\/{producto}\nElimina un producto (soft-delete)",
                "tags": [
                    "Producto"
                ],
                "parameters": [
                    {
                        "name": "producto",
                        "in": "path",
                        "required": true,
                        "description": "The producto ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Producto eliminado correctamente."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/webhooks": {
            "get": {
                "operationId": "v1.webhooks.index",
                "summary": "GET \/api\/v1\/webhooks\nLista los endpoints webhook registrados",
                "tags": [
                    "Webhook"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/Webhook"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.webhooks.store",
                "summary": "POST \/api\/v1\/webhooks\nRegistra un nuevo endpoint webhook",
                "tags": [
                    "Webhook"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 500
                                    },
                                    "secret": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 16,
                                        "maxLength": 100
                                    },
                                    "eventos": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                "factura.autorizada",
                                                "factura.rechazada",
                                                "factura.creada",
                                                "nota_credito.autorizada",
                                                "nota_credito.rechazada",
                                                "documento.emitido"
                                            ]
                                        },
                                        "minItems": 1
                                    }
                                },
                                "required": [
                                    "url",
                                    "eventos"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/Webhook"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Webhook registrado. Guarda el campo `secret`, no se mostrar\u00e1 nuevamente."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/webhooks\/{webhook}": {
            "get": {
                "operationId": "v1.webhooks.show",
                "summary": "GET \/api\/v1\/webhooks\/{webhook}\nDetalle de un webhook (sin el secret)",
                "tags": [
                    "Webhook"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/Webhook"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.webhooks.update",
                "summary": "PUT \/api\/v1\/webhooks\/{webhook}\nActualiza la URL, eventos o estado activo de un webhook",
                "tags": [
                    "Webhook"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 500
                                    },
                                    "activo": {
                                        "type": "boolean"
                                    },
                                    "eventos": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                "factura.autorizada",
                                                "factura.rechazada",
                                                "factura.creada",
                                                "nota_credito.autorizada",
                                                "nota_credito.rechazada",
                                                "documento.emitido"
                                            ]
                                        },
                                        "minItems": 1
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/Webhook"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.webhooks.destroy",
                "summary": "DELETE \/api\/v1\/webhooks\/{webhook}\nElimina un webhook y todos sus logs",
                "tags": [
                    "Webhook"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Webhook eliminado correctamente."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/webhooks\/{webhook}\/logs": {
            "get": {
                "operationId": "v1.webhooks.logs",
                "summary": "GET \/api\/v1\/webhooks\/{webhook}\/logs\nHistorial de entregas del webhook (\u00faltimas 100)",
                "tags": [
                    "Webhook"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/LengthAwarePaginator"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/webhooks\/{webhook}\/ping": {
            "post": {
                "operationId": "v1.webhooks.ping",
                "summary": "POST \/api\/v1\/webhooks\/{webhook}\/ping\nEnv\u00eda un evento de prueba al endpoint para verificar la conectividad",
                "tags": [
                    "Webhook"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Ping enviado a la cola. Revisa los logs en unos segundos."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "ClienteResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "tipo_identificacion": {
                        "type": "string"
                    },
                    "identificacion": {
                        "type": "string"
                    },
                    "razon_social": {
                        "type": "string"
                    },
                    "nombre_comercial": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email2": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email3": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "telefono": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "direccion": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "ciudad": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "pais": {
                        "type": "string"
                    },
                    "activo": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "tipo_identificacion",
                    "identificacion",
                    "razon_social",
                    "nombre_comercial",
                    "email",
                    "email2",
                    "email3",
                    "telefono",
                    "direccion",
                    "ciudad",
                    "pais",
                    "activo",
                    "created_at",
                    "updated_at"
                ],
                "title": "ClienteResource"
            },
            "DocumentoResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "tipo": {
                        "type": "string"
                    },
                    "numero": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "numero_establecimiento": {
                        "type": "string"
                    },
                    "numero_punto": {
                        "type": "string"
                    },
                    "numero_secuencia": {
                        "type": "string"
                    },
                    "estado": {
                        "type": "string"
                    },
                    "ambiente": {
                        "type": "string"
                    },
                    "clave_acceso": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "fecha_documento": {
                        "type": "string"
                    },
                    "fecha_autorizacion": {
                        "type": "string"
                    },
                    "subtotal": {
                        "type": "number"
                    },
                    "descuento_total": {
                        "type": "number"
                    },
                    "base_imponible": {
                        "type": "number"
                    },
                    "iva_total": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    },
                    "cliente": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "identificacion": {
                                "type": "string"
                            },
                            "razon_social": {
                                "type": "string"
                            },
                            "email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "id",
                            "identificacion",
                            "razon_social",
                            "email"
                        ]
                    },
                    "punto_emision": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "establecimiento": {
                                "type": "string"
                            },
                            "punto": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "establecimiento",
                            "punto"
                        ]
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/ItemDocumentoResource"
                        }
                    },
                    "formas_pago": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "forma_pago": {
                                    "type": "string"
                                },
                                "codigo_sri": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "importe": {
                                    "type": "number"
                                },
                                "plazo": {
                                    "type": "integer"
                                },
                                "unidad_tiempo": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "forma_pago",
                                "codigo_sri",
                                "importe",
                                "plazo",
                                "unidad_tiempo"
                            ]
                        }
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "tipo",
                    "numero",
                    "numero_establecimiento",
                    "numero_punto",
                    "numero_secuencia",
                    "estado",
                    "ambiente",
                    "clave_acceso",
                    "fecha_documento",
                    "fecha_autorizacion",
                    "subtotal",
                    "descuento_total",
                    "base_imponible",
                    "iva_total",
                    "total",
                    "created_at",
                    "updated_at"
                ],
                "title": "DocumentoResource"
            },
            "ItemDocumentoResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "codigo": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "descripcion": {
                        "type": "string"
                    },
                    "cantidad": {
                        "type": "number"
                    },
                    "precio_unitario": {
                        "type": "number"
                    },
                    "descuento": {
                        "type": "number"
                    },
                    "tiene_iva": {
                        "type": "boolean"
                    },
                    "porcentaje_iva": {
                        "type": "number"
                    },
                    "valor_iva": {
                        "type": "number"
                    }
                },
                "required": [
                    "id",
                    "codigo",
                    "descripcion",
                    "cantidad",
                    "precio_unitario",
                    "descuento",
                    "tiene_iva",
                    "porcentaje_iva",
                    "valor_iva"
                ],
                "title": "ItemDocumentoResource"
            },
            "LengthAwarePaginator": {
                "type": "object",
                "properties": {
                    "current_page": {
                        "type": "integer"
                    },
                    "data": {
                        "type": "string"
                    },
                    "first_page_url": {
                        "type": "string"
                    },
                    "from": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "last_page": {
                        "type": "integer"
                    },
                    "last_page_url": {
                        "type": "string"
                    },
                    "links": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "next_page_url": {
                        "type": "string"
                    },
                    "path": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "per_page": {
                        "type": "integer"
                    },
                    "prev_page_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "to": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "total": {
                        "type": "integer"
                    }
                },
                "required": [
                    "current_page",
                    "data",
                    "first_page_url",
                    "from",
                    "last_page",
                    "last_page_url",
                    "links",
                    "next_page_url",
                    "path",
                    "per_page",
                    "prev_page_url",
                    "to",
                    "total"
                ],
                "title": "LengthAwarePaginator"
            },
            "ProductoResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "codigo": {
                        "type": "string"
                    },
                    "descripcion": {
                        "type": "string"
                    },
                    "precio": {
                        "type": "number"
                    },
                    "tiene_iva": {
                        "type": "boolean"
                    },
                    "porcentaje_iva": {
                        "type": "number"
                    },
                    "controla_inventario": {
                        "type": "boolean"
                    },
                    "stock": {
                        "type": "number"
                    },
                    "stock_minimo": {
                        "type": "number"
                    },
                    "precio_compra": {
                        "type": "number"
                    },
                    "activo": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "codigo",
                    "descripcion",
                    "precio",
                    "tiene_iva",
                    "porcentaje_iva",
                    "controla_inventario",
                    "stock",
                    "stock_minimo",
                    "precio_compra",
                    "activo",
                    "created_at",
                    "updated_at"
                ],
                "title": "ProductoResource"
            },
            "StoreClienteRequest": {
                "type": "object",
                "properties": {
                    "tipo_identificacion": {
                        "type": "string",
                        "enum": [
                            "RUC",
                            "CEDULA",
                            "PASAPORTE",
                            "CONSUMIDOR_FINAL",
                            "EXTERIOR"
                        ]
                    },
                    "identificacion": {
                        "type": "string",
                        "maxLength": 20
                    },
                    "razon_social": {
                        "type": "string",
                        "maxLength": 200
                    },
                    "nombre_comercial": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 200
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 100
                    },
                    "email2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 100
                    },
                    "email3": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 100
                    },
                    "telefono": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20
                    },
                    "direccion": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "ciudad": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "pais": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    }
                },
                "required": [
                    "tipo_identificacion",
                    "identificacion",
                    "razon_social"
                ],
                "title": "StoreClienteRequest"
            },
            "StoreFacturaRequest": {
                "type": "object",
                "properties": {
                    "cliente_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "punto_emision_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "fecha_documento": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date"
                    },
                    "forma_pago": {
                        "type": "string",
                        "enum": [
                            "01",
                            "15",
                            "16",
                            "17",
                            "18",
                            "19",
                            "20",
                            "21"
                        ]
                    },
                    "plazo": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "unidad_tiempo": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "dias",
                            "meses"
                        ]
                    },
                    "emitir": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "producto_id": {
                                    "type": "string",
                                    "format": "uuid"
                                },
                                "cantidad": {
                                    "type": "number",
                                    "minimum": 0.0001
                                },
                                "precio_unitario": {
                                    "type": [
                                        "number",
                                        "null"
                                    ],
                                    "minimum": 0
                                },
                                "descuento": {
                                    "type": [
                                        "number",
                                        "null"
                                    ],
                                    "minimum": 0
                                }
                            },
                            "required": [
                                "producto_id",
                                "cantidad"
                            ]
                        },
                        "minItems": 1
                    },
                    "info_adicional": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "nombre": {
                                    "type": "string",
                                    "maxLength": 100
                                },
                                "valor": {
                                    "type": "string",
                                    "maxLength": 300
                                }
                            }
                        }
                    }
                },
                "required": [
                    "cliente_id",
                    "punto_emision_id",
                    "forma_pago",
                    "items"
                ],
                "title": "StoreFacturaRequest"
            },
            "StoreProductoRequest": {
                "type": "object",
                "properties": {
                    "codigo": {
                        "type": "string",
                        "maxLength": 50
                    },
                    "descripcion": {
                        "type": "string",
                        "maxLength": 500
                    },
                    "precio": {
                        "type": "number",
                        "minimum": 0
                    },
                    "tiene_iva": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "porcentaje_iva": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 100
                    },
                    "controla_inventario": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "stock": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "stock_minimo": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "precio_compra": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    }
                },
                "required": [
                    "codigo",
                    "descripcion",
                    "precio"
                ],
                "title": "StoreProductoRequest"
            },
            "UpdateClienteRequest": {
                "type": "object",
                "properties": {
                    "tipo_identificacion": {
                        "type": "string",
                        "enum": [
                            "RUC",
                            "CEDULA",
                            "PASAPORTE",
                            "CONSUMIDOR_FINAL",
                            "EXTERIOR"
                        ]
                    },
                    "identificacion": {
                        "type": "string",
                        "maxLength": 20
                    },
                    "razon_social": {
                        "type": "string",
                        "maxLength": 200
                    },
                    "nombre_comercial": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 200
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 100
                    },
                    "email2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 100
                    },
                    "email3": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 100
                    },
                    "telefono": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20
                    },
                    "direccion": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "ciudad": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "pais": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "activo": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    }
                },
                "title": "UpdateClienteRequest"
            },
            "UpdateProductoRequest": {
                "type": "object",
                "properties": {
                    "codigo": {
                        "type": "string",
                        "maxLength": 50
                    },
                    "descripcion": {
                        "type": "string",
                        "maxLength": 500
                    },
                    "precio": {
                        "type": "number",
                        "minimum": 0
                    },
                    "tiene_iva": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "porcentaje_iva": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 100
                    },
                    "controla_inventario": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "stock": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "stock_minimo": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "precio_compra": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "activo": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    }
                },
                "title": "UpdateProductoRequest"
            },
            "Webhook": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "empresa_id": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "eventos": {
                        "type": "array",
                        "items": {}
                    },
                    "activo": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "empresa_id",
                    "url",
                    "eventos",
                    "activo",
                    "created_at",
                    "updated_at"
                ],
                "title": "Webhook"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}