{
"openapi": "3.0.0",
"info": {
"title": "PlanB API",
"description": "Documentación de la API de PlanB con integración Toku",
"contact": {
"email": "soporte@bradford.cl"
},
"version": "1.0.0"
},
"servers": [
{
"url": "https://api-planb.bradford.cl/api",
"description": "Servidor Producción"
},
{
"url": "http://localhost:8000/api",
"description": "Servidor Local"
}
],
"paths": {
"/signapis/documents/batch/file": {
"post": {
"tags": [
"SignApis/Batch"
],
"summary": "Subir un documento temporal para incluirlo en un lote",
"operationId": "319b403aac12dcff0081e0282f76d161",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"example": "contrato.pdf"
},
"document": {
"type": "string",
"example": "http://url.com/file.pdf"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Documento temporal subido exitosamente"
}
}
}
},
"/signapis/documents/batch": {
"post": {
"tags": [
"SignApis/Batch"
],
"summary": "Crear un lote de documentos para firma",
"operationId": "4359298498dc8be15d0ad214866932c5",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"flow": {
"type": "string",
"enum": [
"INDIVIDUAL",
"SEQUENTIAL",
"PARALLEL"
],
"example": "SEQUENTIAL"
},
"documents": {
"type": "array",
"items": {
"type": "object"
}
},
"signatories": {
"type": "array",
"items": {
"type": "object"
}
},
"metadata": {
"type": "object"
},
"preSign": {
"type": "boolean",
"example": false
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Lote creado exitosamente"
}
}
}
},
"/signapis/documents/batch/signatories/{signatoryId}/sign": {
"post": {
"tags": [
"SignApis/Batch"
],
"summary": "Firmar un lote de documentos (signatario)",
"operationId": "50965042143ee8e17a707402acb1f349",
"parameters": [
{
"name": "signatoryId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "b1f2bb89-70a0-4f4c-b783-058c5afe3e80"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"signatureType": {
"type": "integer",
"enum": [
1,
2,
3
],
"example": 1
},
"signatureText": {
"type": "string",
"example": "John Doe"
},
"signatureImage": {
"type": "string",
"example": "base64string"
},
"geolocation": {
"type": "string",
"example": "-33.4489,-70.6693"
},
"geolocationReference": {
"type": "string",
"example": "Santiago, Chile"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Lote firmado exitosamente"
}
}
}
},
"/signapis/documents/batch/signatories/{signatoryId}/reject": {
"post": {
"tags": [
"SignApis/Batch"
],
"summary": "Rechazar un lote de documentos como firmante",
"operationId": "e2a37b344b3de9a258ca780b39f97aea",
"parameters": [
{
"name": "signatoryId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "cee2d963-634a-443e-9eb3-f151f720a5b0"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"observation": {
"type": "string",
"example": "Hay que corregir los documentos"
},
"geolocation": {
"type": "string",
"example": "-33.4489,-70.6693"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Lote rechazado exitosamente"
}
}
}
},
"/signapis/documents/batch/{groupId}": {
"get": {
"tags": [
"SignApis/Batch"
],
"summary": "Obtener la información de un lote de documentos",
"operationId": "c974e1d13eb5cb8c2ad52965a1dd9577",
"parameters": [
{
"name": "groupId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "29de9c96-b8a2-4e60-a3ac-3d9d45ae069d"
}
],
"responses": {
"200": {
"description": "Información del lote obtenida exitosamente"
}
}
}
},
"/signapis/documents/batch/{groupId}/cancel": {
"patch": {
"tags": [
"SignApis/Batch"
],
"summary": "Cancelar un lote de documentos por su groupId",
"operationId": "382119bf1fa550bea7b493f5fd82b0ca",
"parameters": [
{
"name": "groupId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "29de9c96-b8a2-4e60-a3ac-3d9d45ae069d"
}
],
"responses": {
"200": {
"description": "Lote cancelado exitosamente"
}
}
}
},
"/signapis/documents/batch/certify": {
"post": {
"tags": [
"SignApis/Batch"
],
"summary": "Certificar un lote previamente firmado (status PRESIGNED)",
"operationId": "20d782d82d8bf2296e96226c157e9a7f",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"groupId": {
"type": "string",
"example": "7d4dda45-0e5f-480a-ac0e-c9fcbeec4c92"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Lote certificado exitosamente"
}
}
}
},
"/signapis/documents/batch/{groupId}/summary/{email}": {
"get": {
"tags": [
"SignApis/Batch"
],
"summary": "Obtener información del firmante de un lote firmado",
"operationId": "2cf9eae7c6d9281e33fe4aefb25a0761",
"parameters": [
{
"name": "groupId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "29de9c96-b8a2-4e60-a3ac-3d9d45ae069d"
},
{
"name": "email",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "john.doe@mail.com"
}
],
"responses": {
"200": {
"description": "Información del firmante obtenida"
}
}
},
"patch": {
"tags": [
"SignApis/Batch"
],
"summary": "Modificar datos de un firmante de un lote (estado PRESIGNED)",
"operationId": "ce2021f7ea68b023d1d7189ebb61327d",
"parameters": [
{
"name": "groupId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "29de9c96-b8a2-4e60-a3ac-3d9d45ae069d"
},
{
"name": "email",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "john.doe@mail.com"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"fullName": {
"type": "string",
"example": "John Doe"
},
"email": {
"type": "string",
"example": "john.doe@mail.com"
},
"biometric": {
"type": "object",
"example": {
"identification": "12345678-9"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Firmante actualizado exitosamente"
}
}
}
},
"/signapis/documents": {
"post": {
"tags": [
"SignApis/Documentos"
],
"summary": "Crear un documento para firma",
"operationId": "3bb4f655b1de877fddb818ead77893f3",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
},
"document": {
"type": "string"
},
"flow": {
"type": "string"
},
"signatories": {
"type": "array",
"items": {
"type": "object"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Documento creado"
}
}
}
},
"/signapis/documents/{documentId}": {
"get": {
"tags": [
"SignApis/Documentos"
],
"summary": "Obtener documento por ID",
"operationId": "3d3b757d78cbef25ab67278f11ec878e",
"parameters": [
{
"name": "documentId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Documento obtenido"
}
}
}
},
"/signapis/documents/signatories": {
"post": {
"tags": [
"SignApis/Documents"
],
"summary": "Agregar firmantes adicionales a un documento pendiente",
"operationId": "c50d6f3f4b496ee9f2c50566a7ff35e3",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"documentId": {
"type": "string",
"example": "123e4567-e89b-12d3-a456-426614174000"
},
"signatories": {
"type": "array",
"items": {
"type": "object",
"example": {
"email": "john@mail.com",
"fullName": "John Doe"
}
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Firmantes agregados exitosamente"
},
"400": {
"description": "Error de validación"
}
}
}
},
"/signapis/documents/signatories/{signatoryId}": {
"delete": {
"tags": [
"SignApis/Documents"
],
"summary": "Eliminar un firmante de un documento pendiente",
"operationId": "0d20bfe20d26be81b5235e0cadf56024",
"parameters": [
{
"name": "signatoryId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "cee2d963-634a-443e-9eb3-f151f720a5b0"
}
],
"responses": {
"200": {
"description": "Firmante eliminado exitosamente"
}
}
},
"patch": {
"tags": [
"SignApis/Documents"
],
"summary": "Actualizar la información de un firmante",
"operationId": "a76af98bd89d29e0da2ecce2d5ed4461",
"parameters": [
{
"name": "signatoryId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "cee2d963-634a-443e-9eb3-f151f720a5b0"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"email": {
"type": "string",
"example": "new@mail.com"
},
"fullName": {
"type": "string",
"example": "Nuevo Nombre"
},
"phoneNumber": {
"type": "string",
"example": "+56911111111"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Firmante actualizado"
},
"404": {
"description": "Firmante no encontrado"
}
}
}
},
"/signapis/documents/signatories/{signatoryId}/reject": {
"post": {
"tags": [
"SignApis/Documents"
],
"summary": "Rechazar un documento como firmante",
"operationId": "71e3f6e828f551ad4b264c277189a4a2",
"parameters": [
{
"name": "signatoryId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "cee2d963-634a-443e-9eb3-f151f720a5b0"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"observation": {
"type": "string",
"example": "Hay que corregir el documento"
},
"geolocation": {
"type": "string",
"example": "-33.4489,-70.6693"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Documento rechazado"
}
}
}
},
"/signapis/documents/{documentId}/cancel": {
"patch": {
"tags": [
"SignApis/Documents"
],
"summary": "Cancelar un documento usando el documentId",
"operationId": "284b9987cf82abfb2bc5fece65c1dce5",
"parameters": [
{
"name": "documentId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "29de9c96-b8a2-4e60-a3ac-3d9d45ae069d"
}
],
"responses": {
"200": {
"description": "Documento cancelado"
}
}
}
},
"/signapis/documents/client/{documentClientId}/cancel": {
"patch": {
"tags": [
"SignApis/Documents"
],
"summary": "Cancelar un documento usando el documentClientId definido por el cliente",
"operationId": "ed20c70dc61b09a5fbec6ae7934e4d90",
"parameters": [
{
"name": "documentClientId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "DOC-CLIENT-001"
}
],
"responses": {
"200": {
"description": "Documento cancelado"
}
}
}
},
"/signapis/logos": {
"get": {
"tags": [
"SignApis/Logos"
],
"summary": "Listar logos",
"operationId": "ba91952f1c42b629d5fc8dc53433a187",
"responses": {
"200": {
"description": "Lista de logos"
}
}
},
"post": {
"tags": [
"SignApis/Logos"
],
"summary": "Crear un logo",
"operationId": "6da2fe78aeaa67bb3ac8b462779fc620",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
},
"code": {
"type": "string"
},
"image": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Logo creado"
}
}
}
},
"/signapis/logos/{code}": {
"get": {
"tags": [
"SignApis/Logos"
],
"summary": "Obtener información de un Logo",
"operationId": "a0f1afe89b5a948fd8bfe1ac63993811",
"parameters": [
{
"name": "code",
"in": "path",
"description": "Código del logo",
"required": true,
"schema": {
"type": "string",
"example": "myLogoCode"
}
}
],
"responses": {
"200": {
"description": "Logo obtenido exitosamente"
},
"404": {
"description": "Logo no encontrado"
}
}
},
"delete": {
"tags": [
"SignApis/Logos"
],
"summary": "Eliminar un Logo",
"operationId": "930362c8427f048bafb1835f0cc49c6c",
"parameters": [
{
"name": "code",
"in": "path",
"description": "Código del logo",
"required": true,
"schema": {
"type": "string",
"example": "myLogoCode"
}
}
],
"responses": {
"200": {
"description": "Logo eliminado exitosamente"
},
"404": {
"description": "Logo no encontrado"
}
}
}
},
"/signapis/signatories/{signatoryId}/resend": {
"post": {
"tags": [
"SignApis/Notifications"
],
"summary": "Reenviar invitación a firmante",
"operationId": "d6ad2fc7513ac55223b68db2a59e34c5",
"parameters": [
{
"name": "signatoryId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Invitación reenviada"
}
}
}
},
"/signapis/reports/statusDocuments": {
"get": {
"tags": [
"SignApis/Reportes"
],
"summary": "Obtener documentos filtrados por fechas y estado",
"operationId": "e4b69d3264036b4349a3c71661dfadf5",
"parameters": [
{
"name": "start",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date"
}
},
{
"name": "end",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date"
}
},
{
"name": "status",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Lista de documentos"
}
}
}
},
"/signapis/reports/company": {
"get": {
"tags": [
"SignApis/Reportes"
],
"summary": "Obtener reporte general de documentos",
"operationId": "2da86b450c2597c5909857d22cc1e180",
"parameters": [
{
"name": "start",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date"
}
},
{
"name": "end",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date"
}
}
],
"responses": {
"200": {
"description": "Reporte obtenido"
}
}
}
},
"/signapis/documents/signatories/{signatoryId}/sign": {
"post": {
"tags": [
"SignApis/Documents"
],
"summary": "Firmar un documento individual (signatario)",
"operationId": "2cc3cc8db2007b9fa26eb87a7569ba37",
"parameters": [
{
"name": "signatoryId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "b1f2bb89-70a0-4f4c-b783-058c5afe3e80"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"signatureType": {
"type": "integer",
"enum": [
1,
2,
3
],
"example": 1
},
"signatureText": {
"type": "string",
"example": "John Doe"
},
"signatureImage": {
"type": "string",
"example": "base64string"
},
"geolocation": {
"type": "string",
"example": "-33.4489,-70.6693"
},
"geolocationReference": {
"type": "string",
"example": "Santiago, Chile"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Documento firmado exitosamente"
}
}
}
},
"/signapis/templates": {
"get": {
"tags": [
"SignApis/Templates"
],
"summary": "Listar todas las plantillas de correo",
"operationId": "f5a2aa375c4ae0f6dbc826e73e80bc43",
"responses": {
"200": {
"description": "Listado de plantillas obtenido exitosamente"
}
}
},
"post": {
"tags": [
"SignApis/Templates"
],
"summary": "Crear plantilla de correo",
"operationId": "1835b4e80557eca7108d3c3542c9c094",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "string"
},
"type": {
"type": "string"
},
"body": {
"type": "string"
},
"logoCode": {
"type": "string"
},
"footerCode": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Plantilla creada"
}
}
}
},
"/signapis/templates/{code}/{type}": {
"get": {
"tags": [
"SignApis/Templates"
],
"summary": "Obtener información de una plantilla específica",
"operationId": "3b35073910928219856fb08d93776b42",
"parameters": [
{
"name": "code",
"in": "path",
"description": "Código de la plantilla",
"required": true,
"schema": {
"type": "string",
"example": "welcomeTemplate"
}
},
{
"name": "type",
"in": "path",
"description": "Tipo de plantilla (ejemplo: email)",
"required": true,
"schema": {
"type": "string",
"example": "email"
}
}
],
"responses": {
"200": {
"description": "Plantilla obtenida exitosamente"
},
"404": {
"description": "Plantilla no encontrada"
}
}
},
"delete": {
"tags": [
"SignApis/Templates"
],
"summary": "Eliminar una plantilla específica",
"operationId": "c9ed05aa8157d8254984a9fdd9bf5ae5",
"parameters": [
{
"name": "code",
"in": "path",
"description": "Código de la plantilla",
"required": true,
"schema": {
"type": "string",
"example": "welcomeTemplate"
}
},
{
"name": "type",
"in": "path",
"description": "Tipo de plantilla",
"required": true,
"schema": {
"type": "string",
"example": "email"
}
}
],
"responses": {
"200": {
"description": "Plantilla eliminada exitosamente"
},
"404": {
"description": "Plantilla no encontrada"
}
}
},
"patch": {
"tags": [
"SignApis/Templates"
],
"summary": "Modificar una plantilla existente",
"operationId": "cdfb40416b41de14bd53e23b96dcdfb2",
"parameters": [
{
"name": "code",
"in": "path",
"description": "Código de la plantilla",
"required": true,
"schema": {
"type": "string",
"example": "welcomeTemplate"
}
},
{
"name": "type",
"in": "path",
"description": "Tipo de plantilla (ejemplo: email)",
"required": true,
"schema": {
"type": "string",
"example": "email"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"example": "Welcome Template"
},
"subject": {
"type": "string",
"example": "Bienvenido a nuestra plataforma"
},
"body": {
"type": "string",
"example": "<p>Hola {{name}}, bienvenido!</p>"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Plantilla modificada exitosamente"
},
"404": {
"description": "Plantilla no encontrada"
}
}
}
},
"/signapis/templates/{code}": {
"delete": {
"tags": [
"SignApis/Templates"
],
"summary": "Eliminar todas las plantillas asociadas a un código",
"operationId": "70c7e0d1cbc1994c5d623bdd96a9b15b",
"parameters": [
{
"name": "code",
"in": "path",
"description": "Código de las plantillas",
"required": true,
"schema": {
"type": "string",
"example": "welcomeTemplate"
}
}
],
"responses": {
"200": {
"description": "Plantillas eliminadas exitosamente"
},
"404": {
"description": "No se encontraron plantillas con ese código"
}
}
}
},
"/signapis/templates/test": {
"post": {
"tags": [
"SignApis/Templates"
],
"summary": "Enviar un correo de prueba usando una plantilla",
"operationId": "81b7ca8b5132f667a1b4b7aeebd235dd",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"templateCode": {
"type": "string",
"example": "welcomeTemplate"
},
"recipient": {
"type": "string",
"example": "user@mail.com"
},
"variables": {
"type": "object",
"example": {
"name": "John"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Correo de prueba enviado exitosamente"
},
"400": {
"description": "Error en la solicitud"
}
}
}
},
"/signapis/test/send": {
"post": {
"tags": [
"Signapis/Test"
],
"summary": "Generar PDF y enviarlo a firmar con Signapis",
"operationId": "5b43c1aa14867dbc7cfbeac149501492",
"responses": {
"200": {
"description": "Documento enviado a firma"
}
}
}
},
"/signapis/test/webhook": {
"post": {
"tags": [
"Signapis/Test"
],
"summary": "Webhook de respuesta Signapis",
"operationId": "4bb549e838b25be9bbf9e1697ae90aef",
"responses": {
"200": {
"description": "Webhook recibido correctamente"
}
}
}
},
"/signapis/webhook": {
"get": {
"tags": [
"SignApis/Webhooks"
],
"summary": "Obtener configuración de Webhook",
"operationId": "b19722198fadadcba708eec2cf72c1ae",
"responses": {
"200": {
"description": "Configuración obtenida"
}
}
},
"post": {
"tags": [
"SignApis/Webhooks"
],
"summary": "Configurar Webhook",
"operationId": "d4e9c2c590ad3d59c9780ea4bd38d915",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"webhook": {
"type": "string",
"example": "https://api-planb.bradford.cl/signapis-webhook"
},
"authType": {
"type": "string",
"enum": [
"WEBHOOK_NO_AUTH",
"WEBHOOK_BASIC_AUTH",
"WEBHOOK_OAUTH_TOKEN",
"WEBHOOK_API_KEY"
]
},
"authValue": {
"type": "object",
"example": []
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook configurado"
}
}
},
"delete": {
"tags": [
"SignApis/Webhooks"
],
"summary": "Eliminar Webhook",
"operationId": "2c0e44db45568be00d236fc8785dc368",
"responses": {
"200": {
"description": "Webhook eliminado"
}
}
}
},
"/signapis/webhook/test": {
"post": {
"tags": [
"SignApis/Webhooks"
],
"summary": "Probar Webhook",
"operationId": "047379799ead0c447e36a1e61b54f5d7",
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"event": {
"type": "string",
"example": "document.created"
},
"payload": {
"type": "object",
"example": {
"id": "123",
"name": "doc.pdf"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Evento de prueba enviado al webhook"
}
}
}
},
"/toku/customers": {
"post": {
"tags": [
"Toku/Customers"
],
"summary": "Crear Customer",
"operationId": "e065877f3da47c1d977d8e2e94fbbff0",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"government_id",
"external_id",
"mail",
"name"
],
"properties": {
"government_id": {
"type": "string",
"example": "18579878K"
},
"external_id": {
"type": "string",
"example": "18579878K"
},
"mail": {
"type": "string",
"example": "jon@snow.got"
},
"name": {
"type": "string",
"example": "Jon Snow"
},
"phone_number": {
"type": "string",
"example": "+56987654321"
},
"send_mail": {
"type": "boolean",
"example": false
},
"default_receipt_type": {
"type": "string",
"example": "bill"
},
"metadata": {
"properties": {
"var1": {
"type": "string",
"example": "value1"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"201": {
"description": "Customer creado"
},
"400": {
"description": "Error en validación"
},
"422": {
"description": "Error de datos"
}
}
}
},
"/toku/customers/{id}": {
"get": {
"tags": [
"Toku/Customers"
],
"summary": "Obtener Customer",
"operationId": "3f602acd099ba1a86df7ed9174f32ee0",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Customer",
"required": true,
"schema": {
"type": "string",
"example": "cus_lq1wGjwgFyqQm4ACZx0QjE84qKm8fff"
}
}
],
"responses": {
"200": {
"description": "Detalle del Customer"
},
"404": {
"description": "No encontrado"
}
}
},
"put": {
"tags": [
"Toku/Customers"
],
"summary": "Editar Customer",
"operationId": "494d304be55baf37d65285067c53ee42",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Customer",
"required": true,
"schema": {
"type": "string",
"example": "cus_lq1wGjwgFyqQm4ACZx0QjE84qKm8fff"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"mail": {
"type": "string",
"example": "jon.updated@snow.got"
},
"phone_number": {
"type": "string",
"example": "+56912345678"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Customer actualizado"
},
"404": {
"description": "Customer no encontrado"
}
}
},
"delete": {
"tags": [
"Toku/Customers"
],
"summary": "Eliminar Customer",
"operationId": "48bf5da6c379f4fd25245f61ff263cfd",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Customer",
"required": true,
"schema": {
"type": "string",
"example": "cus_lq1wGjwgFyqQm4ACZx0QjE84qKm8fff"
}
}
],
"responses": {
"204": {
"description": "Customer eliminado"
},
"404": {
"description": "Customer no encontrado"
}
}
}
},
"/toku/events": {
"get": {
"tags": [
"Toku/Eventos"
],
"summary": "Listado de eventos disponibles en Toku",
"operationId": "7eaa460653845c3d5ed0b0be5ff3cb97",
"responses": {
"200": {
"description": "Listado de eventos agrupados por entidad"
}
}
}
},
"/toku/invoices": {
"post": {
"tags": [
"Toku/Invoices"
],
"summary": "Crear un Invoice",
"operationId": "d407ec48e7616beafe402afec9b3ff15",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"customer": {
"type": "string",
"example": "cus_123456"
},
"product_id": {
"type": "string",
"example": "92792"
},
"subscription": {
"type": "string",
"example": "sub_987654"
},
"amount": {
"type": "number",
"example": 1000
},
"due_date": {
"type": "string",
"example": "2025-03-04"
},
"currency_code": {
"type": "string",
"example": "CLP"
},
"metadata": {
"type": "object",
"example": {
"car_brand": "Toyota",
"car_model": "Yaris"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"201": {
"description": "Invoice creado"
},
"422": {
"description": "Error de validación"
}
}
}
},
"/toku/invoices/{id}": {
"get": {
"tags": [
"Toku/Invoices"
],
"summary": "Obtener detalle de un Invoice",
"operationId": "c14915c11ce93f3953bd9c2f1ab85281",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Invoice",
"required": true,
"schema": {
"type": "string",
"example": "in_123456"
}
}
],
"responses": {
"200": {
"description": "Detalle del Invoice"
},
"404": {
"description": "Invoice no encontrado"
}
}
},
"put": {
"tags": [
"Toku/Invoices"
],
"summary": "Editar un Invoice",
"operationId": "96a533e9ccc83b86134b9e9b2974e1ab",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Invoice",
"required": true,
"schema": {
"type": "string",
"example": "in_123456"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"product_id": {
"type": "string",
"example": "92792"
},
"amount": {
"type": "number",
"example": 1500
},
"due_date": {
"type": "string",
"example": "2025-03-05"
},
"is_paid": {
"type": "boolean",
"example": false
},
"metadata": {
"type": "object",
"example": {
"car_brand": "Honda",
"car_model": "Civic"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Invoice editado"
},
"404": {
"description": "Invoice no encontrado"
}
}
},
"delete": {
"tags": [
"Toku/Invoices"
],
"summary": "Eliminar un Invoice",
"operationId": "0a81cbc3f5e91f872a63c9de128ec661",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Invoice",
"required": true,
"schema": {
"type": "string",
"example": "in_123456"
}
}
],
"responses": {
"204": {
"description": "Invoice eliminado"
},
"404": {
"description": "Invoice no encontrado"
}
}
}
},
"/toku/invoices/{id}/void": {
"post": {
"tags": [
"Toku/Invoices"
],
"summary": "Anular un Invoice",
"operationId": "761c2f01b3fc008afcc1ed6ec66e6fad",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Invoice",
"required": true,
"schema": {
"type": "string",
"example": "in_123456"
}
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"delete_invoice": {
"type": "boolean",
"example": false
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Invoice anulado"
},
"404": {
"description": "Invoice no encontrado"
}
}
}
},
"/toku/invoices/customer/{customerId}": {
"get": {
"tags": [
"Toku/Invoices"
],
"summary": "Obtener todas las Invoices de un Customer",
"operationId": "35c843963158c762653cfcfbc419f8b5",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Customer",
"required": true,
"schema": {
"type": "string",
"example": "cus_123456"
}
}
],
"responses": {
"200": {
"description": "Listado de Invoices"
},
"404": {
"description": "Customer no encontrado"
}
}
}
},
"/toku/payments": {
"put": {
"tags": [
"Toku/Payments"
],
"summary": "Modificar un Payment",
"operationId": "d76f43029dde940c754b2d3ae48e93ac",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"product_id": {
"type": "string",
"example": "92792"
},
"due_date": {
"type": "string",
"example": "2025-03-04"
},
"payment_amount": {
"type": "integer",
"example": 1200
},
"payment_date": {
"type": "string",
"example": "2025-03-17T19:20:30Z"
},
"payment_method": {
"type": "string",
"example": "Cash"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Payment actualizado"
},
"404": {
"description": "Payment no encontrado"
}
}
},
"post": {
"tags": [
"Toku/Payments"
],
"summary": "Crear o Modificar Payments masivamente",
"operationId": "895e86fbe56fb2aedac91ab9c8d90340",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"payments": {
"type": "array",
"items": {
"properties": {
"product_id": {
"type": "string",
"example": "92792"
},
"due_date": {
"type": "string",
"example": "2025-03-04"
},
"payment_amount": {
"type": "integer",
"example": 1000
},
"payment_date": {
"type": "string",
"example": "2025-03-16T19:20:30Z"
},
"payment_method": {
"type": "string",
"example": "Transference"
}
},
"type": "object"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Payments creados o modificados"
},
"422": {
"description": "Error de validación"
}
}
},
"delete": {
"tags": [
"Toku/Payments"
],
"summary": "Eliminar Payments masivamente",
"operationId": "3f2c3015f98551f33fa8a576e4b74d2e",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"payments": {
"type": "array",
"items": {
"required": [
"product_id",
"due_date",
"payment_amount",
"payment_date",
"payment_method"
],
"properties": {
"product_id": {
"type": "string",
"example": "92792"
},
"due_date": {
"type": "string",
"format": "date",
"example": "2025-03-04"
},
"payment_amount": {
"type": "integer",
"example": 1000
},
"payment_date": {
"type": "string",
"format": "date-time",
"example": "2025-03-16T19:20:30Z"
},
"payment_method": {
"type": "string",
"example": "Transference"
}
},
"type": "object"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Payments eliminados",
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"type": "array",
"items": {
"type": "object"
}
},
"message": {
"type": "string",
"example": "ok"
},
"code": {
"type": "integer",
"example": 200
}
},
"type": "object"
}
}
}
},
"400": {
"description": "Error en la solicitud",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"type": "string",
"example": "Bad Request"
}
},
"type": "object"
}
}
}
},
"422": {
"description": "Error de validación",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"type": "string",
"example": "Invalid data provided"
}
},
"type": "object"
}
}
}
}
}
}
},
"/toku/organization/payments": {
"get": {
"tags": [
"Toku/Payments"
],
"summary": "Obtener todos los Payments",
"operationId": "1f9e034a68d7339eda5068cafc40ce5d",
"parameters": [
{
"name": "page",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "page_size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"example": 10
}
},
{
"name": "start_date",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "2025-01-01"
}
},
{
"name": "end_date",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "2025-01-31"
}
}
],
"responses": {
"200": {
"description": "Listado de Payments"
},
"400": {
"description": "Error en parámetros"
}
}
}
},
"/toku/payments/{id}": {
"get": {
"tags": [
"Toku/Payments"
],
"summary": "Obtener detalle de un Payment",
"operationId": "7b0a2eed5b1c466dff15e69c4db19c38",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Payment",
"required": true,
"schema": {
"type": "string",
"example": "pay_Ped3YnVvsu59LpSMlA9p9vpoezQOIaXz"
}
}
],
"responses": {
"200": {
"description": "Detalle del Payment"
},
"404": {
"description": "Payment no encontrado"
}
}
}
},
"/toku/organization/payment-methods": {
"get": {
"tags": [
"Toku/PaymentMethods"
],
"summary": "Obtener todos los Payment Methods",
"operationId": "a9347dab50165ccfaadf037e92937013",
"parameters": [
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "page_size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"example": 10
}
},
{
"name": "start_date",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date",
"example": "2025-01-01"
}
},
{
"name": "end_date",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date",
"example": "2025-12-31"
}
},
{
"name": "id_bulk_insertion",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "bulk_1234"
}
}
],
"responses": {
"200": {
"description": "Listado de Payment Methods"
},
"400": {
"description": "Error en la solicitud"
}
}
}
},
"/toku/payment_method": {
"get": {
"tags": [
"Toku/PaymentMethods"
],
"summary": "Obtener un Payment Method",
"operationId": "a9941a4eda6d691ded97dd0b78a35845",
"parameters": [
{
"name": "id",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "pm_example_payment_method"
}
},
{
"name": "external_id",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "pm_external_1234"
}
}
],
"responses": {
"200": {
"description": "Detalle del Payment Method"
},
"400": {
"description": "Error en la solicitud"
}
}
}
},
"/toku/payment-methods/{id}": {
"delete": {
"tags": [
"Toku/PaymentMethods"
],
"summary": "Eliminar Payment Method",
"operationId": "16ed1cc0fb62b31dd876f185b40b81b1",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID único del Payment Method",
"required": true,
"schema": {
"type": "string",
"example": "pm_example_payment_method"
}
}
],
"responses": {
"200": {
"description": "Payment Method eliminado"
},
"400": {
"description": "Error en la solicitud"
}
}
}
},
"/toku/payment-methods/customers/{customerId}": {
"get": {
"tags": [
"Toku/PaymentMethods"
],
"summary": "Obtener Payment Methods de un Customer",
"operationId": "c8eaa887bbca3667605d6057cd916a3e",
"parameters": [
{
"name": "customer_id",
"in": "path",
"description": "ID del Customer",
"required": true,
"schema": {
"type": "string",
"example": "cus_examplecustomer"
}
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "page_size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"example": 8
}
},
{
"name": "include_temporary_failed",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"example": false
}
}
],
"responses": {
"200": {
"description": "Listado de Payment Methods de un Customer"
},
"400": {
"description": "Error en la solicitud"
}
}
}
},
"/toku/subscriptions/associate/payment-method": {
"post": {
"tags": [
"Toku/PaymentMethods"
],
"summary": "Asociar un Payment Method a una Subscription",
"operationId": "5efeeccf39b43f0fb9b8533444242da8",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"id_subscription",
"id_payment_method"
],
"properties": {
"id_subscription": {
"type": "string",
"example": "sub_example_subscription"
},
"id_payment_method": {
"type": "string",
"example": "pm_example_payment_method"
},
"clabe": {
"type": "string",
"example": "123456789012345678"
},
"token": {
"type": "string",
"example": "external_id_token"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Asociación exitosa"
},
"400": {
"description": "Error en la solicitud"
}
}
}
},
"/toku/subscriptions/associate/payment-method/batch": {
"post": {
"tags": [
"Toku/PaymentMethods"
],
"summary": "Asociar múltiples Payment Methods a Subscriptions",
"operationId": "956bdc43099ece38b47cf814bf3c0d69",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"type": "array",
"items": {
"required": [
"id_payment_method",
"id_subscription"
],
"properties": {
"id_payment_method": {
"type": "string",
"example": "pm_example_payment_method"
},
"id_subscription": {
"type": "string",
"example": "sub_example_subscription"
}
},
"type": "object"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Asociación en batch exitosa"
},
"400": {
"description": "Error en la solicitud"
}
}
}
},
"/toku/redirection": {
"put": {
"tags": [
"Toku/Redirections"
],
"summary": "Editar configuración de Redirection",
"operationId": "a132dc6ccd984f527622c052019a6e86",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string",
"example": "red_6D1vT6JHh84oKdi9xgvAhcNcsKDerv6J"
},
"success_url": {
"type": "string",
"example": "https://example.com/success"
},
"failure_url": {
"type": "string",
"example": "https://example.com/failure"
},
"activation_url": {
"type": "string",
"example": "https://example.com/activation"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Redirection actualizado"
},
"404": {
"description": "Redirection no encontrado"
}
}
},
"post": {
"tags": [
"Toku/Redirections"
],
"summary": "Crear configuración de Redirection",
"operationId": "7f06e34e621700f0dd5c171abb7cbcd5",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"success_url": {
"type": "string",
"example": "https://example.com/success"
},
"failure_url": {
"type": "string",
"example": "https://example.com/failure"
},
"activation_url": {
"type": "string",
"example": "https://example.com/activation"
}
},
"type": "object"
}
}
}
},
"responses": {
"201": {
"description": "Redirection creado"
},
"422": {
"description": "Error de validación"
}
}
}
},
"/toku/subscriptions": {
"post": {
"tags": [
"Toku/Subscriptions"
],
"summary": "Crear Subscription",
"operationId": "3bb482bb95bd21d105950eb90284816b",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"customer",
"product_id"
],
"properties": {
"customer": {
"type": "string",
"example": "cus_M2aYvh3QOfVylcre5gIMyIhYPrHBKfw2"
},
"product_id": {
"type": "string",
"example": "92792"
},
"pac_mandate_id": {
"type": "string",
"example": "500196"
},
"is_recurring": {
"type": "boolean",
"example": true
},
"due_day": {
"type": "integer",
"example": 1
},
"amount": {
"type": "number",
"format": "float",
"example": 1000
},
"metadata": {
"type": "object",
"example": {
"color": "red",
"shape": "square"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"201": {
"description": "Subscription creada"
},
"400": {
"description": "Error en validación"
},
"422": {
"description": "Error de datos"
}
}
}
},
"/toku/subscriptions/{id}": {
"get": {
"tags": [
"Toku/Subscriptions"
],
"summary": "Obtener Subscription",
"operationId": "9e81a11324879afd8d6cc7d118a88579",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID de la Subscription",
"required": true,
"schema": {
"type": "string",
"example": "sub_K3a1P1_p_t5UHJHJXmpkQYmqXCHvXrNi"
}
}
],
"responses": {
"200": {
"description": "Detalle de la Subscription"
},
"404": {
"description": "No encontrada"
}
}
},
"put": {
"tags": [
"Toku/Subscriptions"
],
"summary": "Editar Subscription",
"operationId": "e2d504e0e4da30cc38df50552a958487",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID de la Subscription",
"required": true,
"schema": {
"type": "string",
"example": "sub_K3a1P1_p_t5UHJHJXmpkQYmqXCHvXrNi"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"is_recurring": {
"type": "boolean",
"example": true
},
"due_day": {
"type": "integer",
"example": 5
},
"amount": {
"type": "number",
"format": "float",
"example": 1200
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Subscription actualizada"
},
"404": {
"description": "Subscription no encontrada"
}
}
},
"delete": {
"tags": [
"Toku/Subscriptions"
],
"summary": "Eliminar Subscription",
"operationId": "bf01eeb41c0040de302695d3410465da",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID de la Subscription",
"required": true,
"schema": {
"type": "string",
"example": "sub_K3a1P1_p_t5UHJHJXmpkQYmqXCHvXrNi"
}
}
],
"responses": {
"204": {
"description": "Subscription eliminada"
},
"404": {
"description": "No encontrada"
}
}
}
},
"/toku/subscriptions/customer/{customerId}": {
"get": {
"tags": [
"Toku/Subscriptions"
],
"summary": "Obtener Subscriptions de un Customer",
"operationId": "ae37d9e4057618af33ef7fac64f5ddf8",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID del Customer",
"required": true,
"schema": {
"type": "string",
"example": "cus_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9"
}
}
],
"responses": {
"200": {
"description": "Listado de Subscriptions del Customer"
},
"404": {
"description": "Customer no encontrado"
}
}
}
},
"/toku/transactions": {
"get": {
"tags": [
"Toku/Transactions"
],
"summary": "Listar Transactions",
"operationId": "dcc4f87cc98895db6a457d9dad5ff7ad",
"parameters": [
{
"name": "page",
"in": "query",
"description": "Número de página (default 1)",
"required": true,
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "page_size",
"in": "query",
"description": "Tamaño de página (máx. 10)",
"required": false,
"schema": {
"type": "integer",
"example": 5
}
},
{
"name": "start_date",
"in": "query",
"description": "Fecha inicio (YYYY-MM-DD)",
"schema": {
"type": "string",
"example": "2025-01-01"
}
},
{
"name": "end_date",
"in": "query",
"description": "Fecha fin (YYYY-MM-DD)",
"schema": {
"type": "string",
"example": "2025-01-31"
}
},
{
"name": "id_customer",
"in": "query",
"description": "Filtrar por ID de Customer",
"schema": {
"type": "string",
"example": "cus_LDrzHO79tg5hvJSGgax6TkWfxYPL5AEh"
}
}
],
"responses": {
"200": {
"description": "Listado de Transactions"
},
"400": {
"description": "Error en parámetros"
}
}
}
},
"/toku/transactions/{id}": {
"get": {
"tags": [
"Toku/Transactions"
],
"summary": "Obtener detalle de Transaction",
"operationId": "916a15de215ba3ad16745becfcf9146a",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID de la Transaction",
"required": true,
"schema": {
"type": "string",
"example": "trs_jwZpTbVb0RwcnaB2xTf19nBYH-s1z_NT"
}
}
],
"responses": {
"200": {
"description": "Detalle de la Transaction"
},
"404": {
"description": "No encontrada"
}
}
}
},
"/toku/transactions/{id}/fees": {
"get": {
"tags": [
"Toku/Transactions"
],
"summary": "Obtener Fees de una Transaction",
"operationId": "3e726c6595d178d8adcdfb93e0596bcb",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID de la Transaction",
"required": true,
"schema": {
"type": "string",
"example": "trs_jwZpTbVb0RwcnaB2xTf19nBYH-s1z_NT"
}
}
],
"responses": {
"200": {
"description": "Detalle de Fees de la Transaction"
},
"404": {
"description": "Transaction no encontrada"
}
}
}
},
"/toku/webhook-endpoints": {
"get": {
"tags": [
"Toku/Webhooks"
],
"summary": "Obtener todos los Webhook Endpoints",
"operationId": "ab99984423776afde5966d2dc3c03e77",
"responses": {
"200": {
"description": "Listado de Webhooks"
},
"400": {
"description": "Error en petición"
}
}
},
"post": {
"tags": [
"Toku/Webhooks"
],
"summary": "Crear Webhook Endpoint",
"operationId": "3bbd5b583ca9bd30c73e0faf3139146e",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"enabled_events": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"customer.created",
"invoice.created"
]
},
"url": {
"type": "string",
"example": "https://miapp.com/webhook/toku"
},
"status": {
"type": "string",
"example": "enabled"
},
"custom_headers": {
"type": "object",
"example": {
"custom-header-1": "value1"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook creado"
},
"422": {
"description": "Error de validación"
}
}
}
},
"/toku/webhook-endpoints/{id}": {
"get": {
"tags": [
"Toku/Webhooks"
],
"summary": "Obtener un Webhook Endpoint",
"operationId": "0a9577c467068787e374a5e68d46d906",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "whe_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc"
}
],
"responses": {
"200": {
"description": "Webhook obtenido"
},
"404": {
"description": "Webhook no encontrado"
}
}
},
"put": {
"tags": [
"Toku/Webhooks"
],
"summary": "Editar Webhook Endpoint",
"operationId": "64bd88443a6e57a3a296662c4aa9eff4",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"example": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"enabled_events": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"customer.updated"
]
},
"url": {
"type": "string",
"example": "https://miapp.com/webhook/update"
},
"status": {
"type": "string",
"example": "disabled"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook actualizado"
},
"404": {
"description": "Webhook no encontrado"
}
}
}
},
"/toku/dummy-webhook": {
"post": {
"tags": [
"Toku/Webhooks"
],
"summary": "Probar un Webhook con evento dummy",
"operationId": "ec6ea88d865ea1a1d4b37b0c21487436",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"event_type": {
"type": "string",
"example": "invoice.created"
},
"url": {
"type": "string",
"example": "https://miapp.com/webhook/test"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook dummy enviado"
},
"400": {
"description": "Error en prueba de webhook"
}
}
}
},
"/toku/webhooks/customers": {
"post": {
"tags": [
"WebhooksToku/Customers"
],
"summary": "Webhook Customer (Toku)",
"operationId": "0bf0421e072ef7414f6ce1524fa7baa8",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"event_type": {
"type": "string",
"example": "customer.created"
},
"customer": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook procesado correctamente"
}
}
}
},
"/toku/webhooks/invoices": {
"post": {
"tags": [
"WebhooksToku/Invoices"
],
"summary": "Webhook Invoice (Toku)",
"operationId": "f9d2ecc162ebcd3f41c6e08ace4c724d",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"event_type": {
"type": "string",
"example": "invoice.created"
},
"invoice": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook procesado correctamente"
}
}
}
},
"/toku/webhooks/payments": {
"post": {
"tags": [
"WebhooksToku/Payments"
],
"summary": "Webhook Payment (Toku)",
"operationId": "aa1e2747105d489f778261c72c98190a",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"event_type": {
"type": "string",
"example": "payment.succeeded"
},
"payment": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook procesado correctamente"
}
}
}
},
"/toku/webhooks/payment-intents": {
"post": {
"tags": [
"WebhooksToku/PaymentIntent"
],
"summary": "Webhook PaymentIntent (Toku) - Obsoleto",
"operationId": "2c303c49923cad7752c6a4b7cbfa5caa",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"event_type": {
"type": "string",
"example": "payment_intent.succeeded"
},
"payment_intent": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook procesado correctamente"
}
}
}
},
"/toku/webhooks/payment-methods": {
"post": {
"tags": [
"WebhooksToku/Payment Methods"
],
"summary": "Webhook PaymentMethod (Toku)",
"operationId": "22de124803109a0ee3dcacc9d64b0fc9",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"event_type": {
"type": "string",
"example": "payment_method.attached_products"
},
"payment_method": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook procesado correctamente"
}
}
}
},
"/toku/webhooks/payouts": {
"post": {
"tags": [
"WebhooksToku/Payouts"
],
"summary": "Webhook Payout (Toku)",
"operationId": "914cef0888c0d74e77e64eecae8a556b",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"event_type": {
"type": "string",
"example": "payout.done"
},
"payout": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook procesado correctamente"
}
}
}
},
"/toku/webhooks/subscriptions": {
"post": {
"tags": [
"WebhooksToku/Subscriptions"
],
"summary": "Webhook Subscription (Toku)",
"operationId": "8d682f0aadc249a36a5dc1124a453e1d",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"event_type": {
"type": "string",
"example": "subscription.created"
},
"subscription": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook procesado correctamente"
}
}
}
},
"/toku/webhooks/transactions": {
"post": {
"tags": [
"WebhooksToku/Transactions"
],
"summary": "Webhook Transaction (Toku)",
"operationId": "75438c84de226943138ba81adddddefb",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"event_type": {
"type": "string",
"example": "transaction.success"
},
"transaction": {
"type": "object"
},
"customer": {
"type": "object"
},
"payment_instrument": {
"type": "object"
},
"payment_intents": {
"type": "array",
"items": {
"type": "object"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook procesado correctamente"
}
}
}
}
},
"tags": [
{
"name": "SignApis/Batch",
"description": "SignApis/Batch"
},
{
"name": "SignApis/Documentos",
"description": "SignApis/Documentos"
},
{
"name": "SignApis/Documents",
"description": "SignApis/Documents"
},
{
"name": "SignApis/Logos",
"description": "SignApis/Logos"
},
{
"name": "SignApis/Notifications",
"description": "SignApis/Notifications"
},
{
"name": "SignApis/Reportes",
"description": "SignApis/Reportes"
},
{
"name": "SignApis/Templates",
"description": "SignApis/Templates"
},
{
"name": "Signapis/Test",
"description": "Signapis/Test"
},
{
"name": "SignApis/Webhooks",
"description": "SignApis/Webhooks"
},
{
"name": "Toku/Customers",
"description": "Toku/Customers"
},
{
"name": "Toku/Eventos",
"description": "Toku/Eventos"
},
{
"name": "Toku/Invoices",
"description": "Toku/Invoices"
},
{
"name": "Toku/Payments",
"description": "Toku/Payments"
},
{
"name": "Toku/PaymentMethods",
"description": "Toku/PaymentMethods"
},
{
"name": "Toku/Redirections",
"description": "Toku/Redirections"
},
{
"name": "Toku/Subscriptions",
"description": "Toku/Subscriptions"
},
{
"name": "Toku/Transactions",
"description": "Toku/Transactions"
},
{
"name": "Toku/Webhooks",
"description": "Toku/Webhooks"
},
{
"name": "WebhooksToku/Customers",
"description": "WebhooksToku/Customers"
},
{
"name": "WebhooksToku/Invoices",
"description": "WebhooksToku/Invoices"
},
{
"name": "WebhooksToku/Payments",
"description": "WebhooksToku/Payments"
},
{
"name": "WebhooksToku/PaymentIntent",
"description": "WebhooksToku/PaymentIntent"
},
{
"name": "WebhooksToku/Payment Methods",
"description": "WebhooksToku/Payment Methods"
},
{
"name": "WebhooksToku/Payouts",
"description": "WebhooksToku/Payouts"
},
{
"name": "WebhooksToku/Subscriptions",
"description": "WebhooksToku/Subscriptions"
},
{
"name": "WebhooksToku/Transactions",
"description": "WebhooksToku/Transactions"
}
],
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
},
"security": [
{
"bearerAuth": []
}
]
}