From f5087826778234f34d6b1edbbc4dda5fd78413a4 Mon Sep 17 00:00:00 2001 From: Lucas-FullStackX Date: Tue, 10 Nov 2026 14:59:01 -0500 Subject: [PATCH] chore(contract): sync v1 1.42.0 and admin 1.8.0 from production B2B v1 1.38.0 -> 1.42.0 and superadmin 1.5.1 -> 1.8.0, pulled with `pnpm sync-openapi` / `pnpm sync-openapi:admin`. Additive only: no operationId removed or renamed. The merch test fixture gains the two fields MerchAdminProduct now requires (maxPerCustomer, membersOnly). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Fo7cm6tJ2XF1A7EL6t4KGF --- .changeset/contract-sync-1-42.md | 5 + admin-openapi.json | 3734 +++- openapi.json | 26239 +++++++++++++++-------------- src/commands/merch.test.ts | 2 + 4 files changed, 16775 insertions(+), 13205 deletions(-) create mode 100644 .changeset/contract-sync-1-42.md diff --git a/.changeset/contract-sync-1-42.md b/.changeset/contract-sync-1-42.md new file mode 100644 index 0000000..4786385 --- /dev/null +++ b/.changeset/contract-sync-1-42.md @@ -0,0 +1,5 @@ +--- +"@freeticket/cli": patch +--- + +Sync the committed contracts with production: B2B v1 1.38.0 → 1.42.0 and superadmin 1.5.1 → 1.8.0. Additive only (customer addresses, customer merch orders, merch discount-code preview, merch per-customer limits and members-only products, master CRM campaigns, `MERCH_MANAGER` role); no command changes. diff --git a/admin-openapi.json b/admin-openapi.json index 314f732..9bade83 100644 --- a/admin-openapi.json +++ b/admin-openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "FreeTicket Admin API", - "version": "1.5.1", + "version": "1.8.0", "description": "API REST de superadmin de FreeTicket (cross-tenant). Autenticación por sesión de plataforma (staff con rol SUPER_ADMIN) o por service token (PAT) vía `Authorization: Bearer ` — NO usa API key de tenant. Aislada del contrato B2B /api/v1." }, "servers": [ @@ -2389,6 +2389,1169 @@ } } } + }, + "/crm/campaigns": { + "get": { + "operationId": "getCrmCampaigns", + "tags": [ + "crm" + ], + "summary": "Listar campañas del CRM maestro (las que lanzó el equipo)", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`.", + "security": [ + { + "session": [] + } + ], + "parameters": [ + { + "name": "channel", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "EMAIL", + "WHATSAPP" + ] + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "SENT", + "FAILED", + "DENIED", + "PROCESSING", + "APPROVED", + "SCHEDULED", + "CANCELLED" + ] + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 50", + "schema": { + "type": "integer", + "default": 50 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminCrmCampaign" + } + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "operationId": "postCrmCampaigns", + "tags": [ + "crm" + ], + "summary": "Lanzar una campaña del CRM maestro (ESCRITURA: envía mensajes)", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`. ESCRITURA: crea la campaña ya aprobada y, con `timing.mode = now`, empieza a enviar a toda la audiencia al responder. Un WhatsApp con `timing.mode = now` fuera de las 9:00–20:00 de Bogotá responde 409 `OUTSIDE_SEND_WINDOW` (reintentable) con `Retry-After` hasta la próxima apertura, antes de contar la audiencia; `ignoreSendWindow: true` la salta (el correo no tiene ventana; programada y lotes se ajustan solos). No expuesta por el MCP (`x-ft-mcp`). Errores: 422 con `error.details[].path` (filtro, remitente, reglas de canal, ids que no existen) o `EMPTY_AUDIENCE`; 409 `DUPLICATE_CAMPAIGN` con `error.details.existingId` si hace menos de 10 minutos se lanzó otra con el mismo canal, remitente y asunto; 409 `WHATSAPP_BLOCKED` (plantilla) o 503 `WHATSAPP_UNAVAILABLE` (Kapso no contestó, reintentable). Queda en `GET /audit-log` como `crm_campaign.launch`.", + "security": [ + { + "session": [] + } + ], + "x-ft-mcp": { + "expose": false, + "reason": "Escritura del CRM maestro: dispara o frena envíos reales a clientes. Solo por el CLI (`ft admin crm`) o el panel, no por un agente MCP." + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminCrmLaunchInput" + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AdminCrmLaunchResult" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Payload too large: the request body exceeds the maximum size.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable: an external dependency is down or initialization failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/crm/campaigns/{id}": { + "get": { + "operationId": "getCrmCampaignsId", + "tags": [ + "crm" + ], + "summary": "Detalle de una campaña del CRM maestro", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`.", + "security": [ + { + "session": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AdminCrmCampaignDetail" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/crm/campaigns/{id}/batches/next": { + "post": { + "operationId": "postCrmCampaignsIdBatchesNext", + "tags": [ + "crm" + ], + "summary": "Mandar ya el siguiente lote de WhatsApp (ESCRITURA: envía mensajes)", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`. ESCRITURA: reclama la campaña y envía hasta un lote de destinatarios pendientes al responder. Solo campañas del equipo (otra es 404). Respeta la ventana de 9:00–20:00 de Bogotá: fuera de ella responde 409 `OUTSIDE_SEND_WINDOW` (reintentable) con `Retry-After` hasta la próxima apertura; `ignoreSendWindow: true` la salta. Otros 409: `INVALID_STATE` (no hay pendientes, ya está saliendo un lote, no es WhatsApp) o `WHATSAPP_BLOCKED`; 429 `QUOTA_EXHAUSTED` con `Retry-After` si se usó el cupo diario; 503 `WHATSAPP_UNAVAILABLE`. No expuesta por el MCP (`x-ft-mcp`). Queda en `GET /audit-log` como `crm_campaign.batch_next`.", + "security": [ + { + "session": [] + } + ], + "x-ft-mcp": { + "expose": false, + "reason": "Escritura del CRM maestro: dispara o frena envíos reales a clientes. Solo por el CLI (`ft admin crm`) o el panel, no por un agente MCP." + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminCrmBatchNextInput" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AdminCrmBatchNextResult" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Payload too large: the request body exceeds the maximum size.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "503": { + "description": "Service unavailable: an external dependency is down or initialization failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/crm/campaigns/{id}/batches/stop": { + "post": { + "operationId": "postCrmCampaignsIdBatchesStop", + "tags": [ + "crm" + ], + "summary": "Detener los lotes pendientes de una campaña (ESCRITURA)", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`. ESCRITURA irreversible: los destinatarios pendientes pasan a SKIPPED y ya no se envían. Solo campañas del equipo (otra es 404). 409 `INVALID_STATE` si no es de WhatsApp o tiene un lote saliendo (reintentar en un minuto). No expuesta por el MCP (`x-ft-mcp`). Queda en `GET /audit-log` como `crm_campaign.batch_stop`.", + "security": [ + { + "session": [] + } + ], + "x-ft-mcp": { + "expose": false, + "reason": "Escritura del CRM maestro: dispara o frena envíos reales a clientes. Solo por el CLI (`ft admin crm`) o el panel, no por un agente MCP." + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AdminCrmBatchStopResult" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Payload too large: the request body exceeds the maximum size.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/crm/campaigns/{id}/cancel": { + "post": { + "operationId": "postCrmCampaignsIdCancel", + "tags": [ + "crm" + ], + "summary": "Cancelar una campaña programada (ESCRITURA)", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`. ESCRITURA: la campaña programada no sale (queda `DENIED`, con un motivo que ve el organizador). Solo campañas del equipo (otra es 404). 409 `INVALID_STATE` si ya no está programada (salió, está saliendo o alguien la canceló antes). No expuesta por el MCP (`x-ft-mcp`). Queda en `GET /audit-log` como `crm_campaign.cancel`.", + "security": [ + { + "session": [] + } + ], + "x-ft-mcp": { + "expose": false, + "reason": "Escritura del CRM maestro: dispara o frena envíos reales a clientes. Solo por el CLI (`ft admin crm`) o el panel, no por un agente MCP." + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AdminCrmCancelResult" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Payload too large: the request body exceeds the maximum size.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/crm/audience/preview": { + "post": { + "operationId": "postCrmAudiencePreview", + "tags": [ + "crm" + ], + "summary": "Contar la audiencia de un filtro del CRM (solo lectura)", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`. Solo lectura: no crea nada. Devuelve contadores, una muestra de hasta 10 personas enmascarada en el servidor (correo, teléfono y nombre: solo la inicial), quién puede firmar y, si hay WhatsApp alcanzable, los días que tomaría con el cupo. Un filtro inválido responde 422 con `error.details[].path`.", + "security": [ + { + "session": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminCrmPreviewInput" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AdminCrmAudiencePreview" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "413": { + "description": "Payload too large: the request body exceeds the maximum size.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/crm/quota": { + "get": { + "operationId": "getCrmQuota", + "tags": [ + "crm" + ], + "summary": "Cupo de WhatsApp y lotes comprometidos", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`.", + "security": [ + { + "session": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AdminCrmQuotaOutlook" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/crm/options": { + "get": { + "operationId": "getCrmOptions", + "tags": [ + "crm" + ], + "summary": "Opciones para armar una campaña (ciudades, facetas, planes, plantillas)", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`.", + "security": [ + { + "session": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AdminCrmWizardOptions" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/crm/events": { + "get": { + "operationId": "getCrmEvents", + "tags": [ + "crm" + ], + "summary": "Buscar shows para una campaña del CRM", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`.", + "security": [ + { + "session": [] + } + ], + "parameters": [ + { + "name": "query", + "in": "query", + "required": false, + "description": "Texto (hasta 120 caracteres).", + "schema": { + "type": "string" + } + }, + { + "name": "purpose", + "in": "query", + "required": true, + "description": "`promote` solo devuelve shows publicados (y, con `senderWorkspaceId`, solo los de esa organización).", + "schema": { + "type": "string", + "enum": [ + "scope", + "promote", + "except" + ] + } + }, + { + "name": "senderWorkspaceId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminCrmEventOption" + } + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/crm/event-dates": { + "get": { + "operationId": "getCrmEventDates", + "tags": [ + "crm" + ], + "summary": "Funciones de unos shows (para acotar una condición)", + "description": "Requiere sesión de plataforma con rol `SUPER_ADMIN`.", + "security": [ + { + "session": [] + } + ], + "parameters": [ + { + "name": "eventIds", + "in": "query", + "required": true, + "description": "Ids de shows separados por coma (1 a 50).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminCrmEventDateOption" + } + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } } }, "components": { @@ -2396,37 +3559,428 @@ "Error": { "type": "object", "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "retryable": { - "type": "boolean" - }, - "details": {} - }, - "required": [ - "code", - "message", - "retryable" - ], - "additionalProperties": false + "error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "details": {} + }, + "required": [ + "code", + "message", + "retryable" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false + }, + "AdminMe": { + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role": { + "type": "string", + "enum": [ + "SUPER_ADMIN", + "ADMIN", + "STAFF", + "VIEWER", + "MINCULTURA", + "MERCH_MANAGER" + ] + } + }, + "required": [ + "userId", + "name", + "email", + "role" + ], + "additionalProperties": false + }, + "FeatureFlagScope": { + "type": "string", + "enum": [ + "global", + "plan", + "workspace" + ] + }, + "Page": { + "type": "object", + "properties": { + "nextCursor": { + "type": [ + "string", + "null" + ] + }, + "hasMore": { + "type": "boolean" + } + }, + "required": [ + "nextCursor", + "hasMore" + ], + "additionalProperties": false + }, + "AdminWorkspace": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "ARTIST", + "VENUE", + "ORGANIZER" + ] + }, + "country": { + "type": "string" + }, + "isPublished": { + "type": "boolean" + }, + "webTemplate": { + "type": [ + "string", + "null" + ] + }, + "customDomain": { + "type": [ + "string", + "null" + ] + }, + "customDomainVerifiedAt": { + "type": [ + "string", + "null" + ] + }, + "suspended": { + "type": "boolean" + }, + "suspendedAt": { + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug", + "type", + "country", + "isPublished", + "webTemplate", + "customDomain", + "customDomainVerifiedAt", + "suspended", + "suspendedAt", + "deletedAt", + "createdAt" + ], + "additionalProperties": false + }, + "AdminWorkspaceCreate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "slug": { + "type": "string", + "minLength": 1, + "pattern": "^[a-z0-9-]+$" + }, + "type": { + "default": "ORGANIZER", + "type": "string", + "enum": [ + "ARTIST", + "VENUE", + "ORGANIZER" + ] + }, + "country": { + "default": "CO", + "type": "string" + }, + "email": { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": [ + "name", + "slug", + "type", + "country" + ], + "additionalProperties": false + }, + "AdminWorkspaceUpdate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "slug": { + "type": "string", + "minLength": 1, + "pattern": "^[a-z0-9-]+$" + }, + "type": { + "type": "string", + "enum": [ + "ARTIST", + "VENUE", + "ORGANIZER" + ] + }, + "isPublished": { + "type": "boolean" + }, + "webTemplate": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + { + "type": "null" + } + ] + }, + "customDomain": { + "anyOf": [ + { + "type": "string", + "maxLength": 253, + "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+\\.?$" + }, + { + "type": "null" + } + ] + }, + "customDomainVerifiedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "AdminWorkspacePlanAssign": { + "type": "object", + "properties": { + "planSlug": { + "type": "string", + "enum": [ + "spark", + "star", + "icon", + "legend" + ] + } + }, + "required": [ + "planSlug" + ], + "additionalProperties": false + }, + "AdminWorkspacePlan": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string" + }, + "planSlug": { + "type": "string" + }, + "planName": { + "type": "string" + }, + "previousPlanSlug": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "workspaceId", + "planSlug", + "planName", + "previousPlanSlug" + ], + "additionalProperties": false + }, + "AdminWorkspacePlanDetail": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string" + }, + "orgId": { + "type": [ + "string", + "null" + ] + }, + "planSlug": { + "type": [ + "string", + "null" + ] + }, + "planName": { + "type": [ + "string", + "null" + ] + }, + "status": { + "anyOf": [ + { + "type": "string", + "enum": [ + "TRIALING", + "ACTIVE", + "PAST_DUE", + "CANCELLED" + ] + }, + { + "type": "null" + } + ] + }, + "startedAt": { + "type": [ + "string", + "null" + ] + }, + "expiresAt": { + "type": [ + "string", + "null" + ] + }, + "cancelledAt": { + "type": [ + "string", + "null" + ] + }, + "stripeLinked": { + "type": "boolean" + }, + "paymentOption": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "workspaceId", + "orgId", + "planSlug", + "planName", + "status", + "startedAt", + "expiresAt", + "cancelledAt", + "stripeLinked", + "paymentOption" + ], + "additionalProperties": false + }, + "AdminUserWorkspace": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "isOwner": { + "type": "boolean" } }, "required": [ - "error" + "id", + "name", + "slug", + "isOwner" ], "additionalProperties": false }, - "AdminMe": { + "AdminUser": { "type": "object", "properties": { - "userId": { + "id": { "type": "string" }, "name": { @@ -2442,50 +3996,114 @@ "ADMIN", "STAFF", "VIEWER", - "MINCULTURA" + "MINCULTURA", + "MERCH_MANAGER" + ] + }, + "banned": { + "type": "boolean" + }, + "bannedAt": { + "type": [ + "string", + "null" + ] + }, + "homeOrganizationId": { + "type": [ + "string", + "null" ] + }, + "workspaces": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminUserWorkspace" + } + }, + "createdAt": { + "type": "string" } }, "required": [ - "userId", + "id", "name", "email", - "role" + "role", + "banned", + "bannedAt", + "homeOrganizationId", + "workspaces", + "createdAt" ], "additionalProperties": false }, - "FeatureFlagScope": { - "type": "string", - "enum": [ - "global", - "plan", - "workspace" - ] - }, - "Page": { + "AdminUserUpdate": { "type": "object", "properties": { - "nextCursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "role": { + "type": "string", + "enum": [ + "SUPER_ADMIN", + "ADMIN", + "STAFF", + "VIEWER", + "MINCULTURA", + "MERCH_MANAGER" ] }, - "hasMore": { + "banned": { "type": "boolean" } }, + "additionalProperties": false + }, + "AdminImpersonate": { + "type": "object", + "properties": { + "targetUserId": { + "type": "string", + "minLength": 1 + }, + "workspaceId": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "AdminImpersonation": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "expiresAt": { + "type": "string" + }, + "actorUserId": { + "type": "string" + }, + "targetUserId": { + "type": "string" + }, + "targetOrgId": { + "type": [ + "string", + "null" + ] + } + }, "required": [ - "nextCursor", - "hasMore" + "token", + "expiresAt", + "actorUserId", + "targetUserId", + "targetOrgId" ], "additionalProperties": false }, - "AdminWorkspace": { + "AdminPlatformPlan": { "type": "object", "properties": { "id": { @@ -2497,72 +4115,85 @@ "slug": { "type": "string" }, - "type": { - "type": "string", - "enum": [ - "ARTIST", - "VENUE", - "ORGANIZER" - ] - }, - "country": { - "type": "string" - }, - "isPublished": { - "type": "boolean" + "priceMonthly": { + "type": "number" }, - "webTemplate": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "priceYearly": { + "type": "number" }, - "customDomain": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "priceBiannual": { + "type": [ + "number", + "null" ] }, - "customDomainVerifiedAt": { + "maxEvents": { "anyOf": [ { - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, { "type": "null" } ] }, - "suspended": { + "isActive": { "type": "boolean" }, - "suspendedAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "sortOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "deletedAt": { - "anyOf": [ - { - "type": "string" + "features": { + "type": "object", + "properties": { + "memberships": { + "type": "boolean" + }, + "content": { + "type": "boolean" + }, + "fanDatabase": { + "type": "boolean" + }, + "directMessages": { + "type": "boolean" + }, + "streaming": { + "type": "boolean" + }, + "customLanding": { + "type": "boolean" + }, + "dataExport": { + "type": "boolean" + }, + "seatMaps": { + "type": "boolean" }, - { - "type": "null" + "customDomain": { + "type": "boolean" + }, + "analytics": { + "type": "boolean" } - ] + }, + "required": [ + "memberships", + "content", + "fanDatabase", + "directMessages", + "streaming", + "customLanding", + "dataExport", + "seatMaps", + "customDomain", + "analytics" + ], + "additionalProperties": false }, "createdAt": { "type": "string" @@ -2572,20 +4203,18 @@ "id", "name", "slug", - "type", - "country", - "isPublished", - "webTemplate", - "customDomain", - "customDomainVerifiedAt", - "suspended", - "suspendedAt", - "deletedAt", + "priceMonthly", + "priceYearly", + "priceBiannual", + "maxEvents", + "isActive", + "sortOrder", + "features", "createdAt" ], "additionalProperties": false }, - "AdminWorkspaceCreate": { + "AdminPlatformPlanCreate": { "type": "object", "properties": { "name": { @@ -2597,86 +4226,153 @@ "minLength": 1, "pattern": "^[a-z0-9-]+$" }, - "type": { - "default": "ORGANIZER", - "type": "string", - "enum": [ - "ARTIST", - "VENUE", - "ORGANIZER" + "priceMonthly": { + "default": 0, + "type": "number", + "minimum": 0 + }, + "priceYearly": { + "default": 0, + "type": "number", + "minimum": 0 + }, + "priceBiannual": { + "anyOf": [ + { + "type": "number", + "minimum": 0 + }, + { + "type": "null" + } ] }, - "country": { - "default": "CO", - "type": "string" + "isActive": { + "default": true, + "type": "boolean" }, - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "memberships": { + "type": "boolean" + }, + "content": { + "type": "boolean" + }, + "fanDatabase": { + "type": "boolean" + }, + "directMessages": { + "type": "boolean" + }, + "streaming": { + "type": "boolean" + }, + "customLanding": { + "type": "boolean" + }, + "dataExport": { + "type": "boolean" + }, + "seatMaps": { + "type": "boolean" + }, + "customDomain": { + "type": "boolean" + }, + "analytics": { + "type": "boolean" + }, + "maxEvents": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] } }, "required": [ "name", "slug", - "type", - "country" + "priceMonthly", + "priceYearly", + "isActive" ], "additionalProperties": false }, - "AdminWorkspaceUpdate": { + "AdminPlatformPlanUpdate": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, - "slug": { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-]+$" - }, - "type": { - "type": "string", - "enum": [ - "ARTIST", - "VENUE", - "ORGANIZER" - ] + "priceMonthly": { + "type": "number", + "minimum": 0 }, - "isPublished": { - "type": "boolean" + "priceYearly": { + "type": "number", + "minimum": 0 }, - "webTemplate": { + "priceBiannual": { "anyOf": [ { - "type": "string", - "minLength": 1, - "maxLength": 80 + "type": "number", + "minimum": 0 }, { "type": "null" } ] }, + "isActive": { + "type": "boolean" + }, + "sortOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "memberships": { + "type": "boolean" + }, + "content": { + "type": "boolean" + }, + "fanDatabase": { + "type": "boolean" + }, + "directMessages": { + "type": "boolean" + }, + "streaming": { + "type": "boolean" + }, + "customLanding": { + "type": "boolean" + }, + "dataExport": { + "type": "boolean" + }, + "seatMaps": { + "type": "boolean" + }, "customDomain": { - "anyOf": [ - { - "type": "string", - "maxLength": 253, - "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+\\.?$" - }, - { - "type": "null" - } - ] + "type": "boolean" }, - "customDomainVerifiedAt": { + "analytics": { + "type": "boolean" + }, + "maxEvents": { "anyOf": [ { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, { "type": "null" @@ -2686,166 +4382,122 @@ }, "additionalProperties": false }, - "AdminWorkspacePlanAssign": { + "AdminFeatureFlag": { "type": "object", "properties": { - "planSlug": { - "type": "string", - "enum": [ - "spark", - "star", - "icon", - "legend" + "key": { + "type": "string" + }, + "scope": { + "$ref": "#/components/schemas/FeatureFlagScope" + }, + "scopeId": { + "type": [ + "string", + "null" + ] + }, + "enabled": { + "type": "boolean" + }, + "updatedBy": { + "type": [ + "string", + "null" ] + }, + "updatedAt": { + "type": "string" } }, "required": [ - "planSlug" + "key", + "scope", + "scopeId", + "enabled", + "updatedBy", + "updatedAt" ], "additionalProperties": false }, - "AdminWorkspacePlan": { + "AdminFeatureFlagSet": { "type": "object", "properties": { - "workspaceId": { - "type": "string" - }, - "planSlug": { - "type": "string" - }, - "planName": { - "type": "string" - }, - "previousPlanSlug": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "scope": { + "$ref": "#/components/schemas/FeatureFlagScope" + }, + "scopeId": { + "type": "string", + "minLength": 1 + }, + "enabled": { + "type": "boolean" } }, "required": [ - "workspaceId", - "planSlug", - "planName", - "previousPlanSlug" + "scope", + "enabled" ], "additionalProperties": false }, - "AdminWorkspacePlanDetail": { + "AdminAuditEntry": { "type": "object", "properties": { - "workspaceId": { + "id": { "type": "string" }, - "orgId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "actorUserId": { + "type": "string" }, - "planSlug": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "action": { + "type": "string" }, - "planName": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "targetType": { + "type": "string" }, - "status": { - "anyOf": [ - { - "type": "string", - "enum": [ - "TRIALING", - "ACTIVE", - "PAST_DUE", - "CANCELLED" - ] - }, - { - "type": "null" - } - ] + "targetId": { + "type": "string" }, - "startedAt": { + "before": { "anyOf": [ - { - "type": "string" - }, + {}, { "type": "null" } ] }, - "expiresAt": { + "after": { "anyOf": [ - { - "type": "string" - }, + {}, { "type": "null" } ] }, - "cancelledAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "ipAddress": { + "type": [ + "string", + "null" ] }, - "stripeLinked": { - "type": "boolean" - }, - "paymentOption": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "createdAt": { + "type": "string" } }, "required": [ - "workspaceId", - "orgId", - "planSlug", - "planName", - "status", - "startedAt", - "expiresAt", - "cancelledAt", - "stripeLinked", - "paymentOption" + "id", + "actorUserId", + "action", + "targetType", + "targetId", + "before", + "after", + "ipAddress", + "createdAt" ], "additionalProperties": false }, - "AdminUserWorkspace": { + "AdminToken": { "type": "object", "properties": { "id": { @@ -2854,22 +4506,43 @@ "name": { "type": "string" }, - "slug": { + "tokenPrefix": { "type": "string" }, - "isOwner": { - "type": "boolean" + "lastUsedAt": { + "type": [ + "string", + "null" + ] + }, + "expiresAt": { + "type": [ + "string", + "null" + ] + }, + "revokedAt": { + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "type": "string" } }, "required": [ "id", "name", - "slug", - "isOwner" + "tokenPrefix", + "lastUsedAt", + "expiresAt", + "revokedAt", + "createdAt" ], "additionalProperties": false }, - "AdminUser": { + "AdminTokenCreated": { "type": "object", "properties": { "id": { @@ -2878,162 +4551,224 @@ "name": { "type": "string" }, - "email": { + "token": { "type": "string" }, - "role": { - "type": "string", - "enum": [ - "SUPER_ADMIN", - "ADMIN", - "STAFF", - "VIEWER", - "MINCULTURA" - ] - }, - "banned": { - "type": "boolean" + "createdAt": { + "type": "string" }, - "bannedAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "expiresAt": { + "type": [ + "string", + "null" ] }, - "homeOrganizationId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "lastUsedAt": { + "type": [ + "string", + "null" ] - }, - "workspaces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AdminUserWorkspace" - } - }, - "createdAt": { - "type": "string" } }, "required": [ "id", "name", - "email", - "role", - "banned", - "bannedAt", - "homeOrganizationId", - "workspaces", - "createdAt" + "token", + "createdAt", + "expiresAt", + "lastUsedAt" ], "additionalProperties": false }, - "AdminUserUpdate": { + "AdminTokenCreate": { "type": "object", "properties": { - "role": { + "name": { "type": "string", - "enum": [ - "SUPER_ADMIN", - "ADMIN", - "STAFF", - "VIEWER", - "MINCULTURA" - ] + "minLength": 1 }, - "banned": { - "type": "boolean" + "expiresAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, + "required": [ + "name" + ], "additionalProperties": false }, - "AdminImpersonate": { + "AdminCrmChannel": { + "type": "string", + "enum": [ + "EMAIL", + "WHATSAPP" + ] + }, + "AdminCrmCampaignStatus": { + "type": "string", + "enum": [ + "SENT", + "FAILED", + "DENIED", + "PROCESSING", + "APPROVED", + "SCHEDULED", + "CANCELLED" + ] + }, + "AdminCrmAudienceFilter": { "type": "object", + "description": "Filtro de audiencia v2 (`{ version: 2, scope, include, except }`). Objeto abierto en el contrato: lo valida el servidor con `audienceFilterSchema` (src/lib/crm/filter.ts). Un filtro inválido responde 422 con `error.details[].path` relativo al body (ej. `filter.scope.level`).", "properties": { - "targetUserId": { - "type": "string", - "minLength": 1 + "version": { + "type": "integer", + "enum": [ + 2 + ] + } + }, + "required": [ + "version" + ], + "additionalProperties": true, + "examples": [ + { + "version": 2, + "scope": { + "level": "platform" + }, + "include": [ + { + "type": "purchased", + "window": { + "kind": "last_days", + "days": 90 + } + } + ], + "except": [ + { + "type": "received_campaign", + "days": 7 + } + ] + } + ] + }, + "AdminCrmSender": { + "oneOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "freeticket" + } + }, + "required": [ + "kind" + ], + "additionalProperties": false }, - "workspaceId": { - "type": "string", - "minLength": 1 + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "organization" + }, + "workspaceId": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "kind", + "workspaceId" + ], + "additionalProperties": false } - }, - "additionalProperties": false + ], + "description": "Quién firma. `freeticket` es obligatorio si el alcance es la plataforma, varias organizaciones o eventos de más de un dueño: el servidor RECHAZA otra firma (422), no la corrige." }, - "AdminImpersonation": { + "AdminCrmCampaign": { "type": "object", "properties": { - "token": { + "id": { "type": "string" }, - "expiresAt": { + "subject": { "type": "string" }, - "actorUserId": { + "channel": { + "$ref": "#/components/schemas/AdminCrmChannel" + }, + "status": { + "type": "string", + "description": "`BroadcastStatus`" + }, + "senderName": { "type": "string" }, - "targetUserId": { + "isPlatform": { + "type": "boolean" + }, + "audienceLabel": { "type": "string" }, - "targetOrgId": { + "createdAt": { + "type": "string", + "description": "ISO 8601" + }, + "scheduledAt": { "anyOf": [ { - "type": "string" + "type": "string", + "description": "ISO 8601" }, { "type": "null" } ] - } - }, - "required": [ - "token", - "expiresAt", - "actorUserId", - "targetUserId", - "targetOrgId" - ], - "additionalProperties": false - }, - "AdminPlatformPlan": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "name": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "priceMonthly": { - "type": "number" + "nextBatchAt": { + "anyOf": [ + { + "type": "string", + "description": "ISO 8601" + }, + { + "type": "null" + } + ] }, - "priceYearly": { - "type": "number" + "recipientCount": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] }, - "priceBiannual": { + "sentCount": { "anyOf": [ { - "type": "number" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, { "type": "null" } ] }, - "maxEvents": { + "failedCount": { "anyOf": [ { "type": "integer", @@ -3045,240 +4780,593 @@ } ] }, - "isActive": { - "type": "boolean" + "deliveredCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "sortOrder": { + "readCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "features": { + "deferredCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "attributed": { "type": "object", "properties": { - "memberships": { - "type": "boolean" - }, - "content": { - "type": "boolean" - }, - "fanDatabase": { - "type": "boolean" - }, - "directMessages": { - "type": "boolean" - }, - "streaming": { - "type": "boolean" - }, - "customLanding": { - "type": "boolean" - }, - "dataExport": { - "type": "boolean" - }, - "seatMaps": { - "type": "boolean" + "sales": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "customDomain": { - "type": "boolean" + "revenueCop": { + "type": "number" }, - "analytics": { - "type": "boolean" + "feeCop": { + "type": "number" } }, "required": [ - "memberships", - "content", - "fanDatabase", - "directMessages", - "streaming", - "customLanding", - "dataExport", - "seatMaps", - "customDomain", - "analytics" + "sales", + "revenueCop", + "feeCop" ], "additionalProperties": false - }, - "createdAt": { - "type": "string" } }, "required": [ "id", - "name", - "slug", - "priceMonthly", - "priceYearly", - "priceBiannual", - "maxEvents", - "isActive", - "sortOrder", - "features", - "createdAt" + "subject", + "channel", + "status", + "senderName", + "isPlatform", + "audienceLabel", + "createdAt", + "scheduledAt", + "nextBatchAt", + "recipientCount", + "sentCount", + "failedCount", + "deliveredCount", + "readCount", + "deferredCount", + "attributed" ], "additionalProperties": false }, - "AdminPlatformPlanCreate": { + "AdminCrmCampaignDetail": { "type": "object", "properties": { - "name": { + "id": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "channel": { + "$ref": "#/components/schemas/AdminCrmChannel" + }, + "status": { "type": "string", - "minLength": 1 + "description": "`BroadcastStatus`" }, - "slug": { + "senderName": { + "type": "string" + }, + "isPlatform": { + "type": "boolean" + }, + "audienceLabel": { + "type": "string" + }, + "createdAt": { "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-]+$" + "description": "ISO 8601" }, - "priceMonthly": { - "default": 0, - "type": "number", - "minimum": 0 + "scheduledAt": { + "anyOf": [ + { + "type": "string", + "description": "ISO 8601" + }, + { + "type": "null" + } + ] }, - "priceYearly": { - "default": 0, - "type": "number", - "minimum": 0 + "nextBatchAt": { + "anyOf": [ + { + "type": "string", + "description": "ISO 8601" + }, + { + "type": "null" + } + ] }, - "priceBiannual": { + "recipientCount": { "anyOf": [ { - "type": "number", - "minimum": 0 + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, { "type": "null" } ] }, - "isActive": { - "default": true, - "type": "boolean" + "sentCount": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] }, - "memberships": { - "type": "boolean" + "failedCount": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] }, - "content": { - "type": "boolean" + "deliveredCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "fanDatabase": { - "type": "boolean" + "readCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "directMessages": { - "type": "boolean" + "deferredCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "streaming": { - "type": "boolean" + "attributed": { + "type": "object", + "properties": { + "sales": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "revenueCop": { + "type": "number" + }, + "feeCop": { + "type": "number" + } + }, + "required": [ + "sales", + "revenueCop", + "feeCop" + ], + "additionalProperties": false }, - "customLanding": { - "type": "boolean" + "body": { + "type": "string" }, - "dataExport": { - "type": "boolean" + "imageUrl": { + "type": [ + "string", + "null" + ] }, - "seatMaps": { - "type": "boolean" + "templateName": { + "type": [ + "string", + "null" + ] }, - "customDomain": { - "type": "boolean" + "promotedEvent": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "slug" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] }, - "analytics": { - "type": "boolean" + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/AdminCrmAudienceFilter" + }, + { + "type": "null" + } + ], + "description": "null = campaña v1 (segmento previo al CRM v2)." }, - "maxEvents": { + "batchPlan": { "anyOf": [ { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "object", + "properties": { + "batchSize": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "perDay": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "intervalMinutes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "batchSize", + "perDay", + "intervalMinutes" + ], + "additionalProperties": false }, { "type": "null" } ] + }, + "deliveriesByStatus": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "topErrors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "count": { + "type": "number" + } + }, + "required": [ + "error", + "count" + ], + "additionalProperties": false + } + }, + "sentByHour": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hour": { + "type": "string", + "description": "ISO 8601" + }, + "count": { + "type": "number" + } + }, + "required": [ + "hour", + "count" + ], + "additionalProperties": false + } + }, + "conversions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "reference": { + "type": "string" + }, + "total": { + "type": "number" + }, + "createdAt": { + "type": "string", + "description": "ISO 8601" + }, + "eventName": { + "type": [ + "string", + "null" + ] + }, + "utmSource": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "reference", + "total", + "createdAt", + "eventName", + "utmSource" + ], + "additionalProperties": false + } } }, "required": [ - "name", - "slug", - "priceMonthly", - "priceYearly", - "isActive" + "id", + "subject", + "channel", + "status", + "senderName", + "isPlatform", + "audienceLabel", + "createdAt", + "scheduledAt", + "nextBatchAt", + "recipientCount", + "sentCount", + "failedCount", + "deliveredCount", + "readCount", + "deferredCount", + "attributed", + "body", + "imageUrl", + "templateName", + "promotedEvent", + "filter", + "batchPlan", + "deliveriesByStatus", + "topErrors", + "sentByHour", + "conversions" ], "additionalProperties": false }, - "AdminPlatformPlanUpdate": { + "AdminCrmPreviewInput": { "type": "object", "properties": { - "name": { - "type": "string", - "minLength": 1 + "filter": { + "$ref": "#/components/schemas/AdminCrmAudienceFilter" }, - "priceMonthly": { - "type": "number", - "minimum": 0 + "sender": { + "description": "Opcional. Solo SUMA bajas (las del remitente): uno que no corresponda al alcance recorta de más, nunca agrega gente.", + "$ref": "#/components/schemas/AdminCrmSender" + } + }, + "required": [ + "filter" + ], + "additionalProperties": false + }, + "AdminCrmAudiencePreview": { + "type": "object", + "properties": { + "counts": { + "type": "object", + "properties": { + "matched": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "excludedByExcept": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "excludedByFrequency": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "suppressed": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "total": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "reachableWhatsapp": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "withoutPhone": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "matched", + "excludedByExcept", + "excludedByFrequency", + "suppressed", + "total", + "reachableWhatsapp", + "withoutPhone" + ], + "additionalProperties": false }, - "priceYearly": { - "type": "number", - "minimum": 0 + "sample": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "emailMasked": { + "type": "string" + }, + "phoneMasked": { + "type": [ + "string", + "null" + ] + }, + "lastPurchaseAt": { + "anyOf": [ + { + "type": "string", + "description": "ISO 8601" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "name", + "emailMasked", + "phoneMasked", + "lastPurchaseAt" + ], + "additionalProperties": false + }, + "description": "Hasta 10 personas, enmascaradas en el servidor." }, - "priceBiannual": { + "involvedWorkspaceIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "senderChoice": { "anyOf": [ { - "type": "number", - "minimum": 0 + "type": "object", + "properties": { + "forced": { + "type": "boolean", + "const": true + } + }, + "required": [ + "forced" + ], + "additionalProperties": false }, { - "type": "null" + "type": "object", + "properties": { + "forced": { + "type": "boolean", + "const": false + }, + "organization": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "logoUrl": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name", + "logoUrl" + ], + "additionalProperties": false + } + }, + "required": [ + "forced", + "organization" + ], + "additionalProperties": false } ] }, - "isActive": { - "type": "boolean" - }, - "sortOrder": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "memberships": { - "type": "boolean" - }, - "content": { - "type": "boolean" - }, - "fanDatabase": { - "type": "boolean" - }, - "directMessages": { - "type": "boolean" - }, - "streaming": { - "type": "boolean" - }, - "customLanding": { - "type": "boolean" - }, - "dataExport": { - "type": "boolean" - }, - "seatMaps": { - "type": "boolean" - }, - "customDomain": { - "type": "boolean" - }, - "analytics": { - "type": "boolean" - }, - "maxEvents": { + "whatsappEstimate": { "anyOf": [ { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "object", + "properties": { + "days": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "dailyCap": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remainingToday": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "days", + "dailyCap", + "remainingToday" + ], + "additionalProperties": false }, { "type": "null" @@ -3286,253 +5374,573 @@ ] } }, + "required": [ + "counts", + "sample", + "involvedWorkspaceIds", + "senderChoice", + "whatsappEstimate" + ], "additionalProperties": false }, - "AdminFeatureFlag": { + "AdminCrmQuotaOutlook": { "type": "object", "properties": { - "key": { - "type": "string" + "limit": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "scope": { - "$ref": "#/components/schemas/FeatureFlagScope" + "used": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "scopeId": { + "remaining": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nextFreeAt": { "anyOf": [ { - "type": "string" + "type": "string", + "description": "ISO 8601" }, { "type": "null" } ] }, - "enabled": { - "type": "boolean" + "platformDailyShare": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "updatedBy": { - "anyOf": [ - { - "type": "string" + "committed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "at": { + "type": "string", + "description": "ISO 8601" + }, + "size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "messageId": { + "type": "string" + } }, - { - "type": "null" - } - ] - }, - "updatedAt": { - "type": "string" + "required": [ + "at", + "size", + "messageId" + ], + "additionalProperties": false + } } }, "required": [ - "key", - "scope", - "scopeId", - "enabled", - "updatedBy", - "updatedAt" + "limit", + "used", + "remaining", + "nextFreeAt", + "platformDailyShare", + "committed" ], "additionalProperties": false }, - "AdminFeatureFlagSet": { + "AdminCrmWizardOptions": { "type": "object", "properties": { - "scope": { - "$ref": "#/components/schemas/FeatureFlagScope" + "cities": { + "type": "array", + "items": { + "type": "string" + } + }, + "facets": { + "type": "object", + "properties": { + "genre": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "code", + "label" + ], + "additionalProperties": false + } + }, + "format": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "code", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "genre", + "format" + ], + "additionalProperties": false }, - "scopeId": { - "type": "string", - "minLength": 1 + "plans": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "orgName": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "orgName" + ], + "additionalProperties": false + } }, - "enabled": { - "type": "boolean" + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "language": { + "type": "string" + }, + "hasImageHeader": { + "type": "boolean" + }, + "body": { + "type": "string" + }, + "footerText": { + "type": [ + "string", + "null" + ] + }, + "urlButtonText": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "name", + "language", + "hasImageHeader", + "body" + ], + "additionalProperties": false + } + }, + "whatsappBlockedReason": { + "type": [ + "string", + "null" + ] } }, "required": [ - "scope", - "enabled" + "cities", + "facets", + "plans", + "templates", + "whatsappBlockedReason" ], "additionalProperties": false }, - "AdminAuditEntry": { + "AdminCrmEventOption": { "type": "object", "properties": { "id": { "type": "string" }, - "actorUserId": { - "type": "string" - }, - "action": { - "type": "string" - }, - "targetType": { + "name": { "type": "string" }, - "targetId": { + "slug": { "type": "string" }, - "before": { + "startsAt": { "anyOf": [ - {}, + { + "type": "string", + "description": "ISO 8601" + }, { "type": "null" } ] }, - "after": { + "lastAt": { "anyOf": [ - {}, + { + "type": "string", + "description": "ISO 8601" + }, { "type": "null" } ] }, - "ipAddress": { + "nextAt": { "anyOf": [ { - "type": "string" + "type": "string", + "description": "ISO 8601" }, { "type": "null" } ] }, - "createdAt": { + "dateCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "venueName": { + "type": [ + "string", + "null" + ] + }, + "city": { + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string" + }, + "orgName": { "type": "string" } }, "required": [ "id", - "actorUserId", - "action", - "targetType", - "targetId", - "before", - "after", - "ipAddress", - "createdAt" + "name", + "slug", + "startsAt", + "lastAt", + "nextAt", + "dateCount", + "venueName", + "city", + "status", + "orgName" ], "additionalProperties": false }, - "AdminToken": { + "AdminCrmEventDateOption": { "type": "object", "properties": { "id": { "type": "string" }, - "name": { + "eventId": { "type": "string" }, - "tokenPrefix": { - "type": "string" + "startsAt": { + "type": "string", + "description": "ISO 8601" }, - "lastUsedAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "label": { + "type": [ + "string", + "null" ] }, - "expiresAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "status": { + "type": "string" + }, + "venueName": { + "type": [ + "string", + "null" ] }, - "revokedAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "city": { + "type": [ + "string", + "null" ] }, - "createdAt": { - "type": "string" + "past": { + "type": "boolean" + }, + "buyers": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ "id", - "name", - "tokenPrefix", - "lastUsedAt", - "expiresAt", - "revokedAt", - "createdAt" + "eventId", + "startsAt", + "label", + "status", + "venueName", + "city", + "past", + "buyers" ], "additionalProperties": false }, - "AdminTokenCreated": { + "AdminCrmTiming": { + "oneOf": [ + { + "type": "object", + "properties": { + "mode": { + "type": "string", + "const": "now" + } + }, + "required": [ + "mode" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "mode": { + "type": "string", + "const": "scheduled" + }, + "at": { + "type": "string", + "description": "ISO 8601 con offset (ej. `2026-11-03T19:00:00-05:00`)." + } + }, + "required": [ + "mode", + "at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "mode": { + "type": "string", + "const": "batches" + }, + "firstAt": { + "type": "string", + "description": "ISO 8601 con offset (ej. `2026-11-03T19:00:00-05:00`)." + }, + "batchSize": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "perDay": { + "type": "integer", + "minimum": 1, + "maximum": 24 + }, + "intervalMinutes": { + "type": "integer", + "minimum": 15, + "maximum": 1440 + } + }, + "required": [ + "mode", + "firstAt", + "batchSize", + "perDay", + "intervalMinutes" + ], + "additionalProperties": false + } + ], + "description": "Cuándo sale. `scheduled` y `batches` tienen que estar en el futuro. Por WhatsApp, la hora se ajusta a la ventana de 9:00–20:00 de Bogotá (la respuesta trae la real en `scheduledAt`). Lotes solo por WhatsApp, con un tope diario de 150 si firma FreeTicket y 200 si firma una organización." + }, + "AdminCrmLaunchInput": { "type": "object", "properties": { - "id": { - "type": "string" + "channel": { + "$ref": "#/components/schemas/AdminCrmChannel" }, - "name": { + "sender": { + "$ref": "#/components/schemas/AdminCrmSender" + }, + "templateName": { + "description": "Plantilla de WhatsApp aprobada (obligatoria por WhatsApp; el correo la rechaza). Ver `GET /crm/options`.", + "type": [ + "string", + "null" + ] + }, + "subject": { + "type": "string", + "minLength": 1 + }, + "body": { + "type": "string", + "minLength": 1 + }, + "imageUrl": { + "description": "Por WhatsApp tiene que salir de la biblioteca de medios propia.", "type": "string" }, - "token": { + "promotedEventId": { + "description": "Show PUBLICADO que se promociona (si firma una organización, uno suyo).", "type": "string" }, - "createdAt": { + "filter": { + "$ref": "#/components/schemas/AdminCrmAudienceFilter" + }, + "timing": { + "$ref": "#/components/schemas/AdminCrmTiming" + }, + "ignoreSendWindow": { + "description": "Solo WhatsApp con `timing.mode = now`: true = sale aunque sea fuera de las 9:00–20:00 de Bogotá. Por defecto la respeta y responde 409 `OUTSIDE_SEND_WINDOW` con `Retry-After`.", + "type": "boolean" + } + }, + "required": [ + "channel", + "sender", + "subject", + "body", + "filter", + "timing" + ], + "additionalProperties": false + }, + "AdminCrmLaunchResult": { + "type": "object", + "properties": { + "id": { "type": "string" }, - "expiresAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "status": { + "type": "string", + "enum": [ + "APPROVED", + "SCHEDULED" ] }, - "lastUsedAt": { + "scheduledAt": { "anyOf": [ { - "type": "string" + "type": "string", + "description": "ISO 8601" }, { "type": "null" } - ] + ], + "description": "Hora real de salida (ya ajustada a la ventana); null si sale ahora." } }, "required": [ "id", - "name", - "token", - "createdAt", - "expiresAt", - "lastUsedAt" + "status", + "scheduledAt" ], "additionalProperties": false }, - "AdminTokenCreate": { + "AdminCrmBatchNextInput": { "type": "object", "properties": { - "name": { - "type": "string", - "minLength": 1 + "ignoreSendWindow": { + "description": "true = manda aunque sea fuera de las 9:00–20:00 de Bogotá. Por defecto la respeta y responde 409 `OUTSIDE_SEND_WINDOW` con `Retry-After`.", + "type": "boolean" + } + }, + "additionalProperties": false + }, + "AdminCrmBatchNextResult": { + "type": "object", + "properties": { + "batch": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Cuántos salen como máximo en este lote (lo envía el pipeline)." + } + }, + "required": [ + "batch" + ], + "additionalProperties": false + }, + "AdminCrmBatchStopResult": { + "type": "object", + "properties": { + "skipped": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Destinatarios pendientes que ya no se enviarán." + } + }, + "required": [ + "skipped" + ], + "additionalProperties": false + }, + "AdminCrmCancelResult": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "expiresAt": { + "status": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "const": "DENIED" } }, "required": [ - "name" + "id", + "status" ], "additionalProperties": false } diff --git a/openapi.json b/openapi.json index 390d618..e470bfb 100644 --- a/openapi.json +++ b/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "FreeTicket B2B API", - "version": "1.38.0", + "version": "1.42.0", "description": "FreeTicket B2B REST API for integrations, the `ft` CLI and the FreeTicket MCP server. Authentication is by API key (`Authorization: Bearer ` header or `x-api-key`); the active workspace is selected with the `X-Workspace-Id` header.\n\nScopes: each key is either `read` (GET/HEAD only) or `write` (additionally creates, edits, deletes, cancels, refunds and checks in). Self-service keys are issued as `read`. A `read` key calling a mutating method gets a 403. The machine-readable declaration lives at `/.well-known/oauth-protected-resource` (RFC 9728).\n\nGetting a key (self-serve, no sales contact): `ft login` runs the Device Authorization Grant (RFC 8628, `POST /auth/device/code` + `POST /auth/device/token`); the user approves the code at https://admin.appfreeticket.com/device and the CLI receives a key. New organizers can bootstrap headless with `POST /auth/signup` (verify-first, then `ft login`). With a key, `POST /api-keys` mints more (born `read` unless `write` is requested). There is no sandbox environment: test against a dedicated workspace with `read` keys.\n\n## Versioning and deprecation\n\n- **Path version.** The B2B API is versioned in the path (`/api/v1`). A breaking change ships under a new path (`/api/v2`); the previous version keeps running in parallel until its sunset date.\n- **Contract version.** `info.version` is the semantic version of this document. MINOR = additive (new endpoints, new optional fields, new enum values, new error codes; clients must ignore unknown fields). PATCH = documentation or fixes that do not change shapes. The public API (`/api/public`) is pre-1.0 and not versioned in the path: there, a MINOR bump may include a breaking change and PATCH never does.\n- **Deprecation signals.** A deprecated operation is marked `deprecated: true` in this document and its responses carry `Deprecation` (RFC 9745, e.g. `Deprecation: @1767225600`), `Sunset` (RFC 8594, an HTTP-date after which the operation may stop working) and `Link: ; rel=\"deprecation\"`.\n- **Timeline.** At least 6 months between the first `Deprecation` header and the `Sunset` date for `/api/v1`, and at least 90 days for `/api/public`. A path version is only retired after all its operations have sunset.\n- **Current status.** No operation is deprecated today.\n\n## Rate limits\n\n- **429 always carries `Retry-After`** (seconds). Wait at least that long before retrying the same request. The JSON error envelope comes with `error.retryable: true`; most rate-limited responses use `error.code: \"RATE_LIMITED\"`, and some return a more specific code (for example `TOO_MANY_REQUESTS` or `SEAT_BUDGET_EXHAUSTED`).\n- **RateLimit headers are sent where listed below.** Those endpoints answer every response, success or error, with the IETF RateLimit headers (draft-ietf-httpapi-ratelimit-headers): `RateLimit-Policy: \"\";q=;w=` and `RateLimit: \"\";r=;t=`. Other endpoints may answer 429 without them.\n- Counters are fixed windows kept per server instance: treat the numbers as pacing hints, not as a global account quota.\n\nEndpoints that send RateLimit headers today: `POST /auth/signup` (per client IP), `POST /customer/auth/request` and `POST /customer/auth/verify` (per client IP), and the buyer-session endpoints `GET /customer/orders/{id}`, `POST /customer/orders/{id}/payment`, `/payment/card`, `/payment/pse`, `/release`, `POST /customer/purchase-sessions` and `POST /customer/purchase-sessions/{id}/release`." }, "servers": [ @@ -19,153 +19,14 @@ } ], "paths": { - "/auth/device/code": { - "post": { - "operationId": "postAuthDeviceCode", - "tags": [ - "auth" - ], - "summary": "Start the Device Authorization Grant (RFC 8628)", - "description": "Public endpoint (no auth): credential bootstrap for the Device Authorization Grant (RFC 8628).", - "security": [], - "responses": { - "200": { - "description": "Flow started: device_code (polled by the CLI) + user_code (approved by the user in the browser).", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceCodeResponse" - } - } - } - }, - "429": { - "description": "Too many requests from the same IP (anti-flood).", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "503": { - "description": "Could not generate a unique device_code/user_code after retrying (persistent collision).", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/auth/device/token": { - "post": { - "operationId": "postAuthDeviceToken", - "tags": [ - "auth" - ], - "summary": "CLI poll: exchanges the device_code for an API key once approved", - "description": "Public endpoint (no auth): credential bootstrap for the Device Authorization Grant (RFC 8628).", - "security": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTokenRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Approved: delivers the ft_live_… API key exactly once and consumes the row.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTokenResponse" - } - } - } - }, - "400": { - "description": "RFC 8628 status: authorization_pending | slow_down | expired_token | access_denied | invalid_request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTokenError" - } - } - } - } - } - } - }, - "/auth/signup": { - "post": { - "operationId": "postAuthSignup", - "tags": [ - "auth" - ], - "summary": "Headless sign-up: creates the unverified account and sends the email", - "description": "Public (no auth). Verify-first: no credential is issued. The optional `workspaceName` creates the first tenant in the same step (on the free Spark plan). Rate-limited per IP and per email.", - "security": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignupRequest" - } - } - } - }, - "responses": { - "202": { - "description": "Account pending verification (or already existing: same shape, no enumeration). The email sent is used to verify AND set a password — it reuses the staff invitation (src/lib/staff-invite.ts). With that, the user can approve an `ft login` (Device Grant) from their browser.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignupResponse" - } - } - } - }, - "422": { - "description": "Invalid body (email, name or workspaceName).", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "429": { - "description": "Too many attempts from the same IP or the same email.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/workspaces": { - "post": { - "operationId": "postWorkspaces", + "/events/{id}/dates": { + "get": { + "operationId": "getEventsIdDates", "tags": [ - "me" + "events" ], - "summary": "Create your own workspace/tenant (self-serve)", - "description": "Requires a valid API key — does NOT require an active workspace (`X-Workspace-Id` does not apply here: it is ignored if sent). The caller becomes ADMIN of the new workspace. If they already administer their own Organization (umbrella), another workspace is added there, subject to the plan quota (spark=1, star=3, icon=7); if they have no link at all, a new Organization is created on the free Spark plan. A user who is already a collaborator (staff) of someone else's workspace gets 409 `ALREADY_HAS_ACCESS`: ask an administrator to add them, instead of creating a tenant that would override their current access.", + "summary": "List an event's dates", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -175,6 +36,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -185,18 +54,8 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkspaceCreate" - } - } - } - }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -204,7 +63,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/WorkspaceAccess" + "type": "array", + "items": { + "$ref": "#/components/schemas/EventDate" + } } }, "required": [ @@ -244,18 +106,8 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { - "description": "Operation error.", + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { @@ -265,16 +117,14 @@ } } } - } - }, - "/me": { - "get": { - "operationId": "getMe", + }, + "post": { + "operationId": "postEventsIdDates", "tags": [ - "me" + "events" ], - "summary": "Authenticated user, role and accessible workspaces", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. `activeWorkspaceId` is `null` and `workspaces` is `[]` when the credential is valid but the user does not have any workspace yet (just registered via POST /auth/signup, before POST /workspaces).", + "summary": "Add a date to an event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -284,6 +134,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -294,8 +152,18 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventDateCreate" + } + } + } + }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -303,7 +171,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Me" + "$ref": "#/components/schemas/EventDate" } }, "required": [ @@ -618,14 +486,14 @@ } } }, - "/events/{id}": { + "/merch/catalog": { "get": { - "operationId": "getEventsId", + "operationId": "getMerchCatalog", "tags": [ - "events" + "merch" ], - "summary": "Get an event", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Merch store catalog of the key's brand", + "description": "Requires an enterprise service API key (Legend headless landing, called server-side); the store is ALWAYS the one of the key's organization. Returns the store settings (brand, support, shipping fees by zone — Bogotá is DANE 11001 —, free-shipping threshold, delivery modes), the PUBLISHED products with their active variants and `stock` (units available right now, already net of open 15-minute reservations), the active pickup points (only when pickup is enabled) and the public key of the brand's own MercadoPago account for the Payment Brick. Prices are COP integers, VAT included; the buyer pays no service fee. Preview: with a valid `X-Merch-Preview` token (issued by the dashboard for this key's store, 1 hour) the response also includes DRAFT products (each product carries `status`), answers even while the store onboarding is pending, sets `preview: true` and `Cache-Control: private, no-store`; an invalid or expired token silently returns the public catalog. Preview never enables ordering: `POST /merch/orders` only sells PUBLISHED products. 403 `MERCH_STORE_LOCKED` when the brand's Legend plan is not active; 404 `STORE_NOT_READY` when the brand has no store, its onboarding is incomplete or it has no connected MercadoPago account (a valid preview token is exempt). `mpPublicKey` is the public key of the brand's own MercadoPago account.", "security": [ { "apiKey": [] @@ -636,18 +504,19 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", "schema": { "type": "string" } }, { - "name": "X-Workspace-Id", + "name": "X-Merch-Preview", "in": "header", "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "description": "Optional preview token from the dashboard's 'Vista previa' link (`ft_preview` query param on the landing). Valid for this key's store: includes DRAFT products, no caching. Invalid or expired: ignored.", "schema": { "type": "string" } @@ -662,7 +531,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Event" + "$ref": "#/components/schemas/MerchCatalog" } }, "required": [ @@ -683,7 +552,7 @@ } }, "403": { - "description": "Insufficient role or resource not accessible.", + "description": "Operation error.", "content": { "application/json": { "schema": { @@ -693,7 +562,7 @@ } }, "404": { - "description": "Resource does not exist or is out of scope.", + "description": "Operation error.", "content": { "application/json": { "schema": { @@ -713,14 +582,16 @@ } } } - }, - "patch": { - "operationId": "patchEventsId", + } + }, + "/content/videos": { + "get": { + "operationId": "getContentVideos", "tags": [ - "events" + "content" ], - "summary": "Update an event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nAbsent fields are left untouched. Errors (`error.code`): 409 `SLUG_TAKEN`; 422 `PULEP_REQUIRED` (only evaluated when the request changes `genre` or `pulepCode`); 422 `GENRE_OTHER_WITHOUT_OTRO` (`genreOther` sent without `genre` while the stored genre is not \"otro\"); 422 `CLASSIFICATION_CONFLICT` (the resulting genre + audience, merged with the stored values, are incompatible, e.g. \"familiar\" with an 18+ audience). `genre`/`subgenre`/`audience` are validated against the stored classification (422 `CLASSIFICATION_CONFLICT`) and then saved as manual classification facets on a best-effort basis. Publication status, the external ticketing URL and the artist lineup have their own endpoints.", + "summary": "List the organization's published videos", + "description": "Only published videos that have finished processing (READY) in the active workspace. Does not include the playback id: to play one, request a token from `POST /content/playback-token`.", "security": [ { "apiKey": [] @@ -731,9 +602,19 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, "schema": { "type": "string" } @@ -748,16 +629,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventUpdate" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -767,11 +638,18 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Event" + "type": "array", + "items": { + "$ref": "#/components/schemas/ContentVideo" + } + }, + "page": { + "$ref": "#/components/schemas/Page" } }, "required": [ - "data" + "data", + "page" ] } } @@ -807,16 +685,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -828,14 +696,16 @@ } } } - }, - "delete": { - "operationId": "deleteEventsId", + } + }, + "/content/lives": { + "get": { + "operationId": "getContentLives", "tags": [ - "events" + "content" ], - "summary": "Delete an event (soft delete)", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nReturns 409 `EVENT_HAS_SALES` when the event has CONFIRMED or REFUNDED sales; cancel it with `POST /events/{id}/cancel` instead.", + "summary": "List the organization's live streams", + "description": "Live streams from the active workspace, newest first. `status: ACTIVE` is the one on air. Does not include the RTMP key or the playback ids.", "security": [ { "apiKey": [] @@ -846,9 +716,19 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, "schema": { "type": "string" } @@ -869,7 +749,22 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContentLive" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "data", + "page" + ] } } } @@ -904,16 +799,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -925,16 +810,14 @@ } } } - } - }, - "/events/{id}/publish": { + }, "post": { - "operationId": "postEventsIdPublish", + "operationId": "postContentLives", "tags": [ - "events" + "content" ], - "summary": "Publish an event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nPublishes the event and its dates (cancelled dates stay cancelled unless the whole event was `CANCELLED`). Requires at least one future date (409 `CONFLICT`).\n\nSeated (seats.io) events are validated first:\n- 409 `SEATSIO_INVALID`: a seated date has no ticket type mapped to a chart category, or maps a category missing from the chart.\n- 409 `SEAT_MAP_CATEGORIES_UNCOVERED`: a chart category with seats on sale has no ticket type on that date and is not fully blocked (booked). `error.details.zones[]` lists each one (`dateLabel`, `categoryKey`, `categoryLabel`, `seats`). Create its ticket type or block those seats, then retry.\n- 503 `SEAT_MAP_UNVERIFIABLE` (retryable): seats.io could not be reached to verify the map.\n\nPaid events (any ticket type with price > 0) require the workspace identity verification to be approved:\n- 409 `IDENTITY_VERIFICATION_REQUIRED`: the event stays `DRAFT` and is queued; it publishes automatically within ~5 minutes of the verification being approved.", + "summary": "Create a live stream", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New live stream\" in the dashboard: creates the stream in Mux and returns the RTMPS server and stream key to configure OBS or any encoder.\n\nSECURITY: `streamKey` is a secret that grants broadcasting rights on this stream in the organization's name. It is returned ONLY here and by `POST /content/lives/{id}/reset-key`, never by `GET /content/lives`, `GET /content/lives/{id}` or `PATCH`. Store it like a password; if it leaks, rotate it with reset-key.\n\n`memberOnly` is forced to false when the workspace has no active membership plan (nobody to restrict it to). With `eventDateId` and no `scheduledAt`, the stream inherits the show date's start time.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `title` empty or longer than 120 characters, or `scheduledAt` not in \"YYYY-MM-DDTHH:mm\" format.\n- 400 `INVALID_SCHEDULE`: `scheduledAt` is in the past or more than 2 years ahead.\n- 403 `FEATURE_LOCKED`: the workspace plan does not include streaming.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: `eventDateId` does not exist or is not an event of this workspace (as owner or linked artist).\n- 409 `EVENT_DATE_HAS_LIVE`: that show date already has a live stream.\n- 502 `MUX_ERROR`: Mux rejected the request or is not configured; nothing was created.", "security": [ { "apiKey": [] @@ -944,14 +827,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -962,8 +837,18 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentLiveCreate" + } + } + } + }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -971,7 +856,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Event" + "$ref": "#/components/schemas/ContentLiveCreated" } }, "required": [ @@ -981,6 +866,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -1031,8 +926,51 @@ } } }, + "502": { + "description": "The external provider failed to complete the operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/auth/device/code": { + "post": { + "operationId": "postAuthDeviceCode", + "tags": [ + "auth" + ], + "summary": "Start the Device Authorization Grant (RFC 8628)", + "description": "Public endpoint (no auth): credential bootstrap for the Device Authorization Grant (RFC 8628).", + "security": [], + "responses": { + "200": { + "description": "Flow started: device_code (polled by the CLI) + user_code (approved by the user in the browser).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCodeResponse" + } + } + } + }, + "429": { + "description": "Too many requests from the same IP (anti-flood).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "503": { - "description": "Service unavailable: an external dependency is down or initialization failed.", + "description": "Could not generate a unique device_code/user_code after retrying (persistent collision).", "content": { "application/json": { "schema": { @@ -1044,14 +982,110 @@ } } }, - "/events/{id}/cancel": { + "/auth/device/token": { "post": { - "operationId": "postEventsIdCancel", + "operationId": "postAuthDeviceToken", "tags": [ - "events" + "auth" ], - "summary": "Cancel an event (keeps the record and its sales)", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nSets the event and ALL its dates to `CANCELLED` and turns off the waiting room. Unlike `DELETE /events/{id}`, it PRESERVES the record: sales, issued tickets and the audit trail for refunds remain. Idempotent: cancelling an already-cancelled event returns 200 with no changes. Does not trigger refunds — use `POST /sales/{id}/refund` for that.", + "summary": "CLI poll: exchanges the device_code for an API key once approved", + "description": "Public endpoint (no auth): credential bootstrap for the Device Authorization Grant (RFC 8628).", + "security": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTokenRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Approved: delivers the ft_live_… API key exactly once and consumes the row.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTokenResponse" + } + } + } + }, + "400": { + "description": "RFC 8628 status: authorization_pending | slow_down | expired_token | access_denied | invalid_request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTokenError" + } + } + } + } + } + } + }, + "/auth/signup": { + "post": { + "operationId": "postAuthSignup", + "tags": [ + "auth" + ], + "summary": "Headless sign-up: creates the unverified account and sends the email", + "description": "Public (no auth). Verify-first: no credential is issued. The optional `workspaceName` creates the first tenant in the same step (on the free Spark plan). Rate-limited per IP and per email.", + "security": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignupRequest" + } + } + } + }, + "responses": { + "202": { + "description": "Account pending verification (or already existing: same shape, no enumeration). The email sent is used to verify AND set a password — it reuses the staff invitation (src/lib/staff-invite.ts). With that, the user can approve an `ft login` (Device Grant) from their browser.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignupResponse" + } + } + } + }, + "422": { + "description": "Invalid body (email, name or workspaceName).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too many attempts from the same IP or the same email.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/workspaces": { + "post": { + "operationId": "postWorkspaces", + "tags": [ + "me" + ], + "summary": "Create your own workspace/tenant (self-serve)", + "description": "Requires a valid API key — does NOT require an active workspace (`X-Workspace-Id` does not apply here: it is ignored if sent). The caller becomes ADMIN of the new workspace. If they already administer their own Organization (umbrella), another workspace is added there, subject to the plan quota (spark=1, star=3, icon=7); if they have no link at all, a new Organization is created on the free Spark plan. A user who is already a collaborator (staff) of someone else's workspace gets 409 `ALREADY_HAS_ACCESS`: ask an administrator to add them, instead of creating a tenant that would override their current access.", "security": [ { "apiKey": [] @@ -1061,14 +1095,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -1079,8 +1105,18 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceCreate" + } + } + } + }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -1088,7 +1124,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Event" + "$ref": "#/components/schemas/WorkspaceAccess" } }, "required": [ @@ -1128,8 +1164,18 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { - "description": "Request body/parameter validation failed.", + "description": "Operation error.", "content": { "application/json": { "schema": { @@ -1141,14 +1187,14 @@ } } }, - "/events/{id}/dates": { + "/me": { "get": { - "operationId": "getEventsIdDates", + "operationId": "getMe", "tags": [ - "events" + "me" ], - "summary": "List an event's dates", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Authenticated user, role and accessible workspaces", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. `activeWorkspaceId` is `null` and `workspaces` is `[]` when the credential is valid but the user does not have any workspace yet (just registered via POST /auth/signup, before POST /workspaces).", "security": [ { "apiKey": [] @@ -1158,14 +1204,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -1185,10 +1223,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventDate" - } + "$ref": "#/components/schemas/Me" } }, "required": [ @@ -1239,14 +1274,16 @@ } } } - }, - "post": { - "operationId": "postEventsIdDates", + } + }, + "/events/{id}": { + "get": { + "operationId": "getEventsId", "tags": [ "events" ], - "summary": "Add a date to an event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Get an event", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -1274,18 +1311,8 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventDateCreate" - } - } - } - }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -1293,7 +1320,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EventDate" + "$ref": "#/components/schemas/Event" } }, "required": [ @@ -1344,16 +1371,14 @@ } } } - } - }, - "/events/{id}/dates/{dateId}": { + }, "patch": { - "operationId": "patchEventsIdDatesDateId", + "operationId": "patchEventsId", "tags": [ "events" ], - "summary": "Update an event date", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Update an event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nAbsent fields are left untouched. Errors (`error.code`): 409 `SLUG_TAKEN`; 422 `PULEP_REQUIRED` (only evaluated when the request changes `genre` or `pulepCode`); 422 `GENRE_OTHER_WITHOUT_OTRO` (`genreOther` sent without `genre` while the stored genre is not \"otro\"); 422 `CLASSIFICATION_CONFLICT` (the resulting genre + audience, merged with the stored values, are incompatible, e.g. \"familiar\" with an 18+ audience). `genre`/`subgenre`/`audience` are validated against the stored classification (422 `CLASSIFICATION_CONFLICT`) and then saved as manual classification facets on a best-effort basis. Publication status, the external ticketing URL and the artist lineup have their own endpoints.", "security": [ { "apiKey": [] @@ -1371,14 +1396,6 @@ "type": "string" } }, - { - "name": "dateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -1394,7 +1411,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventDateUpdate" + "$ref": "#/components/schemas/EventUpdate" } } } @@ -1408,7 +1425,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EventDate" + "$ref": "#/components/schemas/Event" } }, "required": [ @@ -1448,6 +1465,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -1461,12 +1488,12 @@ } }, "delete": { - "operationId": "deleteEventsIdDatesDateId", + "operationId": "deleteEventsId", "tags": [ "events" ], - "summary": "Delete an event date", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Delete an event (soft delete)", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nReturns 409 `EVENT_HAS_SALES` when the event has CONFIRMED or REFUNDED sales; cancel it with `POST /events/{id}/cancel` instead.", "security": [ { "apiKey": [] @@ -1484,14 +1511,6 @@ "type": "string" } }, - { - "name": "dateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -1566,14 +1585,14 @@ } } }, - "/events/{id}/artists": { - "put": { - "operationId": "putEventsIdArtists", + "/events/{id}/publish": { + "post": { + "operationId": "postEventsIdPublish", "tags": [ "events" ], - "summary": "Replace the event lineup", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nReplaces the artists linked to the event with `artistIds`, in that order (the lineup order). Artists not in the list are unlinked (send the full lineup, not a diff); `[]` clears it. Ids come from `GET /artists?q=` (workspace ids of registered artists). Newly linked artists get a notification email.\n\n`inviteEmails` invites artists without an account: each email gets an invitation (only once per email and event) and is linked when it signs up. `inviteEmails` is additive: omitting it does not cancel existing invitations (use `DELETE /events/{id}/artist-invitations/{invitationId}`).\n\nIds that are not a registered artist (or the event's own workspace) are skipped and reported in `warnings[]` with code `ARTIST_IDS_IGNORED` (`ids`).\n\nLimits: up to 50 `artistIds` and 20 `inviteEmails` per request; 20 lineup changes per hour per API key and event (429 `RATE_LIMITED` with `Retry-After`).", + "summary": "Publish an event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nPublishes the event and its dates (cancelled dates stay cancelled unless the whole event was `CANCELLED`). Requires at least one future date (409 `CONFLICT`).\n\nSeated (seats.io) events are validated first:\n- 409 `SEATSIO_INVALID`: a seated date has no ticket type mapped to a chart category, or maps a category missing from the chart.\n- 409 `SEAT_MAP_CATEGORIES_UNCOVERED`: a chart category with seats on sale has no ticket type on that date and is not fully blocked (booked). `error.details.zones[]` lists each one (`dateLabel`, `categoryKey`, `categoryLabel`, `seats`). Create its ticket type or block those seats, then retry.\n- 503 `SEAT_MAP_UNVERIFIABLE` (retryable): seats.io could not be reached to verify the map.\n\nPaid events (any ticket type with price > 0) require the workspace identity verification to be approved:\n- 409 `IDENTITY_VERIFICATION_REQUIRED`: the event stays `DRAFT` and is queued; it publishes automatically within ~5 minutes of the verification being approved.", "security": [ { "apiKey": [] @@ -1601,16 +1620,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventArtistsReplace" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -1621,12 +1630,6 @@ "properties": { "data": { "$ref": "#/components/schemas/Event" - }, - "warnings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Warning" - } } }, "required": [ @@ -1666,6 +1669,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -1676,38 +1689,27 @@ } } }, - "429": { - "description": "Too many requests: rate limit exceeded.", + "503": { + "description": "Service unavailable: an external dependency is down or initialization failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } } } } } }, - "/events/{id}/artists/{organizationId}": { - "delete": { - "operationId": "deleteEventsIdArtistsOrganizationId", + "/events/{id}/cancel": { + "post": { + "operationId": "postEventsIdCancel", "tags": [ "events" ], - "summary": "Unlink an artist from an event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nRemoves one artist from the event lineup. Allowed for the workspace that owns the event, or for the artist itself (`organizationId` equal to the active workspace) to remove itself from an event it was linked to. 404 `EVENT_NOT_FOUND` when the event is not owned by the workspace; 404 `ARTIST_NOT_LINKED` when the artist is not in its lineup (when unlinking itself, the artist always gets `ARTIST_NOT_LINKED`).", + "summary": "Cancel an event (keeps the record and its sales)", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nSets the event and ALL its dates to `CANCELLED` and turns off the waiting room. Unlike `DELETE /events/{id}`, it PRESERVES the record: sales, issued tickets and the audit trail for refunds remain. Idempotent: cancelling an already-cancelled event returns 200 with no changes. Does not trigger refunds — use `POST /sales/{id}/refund` for that.", "security": [ { "apiKey": [] @@ -1725,14 +1727,6 @@ "type": "string" } }, - { - "name": "organizationId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -1752,7 +1746,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EventArtistUnlink" + "$ref": "#/components/schemas/Event" } }, "required": [ @@ -1805,14 +1799,14 @@ } } }, - "/events/{id}/artist-invitations": { - "get": { - "operationId": "getEventsIdArtistInvitations", + "/events/{id}/dates/{dateId}": { + "patch": { + "operationId": "patchEventsIdDatesDateId", "tags": [ "events" ], - "summary": "List artist invitations of an event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nPending and expired invitations sent to artists without an account (via `inviteEmails` in `PUT /events/{id}/artists`), newest first. Accepted invitations are not listed: they are already linked artists. Invitations expire 14 days after being sent.", + "summary": "Update an event date", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -1830,6 +1824,14 @@ "type": "string" } }, + { + "name": "dateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -1840,6 +1842,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventDateUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -1849,10 +1861,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArtistInvitation" - } + "$ref": "#/components/schemas/EventDate" } }, "required": [ @@ -1903,16 +1912,14 @@ } } } - } - }, - "/events/{id}/artist-invitations/{invitationId}": { + }, "delete": { - "operationId": "deleteEventsIdArtistInvitationsInvitationId", + "operationId": "deleteEventsIdDatesDateId", "tags": [ "events" ], - "summary": "Cancel an artist invitation", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nCancels a pending or expired invitation; its link stops working. 409 `INVITATION_ACCEPTED` when the artist already accepted it (unlink the artist with `DELETE /events/{id}/artists/{organizationId}` instead).", + "summary": "Delete an event date", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -1931,7 +1938,7 @@ } }, { - "name": "invitationId", + "name": "dateId", "in": "path", "required": true, "schema": { @@ -1954,15 +1961,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/ArtistInvitationDeleted" - } - }, - "required": [ - "data" - ] + "type": "object" } } } @@ -2020,14 +2019,14 @@ } } }, - "/events/{id}/artist-invitations/{invitationId}/resend": { - "post": { - "operationId": "postEventsIdArtistInvitationsInvitationIdResend", + "/events/{id}/artists": { + "put": { + "operationId": "putEventsIdArtists", "tags": [ "events" ], - "summary": "Resend an artist invitation", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nResends the invitation email and renews its expiry to 14 days from now (status back to `PENDING`, same link). Works on expired invitations too. 409 `INVITATION_ACCEPTED` when already accepted. 502 `EMAIL_NOT_SENT` when the email provider failed (the expiry was renewed; retry). Rate limited: 3 resends per hour per API key and invitation (429 `RATE_LIMITED` with `Retry-After`).", + "summary": "Replace the event lineup", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nReplaces the artists linked to the event with `artistIds`, in that order (the lineup order). Artists not in the list are unlinked (send the full lineup, not a diff); `[]` clears it. Ids come from `GET /artists?q=` (workspace ids of registered artists). Newly linked artists get a notification email.\n\n`inviteEmails` invites artists without an account: each email gets an invitation (only once per email and event) and is linked when it signs up. `inviteEmails` is additive: omitting it does not cancel existing invitations (use `DELETE /events/{id}/artist-invitations/{invitationId}`).\n\nIds that are not a registered artist (or the event's own workspace) are skipped and reported in `warnings[]` with code `ARTIST_IDS_IGNORED` (`ids`).\n\nLimits: up to 50 `artistIds` and 20 `inviteEmails` per request; 20 lineup changes per hour per API key and event (429 `RATE_LIMITED` with `Retry-After`).", "security": [ { "apiKey": [] @@ -2045,14 +2044,6 @@ "type": "string" } }, - { - "name": "invitationId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -2063,6 +2054,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventArtistsReplace" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -2072,7 +2073,13 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ArtistInvitation" + "$ref": "#/components/schemas/Event" + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Warning" + } } }, "required": [ @@ -2112,16 +2119,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -2152,28 +2149,18 @@ "$ref": "#/components/headers/RateLimitPolicy" } } - }, - "502": { - "description": "The external provider failed to complete the operation.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } } } }, - "/artists": { - "get": { - "operationId": "getArtists", + "/events/{id}/artists/{organizationId}": { + "delete": { + "operationId": "deleteEventsIdArtistsOrganizationId", "tags": [ - "artists" + "events" ], - "summary": "Search registered artists", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.\n\nSearches artist workspaces registered on FreeTicket by name (case-insensitive, `q` of 2+ characters). Returns public brand data only. Use the `id` in `PUT /events/{id}/artists`; for artists without an account use `inviteEmails` there.", + "summary": "Unlink an artist from an event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nRemoves one artist from the event lineup. Allowed for the workspace that owns the event, or for the artist itself (`organizationId` equal to the active workspace) to remove itself from an event it was linked to. 404 `EVENT_NOT_FOUND` when the event is not owned by the workspace; 404 `ARTIST_NOT_LINKED` when the artist is not in its lineup (when unlinking itself, the artist always gets `ARTIST_NOT_LINKED`).", "security": [ { "apiKey": [] @@ -2184,28 +2171,17 @@ ], "parameters": [ { - "name": "q", - "in": "query", + "name": "id", + "in": "path", "required": true, - "description": "Name to search, 2-100 characters", "schema": { "type": "string" } }, { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, + "name": "organizationId", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -2229,18 +2205,11 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArtistSummary" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/EventArtistUnlink" } }, "required": [ - "data", - "page" + "data" ] } } @@ -2289,14 +2258,14 @@ } } }, - "/events/{id}/viewers": { + "/events/{id}/artist-invitations": { "get": { - "operationId": "getEventsIdViewers", + "operationId": "getEventsIdArtistInvitations", "tags": [ "events" ], - "summary": "List read-only viewers of an event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nPeople with read-only access to this event's statistics (they see only `/stats`, nothing else of the workspace), newest first. Only events owned by the active workspace (an event where the workspace is just a linked artist is 404). A key restricted by `event_scope` gets 403 `EVENT_SCOPE_FORBIDDEN` for events outside its scope.", + "summary": "List artist invitations of an event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nPending and expired invitations sent to artists without an account (via `inviteEmails` in `PUT /events/{id}/artists`), newest first. Accepted invitations are not listed: they are already linked artists. Invitations expire 14 days after being sent.", "security": [ { "apiKey": [] @@ -2335,7 +2304,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/EventViewer" + "$ref": "#/components/schemas/ArtistInvitation" } } }, @@ -2387,14 +2356,16 @@ } } } - }, - "post": { - "operationId": "postEventsIdViewers", + } + }, + "/events/{id}/artist-invitations/{invitationId}": { + "delete": { + "operationId": "deleteEventsIdArtistInvitationsInvitationId", "tags": [ "events" ], - "summary": "Grant read-only access to an event's statistics", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nGives the owner of `email` read-only access to this event's statistics and emails them the link. If no account exists for that email, a read-only (`VIEWER`) account is created with no access to the rest of the workspace, and a second email lets them set a password. The response does not say whether an account already existed (`newAccount` is deprecated and never sent). Idempotent per event and person: 201 when the access is new, 200 when it already existed (the notice email is sent again). 502 `EMAIL_NOT_SENT` when the email provider failed (the access WAS granted; retry to resend). Rate limited: 10 invitations per 10 minutes per API key (429 `RATE_LIMITED` with `Retry-After`).", + "summary": "Cancel an artist invitation", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nCancels a pending or expired invitation; its link stops working. 409 `INVITATION_ACCEPTED` when the artist already accepted it (unlink the artist with `DELETE /events/{id}/artists/{organizationId}` instead).", "security": [ { "apiKey": [] @@ -2412,6 +2383,14 @@ "type": "string" } }, + { + "name": "invitationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -2422,36 +2401,8 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventViewerInvite" - } - } - } - }, "responses": { "200": { - "description": "The person already had access.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/EventViewerInviteResult" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "201": { "description": "OK", "content": { "application/json": { @@ -2459,7 +2410,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EventViewerInviteResult" + "$ref": "#/components/schemas/ArtistInvitationDeleted" } }, "required": [ @@ -2499,6 +2450,131 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/events/{id}/artist-invitations/{invitationId}/resend": { + "post": { + "operationId": "postEventsIdArtistInvitationsInvitationIdResend", + "tags": [ + "events" + ], + "summary": "Resend an artist invitation", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nResends the invitation email and renews its expiry to 14 days from now (status back to `PENDING`, same link). Works on expired invitations too. 409 `INVITATION_ACCEPTED` when already accepted. 502 `EMAIL_NOT_SENT` when the email provider failed (the expiry was renewed; retry). Rate limited: 3 resends per hour per API key and invitation (429 `RATE_LIMITED` with `Retry-After`).", + "security": [ + { + "apiKey": [] + }, + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "invitationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ArtistInvitation" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -2543,14 +2619,14 @@ } } }, - "/events/{id}/viewers/{viewerId}": { - "delete": { - "operationId": "deleteEventsIdViewersViewerId", + "/artists": { + "get": { + "operationId": "getArtists", "tags": [ - "events" + "artists" ], - "summary": "Revoke a read-only viewer of an event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nDESTRUCTIVE: removes this person's read-only access to the event's statistics. Their account is kept (it may have access to other events). `viewerId` is the access id returned by `GET /events/{id}/viewers`, not the user id. An access of another event or workspace is 404.", + "summary": "Search registered artists", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.\n\nSearches artist workspaces registered on FreeTicket by name (case-insensitive, `q` of 2+ characters). Returns public brand data only. Use the `id` in `PUT /events/{id}/artists`; for artists without an account use `inviteEmails` there.", "security": [ { "apiKey": [] @@ -2559,20 +2635,30 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ { - "name": "id", - "in": "path", + "name": "q", + "in": "query", "required": true, + "description": "Name to search, 2-100 characters", "schema": { "type": "string" } }, { - "name": "viewerId", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, "schema": { "type": "string" } @@ -2596,11 +2682,18 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EventViewerRevoke" + "type": "array", + "items": { + "$ref": "#/components/schemas/ArtistSummary" + } + }, + "page": { + "$ref": "#/components/schemas/Page" } }, "required": [ - "data" + "data", + "page" ] } } @@ -2649,14 +2742,14 @@ } } }, - "/events/{id}/validators": { + "/events/{id}/viewers": { "get": { - "operationId": "getEventsIdValidators", + "operationId": "getEventsIdViewers", "tags": [ "events" ], - "summary": "List the ticket validators of an event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nDoor staff who can validate tickets for this event: those assigned to it plus those with no events assigned (`allEvents: true`, they validate every event of the workspace). Includes inactive validators (`isActive: false`). `userId` and `name` are only returned for members of the active workspace. Only events owned by the active workspace. A key restricted by `event_scope` gets 403 `EVENT_SCOPE_FORBIDDEN` for events outside its scope.", + "summary": "List read-only viewers of an event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nPeople with read-only access to this event's statistics (they see only `/stats`, nothing else of the workspace), newest first. Only events owned by the active workspace (an event where the workspace is just a linked artist is 404). A key restricted by `event_scope` gets 403 `EVENT_SCOPE_FORBIDDEN` for events outside its scope.", "security": [ { "apiKey": [] @@ -2695,7 +2788,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/EventValidator" + "$ref": "#/components/schemas/EventViewer" } } }, @@ -2749,12 +2842,12 @@ } }, "post": { - "operationId": "postEventsIdValidators", + "operationId": "postEventsIdViewers", "tags": [ "events" ], - "summary": "Add a ticket validator to an event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nAssigns door staff to this event. If no account exists for `email`, a `STAFF` account is created in the workspace and an invitation email is sent so they can set a password (`invited: true`). If the person is already a validator of this workspace, they are reactivated and this event is added to their list (assignments are additive: existing events are never removed; a validator with no events assigned already validates every event of the workspace, so nothing is added and they keep `allEvents: true`). `userId` and `name` are only returned when the person is a member of the active workspace (otherwise only the `email` sent is echoed). 409 `VALIDATOR_OTHER_WORKSPACE` when that person cannot be assigned as a validator of this workspace (the message is intentionally generic). To remove a validator, change their access with `PUT /staff/{id}/access` or revoke it with `DELETE /staff/{id}`. Rate limited: 10 per 10 minutes per API key (429 `RATE_LIMITED` with `Retry-After`).", + "summary": "Grant read-only access to an event's statistics", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nGives the owner of `email` read-only access to this event's statistics and emails them the link. If no account exists for that email, a read-only (`VIEWER`) account is created with no access to the rest of the workspace, and a second email lets them set a password. The response does not say whether an account already existed (`newAccount` is deprecated and never sent). Idempotent per event and person: 201 when the access is new, 200 when it already existed (the notice email is sent again). 502 `EMAIL_NOT_SENT` when the email provider failed (the access WAS granted; retry to resend). Rate limited: 10 invitations per 10 minutes per API key (429 `RATE_LIMITED` with `Retry-After`).", "security": [ { "apiKey": [] @@ -2787,12 +2880,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventValidatorCreate" + "$ref": "#/components/schemas/EventViewerInvite" } } } }, "responses": { + "200": { + "description": "The person already had access.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EventViewerInviteResult" + } + }, + "required": [ + "data" + ] + } + } + } + }, "201": { "description": "OK", "content": { @@ -2801,7 +2912,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EventValidatorCreateResult" + "$ref": "#/components/schemas/EventViewerInviteResult" } }, "required": [ @@ -2841,16 +2952,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -2881,18 +2982,28 @@ "$ref": "#/components/headers/RateLimitPolicy" } } + }, + "502": { + "description": "The external provider failed to complete the operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } } }, - "/ticket-types": { - "get": { - "operationId": "getTicketTypes", + "/events/{id}/viewers/{viewerId}": { + "delete": { + "operationId": "deleteEventsIdViewersViewerId", "tags": [ - "ticket-types" + "events" ], - "summary": "List workspace ticket types", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Revoke a read-only viewer of an event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nDESTRUCTIVE: removes this person's read-only access to the event's statistics. Their account is kept (it may have access to other events). `viewerId` is the access id returned by `GET /events/{id}/viewers`, not the user id. An access of another event or workspace is 404.", "security": [ { "apiKey": [] @@ -2901,30 +3012,20 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { - "name": "eventDateId", - "in": "query", - "required": false, - "description": "filter by event date", + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } }, { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, + "name": "viewerId", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -2948,18 +3049,11 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TicketType" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/EventViewerRevoke" } }, "required": [ - "data", - "page" + "data" ] } } @@ -3006,14 +3100,16 @@ } } } - }, - "post": { - "operationId": "postTicketTypes", + } + }, + "/events/{id}/validators": { + "get": { + "operationId": "getEventsIdValidators", "tags": [ - "ticket-types" + "events" ], - "summary": "Create a ticket type", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "summary": "List the ticket validators of an event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nDoor staff who can validate tickets for this event: those assigned to it plus those with no events assigned (`allEvents: true`, they validate every event of the workspace). Includes inactive validators (`isActive: false`). `userId` and `name` are only returned for members of the active workspace. Only events owned by the active workspace. A key restricted by `event_scope` gets 403 `EVENT_SCOPE_FORBIDDEN` for events outside its scope.", "security": [ { "apiKey": [] @@ -3023,6 +3119,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -3033,18 +3137,8 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TicketTypeCreate" - } - } - } - }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -3052,7 +3146,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/TicketType" + "type": "array", + "items": { + "$ref": "#/components/schemas/EventValidator" + } } }, "required": [ @@ -3103,16 +3200,14 @@ } } } - } - }, - "/ticket-types/{id}": { - "get": { - "operationId": "getTicketTypesId", + }, + "post": { + "operationId": "postEventsIdValidators", "tags": [ - "ticket-types" + "events" ], - "summary": "Get a ticket type", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Add a ticket validator to an event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nAssigns door staff to this event. If no account exists for `email`, a `STAFF` account is created in the workspace and an invitation email is sent so they can set a password (`invited: true`). If the person is already a validator of this workspace, they are reactivated and this event is added to their list (assignments are additive: existing events are never removed; a validator with no events assigned already validates every event of the workspace, so nothing is added and they keep `allEvents: true`). `userId` and `name` are only returned when the person is a member of the active workspace (otherwise only the `email` sent is echoed). 409 `VALIDATOR_OTHER_WORKSPACE` when that person cannot be assigned as a validator of this workspace (the message is intentionally generic). To remove a validator, change their access with `PUT /staff/{id}/access` or revoke it with `DELETE /staff/{id}`. Rate limited: 10 per 10 minutes per API key (429 `RATE_LIMITED` with `Retry-After`).", "security": [ { "apiKey": [] @@ -3140,8 +3235,18 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventValidatorCreate" + } + } + } + }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -3149,7 +3254,355 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/TicketType" + "$ref": "#/components/schemas/EventValidatorCreateResult" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + }, + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" + } + } + } + } + } + }, + "/ticket-types": { + "get": { + "operationId": "getTicketTypes", + "tags": [ + "ticket-types" + ], + "summary": "List workspace ticket types", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "security": [ + { + "apiKey": [] + }, + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "eventDateId", + "in": "query", + "required": false, + "description": "filter by event date", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TicketType" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "data", + "page" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "operationId": "postTicketTypes", + "tags": [ + "ticket-types" + ], + "summary": "Create a ticket type", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "security": [ + { + "apiKey": [] + }, + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TicketTypeCreate" + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TicketType" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/ticket-types/{id}": { + "get": { + "operationId": "getTicketTypesId", + "tags": [ + "ticket-types" + ], + "summary": "Get a ticket type", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "security": [ + { + "apiKey": [] + }, + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TicketType" } }, "required": [ @@ -3969,14 +4422,14 @@ } } }, - "/sales/{id}/refund": { - "post": { - "operationId": "postSalesIdRefund", + "/event-dates/{id}/courtesy-seats": { + "get": { + "operationId": "getEventDatesIdCourtesySeats", "tags": [ - "sales" + "events" ], - "summary": "Refund a sale (moving the funds depends on the payment gateway)", - "description": "Marks the sale as REFUNDED and releases the associated numbered seats. IMPORTANT: whether the money goes back to the buyer depends on the payment gateway and the payment method used. Sales charged through MercadoPago are fully refunded against the MercadoPago API (stable idempotency key per sale, so retries never refund twice) and marked only once MercadoPago confirms. A 503 GATEWAY_REFUND_PENDING means MercadoPago did not answer clearly: the sale stays CONFIRMED and repeating the same call is safe. Sales charged through Wompi by CARD are voided against the payment gateway before being marked. In every other case this endpoint does NOT trigger the actual refund: the money is NOT returned automatically and a 200 only confirms the accounting status change. Those refunds must be handled separately in the payment gateway's dashboard. PARTIAL REFUND BY TICKET: send `items` with the ids of the sale items to refund (the `id` field of GET /sales/{id}/tickets). Each item refunds its prorated share of the sale total (by item subtotal; shares always add up to the exact total). The refunded tickets are invalidated at the door and their quota returns to stock; when no live item remains the sale becomes REFUNDED. Only MercadoPago (or uncharged / cash sales) support partial refunds: Wompi and Bold answer 409 GATEWAY_REFUND_NOT_SUPPORTED. Items already checked in answer 409 ITEM_ALREADY_CHECKED_IN — also for a FULL refund (no `items`, or all of them): a sale with any checked-in ticket is never refunded whole; refund the unused tickets by item; items from another sale answer 422 ITEM_NOT_IN_SALE; a refund already in flight over the same items answers 409 REFUND_IN_PROGRESS (retry exactly the same items). `block_seats: true` (also valid for a full refund) keeps the refunded numbered seats OUT of sale: seats.io moves them from booked straight to a blocked status, never through free. The `refund` object in the response reports the refunded amount and what happened to the seats. Wompi payment methods without API refunds (PSE, Nequi, Bancolombia transfer) respond 409: return the money in the Wompi dashboard and repeat the call with {\"acknowledge_manual\": true} to reflect the accounting status. A 502 means the gateway rejected the void and the sale remains CONFIRMED.", + "summary": "List blocked seats that can be issued as courtesies", + "description": "For a numbered (seats.io) event date: the seats that are booked on the map without an order (blocked from sale by the event wizard or by hand) and are not claimed by any live sale, grouped by numbered ticket type (matched by seats.io category). These are the seats the dashboard offers when issuing a courtesy. A date without a seat map, or without numbered ticket types, returns `ticketTypes: []`. 503 SEATSIO_UNAVAILABLE (retryable) when seats.io could not be read. Minimum role: `ADMIN`.", "security": [ { "apiKey": [] @@ -4004,16 +4457,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaleRefundRequest" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -4023,7 +4466,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SaleRefundResult" + "$ref": "#/components/schemas/CourtesySeats" } }, "required": [ @@ -4063,28 +4506,8 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { - "description": "Operation error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "502": { - "description": "The external provider failed to complete the operation.", + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { @@ -4106,14 +4529,14 @@ } } }, - "/sales/{id}/items/{itemId}/transfer": { - "post": { - "operationId": "postSalesIdItemsItemIdTransfer", + "/membership-plans": { + "get": { + "operationId": "getMembershipPlans", "tags": [ - "sales" + "membership-plans" ], - "summary": "Transfer one ticket of a sale to another person (destructive)", - "description": "DESTRUCTIVE: changes the ticket holder and voids the previous QR code (the ticket code is rotated and any installed Apple Wallet pass stops working). The new holder receives the ticket by email and the buyer is notified. Same rules as the dashboard and the buyer: the recipient must already have a verified FreeTicket buyer account (the holder name comes from that account), each ticket can be transferred only once (no staff override) and only until the show starts. 422 RECIPIENT_NOT_REGISTERED / SELF_TRANSFER: fix the recipient. 409 NOT_CONFIRMED, ALREADY_TRANSFERRED, CHECKED_IN, REFUNDED, ADDON, PRESALE_NOT_TRANSFERABLE, MULTI_QUANTITY, EVENT_STARTED or CONFLICT (the ticket changed in flight; re-read and retry). Not idempotent: a retry after success answers 409 ALREADY_TRANSFERRED. Minimum role: `ADMIN`.", + "summary": "List the workspace's membership plans", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -4122,20 +4545,21 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", "schema": { - "type": "string" + "type": "integer", + "default": 20 } }, { - "name": "itemId", - "in": "path", - "required": true, + "name": "cursor", + "in": "query", + "required": false, "schema": { "type": "string" } @@ -4150,16 +4574,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaleItemTransferRequest" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -4169,11 +4583,18 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SaleItemTransfer" + "type": "array", + "items": { + "$ref": "#/components/schemas/MembershipPlan" + } + }, + "page": { + "$ref": "#/components/schemas/Page" } }, "required": [ - "data" + "data", + "page" ] } } @@ -4209,16 +4630,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -4230,16 +4641,14 @@ } } } - } - }, - "/sales/{id}/recipient": { - "patch": { - "operationId": "patchSalesIdRecipient", + }, + "post": { + "operationId": "postMembershipPlans", "tags": [ - "sales" + "membership-plans" ], - "summary": "Correct the recipient of a courtesy sale and resend its tickets", - "description": "DESTRUCTIVE when the email changes (previous QR codes are voided). Only for courtesy sales issued from the dashboard (confirmed, `is_courtesy`); any other sale answers 404. Updates the recipient's name and email and resends the tickets to the corrected address. When the email changes, the ticket codes of the non-transferred tickets are rotated, so the QR codes sent to the wrong address stop working (`ticketCodesRotated: true`). Minimum role: `ADMIN`.", + "summary": "Create a membership plan", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -4248,16 +4657,7 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -4273,13 +4673,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CourtesyRecipientUpdate" + "$ref": "#/components/schemas/MembershipPlanCreate" } } } }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -4287,7 +4687,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CourtesyRecipient" + "$ref": "#/components/schemas/MembershipPlan" } }, "required": [ @@ -4340,14 +4740,14 @@ } } }, - "/event-dates/{id}/courtesy-seats": { + "/membership-plans/{id}": { "get": { - "operationId": "getEventDatesIdCourtesySeats", + "operationId": "getMembershipPlansId", "tags": [ - "events" + "membership-plans" ], - "summary": "List blocked seats that can be issued as courtesies", - "description": "For a numbered (seats.io) event date: the seats that are booked on the map without an order (blocked from sale by the event wizard or by hand) and are not claimed by any live sale, grouped by numbered ticket type (matched by seats.io category). These are the seats the dashboard offers when issuing a courtesy. A date without a seat map, or without numbered ticket types, returns `ticketTypes: []`. 503 SEATSIO_UNAVAILABLE (retryable) when seats.io could not be read. Minimum role: `ADMIN`.", + "summary": "Get a membership plan", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -4384,7 +4784,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CourtesySeats" + "$ref": "#/components/schemas/MembershipPlan" } }, "required": [ @@ -4433,28 +4833,16 @@ } } } - }, - "503": { - "description": "Service unavailable: an external dependency is down or initialization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } } - } - }, - "/membership-plans": { - "get": { - "operationId": "getMembershipPlans", + }, + "patch": { + "operationId": "patchMembershipPlansId", "tags": [ "membership-plans" ], - "summary": "List the workspace's membership plans", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Update a membership plan", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -4465,19 +4853,9 @@ ], "parameters": [ { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -4492,6 +4870,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MembershipPlanUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -4501,18 +4889,11 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MembershipPlan" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/MembershipPlan" } }, "required": [ - "data", - "page" + "data" ] } } @@ -4560,12 +4941,12 @@ } } }, - "post": { - "operationId": "postMembershipPlans", + "delete": { + "operationId": "deleteMembershipPlansId", "tags": [ "membership-plans" ], - "summary": "Create a membership plan", + "summary": "Delete a membership plan (soft delete)", "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { @@ -4576,6 +4957,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -4586,31 +4975,13 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MembershipPlanCreate" - } - } - } - }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/MembershipPlan" - } - }, - "required": [ - "data" - ] + "type": "object" } } } @@ -4645,6 +5016,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -4658,13 +5039,13 @@ } } }, - "/membership-plans/{id}": { + "/venues": { "get": { - "operationId": "getMembershipPlansId", + "operationId": "getVenues", "tags": [ - "membership-plans" + "venues" ], - "summary": "Get a membership plan", + "summary": "List workspace venues", "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { @@ -4676,9 +5057,19 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, "schema": { "type": "string" } @@ -4702,11 +5093,18 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MembershipPlan" + "type": "array", + "items": { + "$ref": "#/components/schemas/Venue" + } + }, + "page": { + "$ref": "#/components/schemas/Page" } }, "required": [ - "data" + "data", + "page" ] } } @@ -4754,12 +5152,12 @@ } } }, - "patch": { - "operationId": "patchMembershipPlansId", + "post": { + "operationId": "postVenues", "tags": [ - "membership-plans" + "venues" ], - "summary": "Update a membership plan", + "summary": "Create a venue", "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { @@ -4770,14 +5168,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -4793,13 +5183,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MembershipPlanUpdate" + "$ref": "#/components/schemas/VenueCreate" } } } }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -4807,7 +5197,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MembershipPlan" + "$ref": "#/components/schemas/Venue" } }, "required": [ @@ -4858,14 +5248,16 @@ } } } - }, - "delete": { - "operationId": "deleteMembershipPlansId", + } + }, + "/venues/{id}": { + "get": { + "operationId": "getVenuesId", "tags": [ - "membership-plans" + "venues" ], - "summary": "Delete a membership plan (soft delete)", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Get a venue", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -4899,7 +5291,15 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Venue" + } + }, + "required": [ + "data" + ] } } } @@ -4934,16 +5334,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -4955,16 +5345,14 @@ } } } - } - }, - "/venues": { - "get": { - "operationId": "getVenues", + }, + "patch": { + "operationId": "patchVenuesId", "tags": [ "venues" ], - "summary": "List workspace venues", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Update a venue", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -4975,19 +5363,9 @@ ], "parameters": [ { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -5002,6 +5380,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VenueUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -5011,18 +5399,11 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Venue" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/Venue" } }, "required": [ - "data", - "page" + "data" ] } } @@ -5070,12 +5451,12 @@ } } }, - "post": { - "operationId": "postVenues", + "delete": { + "operationId": "deleteVenuesId", "tags": [ "venues" ], - "summary": "Create a venue", + "summary": "Delete a venue (soft delete)", "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { @@ -5086,6 +5467,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -5096,31 +5485,13 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VenueCreate" - } - } - } - }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Venue" - } - }, - "required": [ - "data" - ] + "type": "object" } } } @@ -5168,14 +5539,14 @@ } } }, - "/venues/{id}": { + "/staff": { "get": { - "operationId": "getVenuesId", + "operationId": "getStaff", "tags": [ - "venues" + "staff" ], - "summary": "Get a venue", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "summary": "List staff with access to the workspace", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. With `?workspaceIds=`, cursor pagination is still per user: `limit` counts people, not rows.", "security": [ { "apiKey": [] @@ -5186,9 +5557,28 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "workspaceIds", + "in": "query", + "required": false, + "description": "Comma-separated workspace ids (max. 25). Returns the staff of all of them in a single call, with each row tagged with `workspaceId`/`workspaceName` (one row per person and workspace). Always intersected with the workspaces the credential can already manage: it never widens its scope. Without the parameter, the workspace from the `X-Workspace-Id` header is listed.", "schema": { "type": "string" } @@ -5212,11 +5602,18 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Venue" + "type": "array", + "items": { + "$ref": "#/components/schemas/StaffUser" + } + }, + "page": { + "$ref": "#/components/schemas/Page" } }, "required": [ - "data" + "data", + "page" ] } } @@ -5264,12 +5661,12 @@ } } }, - "patch": { - "operationId": "patchVenuesId", + "post": { + "operationId": "postStaff", "tags": [ - "venues" + "staff" ], - "summary": "Update a venue", + "summary": "Create a staff user in the workspace", "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { @@ -5280,14 +5677,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -5303,13 +5692,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VenueUpdate" + "$ref": "#/components/schemas/StaffCreate" } } } }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -5317,7 +5706,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Venue" + "$ref": "#/components/schemas/StaffUser" } }, "required": [ @@ -5357,6 +5746,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -5366,15 +5765,38 @@ } } } + }, + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + }, + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" + } + } } } - }, - "delete": { - "operationId": "deleteVenuesId", + } + }, + "/staff/{id}": { + "get": { + "operationId": "getStaffId", "tags": [ - "venues" + "staff" ], - "summary": "Delete a venue (soft delete)", + "summary": "Get a staff member", "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { @@ -5409,7 +5831,15 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StaffUser" + } + }, + "required": [ + "data" + ] } } } @@ -5455,16 +5885,14 @@ } } } - } - }, - "/staff": { - "get": { - "operationId": "getStaff", + }, + "delete": { + "operationId": "deleteStaffId", "tags": [ "staff" ], - "summary": "List staff with access to the workspace", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. With `?workspaceIds=`, cursor pagination is still per user: `limit` counts people, not rows.", + "summary": "Revoke a staff member's access to this workspace", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nRevokes access to THIS workspace: granted sections, ticket validation permissions, read-only events, membership, and the home workspace if it was this one. Terminates live sessions and invalidates the invitation QR code. It does NOT delete the account or its history: the person may belong to other workspaces. An `ADMIN` cannot revoke another admin (403) or themselves (409).", "security": [ { "apiKey": [] @@ -5475,28 +5903,9 @@ ], "parameters": [ { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "workspaceIds", - "in": "query", - "required": false, - "description": "Comma-separated workspace ids (max. 25). Returns the staff of all of them in a single call, with each row tagged with `workspaceId`/`workspaceName` (one row per person and workspace). Always intersected with the workspaces the credential can already manage: it never widens its scope. Without the parameter, the workspace from the `X-Workspace-Id` header is listed.", + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -5517,22 +5926,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StaffUser" - } - }, - "page": { - "$ref": "#/components/schemas/Page" - } - }, - "required": [ - "data", - "page" - ] + "type": "object" } } } @@ -5567,6 +5961,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -5578,13 +5982,15 @@ } } } - }, - "post": { - "operationId": "postStaff", + } + }, + "/staff/{id}/role": { + "patch": { + "operationId": "patchStaffIdRole", "tags": [ "staff" ], - "summary": "Create a staff user in the workspace", + "summary": "Change a staff user's role", "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", "security": [ { @@ -5595,6 +6001,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -5610,13 +6024,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StaffCreate" + "$ref": "#/components/schemas/RoleUpdate" } } } }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -5683,39 +6097,18 @@ } } } - }, - "429": { - "description": "Too many requests: rate limit exceeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } - } } } } }, - "/staff/{id}": { - "get": { - "operationId": "getStaffId", + "/staff/{id}/resend-invite": { + "post": { + "operationId": "postStaffIdResendInvite", "tags": [ "staff" ], - "summary": "Get a staff member", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Resend a staff member's invitation email", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nEmails the staff member their invitation link again (to set a password and enter the panel). The link is the same persistent one already shared, so previously shared links and QR codes keep working; the link itself is never returned by the API. An `ADMIN` can only target users whose home workspace is the active one (otherwise 404). 409 `NO_EMAIL` for quick-access accounts without an email address (share their QR from the panel). 502 `EMAIL_NOT_SENT` when the email provider failed (retry). Rate limited: 3 resends per hour per API key and user (429 `RATE_LIMITED` with `Retry-After`). Keys restricted by `event_scope` get 403.", "security": [ { "apiKey": [] @@ -5752,7 +6145,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/StaffUser" + "$ref": "#/components/schemas/StaffInviteResend" } }, "required": [ @@ -5792,65 +6185,8 @@ } } }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "delete": { - "operationId": "deleteStaffId", - "tags": [ - "staff" - ], - "summary": "Revoke a staff member's access to this workspace", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nRevokes access to THIS workspace: granted sections, ticket validation permissions, read-only events, membership, and the home workspace if it was this one. Terminates live sessions and invalidates the invitation QR code. It does NOT delete the account or its history: the person may belong to other workspaces. An `ADMIN` cannot revoke another admin (403) or themselves (409).", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", "content": { "application/json": { "schema": { @@ -5859,8 +6195,8 @@ } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "422": { + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { @@ -5869,28 +6205,29 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "429": { + "description": "Too many requests: rate limit exceeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } - } - }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + }, + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" } } }, - "422": { - "description": "Request body/parameter validation failed.", + "502": { + "description": "The external provider failed to complete the operation.", "content": { "application/json": { "schema": { @@ -5902,14 +6239,14 @@ } } }, - "/staff/{id}/role": { - "patch": { - "operationId": "patchStaffIdRole", + "/staff/{id}/access": { + "put": { + "operationId": "putStaffIdAccess", "tags": [ "staff" ], - "summary": "Change a staff user's role", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Replace a staff member's access in this workspace", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nDESTRUCTIVE (full replace): sets what the user can do in the active workspace and removes whatever is not in the body. `accessType`: `admin` (role `ADMIN`, everything; only a `SUPER_ADMIN` can grant it, otherwise 403 `ADMIN_REQUIRES_SUPER_ADMIN`), `validador` (role `STAFF`, ticket validation only; `validatorEventIds` limits which events, empty = all events of the workspace), `personalizado` (role `STAFF`, only the listed `sections`; including `validar` also enables validation, limited by `validatorEventIds`) or `lectura` (role `VIEWER`, read-only statistics of `viewerEventIds`). `expiresAt` (`YYYY-MM-DD`, end of that day in the workspace timezone; null = permanent). `expiresAt` in the past is rejected (422). Event ids must belong to the workspace (422 `INVALID_EVENTS`). Nobody can change their own access (409 `SELF_ACCESS`). Only a `SUPER_ADMIN` can change the access of a user whose global role is `SUPER_ADMIN`, `ADMIN` or `MINCULTURA`, or who is an `OWNER`/`ADMIN` of the organization that owns the workspace (403 `TARGET_ROLE_FORBIDDEN`). 409 `VALIDATOR_OTHER_WORKSPACE` when the access enables ticket validation and the user cannot be assigned as a validator of this workspace (nothing is written). An `ADMIN` can only target users whose home workspace is the active one (otherwise 404). Note: the role is the user's global role. Keys restricted by `event_scope` get 403.", "security": [ { "apiKey": [] @@ -5918,6 +6255,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -5942,7 +6280,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RoleUpdate" + "$ref": "#/components/schemas/StaffAccessUpdate" } } } @@ -5956,7 +6294,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/StaffUser" + "$ref": "#/components/schemas/StaffAccess" } }, "required": [ @@ -6019,14 +6357,14 @@ } } }, - "/staff/{id}/resend-invite": { - "post": { - "operationId": "postStaffIdResendInvite", + "/reports/summary": { + "get": { + "operationId": "getReportsSummary", "tags": [ - "staff" + "reports" ], - "summary": "Resend a staff member's invitation email", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nEmails the staff member their invitation link again (to set a password and enter the panel). The link is the same persistent one already shared, so previously shared links and QR codes keep working; the link itself is never returned by the API. An `ADMIN` can only target users whose home workspace is the active one (otherwise 404). 409 `NO_EMAIL` for quick-access accounts without an email address (share their QR from the panel). 502 `EMAIL_NOT_SENT` when the email provider failed (retry). Rate limited: 3 resends per hour per API key and user (429 `RATE_LIMITED` with `Retry-After`). Keys restricted by `event_scope` get 403.", + "summary": "Workspace KPIs (revenue, tickets, sales, memberships)", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -6037,275 +6375,19 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "period", + "in": "query", + "required": false, + "description": "7d | 30d (default) | 90d | 1y", "schema": { - "type": "string" - } - }, - { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/StaffInviteResend" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "429": { - "description": "Too many requests: rate limit exceeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } - } - }, - "502": { - "description": "The external provider failed to complete the operation.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/staff/{id}/access": { - "put": { - "operationId": "putStaffIdAccess", - "tags": [ - "staff" - ], - "summary": "Replace a staff member's access in this workspace", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nDESTRUCTIVE (full replace): sets what the user can do in the active workspace and removes whatever is not in the body. `accessType`: `admin` (role `ADMIN`, everything; only a `SUPER_ADMIN` can grant it, otherwise 403 `ADMIN_REQUIRES_SUPER_ADMIN`), `validador` (role `STAFF`, ticket validation only; `validatorEventIds` limits which events, empty = all events of the workspace), `personalizado` (role `STAFF`, only the listed `sections`; including `validar` also enables validation, limited by `validatorEventIds`) or `lectura` (role `VIEWER`, read-only statistics of `viewerEventIds`). `expiresAt` (`YYYY-MM-DD`, end of that day in the workspace timezone; null = permanent). `expiresAt` in the past is rejected (422). Event ids must belong to the workspace (422 `INVALID_EVENTS`). Nobody can change their own access (409 `SELF_ACCESS`). Only a `SUPER_ADMIN` can change the access of a user whose global role is `SUPER_ADMIN`, `ADMIN` or `MINCULTURA`, or who is an `OWNER`/`ADMIN` of the organization that owns the workspace (403 `TARGET_ROLE_FORBIDDEN`). 409 `VALIDATOR_OTHER_WORKSPACE` when the access enables ticket validation and the user cannot be assigned as a validator of this workspace (nothing is written). An `ADMIN` can only target users whose home workspace is the active one (otherwise 404). Note: the role is the user's global role. Keys restricted by `event_scope` get 403.", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "x-ft-destructive": true, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StaffAccessUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/StaffAccess" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/reports/summary": { - "get": { - "operationId": "getReportsSummary", - "tags": [ - "reports" - ], - "summary": "Workspace KPIs (revenue, tickets, sales, memberships)", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "period", - "in": "query", - "required": false, - "description": "7d | 30d (default) | 90d | 1y", - "schema": { - "type": "string", - "enum": [ - "7d", - "30d", - "90d", - "1y" - ], - "default": "30d" + "type": "string", + "enum": [ + "7d", + "30d", + "90d", + "1y" + ], + "default": "30d" } }, { @@ -9500,14 +9582,14 @@ } } }, - "/tickets/{ticketCode}/resend": { + "/tickets/{ticketCode}/checkin": { "post": { - "operationId": "postTicketsTicketCodeResend", + "operationId": "postTicketsTicketCodeCheckin", "tags": [ "tickets" ], - "summary": "Resend the confirmation email with the ticket", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Check in a ticket at the door", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -9535,6 +9617,16 @@ } } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CheckinRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -9544,7 +9636,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ResendTicket" + "$ref": "#/components/schemas/CheckinResult" } }, "required": [ @@ -9603,28 +9695,16 @@ } } } - }, - "502": { - "description": "The external provider failed to complete the operation.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } } - } - }, - "/tickets/{ticketCode}/checkin": { - "post": { - "operationId": "postTicketsTicketCodeCheckin", + }, + "delete": { + "operationId": "deleteTicketsTicketCodeCheckin", "tags": [ "tickets" ], - "summary": "Check in a ticket at the door", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Undo a ticket check-in (destructive)", + "description": "DESTRUCTIVE: reverts a door check-in so the ticket is valid again. Use it to fix a wrong scan; it is recorded in the audit log as CHECKIN_UNDO. Requires `ADMIN` (not `STAFF`): a checked-in ticket blocks cancelling its sale, and undoing the check-in reopens that path. The show's validation window does not apply. Idempotent: a ticket that is not checked in answers 200 with `undone: false`. 409 CHECKIN_CHANGED when the check-in changed between the read and the write (another undo or a new scan): re-read the ticket and retry. Minimum role: `ADMIN`.", "security": [ { "apiKey": [] @@ -9633,6 +9713,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "ticketCode", @@ -9652,16 +9733,6 @@ } } ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckinRequest" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -9671,7 +9742,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CheckinResult" + "$ref": "#/components/schemas/CheckinUndoResult" } }, "required": [ @@ -9732,14 +9803,16 @@ } } } - }, - "delete": { - "operationId": "deleteTicketsTicketCodeCheckin", + } + }, + "/tickets/{ticketCode}/access": { + "get": { + "operationId": "getTicketsTicketCodeAccess", "tags": [ "tickets" ], - "summary": "Undo a ticket check-in (destructive)", - "description": "DESTRUCTIVE: reverts a door check-in so the ticket is valid again. Use it to fix a wrong scan; it is recorded in the audit log as CHECKIN_UNDO. Requires `ADMIN` (not `STAFF`): a checked-in ticket blocks cancelling its sale, and undoing the check-in reopens that path. The show's validation window does not apply. Idempotent: a ticket that is not checked in answers 200 with `undone: false`. 409 CHECKIN_CHANGED when the check-in changed between the read and the write (another undo or a new scan): re-read the ticket and retry. Minimum role: `ADMIN`.", + "summary": "Check a ticket's validity without consuming it", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -9748,7 +9821,6 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ { "name": "ticketCode", @@ -9777,7 +9849,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CheckinUndoResult" + "$ref": "#/components/schemas/TicketAccess" } }, "required": [ @@ -9817,16 +9889,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -9840,14 +9902,14 @@ } } }, - "/tickets/{ticketCode}/access": { + "/api-keys": { "get": { - "operationId": "getTicketsTicketCodeAccess", + "operationId": "getApiKeys", "tags": [ - "tickets" + "api-keys" ], - "summary": "Check a ticket's validity without consuming it", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header.", + "summary": "List my API keys", + "description": "Lists the authenticated user's API keys (never the hash or the plaintext secret).", "security": [ { "apiKey": [] @@ -9858,9 +9920,19 @@ ], "parameters": [ { - "name": "ticketCode", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, "schema": { "type": "string" } @@ -9884,11 +9956,18 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/TicketAccess" + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiKey" + } + }, + "page": { + "$ref": "#/components/schemas/Page" } }, "required": [ - "data" + "data", + "page" ] } } @@ -9935,16 +10014,14 @@ } } } - } - }, - "/api-keys": { - "get": { - "operationId": "getApiKeys", + }, + "post": { + "operationId": "postApiKeys", "tags": [ "api-keys" ], - "summary": "List my API keys", - "description": "Lists the authenticated user's API keys (never the hash or the plaintext secret).", + "summary": "Mint an API key (returns the plaintext exactly once)", + "description": "Creates a service API key for the authenticated user. scope=\"read\" (default) only allows GET/HEAD; scope=\"write\" enables mutations according to the user role. The plaintext secret only appears in this response.", "security": [ { "apiKey": [] @@ -9954,24 +10031,6 @@ } ], "parameters": [ - { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -9982,8 +10041,18 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKeyCreate" + } + } + } + }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -9991,18 +10060,11 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiKey" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/ApiKeyCreated" } }, "required": [ - "data", - "page" + "data" ] } } @@ -10049,14 +10111,16 @@ } } } - }, - "post": { - "operationId": "postApiKeys", + } + }, + "/api-keys/{id}": { + "delete": { + "operationId": "deleteApiKeysId", "tags": [ "api-keys" ], - "summary": "Mint an API key (returns the plaintext exactly once)", - "description": "Creates a service API key for the authenticated user. scope=\"read\" (default) only allows GET/HEAD; scope=\"write\" enables mutations according to the user role. The plaintext secret only appears in this response.", + "summary": "Revoke one of my API keys", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -10066,6 +10130,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -10076,18 +10148,82 @@ } } ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/customer/auth/request": { + "post": { + "operationId": "postCustomerAuthRequest", + "tags": [ + "customer", + "auth" + ], + "summary": "Request an access code to sign in (or create an account)", + "description": "Public endpoint (no auth): credential bootstrap for the Device Authorization Grant (RFC 8628).", + "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyCreate" + "$ref": "#/components/schemas/CustomerAuthRequest" } } } }, "responses": { - "201": { + "202": { "description": "OK", "content": { "application/json": { @@ -10095,178 +10231,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ApiKeyCreated" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/api-keys/{id}": { - "delete": { - "operationId": "deleteApiKeysId", - "tags": [ - "api-keys" - ], - "summary": "Revoke one of my API keys", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/customer/auth/request": { - "post": { - "operationId": "postCustomerAuthRequest", - "tags": [ - "customer", - "auth" - ], - "summary": "Request an access code to sign in (or create an account)", - "description": "Public endpoint (no auth): credential bootstrap for the Device Authorization Grant (RFC 8628).", - "security": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerAuthRequest" - } - } - } - }, - "responses": { - "202": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/CustomerAuthRequestResult" + "$ref": "#/components/schemas/CustomerAuthRequestResult" } }, "required": [ @@ -11509,16 +11474,16 @@ } } }, - "/customer/orders": { + "/customer/addresses": { "get": { - "operationId": "getCustomerOrders", + "operationId": "getCustomerAddresses", "tags": [ - "customer", - "orders" + "customer" ], - "summary": "The purchase the buyer left unfinished for this event date", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL: with a key, results are additionally scoped to the workspace pinned to it; without a key, any of the buyer's own unfinished purchases is visible. Returns the PENDING sale whose inventory hold is STILL ALIVE that the buyer has for that event date —with its seats, its total and when it expires—, or `order: null` if there is none. This is what lets reloading the checkout, or coming back from signing in, RESUME the purchase instead of starting from scratch: the seats remain held in that person's name. If `paymentOpened` is true the payment is already open and `POST /customer/orders/{id}/payment` returns the SAME signed configuration; to discard it and pick other seats, use `POST /customer/orders/{id}/release`.", + "summary": "Buyer's saved shipping addresses", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL. The address book belongs to the buyer's FreeTicket account and is shared across brands: any landing with the buyer's session sees and edits the same addresses, with any workspace's enterprise key or without a key. Returns at most 10 addresses, the default one first and then newest first. Colombia only: department and city are DANE codes (Bogotá = `11` / `11001`).", "security": [ + {}, { "apiKey": [] }, @@ -11528,19 +11493,19 @@ ], "parameters": [ { - "name": "eventDateId", - "in": "query", + "name": "X-Workspace-Id", + "in": "header", "required": false, - "description": "Required. The event date being queried.", + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", "schema": { "type": "string" } }, { - "name": "X-Workspace-Id", + "name": "X-Customer-Session", "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "required": true, + "description": "REQUIRED buyer session token (401 without it). Addresses are scoped to its customer.", "schema": { "type": "string" } @@ -11555,7 +11520,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CustomerOrderCurrent" + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomerAddress" + } } }, "required": [ @@ -11596,7 +11564,7 @@ } }, "422": { - "description": "Operation error.", + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { @@ -11608,14 +11576,14 @@ } }, "post": { - "operationId": "postCustomerOrders", + "operationId": "postCustomerAddresses", "tags": [ - "customer", - "orders" + "customer" ], - "summary": "Create the ticket reservation (step 1 of the headless purchase)", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL: with a key, the date and the ticket type must belong to the workspace pinned to it (anything else is 404); without a key, it is enough for the ticket type to exist and be on sale (same eligibility as the first-party checkout). Reserves inventory and creates the PENDING sale with the SAME rules as the first-party checkout (stock under lock, seats validated against seats.io, per-buyer limit, presale, memberships and virtual queue turn). The buyer email comes from the session, never from the body. Rejections carry a stable `reason` in `error.details.reason` (`sold_out`, `queue_turn_required`, `seats_not_held`, `members_only`, `members_only_withdrawn` — a members-only ticket whose artist withdrew the permission or left the lineup: it is no longer sold even to members —, …). With `pending_sale_in_progress` the inventory is taken by a half-paid purchase FROM THE SAME buyer: `error.details.pendingSaleId` and `pendingReference` identify it, and the right step is to reopen its payment with `POST /customer/orders/{pendingSaleId}/payment` (idempotent) instead of reserving again. If `free` is true the sale is already confirmed and `/payment` must NOT be called. Next step: `POST /customer/orders/{id}/payment`.", + "summary": "Save a shipping address for the buyer", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL. The address book belongs to the buyer's FreeTicket account and is shared across brands: any landing with the buyer's session sees and edits the same addresses, with any workspace's enterprise key or without a key. At most 10 addresses per buyer (409 `ADDRESS_LIMIT`). The first address is always the default; `isDefault: true` makes the new one the default and clears the previous default atomically. DANE codes are validated by shape (department 2 digits, city 5 digits starting with the department), same rule as `POST /merch/orders`.", "security": [ + {}, { "apiKey": [] }, @@ -11634,10 +11602,10 @@ } }, { - "name": "X-Purchase-Session", + "name": "X-Customer-Session", "in": "header", - "required": false, - "description": "Purchase session id (`POST /customer/purchase-sessions`). Required when the event's workspace enforces a single purchase session; if present, it is always validated. The requirement is decided by the EVENT, not the API key: it applies if the owning workspace, a linked artist or a catalog seller of the show has the flag, with or without a key. Rejections (409; uppercase `error.code` and the slug in `error.details.reason`): `PURCHASE_SESSION_REQUIRED` (missing, or belongs to another buyer or another event date), `PURCHASE_SESSION_SUPERSEDED` (another tab or device replaced it), `PURCHASE_SESSION_EXPIRED` (the map clock ran out before the order was created), `PURCHASE_SESSION_BUSY` (an order is already in flight with this session) and, on `POST /customer/orders` with seats, `HOLD_TOKEN_MISMATCH` (the `holdToken` is not the session's, or belongs to a replaced session or another buyer even if the header is absent). Payment POSTs accept the buyer's live session or the session that created THAT order, as long as no other session has been opened since. Rejecting a new payment NEVER affects a payment already in flight.", + "required": true, + "description": "REQUIRED buyer session token (401 without it). Addresses are scoped to its customer.", "schema": { "type": "string" } @@ -11648,7 +11616,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomerOrderCreateRequest" + "$ref": "#/components/schemas/CustomerAddressCreate" } } } @@ -11662,7 +11630,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CustomerOrderCreateResult" + "$ref": "#/components/schemas/CustomerAddress" } }, "required": [ @@ -11672,6 +11640,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -11721,51 +11699,20 @@ } } } - }, - "429": { - "description": "Too many requests: rate limit exceeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } - } - }, - "503": { - "description": "Service unavailable: an external dependency is down or initialization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } } } }, - "/customer/orders/{id}/payment": { - "post": { - "operationId": "postCustomerOrdersIdPayment", + "/customer/addresses/{id}": { + "patch": { + "operationId": "patchCustomerAddressesId", "tags": [ - "customer", - "orders" + "customer" ], - "summary": "Open payment for a reservation (Bold or MercadoPago, depending on the event)", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). The payment rail is chosen on the SERVER: Bold-eligible events (legend plan + allowlist) return the SIGNED configuration of the embedded Bold Payment Button (`apiKey` + `renderMode: \"embedded\"` + `integritySignature`, …), which the landing page mounts with `new BoldCheckout({...})`; all others return `publicKey` + `amount` + `currency` + `reference` + `payerEmail` to mount the MercadoPago Payment Brick (`POST .../payment/card` to charge, `POST .../payment/pse` for PSE). The landing page tells the rails apart by the SHAPE of the response (`apiKey`/`renderMode` ⇒ Bold, `publicKey` ⇒ MercadoPago), never by a separate flag. The sale must belong to the session buyer (and, with a key, to the workspace pinned to it): anything else is 404. Responds 409 with code `PAYMENT_UNAVAILABLE` if the reservation expired, the sale is no longer pending, or (Bold only) the event has no legend plan or a payment attempt is already in flight with another gateway. `{id}` accepts the sale id or its `reference`. Limited to 10 opens per minute per buyer (429 with `Retry-After`).", + "summary": "Update one of the buyer's addresses", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL. The address book belongs to the buyer's FreeTicket account and is shared across brands: any landing with the buyer's session sees and edits the same addresses, with any workspace's enterprise key or without a key. Partial update: omitted fields are left untouched; `null` or an empty string clears `label`, `phone` and `addressExtra`. The DANE city must belong to the department after applying the change (422). `isDefault: true` makes it the default and clears the previous one atomically; `isDefault: false` on the default moves the default to the most recent other address (if it is the only address, it stays the default). An address of another buyer responds 404 `ADDRESS_NOT_FOUND`, same as one that does not exist.", "security": [ + {}, { "apiKey": [] }, @@ -11792,15 +11739,25 @@ } }, { - "name": "X-Purchase-Session", + "name": "X-Customer-Session", "in": "header", - "required": false, - "description": "Purchase session id (`POST /customer/purchase-sessions`). Required when the event's workspace enforces a single purchase session; if present, it is always validated. The requirement is decided by the EVENT, not the API key: it applies if the owning workspace, a linked artist or a catalog seller of the show has the flag, with or without a key. Rejections (409; uppercase `error.code` and the slug in `error.details.reason`): `PURCHASE_SESSION_REQUIRED` (missing, or belongs to another buyer or another event date), `PURCHASE_SESSION_SUPERSEDED` (another tab or device replaced it), `PURCHASE_SESSION_EXPIRED` (the map clock ran out before the order was created), `PURCHASE_SESSION_BUSY` (an order is already in flight with this session) and, on `POST /customer/orders` with seats, `HOLD_TOKEN_MISMATCH` (the `holdToken` is not the session's, or belongs to a replaced session or another buyer even if the header is absent). Payment POSTs accept the buyer's live session or the session that created THAT order, as long as no other session has been opened since. Rejecting a new payment NEVER affects a payment already in flight.", + "required": true, + "description": "REQUIRED buyer session token (401 without it). Addresses are scoped to its customer.", "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerAddressUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -11810,7 +11767,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CustomerOrderStartPayment" + "$ref": "#/components/schemas/CustomerAddress" } }, "required": [ @@ -11820,8 +11777,8 @@ } } }, - "401": { - "description": "Missing or invalid credential.", + "400": { + "description": "Bad request: malformed parameters.", "content": { "application/json": { "schema": { @@ -11830,8 +11787,8 @@ } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "401": { + "description": "Missing or invalid credential.", "content": { "application/json": { "schema": { @@ -11840,8 +11797,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "403": { + "description": "Insufficient role or resource not accessible.", "content": { "application/json": { "schema": { @@ -11850,8 +11807,8 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -11869,41 +11826,18 @@ } } } - }, - "429": { - "description": "Too many requests: rate limit exceeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } - } } } - } - }, - "/customer/orders/{id}/payment/card": { - "post": { - "operationId": "postCustomerOrdersIdPaymentCard", + }, + "delete": { + "operationId": "deleteCustomerAddressesId", "tags": [ - "customer", - "orders" + "customer" ], - "summary": "Charge with the MercadoPago Payment Brick token", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). Receives the token the Payment Brick produced on the landing page's domain and charges through the Orders API using the sale amount (never one sent by the client); `payer.email` travels in the body but is ignored — the payer is ALWAYS the sale's. `status` is `approved`, `pending` (normal, may require additional authentication from the bank) or `rejected` (business decline; the reason is in `message`) — all three are returned with 200. With `rejected`, `saleAlive` tells what happened to the purchase: `false` = it was cancelled and a new one must be started; `true` = this payment was declined but the purchase is still pending because another payment is in progress on it (do not start a new purchase: wait and check the order). Responds 409 with code `PAYMENT_UNAVAILABLE` if the reservation expired, the sale is no longer pending, a payment attempt is in flight with another gateway, the event only charges through Bold, or MercadoPago returned an error that cannot be classified as a decline. The sale must belong to the session's buyer (and, with a key, to the workspace pinned to it): anything else is 404. `{id}` accepts the sale id or its `reference`. Limited to 10 attempts per minute per buyer (429 with `Retry-After`).", + "summary": "Delete one of the buyer's addresses", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL. The address book belongs to the buyer's FreeTicket account and is shared across brands: any landing with the buyer's session sees and edits the same addresses, with any workspace's enterprise key or without a key. Responds 204 without a body. Deleting the default address promotes the most recent remaining one to default. An address of another buyer responds 404 `ADDRESS_NOT_FOUND`, same as one that does not exist.", "security": [ + {}, { "apiKey": [] }, @@ -11930,43 +11864,18 @@ } }, { - "name": "X-Purchase-Session", + "name": "X-Customer-Session", "in": "header", - "required": false, - "description": "Purchase session id (`POST /customer/purchase-sessions`). Required when the event's workspace enforces a single purchase session; if present, it is always validated. The requirement is decided by the EVENT, not the API key: it applies if the owning workspace, a linked artist or a catalog seller of the show has the flag, with or without a key. Rejections (409; uppercase `error.code` and the slug in `error.details.reason`): `PURCHASE_SESSION_REQUIRED` (missing, or belongs to another buyer or another event date), `PURCHASE_SESSION_SUPERSEDED` (another tab or device replaced it), `PURCHASE_SESSION_EXPIRED` (the map clock ran out before the order was created), `PURCHASE_SESSION_BUSY` (an order is already in flight with this session) and, on `POST /customer/orders` with seats, `HOLD_TOKEN_MISMATCH` (the `holdToken` is not the session's, or belongs to a replaced session or another buyer even if the header is absent). Payment POSTs accept the buyer's live session or the session that created THAT order, as long as no other session has been opened since. Rejecting a new payment NEVER affects a payment already in flight.", + "required": true, + "description": "REQUIRED buyer session token (401 without it). Addresses are scoped to its customer.", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerOrderMercadoPagoChargeRequest" - } - } - } - }, "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/CustomerOrderMercadoPagoChargeResult" - } - }, - "required": [ - "data" - ] - } - } - } + "204": { + "description": "No Content" }, "401": { "description": "Missing or invalid credential.", @@ -11998,59 +11907,27 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { - "description": "Operation error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "429": { - "description": "Too many requests: rate limit exceeded.", + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } } } } } }, - "/customer/orders/{id}/payment/pse": { - "post": { - "operationId": "postCustomerOrdersIdPaymentPse", + "/customer/merch-orders": { + "get": { + "operationId": "getCustomerMerchOrders", "tags": [ - "customer", - "orders" + "customer" ], - "summary": "Open a PSE payment through MercadoPago (redirect)", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). Creates a MercadoPago preference restricted to PSE and returns `redirectUrl` (`init_point`): the landing page must REDIRECT the browser there, not mount it in an iframe. The buyer picks their bank and confirms the transfer inside MercadoPago; on return, they land on `GET /api/mp/return` (our domain), which issues a 302 to the `returnUrl` sent in `POST /customer/orders` — the landing page must call `GET /customer/orders/{id}` for the authoritative status, never infer it from the return URL. The sale is confirmed by webhook when the bank settles the payment (asynchronous: it may take a while). Responds 409 with code `PAYMENT_UNAVAILABLE` if the reservation expired, the sale is no longer pending, a payment attempt is in flight with another gateway, or the event only charges through Bold. The sale must belong to the session's buyer (and, with a key, to the workspace pinned to it): anything else is 404. `{id}` accepts the sale id or its `reference`. Limited to 10 opens per minute per buyer (429 with `Retry-After`).", + "summary": "Buyer's merch orders in the key's store", + "description": "Requires an enterprise service API key AND a valid `X-Customer-Session` (401 without it). Lists the session buyer's merch orders in the key's organization store only (orders from other brands never appear), newest first, 20 per page. PENDING orders whose stock reservation already expired are excluded. Response envelope is `{ data, nextCursor }` (`nextCursor` is null on the last page; pass it back as `?cursor=`; an invalid cursor responds 422 `INVALID_CURSOR`). Each item is the same `MerchOrder` returned by `POST /merch/orders/lookup`. The buyer document is never returned. Keeps working after the brand's Legend plan lapses (the orders were already placed); 404 `STORE_NOT_READY` when the brand has no store.", "security": [ { "apiKey": [] @@ -12061,9 +11938,10 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "cursor", + "in": "query", + "required": false, + "description": "Opaque `nextCursor` from the previous page.", "schema": { "type": "string" } @@ -12078,10 +11956,10 @@ } }, { - "name": "X-Purchase-Session", + "name": "X-Customer-Session", "in": "header", "required": false, - "description": "Purchase session id (`POST /customer/purchase-sessions`). Required when the event's workspace enforces a single purchase session; if present, it is always validated. The requirement is decided by the EVENT, not the API key: it applies if the owning workspace, a linked artist or a catalog seller of the show has the flag, with or without a key. Rejections (409; uppercase `error.code` and the slug in `error.details.reason`): `PURCHASE_SESSION_REQUIRED` (missing, or belongs to another buyer or another event date), `PURCHASE_SESSION_SUPERSEDED` (another tab or device replaced it), `PURCHASE_SESSION_EXPIRED` (the map clock ran out before the order was created), `PURCHASE_SESSION_BUSY` (an order is already in flight with this session) and, on `POST /customer/orders` with seats, `HOLD_TOKEN_MISMATCH` (the `holdToken` is not the session's, or belongs to a replaced session or another buyer even if the header is absent). Payment POSTs accept the buyer's live session or the session that created THAT order, as long as no other session has been opened since. Rejecting a new payment NEVER affects a payment already in flight.", + "description": "REQUIRED buyer session token (401 without it). Orders are scoped to its customer.", "schema": { "type": "string" } @@ -12096,11 +11974,21 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CustomerOrderMercadoPagoPse" + "type": "array", + "items": { + "$ref": "#/components/schemas/MerchOrder" + } + }, + "nextCursor": { + "type": [ + "string", + "null" + ] } }, "required": [ - "data" + "data", + "nextCursor" ] } } @@ -12136,16 +12024,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -12155,40 +12033,19 @@ } } } - }, - "429": { - "description": "Too many requests: rate limit exceeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } - } } } } }, - "/customer/orders/{id}/release": { + "/customer/purchase-sessions": { "post": { - "operationId": "postCustomerOrdersIdRelease", + "operationId": "postCustomerPurchaseSessions", "tags": [ "customer", - "orders" + "purchase-sessions" ], - "summary": "Release a reservation the buyer will not pay for", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). Abandons the PENDING sale and returns its inventory (and its seats) to stock, so the buyer can start over without waiting for the reservation to expire. It is the counterpart of `pending_sale_in_progress`: when `POST /customer/orders` rejects with that `reason`, the landing page can offer *continue paying* (`/payment`, idempotent) or *start over* (this route). It ONLY releases with evidence that nobody started the payment: if Bold reports any transaction, if a provider response is already stored, or if the payment goes through a rail we cannot query, it responds 409 with `details.reason` = `payment_in_flight` and the sale is left intact. If the gateway does not respond, 503 (`gateway_unreachable`): retry later. The sale must belong to the session's buyer (and, with a key, to the workspace pinned to it): anything else is 404. `{id}` accepts the sale id or its `reference`. Limited to 10 calls per minute per buyer.", + "summary": "Open the purchase session (only one live per buyer)", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, the event date must belong to the workspace pinned to it; otherwise 404). Opens THE buyer purchase session: there is ONLY one live per buyer across any tab or device, and the latest wins — the previous one becomes `superseded` (it can no longer create an order or start a new payment) and its seats.io hold is released, unless it backs a live sale. On seated event dates the server ISSUES the `holdToken` (mount the chart with `session: \"manual\"`) and sets `seatsDeadline`: each session gets up to 3 minutes and the budget is 3 attempts (9 CUMULATIVE minutes) per buyer and event date, summing all of their sessions within a 30-minute window, and it only runs while no order has been created. Once exhausted, it responds 429 with `error.code` `SEAT_BUDGET_EXHAUSTED`, `error.details.reason` `seat_budget_exhausted` and `error.details.retryAfterSeconds` (10-minute cooldown; also in the `Retry-After` header). If the SAME browser (`deviceKey`) reopens the SAME event date with its session alive, it gets that same session with 200 instead of 201. Only event dates on sale: published event and current event date (otherwise 404). Limits: 10 creations per minute per buyer, 30 per minute per IP when called without an API key, and a global ceiling per event date (429 `RATE_LIMITED`). Once the session is created, `POST /customer/orders` and the payment POSTs carry the `X-Purchase-Session: ` header; when the clock runs out, call `POST /customer/purchase-sessions/{id}/release`.", "security": [ { "apiKey": [] @@ -12198,14 +12055,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -12216,16 +12065,26 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PurchaseSessionCreateRequest" + } + } + } + }, "responses": { "200": { - "description": "OK", + "description": "The SAME browser (`deviceKey`) reopened the SAME event date while its session was still alive: that session is returned (same `holdToken`, same clock) and nothing was created.", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CustomerOrderRelease" + "$ref": "#/components/schemas/PurchaseSessionCreated" } }, "required": [ @@ -12235,18 +12094,26 @@ } } }, - "401": { - "description": "Missing or invalid credential.", + "201": { + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PurchaseSessionCreated" + } + }, + "required": [ + "data" + ] } } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "401": { + "description": "Missing or invalid credential.", "content": { "application/json": { "schema": { @@ -12255,8 +12122,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "403": { + "description": "Insufficient role or resource not accessible.", "content": { "application/json": { "schema": { @@ -12265,8 +12132,8 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -12319,15 +12186,15 @@ } } }, - "/customer/orders/{id}": { + "/customer/purchase-sessions/{id}": { "get": { - "operationId": "getCustomerOrdersId", + "operationId": "getCustomerPurchaseSessionsId", "tags": [ "customer", - "orders" + "purchase-sessions" ], - "summary": "Status of a headless purchase (and its tickets, once paid)", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). `{id}` accepts the `reference` (FT-…) or the sale id. If the sale is still PENDING and its payment goes through Bold, the authoritative payment status is re-read from Bold; between re-reads it responds with the internal status, which the webhook keeps up to date. `status` is `approved`, `pending` or `rejected`; `pending` is a NORMAL state (asynchronous payment methods take time) and the landing page must retry. `tickets` —with each ticket's `ticketCode`— is only present when `status` is `approved`. The purchase must belong to the session's buyer (and, with a key, to the workspace pinned to it): anything else is 404. The route MAY rate-limit polling and respond 429: honor `Retry-After` and apply backoff. Polling every ~2 s fits comfortably, but do not treat any threshold as a guarantee.", + "summary": "Purchase session status", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL. Returns the status of one of THE buyer's purchase sessions: `live` (this tab can create the order), `superseded` (another tab or device replaced it: stop offering the map and the payment), `expired` (the map clock ran out or it was released) or `converted` (it already created its order: `orderId`). A session whose `seatsDeadline` has passed is reported as `expired` immediately. Designed to be polled every ~10 s. Another buyer's session is 404.", "security": [ { "apiKey": [] @@ -12364,7 +12231,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CustomerOrderStatus" + "$ref": "#/components/schemas/PurchaseSessionStatus" } }, "required": [ @@ -12413,40 +12280,19 @@ } } } - }, - "429": { - "description": "Too many requests: rate limit exceeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } - } } } } }, - "/customer/purchase-sessions": { + "/customer/purchase-sessions/{id}/release": { "post": { - "operationId": "postCustomerPurchaseSessions", + "operationId": "postCustomerPurchaseSessionsIdRelease", "tags": [ "customer", "purchase-sessions" ], - "summary": "Open the purchase session (only one live per buyer)", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, the event date must belong to the workspace pinned to it; otherwise 404). Opens THE buyer purchase session: there is ONLY one live per buyer across any tab or device, and the latest wins — the previous one becomes `superseded` (it can no longer create an order or start a new payment) and its seats.io hold is released, unless it backs a live sale. On seated event dates the server ISSUES the `holdToken` (mount the chart with `session: \"manual\"`) and sets `seatsDeadline`: each session gets up to 3 minutes and the budget is 3 attempts (9 CUMULATIVE minutes) per buyer and event date, summing all of their sessions within a 30-minute window, and it only runs while no order has been created. Once exhausted, it responds 429 with `error.code` `SEAT_BUDGET_EXHAUSTED`, `error.details.reason` `seat_budget_exhausted` and `error.details.retryAfterSeconds` (10-minute cooldown; also in the `Retry-After` header). If the SAME browser (`deviceKey`) reopens the SAME event date with its session alive, it gets that same session with 200 instead of 201. Only event dates on sale: published event and current event date (otherwise 404). Limits: 10 creations per minute per buyer, 30 per minute per IP when called without an API key, and a global ceiling per event date (429 `RATE_LIMITED`). Once the session is created, `POST /customer/orders` and the payment POSTs carry the `X-Purchase-Session: ` header; when the clock runs out, call `POST /customer/purchase-sessions/{id}/release`.", + "summary": "Release the seats of a purchase session", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL. Marks the session `expired` and releases in seats.io the seats held with its `holdToken`. Idempotent: repeating it changes nothing. It NEVER releases a token that backs a live sale (pending payment or confirmed) nor that of a `converted` session: those seats belong to the order. Call it when the map clock runs out. Another buyer's session is 404.", "security": [ { "apiKey": [] @@ -12456,6 +12302,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -12466,36 +12320,8 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PurchaseSessionCreateRequest" - } - } - } - }, "responses": { "200": { - "description": "The SAME browser (`deviceKey`) reopened the SAME event date while its session was still alive: that session is returned (same `holdToken`, same clock) and nothing was created.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/PurchaseSessionCreated" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "201": { "description": "OK", "content": { "application/json": { @@ -12503,7 +12329,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PurchaseSessionCreated" + "$ref": "#/components/schemas/PurchaseSessionStatus" } }, "required": [ @@ -12573,29 +12399,18 @@ "$ref": "#/components/headers/RateLimitPolicy" } } - }, - "503": { - "description": "Service unavailable: an external dependency is down or initialization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } } } }, - "/customer/purchase-sessions/{id}": { + "/content/posts": { "get": { - "operationId": "getCustomerPurchaseSessionsId", + "operationId": "getContentPosts", "tags": [ - "customer", - "purchase-sessions" + "content" ], - "summary": "Purchase session status", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL. Returns the status of one of THE buyer's purchase sessions: `live` (this tab can create the order), `superseded` (another tab or device replaced it: stop offering the map and the payment), `expired` (the map clock ran out or it was released) or `converted` (it already created its order: `orderId`). A session whose `seatsDeadline` has passed is reported as `expired` immediately. Designed to be polled every ~10 s. Another buyer's session is 404.", + "summary": "List the organization's community feed", + "description": "Posts from the active workspace, newest first, excluding deleted posts and posts scheduled for the future. A post with `locked: true` arrives redacted (`content`, `imageUrl`, `videoId`, `eventId` and `link` set to null, `commentsCount` set to 0): it is members-only content and the key does not represent a buyer with a current membership. Does not include `likes_count` (only visible to the workspace owner) or the post's internal author.", "security": [ { "apiKey": [] @@ -12606,9 +12421,19 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, "schema": { "type": "string" } @@ -12632,11 +12457,18 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PurchaseSessionStatus" + "type": "array", + "items": { + "$ref": "#/components/schemas/ContentPost" + } + }, + "page": { + "$ref": "#/components/schemas/Page" } }, "required": [ - "data" + "data", + "page" ] } } @@ -12683,17 +12515,14 @@ } } } - } - }, - "/customer/purchase-sessions/{id}/release": { + }, "post": { - "operationId": "postCustomerPurchaseSessionsIdRelease", + "operationId": "postContentPosts", "tags": [ - "customer", - "purchase-sessions" + "content" ], - "summary": "Release the seats of a purchase session", - "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL. Marks the session `expired` and releases in seats.io the seats held with its `holdToken`. Idempotent: repeating it changes nothing. It NEVER releases a token that backs a live sale (pending payment or confirmed) nor that of a `converted` session: those seats belong to the order. Call it when the map clock runs out. Another buyer's session is 404.", + "summary": "Publish community content (including articles)", + "description": "Creates a community post. `type=ARTICLE` requires `title` and `body` (Markdown) and builds a slug unique per organization (manual via `slug`, or derived from `title` if omitted); `type=TEXT`/`IMAGE` require `content` or `imageUrl`, same as the dashboard composer. Unlike the dashboard, this path does NOT resolve the link's Open Graph snapshot (`link` is always null in the response). Minimum role ADMIN, like every other `POST` in `/api/v1`. If the workspace has the `community_v2` flag enabled, publishing enqueues a notification to members in the same transaction; with a future `publishedAt`, the notification goes out when the post is published. The response does not change.", "security": [ { "apiKey": [] @@ -12703,14 +12532,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -12721,8 +12542,18 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentPostCreate" + } + } + } + }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -12730,7 +12561,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PurchaseSessionStatus" + "$ref": "#/components/schemas/ContentPost" } }, "required": [ @@ -12740,6 +12571,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -12770,8 +12611,8 @@ } } }, - "422": { - "description": "Request body/parameter validation failed.", + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", "content": { "application/json": { "schema": { @@ -12780,38 +12621,27 @@ } } }, - "429": { - "description": "Too many requests: rate limit exceeded.", + "422": { + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } } } } } }, - "/content/videos": { + "/content/lives/{id}": { "get": { - "operationId": "getContentVideos", + "operationId": "getContentLivesId", "tags": [ "content" ], - "summary": "List the organization's published videos", - "description": "Only published videos that have finished processing (READY) in the active workspace. Does not include the playback id: to play one, request a token from `POST /content/playback-token`.", + "summary": "Live stream status", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -12822,19 +12652,9 @@ ], "parameters": [ { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -12858,18 +12678,11 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContentVideo" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/ContentLive" } }, "required": [ - "data", - "page" + "data" ] } } @@ -12916,16 +12729,14 @@ } } } - } - }, - "/content/posts": { - "get": { - "operationId": "getContentPosts", + }, + "patch": { + "operationId": "patchContentLivesId", "tags": [ "content" ], - "summary": "List the organization's community feed", - "description": "Posts from the active workspace, newest first, excluding deleted posts and posts scheduled for the future. A post with `locked: true` arrives redacted (`content`, `imageUrl`, `videoId`, `eventId` and `link` set to null, `commentsCount` set to 0): it is members-only content and the key does not represent a buyer with a current membership. Does not include `likes_count` (only visible to the workspace owner) or the post's internal author.", + "summary": "Update a live stream's schedule or audience", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same actions as the dashboard's scheduled-time picker and members-only switch. Send `scheduledAt` and/or `memberOnly`; absent fields keep their value. Never returns the stream key.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `scheduledAt` not in \"YYYY-MM-DDTHH:mm\" format.\n- 400 `INVALID_SCHEDULE`: `scheduledAt` is in the past or more than 2 years ahead.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the stream does not exist, was deleted or belongs to another workspace.\n- 409 `LIVE_NOT_IDLE`: `scheduledAt` sent for a stream that is on air or already ended.\n- 409 `MEMBERSHIP_PREREQ`: the workspace has no active membership plan yet; create one first (members-only content needs something to pay for). Only checked for `memberOnly: true`.", "security": [ { "apiKey": [] @@ -12936,19 +12747,9 @@ ], "parameters": [ { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -12963,6 +12764,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentLiveUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -12972,23 +12783,26 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContentPost" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/ContentLiveSettings" } }, "required": [ - "data", - "page" + "data" ] } } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -13019,6 +12833,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -13031,13 +12855,13 @@ } } }, - "post": { - "operationId": "postContentPosts", + "delete": { + "operationId": "deleteContentLivesId", "tags": [ "content" ], - "summary": "Publish community content (including articles)", - "description": "Creates a community post. `type=ARTICLE` requires `title` and `body` (Markdown) and builds a slug unique per organization (manual via `slug`, or derived from `title` if omitted); `type=TEXT`/`IMAGE` require `content` or `imageUrl`, same as the dashboard composer. Unlike the dashboard, this path does NOT resolve the link's Open Graph snapshot (`link` is always null in the response). Minimum role ADMIN, like every other `POST` in `/api/v1`. If the workspace has the `community_v2` flag enabled, publishing enqueues a notification to members in the same transaction; with a future `publishedAt`, the notification goes out when the post is published. The response does not change.", + "summary": "Delete a live stream", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a live stream in the dashboard.\n\nDESTRUCTIVE and irreversible: deletes the stream in Mux (its stream key stops working, an encoder on air is cut off) and soft-deletes it locally, so it disappears from the dashboard and the API listings. Cannot be restored through the API.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the stream does not exist, was already deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -13046,7 +12870,16 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -13057,18 +12890,8 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContentPostCreate" - } - } - } - }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -13076,7 +12899,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentPost" + "$ref": "#/components/schemas/ContentMediaDeleted" } }, "required": [ @@ -13086,16 +12909,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -13126,16 +12939,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -13149,14 +12952,14 @@ } } }, - "/content/lives": { - "get": { - "operationId": "getContentLives", + "/content/playback-token": { + "post": { + "operationId": "postContentPlaybackToken", "tags": [ "content" ], - "summary": "List the organization's live streams", - "description": "Live streams from the active workspace, newest first. `status: ACTIVE` is the one on air. Does not include the RTMP key or the playback ids.", + "summary": "Signed token to play a video or a live stream", + "description": "Requires an enterprise service API key. `memberOnly` content additionally requires the `X-Customer-Session` header of a buyer with a current membership in the key's organization or, for a live stream tied to a show date, a CONFIRMED ticket for that date (otherwise 403 `MEMBERSHIP_REQUIRED`). Rate limited: 600 requests/min per key and 30/min per buyer (429 `RATE_LIMITED` with `Retry-After`). Content from another organization responds 404. Short-lived tokens: 30 minutes for live streams, 1 hour for videos.", "security": [ { "apiKey": [] @@ -13166,24 +12969,6 @@ } ], "parameters": [ - { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -13194,6 +12979,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentPlaybackTokenRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -13203,18 +12998,11 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContentLive" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/ContentPlaybackToken" } }, "required": [ - "data", - "page" + "data" ] } } @@ -13259,16 +13047,49 @@ } } } + }, + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + }, + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" + } + } + }, + "503": { + "description": "Service unavailable: an external dependency is down or initialization failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, + } + }, + "/waitlist": { "post": { - "operationId": "postContentLives", + "operationId": "postWaitlist", "tags": [ - "content" + "waitlist" ], - "summary": "Create a live stream", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New live stream\" in the dashboard: creates the stream in Mux and returns the RTMPS server and stream key to configure OBS or any encoder.\n\nSECURITY: `streamKey` is a secret that grants broadcasting rights on this stream in the organization's name. It is returned ONLY here and by `POST /content/lives/{id}/reset-key`, never by `GET /content/lives`, `GET /content/lives/{id}` or `PATCH`. Store it like a password; if it leaks, rotate it with reset-key.\n\n`memberOnly` is forced to false when the workspace has no active membership plan (nobody to restrict it to). With `eventDateId` and no `scheduledAt`, the stream inherits the show date's start time.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `title` empty or longer than 120 characters, or `scheduledAt` not in \"YYYY-MM-DDTHH:mm\" format.\n- 400 `INVALID_SCHEDULE`: `scheduledAt` is in the past or more than 2 years ahead.\n- 403 `FEATURE_LOCKED`: the workspace plan does not include streaming.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: `eventDateId` does not exist or is not an event of this workspace (as owner or linked artist).\n- 409 `EVENT_DATE_HAS_LIVE`: that show date already has a live stream.\n- 502 `MUX_ERROR`: Mux rejected the request or is not configured; nothing was created.", + "summary": "Join the per-city waitlist of an enterprise landing", + "description": "Requires an enterprise service API key; the entry belongs to the key's organization. `X-Customer-Session` is optional: when present the entry is linked to that buyer. `contact` must be an email or a phone number (7-15 digits; only a leading `+`, spaces and dashes besides digits — parentheses, dots, letters or extensions respond 422). Phones are stored without spaces or dashes. Idempotent per (organization, city folded without accents/case, contact normalized — lowercased email, or the last 10 phone digits so `+57 300…` and `300…` are the same contact): 201 with `created: true` on the first call, 200 with `created: false` afterwards. Rate limited: 120 requests/min per key and 10/min per contact (429 `RATE_LIMITED` with `Retry-After`). Invalid JSON responds 400; an invalid body 422.", "security": [ { "apiKey": [] @@ -13286,6 +13107,15 @@ "schema": { "type": "string" } + }, + { + "name": "X-Customer-Session", + "in": "header", + "required": false, + "description": "Optional buyer session token; links the entry to that buyer.", + "schema": { + "type": "string" + } } ], "requestBody": { @@ -13293,12 +13123,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLiveCreate" + "$ref": "#/components/schemas/WaitlistEntryCreate" } } } }, "responses": { + "200": { + "description": "Already on this city's waitlist (`created: false`).", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WaitlistEntryResult" + } + }, + "required": [ + "data" + ] + } + } + } + }, "201": { "description": "OK", "content": { @@ -13307,7 +13155,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentLiveCreated" + "$ref": "#/components/schemas/WaitlistEntryResult" } }, "required": [ @@ -13357,16 +13205,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -13377,27 +13215,36 @@ } } }, - "502": { - "description": "The external provider failed to complete the operation.", + "429": { + "description": "Too many requests: rate limit exceeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + }, + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" + } } } } - } - }, - "/content/lives/{id}": { + }, "get": { - "operationId": "getContentLivesId", + "operationId": "getWaitlist", "tags": [ - "content" + "waitlist" ], - "summary": "Live stream status", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "summary": "List the waitlist entries of the workspace", + "description": "Export for staff (CLI/MCP). Contains personal data, so it requires ADMIN. Newest first, cursor pagination; `city` filters by the folded city (accents and case ignored).", "security": [ { "apiKey": [] @@ -13408,9 +13255,28 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "city", + "in": "query", + "required": false, + "description": "City name; accents and case are ignored", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, "schema": { "type": "string" } @@ -13434,11 +13300,18 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentLive" + "type": "array", + "items": { + "$ref": "#/components/schemas/WaitlistEntry" + } + }, + "page": { + "$ref": "#/components/schemas/Page" } }, "required": [ - "data" + "data", + "page" ] } } @@ -13485,14 +13358,16 @@ } } } - }, - "patch": { - "operationId": "patchContentLivesId", + } + }, + "/events/{id}/schedule": { + "post": { + "operationId": "postEventsIdSchedule", "tags": [ - "content" + "events" ], - "summary": "Update a live stream's schedule or audience", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same actions as the dashboard's scheduled-time picker and members-only switch. Send `scheduledAt` and/or `memberOnly`; absent fields keep their value. Never returns the stream key.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `scheduledAt` not in \"YYYY-MM-DDTHH:mm\" format.\n- 400 `INVALID_SCHEDULE`: `scheduledAt` is in the past or more than 2 years ahead.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the stream does not exist, was deleted or belongs to another workspace.\n- 409 `LIVE_NOT_IDLE`: `scheduledAt` sent for a stream that is on air or already ended.\n- 409 `MEMBERSHIP_PREREQ`: the workspace has no active membership plan yet; create one first (members-only content needs something to pay for). Only checked for `memberOnly: true`.", + "summary": "Schedule a draft event", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nSend exactly one of:\n- `publishAt`: the DRAFT publishes itself at that instant (checked every ~5 minutes). Must be in the future and before at least one of the event's dates. The response's `publishAt` echoes it.\n- `saleStartsAt`: publishes the DRAFT now and opens sales at that instant, setting `saleStartsAt` on every ticket type of the upcoming dates in the same transaction. Must be in the future and before the first upcoming date.\n\nErrors (`error.code`):\n- 409 `EVENT_NOT_DRAFT`: only drafts can be scheduled (also when it got published concurrently).\n- 422 `SCHEDULE_IN_PAST`, 422 `SCHEDULE_AFTER_EVENT_DATE`.\n- 409 `NO_FUTURE_DATE`, 409 `NO_TICKET_TYPES`, 422 `TICKET_TYPE_SALE_CLOSES_BEFORE` (`saleStartsAt` only).\n- Seated (seats.io) events: 409 `SEATSIO_INVALID`, 409 `SEAT_MAP_CATEGORIES_UNCOVERED` (`error.details.zones[]`), 503 `SEAT_MAP_UNVERIFIABLE` (retryable) — same as `POST /events/{id}/publish`.\n- 409 `IDENTITY_VERIFICATION_REQUIRED` (`saleStartsAt` on a paid event of an unverified workspace). Unlike `POST /events/{id}/publish`, the event is NOT queued: retry after the verification is approved.", "security": [ { "apiKey": [] @@ -13525,7 +13400,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLiveUpdate" + "$ref": "#/components/schemas/EventSchedule" } } } @@ -13539,7 +13414,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentLiveSettings" + "$ref": "#/components/schemas/Event" } }, "required": [ @@ -13549,16 +13424,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -13608,16 +13473,26 @@ } } } + }, + "503": { + "description": "Service unavailable: an external dependency is down or initialization failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } }, "delete": { - "operationId": "deleteContentLivesId", + "operationId": "deleteEventsIdSchedule", "tags": [ - "content" + "events" ], - "summary": "Delete a live stream", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a live stream in the dashboard.\n\nDESTRUCTIVE and irreversible: deletes the stream in Mux (its stream key stops working, an encoder on air is cut off) and soft-deletes it locally, so it disappears from the dashboard and the API listings. Cannot be restored through the API.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the stream does not exist, was already deleted or belongs to another workspace.", + "summary": "Cancel a scheduled publication", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nClears the pending scheduled publication (`publishAt` becomes null). The event keeps its status. Does not undo a `saleStartsAt` schedule: edit the ticket types' `saleStartsAt` instead.", "security": [ { "apiKey": [] @@ -13626,7 +13501,6 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -13655,7 +13529,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentMediaDeleted" + "$ref": "#/components/schemas/Event" } }, "required": [ @@ -13708,14 +13582,14 @@ } } }, - "/content/playback-token": { - "post": { - "operationId": "postContentPlaybackToken", + "/ticket-types/{id}/presale-windows": { + "get": { + "operationId": "getTicketTypesIdPresaleWindows", "tags": [ - "content" + "ticket-types" ], - "summary": "Signed token to play a video or a live stream", - "description": "Requires an enterprise service API key. `memberOnly` content additionally requires the `X-Customer-Session` header of a buyer with a current membership in the key's organization or, for a live stream tied to a show date, a CONFIRMED ticket for that date (otherwise 403 `MEMBERSHIP_REQUIRED`). Rate limited: 600 requests/min per key and 30/min per buyer (429 `RATE_LIMITED` with `Retry-After`). Content from another organization responds 404. Short-lived tokens: 30 minutes for live streams, 1 hour for videos.", + "summary": "List a ticket type's presale windows", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", "security": [ { "apiKey": [] @@ -13725,6 +13599,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -13735,16 +13617,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContentPlaybackTokenRequest" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -13754,7 +13626,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentPlaybackToken" + "type": "array", + "items": { + "$ref": "#/components/schemas/PresaleWindow" + } } }, "required": [ @@ -13803,49 +13678,16 @@ } } } - }, - "429": { - "description": "Too many requests: rate limit exceeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } - } - }, - "503": { - "description": "Service unavailable: an external dependency is down or initialization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } } - } - }, - "/waitlist": { + }, "post": { - "operationId": "postWaitlist", + "operationId": "postTicketTypesIdPresaleWindows", "tags": [ - "waitlist" + "ticket-types" ], - "summary": "Join the per-city waitlist of an enterprise landing", - "description": "Requires an enterprise service API key; the entry belongs to the key's organization. `X-Customer-Session` is optional: when present the entry is linked to that buyer. `contact` must be an email or a phone number (7-15 digits; only a leading `+`, spaces and dashes besides digits — parentheses, dots, letters or extensions respond 422). Phones are stored without spaces or dashes. Idempotent per (organization, city folded without accents/case, contact normalized — lowercased email, or the last 10 phone digits so `+57 300…` and `300…` are the same contact): 201 with `created: true` on the first call, 200 with `created: false` afterwards. Rate limited: 120 requests/min per key and 10/min per contact (429 `RATE_LIMITED` with `Retry-After`). Invalid JSON responds 400; an invalid body 422.", + "summary": "Create a presale window", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nActive members of `planId` can buy this ticket type between `presaleStartsAt` and `presaleEndsAt` (instants in UTC), optionally capped by `presaleCapacity`. One window per plan and ticket type.\n\nErrors (`error.code`): 422 `PLAN_NOT_ELIGIBLE` (the plan is not an active plan of the workspace that owns the event), 422 `PRESALE_WINDOW_INVERTED` (end not after start), 409 `DUPLICATE_PLAN` (that plan already has a window on this ticket type), 403 `EVENT_SCOPE_FORBIDDEN` (key restricted to other events).", "security": [ { "apiKey": [] @@ -13856,19 +13698,18 @@ ], "parameters": [ { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } }, { - "name": "X-Customer-Session", + "name": "X-Workspace-Id", "in": "header", "required": false, - "description": "Optional buyer session token; links the entry to that buyer.", + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", "schema": { "type": "string" } @@ -13879,30 +13720,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WaitlistEntryCreate" + "$ref": "#/components/schemas/PresaleWindowCreate" } } } }, "responses": { - "200": { - "description": "Already on this city's waitlist (`created: false`).", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/WaitlistEntryResult" - } - }, - "required": [ - "data" - ] - } - } - } - }, "201": { "description": "OK", "content": { @@ -13911,7 +13734,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/WaitlistEntryResult" + "$ref": "#/components/schemas/PresaleWindow" } }, "required": [ @@ -13921,16 +13744,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -13961,8 +13774,8 @@ } } }, - "422": { - "description": "Request body/parameter validation failed.", + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", "content": { "application/json": { "schema": { @@ -13971,36 +13784,27 @@ } } }, - "429": { - "description": "Too many requests: rate limit exceeded.", + "422": { + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } - }, - "headers": { - "Retry-After": { - "$ref": "#/components/headers/RetryAfter" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimitPolicy" - } } } } - }, - "get": { - "operationId": "getWaitlist", + } + }, + "/presale-windows/{id}": { + "patch": { + "operationId": "patchPresaleWindowsId", "tags": [ - "waitlist" + "ticket-types" ], - "summary": "List the waitlist entries of the workspace", - "description": "Export for staff (CLI/MCP). Contains personal data, so it requires ADMIN. Newest first, cursor pagination; `city` filters by the folded city (accents and case ignored).", + "summary": "Update a presale window", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nAbsent fields are left untouched; the start/end order is checked against the stored values.\n\nErrors (`error.code`): 422 `PLAN_NOT_ELIGIBLE` (the plan is not an active plan of the workspace that owns the event), 422 `PRESALE_WINDOW_INVERTED` (end not after start), 409 `DUPLICATE_PLAN` (that plan already has a window on this ticket type), 403 `EVENT_SCOPE_FORBIDDEN` (key restricted to other events).", "security": [ { "apiKey": [] @@ -14011,28 +13815,9 @@ ], "parameters": [ { - "name": "city", - "in": "query", - "required": false, - "description": "City name; accents and case are ignored", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -14047,6 +13832,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PresaleWindowUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -14056,18 +13851,11 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WaitlistEntry" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/PresaleWindow" } }, "required": [ - "data", - "page" + "data" ] } } @@ -14103,6 +13891,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -14114,16 +13912,14 @@ } } } - } - }, - "/events/{id}/schedule": { - "post": { - "operationId": "postEventsIdSchedule", + }, + "delete": { + "operationId": "deletePresaleWindowsId", "tags": [ - "events" + "ticket-types" ], - "summary": "Schedule a draft event", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nSend exactly one of:\n- `publishAt`: the DRAFT publishes itself at that instant (checked every ~5 minutes). Must be in the future and before at least one of the event's dates. The response's `publishAt` echoes it.\n- `saleStartsAt`: publishes the DRAFT now and opens sales at that instant, setting `saleStartsAt` on every ticket type of the upcoming dates in the same transaction. Must be in the future and before the first upcoming date.\n\nErrors (`error.code`):\n- 409 `EVENT_NOT_DRAFT`: only drafts can be scheduled (also when it got published concurrently).\n- 422 `SCHEDULE_IN_PAST`, 422 `SCHEDULE_AFTER_EVENT_DATE`.\n- 409 `NO_FUTURE_DATE`, 409 `NO_TICKET_TYPES`, 422 `TICKET_TYPE_SALE_CLOSES_BEFORE` (`saleStartsAt` only).\n- Seated (seats.io) events: 409 `SEATSIO_INVALID`, 409 `SEAT_MAP_CATEGORIES_UNCOVERED` (`error.details.zones[]`), 503 `SEAT_MAP_UNVERIFIABLE` (retryable) — same as `POST /events/{id}/publish`.\n- 409 `IDENTITY_VERIFICATION_REQUIRED` (`saleStartsAt` on a paid event of an unverified workspace). Unlike `POST /events/{id}/publish`, the event is NOT queued: retry after the verification is approved.", + "summary": "Delete a presale window", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nDESTRUCTIVE: permanently deletes the window; members lose that presale access immediately. Re-creating it yields a new id.", "security": [ { "apiKey": [] @@ -14132,6 +13928,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -14151,31 +13948,13 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventSchedule" - } - } - } - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Event" - } - }, - "required": [ - "data" - ] + "type": "object" } } } @@ -14210,16 +13989,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -14229,26 +13998,18 @@ } } } - }, - "503": { - "description": "Service unavailable: an external dependency is down or initialization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } } - }, - "delete": { - "operationId": "deleteEventsIdSchedule", + } + }, + "/reports/live-attendance": { + "get": { + "operationId": "getReportsLiveAttendance", "tags": [ - "events" + "reports" ], - "summary": "Cancel a scheduled publication", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nClears the pending scheduled publication (`publishAt` becomes null). The event keeps its status. Does not undo a `saleStartsAt` schedule: edit the ticket types' `saleStartsAt` instead.", + "summary": "Events happening right now, with check-in progress", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same data as the \"Live\" cards of the dashboard summary (section `inicio`).\n\nReturns the event dates whose live window contains the current instant (doors open, or start, until `ends_at`; 6 hours after the start when there is no end), for PUBLISHED/SOLD_OUT events visible to the workspace (own and collaborative) plus shows of other organizers hosted in one of the workspace's venues (occupancy only). Sorted by `sold` descending. `sold`/`validated` count tickets (QR) of CONFIRMED sales; `validatedPct` is 0-100. Meant for polling (the dashboard polls every 20 s).\n\n`scope` narrows like the dashboard selector: `all` (default), `own` (only the workspace's own shows; hosted shows are excluded), `partner:` (shows shared with that partner). An event-scoped API key only sees its events.\n\nErrors (`error.code`): 400 `BAD_REQUEST` (invalid `scope`).", "security": [ { "apiKey": [] @@ -14259,11 +14020,13 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "scope", + "in": "query", + "required": false, + "description": "all (default) | own | partner:", "schema": { - "type": "string" + "type": "string", + "default": "all" } }, { @@ -14285,7 +14048,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Event" + "type": "array", + "items": { + "$ref": "#/components/schemas/LiveAttendance" + } } }, "required": [ @@ -14295,6 +14061,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -14338,14 +14114,15 @@ } } }, - "/ticket-types/{id}/presale-windows": { + "/event-dates/{id}/access-close": { "get": { - "operationId": "getTicketTypesIdPresaleWindows", + "operationId": "getEventDatesIdAccessClose", "tags": [ - "ticket-types" + "events", + "tickets" ], - "summary": "List a ticket type's presale windows", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header.", + "summary": "Live entry count and access-close status of an event date", + "description": "Minimum role: `STAFF` (any role that validates tickets), with the `validar` section when the access is scoped. Active workspace via the `X-Workspace-Id` header. Same gate and same count as the access-close screen of the dashboard: a door validator limited to some events only sees those.\n\nOnly event dates of the workspace's OWN events that admit an access-close record (not cancelled, PUBLISHED/SOLD_OUT/COMPLETED event, no external ticketing). `live.issued` counts tickets of CONFIRMED sales (courtesies included); `live.checkins` is what a signature would freeze right now. Once closed, `closedCheckins` is the frozen number. Date fields are labels already formatted in the event date's time zone.\n\nErrors (`error.code`): 403 `ACCESS_CLOSE_FORBIDDEN` (role/section/validator scope), 404 (not found, another workspace, collaborative/hosted event or outside the key's `event_scope`).", "security": [ { "apiKey": [] @@ -14382,10 +14159,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PresaleWindow" - } + "$ref": "#/components/schemas/AccessCloseStatus" } }, "required": [ @@ -14438,12 +14212,13 @@ } }, "post": { - "operationId": "postTicketTypesIdPresaleWindows", + "operationId": "postEventDatesIdAccessClose", "tags": [ - "ticket-types" + "events", + "tickets" ], - "summary": "Create a presale window", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nActive members of `planId` can buy this ticket type between `presaleStartsAt` and `presaleEndsAt` (instants in UTC), optionally capped by `presaleCapacity`. One window per plan and ticket type.\n\nErrors (`error.code`): 422 `PLAN_NOT_ELIGIBLE` (the plan is not an active plan of the workspace that owns the event), 422 `PRESALE_WINDOW_INVERTED` (end not after start), 409 `DUPLICATE_PLAN` (that plan already has a window on this ticket type), 403 `EVENT_SCOPE_FORBIDDEN` (key restricted to other events).", + "summary": "Sign the access-close record of an event date (irreversible)", + "description": "Minimum role: `ADMIN` (stricter than the dashboard, where door staff can also sign). Active workspace via the `X-Workspace-Id` header.\n\nDESTRUCTIVE and IRREVERSIBLE: freezes the number of check-ins of the event date as its access-close record, signed by the API key owner, and emails the record to the workspace. It does not stop the scanner. There is no endpoint to undo it. Requires the body `{\"confirm\": true}` (422 without it). Only one signature per date: concurrent calls are resolved atomically and the loser gets 409.\n\nSigning opens 2 hours after the date starts.\n\nErrors (`error.code`):\n- 403 `ACCESS_CLOSE_FORBIDDEN` (section/validator scope), 403 `EVENT_SCOPE_FORBIDDEN` (outside the key's `event_scope`).\n- 404: not found, another workspace, or a date that does not admit a record (cancelled, draft event, external ticketing, collaborative/hosted event).\n- 409 `ACCESS_CLOSE_NOT_SIGNABLE_YET`: `error.details.signableFrom` (ISO 8601).\n- 409 `ACCESS_ALREADY_CLOSED`: someone signed first or the automatic close ran; `error.details` has `closedAt`, `closedByName` (null if automatic) and `automatic`. Not retryable.", "security": [ { "apiKey": [] @@ -14452,6 +14227,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -14476,13 +14252,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PresaleWindowCreate" + "$ref": "#/components/schemas/AccessCloseSignRequest" } } } }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -14490,7 +14266,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PresaleWindow" + "$ref": "#/components/schemas/AccessCloseSigned" } }, "required": [ @@ -14553,14 +14329,14 @@ } } }, - "/presale-windows/{id}": { - "patch": { - "operationId": "patchPresaleWindowsId", + "/payment-intents": { + "get": { + "operationId": "getPaymentIntents", "tags": [ - "ticket-types" + "sales" ], - "summary": "Update a presale window", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nAbsent fields are left untouched; the start/end order is checked against the stored values.\n\nErrors (`error.code`): 422 `PLAN_NOT_ELIGIBLE` (the plan is not an active plan of the workspace that owns the event), 422 `PRESALE_WINDOW_INVERTED` (end not after start), 409 `DUPLICATE_PLAN` (that plan already has a window on this ticket type), 403 `EVENT_SCOPE_FORBIDDEN` (key restricted to other events).", + "summary": "Purchase intents of an event (checkout funnel and abandoned journeys)", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same data as the dashboard's Sales → Intents screen.\n\nFolds the checkout funnel log of ONE event (own or collaborative) into one journey per visitor (the buyer account when known, otherwise the device), with how far it got (`stage`) and how it ended (`outcome`: `NO_SALE`, `REJECTED` with `reason`, or the sale status). `funnel` counts ALL journeys of the filter, not only the page. Journeys are sorted by last activity, newest first.\n\nPagination: pass `nextCursor` back as `cursor` (opaque); `null` means no more pages. `eventDate` must belong to the event, otherwise all dates are used (`selectedDateId` echoes the one applied). `onlyAbandoned=true` keeps journeys that picked seats and did not pay (excludes sales still PENDING).\n\nPersonal data: `personName`/`personEmail` come from the buyer account or what was typed at checkout — the same data `GET /sales` returns. Device identifiers never leave the server (`threadId` is a hash).\n\nErrors (`error.code`): 400 `BAD_REQUEST` (missing `event`, invalid `limit`/`onlyAbandoned`), 404 (event not found, not visible, or outside the key's `event_scope`).", "security": [ { "apiKey": [] @@ -14571,9 +14347,47 @@ ], "parameters": [ { - "name": "id", - "in": "path", + "name": "event", + "in": "query", "required": true, + "description": "event id", + "schema": { + "type": "string" + } + }, + { + "name": "eventDate", + "in": "query", + "required": false, + "description": "event date id (must belong to the event)", + "schema": { + "type": "string" + } + }, + { + "name": "onlyAbandoned", + "in": "query", + "required": false, + "description": "true = only journeys that picked seats and did not pay", + "schema": { + "type": "boolean" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 100", + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "description": "`nextCursor` of the previous page", "schema": { "type": "string" } @@ -14588,16 +14402,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PresaleWindowUpdate" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -14607,7 +14411,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PresaleWindow" + "$ref": "#/components/schemas/PaymentIntentsPage" } }, "required": [ @@ -14617,48 +14421,8 @@ } } }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Request body/parameter validation failed.", + "400": { + "description": "Bad request: malformed parameters.", "content": { "application/json": { "schema": { @@ -14666,54 +14430,6 @@ } } } - } - } - }, - "delete": { - "operationId": "deletePresaleWindowsId", - "tags": [ - "ticket-types" - ], - "summary": "Delete a presale window", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.\n\nDESTRUCTIVE: permanently deletes the window; members lose that presale access immediately. Re-creating it yields a new id.", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "x-ft-destructive": true, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } }, "401": { "description": "Missing or invalid credential.", @@ -14758,14 +14474,14 @@ } } }, - "/reports/live-attendance": { - "get": { - "operationId": "getReportsLiveAttendance", + "/sales/{id}/abandon": { + "post": { + "operationId": "postSalesIdAbandon", "tags": [ - "reports" + "sales" ], - "summary": "Events happening right now, with check-in progress", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same data as the \"Live\" cards of the dashboard summary (section `inicio`).\n\nReturns the event dates whose live window contains the current instant (doors open, or start, until `ends_at`; 6 hours after the start when there is no end), for PUBLISHED/SOLD_OUT events visible to the workspace (own and collaborative) plus shows of other organizers hosted in one of the workspace's venues (occupancy only). Sorted by `sold` descending. `sold`/`validated` count tickets (QR) of CONFIRMED sales; `validatedPct` is 0-100. Meant for polling (the dashboard polls every 20 s).\n\n`scope` narrows like the dashboard selector: `all` (default), `own` (only the workspace's own shows; hosted shows are excluded), `partner:` (shows shared with that partner). An event-scoped API key only sees its events.\n\nErrors (`error.code`): 400 `BAD_REQUEST` (invalid `scope`).", + "summary": "Mark a pending sale as abandoned (releases its stock)", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Mark as abandoned\" in the dashboard.\n\nDESTRUCTIVE: a PENDING sale whose payment never started moves to ABANDONED (terminal) and its stock reservations are deleted, so the inventory goes back on sale immediately. It does not touch seats.io holds (same as the dashboard). Use `POST /sales/{id}/cancel` for confirmed sales.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: an item of the sale is outside the key's `event_scope`.\n- 409 `SALE_NOT_PENDING`: only PENDING sales (also when it is already ABANDONED).\n- 409 `PAYMENT_IN_PROGRESS`: a payment was started (`payment_ref` set) and may still be confirmed by the gateway; wait for reconciliation.\n- 409 `SALE_STATE_CHANGED`: the sale changed between the read and the write (e.g. a payment started); re-read it.", "security": [ { "apiKey": [] @@ -14774,15 +14490,14 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { - "name": "scope", - "in": "query", - "required": false, - "description": "all (default) | own | partner:", + "name": "id", + "in": "path", + "required": true, "schema": { - "type": "string", - "default": "all" + "type": "string" } }, { @@ -14804,10 +14519,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LiveAttendance" - } + "$ref": "#/components/schemas/Sale" } }, "required": [ @@ -14817,8 +14529,8 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", + "401": { + "description": "Missing or invalid credential.", "content": { "application/json": { "schema": { @@ -14827,8 +14539,8 @@ } } }, - "401": { - "description": "Missing or invalid credential.", + "403": { + "description": "Insufficient role or resource not accessible.", "content": { "application/json": { "schema": { @@ -14837,8 +14549,8 @@ } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -14847,8 +14559,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", "content": { "application/json": { "schema": { @@ -14870,15 +14582,14 @@ } } }, - "/event-dates/{id}/access-close": { - "get": { - "operationId": "getEventDatesIdAccessClose", + "/content/posts/{id}": { + "patch": { + "operationId": "patchContentPostsId", "tags": [ - "events", - "tickets" + "content" ], - "summary": "Live entry count and access-close status of an event date", - "description": "Minimum role: `STAFF` (any role that validates tickets), with the `validar` section when the access is scoped. Active workspace via the `X-Workspace-Id` header. Same gate and same count as the access-close screen of the dashboard: a door validator limited to some events only sees those.\n\nOnly event dates of the workspace's OWN events that admit an access-close record (not cancelled, PUBLISHED/SOLD_OUT/COMPLETED event, no external ticketing). `live.issued` counts tickets of CONFIRMED sales (courtesies included); `live.checkins` is what a signature would freeze right now. Once closed, `closedCheckins` is the frozen number. Date fields are labels already formatted in the event date's time zone.\n\nErrors (`error.code`): 403 `ACCESS_CLOSE_FORBIDDEN` (role/section/validator scope), 404 (not found, another workspace, collaborative/hosted event or outside the key's `event_scope`).", + "summary": "Update a community post or article", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a post or an article in the dashboard.\n\nPartial update: absent fields keep their stored value; `null` clears a nullable field. The stored post decides the shape: an ARTICLE accepts `title`, `subtitle`, `body`, `slug`, `imageUrl` (cover), `locked`, `eventId` and `publishedAt`; a TEXT/IMAGE/VIDEO post accepts `type` (TEXT/IMAGE), `content`, `imageUrl`, `locked`, `eventId`, `channelId` and `publishedAt`. Unlike `POST /content/posts`, changing the text of a short post re-resolves its link preview, like the dashboard. Member posts cannot be edited (404); moderate them under `/content/moderation/member-posts`. The response is redacted like `GET /content/posts` when the post is `locked`.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: a field that does not apply to the post's type, or the result would be empty (a short post needs `content` or `imageUrl`).\n- 404 `NOT_FOUND`: the post, the linked `eventId` or the `channelId` does not exist in this workspace.\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: `channelId` was sent but channels are not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 409 `SLUG_CONFLICT`: another article of the organization already uses that slug.", "security": [ { "apiKey": [] @@ -14906,6 +14617,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentPostUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -14915,7 +14636,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AccessCloseStatus" + "$ref": "#/components/schemas/ContentPost" } }, "required": [ @@ -14925,6 +14646,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -14955,6 +14686,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -14967,14 +14708,13 @@ } } }, - "post": { - "operationId": "postEventDatesIdAccessClose", + "delete": { + "operationId": "deleteContentPostsId", "tags": [ - "events", - "tickets" + "content" ], - "summary": "Sign the access-close record of an event date (irreversible)", - "description": "Minimum role: `ADMIN` (stricter than the dashboard, where door staff can also sign). Active workspace via the `X-Workspace-Id` header.\n\nDESTRUCTIVE and IRREVERSIBLE: freezes the number of check-ins of the event date as its access-close record, signed by the API key owner, and emails the record to the workspace. It does not stop the scanner. There is no endpoint to undo it. Requires the body `{\"confirm\": true}` (422 without it). Only one signature per date: concurrent calls are resolved atomically and the loser gets 409.\n\nSigning opens 2 hours after the date starts.\n\nErrors (`error.code`):\n- 403 `ACCESS_CLOSE_FORBIDDEN` (section/validator scope), 403 `EVENT_SCOPE_FORBIDDEN` (outside the key's `event_scope`).\n- 404: not found, another workspace, or a date that does not admit a record (cancelled, draft event, external ticketing, collaborative/hosted event).\n- 409 `ACCESS_CLOSE_NOT_SIGNABLE_YET`: `error.details.signableFrom` (ISO 8601).\n- 409 `ACCESS_ALREADY_CLOSED`: someone signed first or the automatic close ran; `error.details` has `closedAt`, `closedByName` (null if automatic) and `automatic`. Not retryable.", + "summary": "Delete a community post", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a post in the dashboard.\n\nDESTRUCTIVE: soft-deletes the post (organization post, article or member post), unpins it and redacts the member notifications that pointed to it. It disappears from the feed immediately and cannot be restored through the API. To take down a member post with a notice to its author, prefer `POST /content/moderation/member-posts/{id}/remove`.\n\nErrors: 404 `NOT_FOUND` (does not exist, already deleted or belongs to another workspace); 403 `EVENT_SCOPE_FORBIDDEN`.", "security": [ { "apiKey": [] @@ -15003,31 +14743,13 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AccessCloseSignRequest" - } - } - } - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/AccessCloseSigned" - } - }, - "required": [ - "data" - ] + "type": "object" } } } @@ -15062,16 +14784,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -15085,14 +14797,14 @@ } } }, - "/payment-intents": { - "get": { - "operationId": "getPaymentIntents", + "/content/posts/{id}/pin": { + "put": { + "operationId": "putContentPostsIdPin", "tags": [ - "sales" + "content" ], - "summary": "Purchase intents of an event (checkout funnel and abandoned journeys)", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same data as the dashboard's Sales → Intents screen.\n\nFolds the checkout funnel log of ONE event (own or collaborative) into one journey per visitor (the buyer account when known, otherwise the device), with how far it got (`stage`) and how it ended (`outcome`: `NO_SALE`, `REJECTED` with `reason`, or the sale status). `funnel` counts ALL journeys of the filter, not only the page. Journeys are sorted by last activity, newest first.\n\nPagination: pass `nextCursor` back as `cursor` (opaque); `null` means no more pages. `eventDate` must belong to the event, otherwise all dates are used (`selectedDateId` echoes the one applied). `onlyAbandoned=true` keeps journeys that picked seats and did not pay (excludes sales still PENDING).\n\nPersonal data: `personName`/`personEmail` come from the buyer account or what was typed at checkout — the same data `GET /sales` returns. Device identifiers never leave the server (`threadId` is a hash).\n\nErrors (`error.code`): 400 `BAD_REQUEST` (missing `event`, invalid `limit`/`onlyAbandoned`), 404 (event not found, not visible, or outside the key's `event_scope`).", + "summary": "Pin or unpin a community post", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Pin\" in the dashboard.\n\nAt most one pinned post per workspace: `pinned: true` unpins the previous one in the same transaction. Only a published post can be pinned; unpinning works on any post. Idempotent.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 404 `NOT_FOUND`: the post does not exist, is deleted, is not published (when pinning) or belongs to another workspace.", "security": [ { "apiKey": [] @@ -15103,47 +14815,9 @@ ], "parameters": [ { - "name": "event", - "in": "query", + "name": "id", + "in": "path", "required": true, - "description": "event id", - "schema": { - "type": "string" - } - }, - { - "name": "eventDate", - "in": "query", - "required": false, - "description": "event date id (must belong to the event)", - "schema": { - "type": "string" - } - }, - { - "name": "onlyAbandoned", - "in": "query", - "required": false, - "description": "true = only journeys that picked seats and did not pay", - "schema": { - "type": "boolean" - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 100", - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, - "description": "`nextCursor` of the previous page", "schema": { "type": "string" } @@ -15158,6 +14832,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentPostPin" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -15167,7 +14851,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PaymentIntentsPage" + "$ref": "#/components/schemas/ContentPostPinned" } }, "required": [ @@ -15177,16 +14861,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -15230,14 +14904,14 @@ } } }, - "/sales/{id}/abandon": { - "post": { - "operationId": "postSalesIdAbandon", + "/content/comments/{id}": { + "delete": { + "operationId": "deleteContentCommentsId", "tags": [ - "sales" + "content" ], - "summary": "Mark a pending sale as abandoned (releases its stock)", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Mark as abandoned\" in the dashboard.\n\nDESTRUCTIVE: a PENDING sale whose payment never started moves to ABANDONED (terminal) and its stock reservations are deleted, so the inventory goes back on sale immediately. It does not touch seats.io holds (same as the dashboard). Use `POST /sales/{id}/cancel` for confirmed sales.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: an item of the sale is outside the key's `event_scope`.\n- 409 `SALE_NOT_PENDING`: only PENDING sales (also when it is already ABANDONED).\n- 409 `PAYMENT_IN_PROGRESS`: a payment was started (`payment_ref` set) and may still be confirmed by the gateway; wait for reconciliation.\n- 409 `SALE_STATE_CHANGED`: the sale changed between the read and the write (e.g. a payment started); re-read it.", + "summary": "Delete a community comment (moderation)", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a comment from the dashboard.\n\nDESTRUCTIVE: soft-deletes the comment and, if it is a top-level comment, all its live replies; the post's comment count is recomputed. Cannot be undone through the API. To hide it reversibly use `POST /content/moderation/comments/{id}/hide`.\n\nErrors: 404 `NOT_FOUND` (does not exist, already deleted or belongs to another workspace); 403 `EVENT_SCOPE_FORBIDDEN`.", "security": [ { "apiKey": [] @@ -15275,7 +14949,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Sale" + "$ref": "#/components/schemas/ContentCommentDeleted" } }, "required": [ @@ -15315,16 +14989,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -15338,14 +15002,14 @@ } } }, - "/content/posts/{id}": { - "patch": { - "operationId": "patchContentPostsId", + "/content/channels": { + "get": { + "operationId": "getContentChannels", "tags": [ "content" ], - "summary": "Update a community post or article", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a post or an article in the dashboard.\n\nPartial update: absent fields keep their stored value; `null` clears a nullable field. The stored post decides the shape: an ARTICLE accepts `title`, `subtitle`, `body`, `slug`, `imageUrl` (cover), `locked`, `eventId` and `publishedAt`; a TEXT/IMAGE/VIDEO post accepts `type` (TEXT/IMAGE), `content`, `imageUrl`, `locked`, `eventId`, `channelId` and `publishedAt`. Unlike `POST /content/posts`, changing the text of a short post re-resolves its link preview, like the dashboard. Member posts cannot be edited (404); moderate them under `/content/moderation/member-posts`. The response is redacted like `GET /content/posts` when the post is `locked`.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: a field that does not apply to the post's type, or the result would be empty (a short post needs `content` or `imageUrl`).\n- 404 `NOT_FOUND`: the post, the linked `eventId` or the `channelId` does not exist in this workspace.\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: `channelId` was sent but channels are not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 409 `SLUG_CONFLICT`: another article of the organization already uses that slug.", + "summary": "List the community channels", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Channels screen: active channels in display order (archived ones are omitted). Like the dashboard, the default Announcements and General channels are created on first read if the workspace has none.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -15355,14 +15019,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -15373,16 +15029,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContentPostUpdate" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -15392,7 +15038,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentPost" + "type": "array", + "items": { + "$ref": "#/components/schemas/CommunityChannel" + } } }, "required": [ @@ -15402,16 +15051,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -15442,16 +15081,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -15464,13 +15093,13 @@ } } }, - "delete": { - "operationId": "deleteContentPostsId", + "post": { + "operationId": "postContentChannels", "tags": [ "content" ], - "summary": "Delete a community post", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a post in the dashboard.\n\nDESTRUCTIVE: soft-deletes the post (organization post, article or member post), unpins it and redacts the member notifications that pointed to it. It disappears from the feed immediately and cannot be restored through the API. To take down a member post with a notice to its author, prefer `POST /content/moderation/member-posts/{id}/remove`.\n\nErrors: 404 `NOT_FOUND` (does not exist, already deleted or belongs to another workspace); 403 `EVENT_SCOPE_FORBIDDEN`.", + "summary": "Create a community channel", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New channel\" in the dashboard: a CITY or CUSTOM channel, appended at the end. The slug is derived from the name, unique in the workspace, and never changes afterwards.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 400 `BAD_REQUEST`: `city` missing on a CITY channel.\n- 409 `CHANNEL_LIMIT_REACHED`: the workspace already has the maximum of active channels; archive one first.", "security": [ { "apiKey": [] @@ -15479,16 +15108,7 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -15499,13 +15119,41 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommunityChannelCreate" + } + } + } + }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CommunityChannel" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -15540,6 +15188,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -15553,14 +15211,14 @@ } } }, - "/content/posts/{id}/pin": { - "put": { - "operationId": "putContentPostsIdPin", + "/content/channels/{id}": { + "patch": { + "operationId": "patchContentChannelsId", "tags": [ "content" ], - "summary": "Pin or unpin a community post", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Pin\" in the dashboard.\n\nAt most one pinned post per workspace: `pinned: true` unpins the previous one in the same transaction. Only a published post can be pinned; unpinning works on any post. Idempotent.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 404 `NOT_FOUND`: the post does not exist, is deleted, is not published (when pinning) or belongs to another workspace.", + "summary": "Update a community channel", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a channel in the dashboard. Partial: absent fields keep their value; `null` clears `description`/`city`. The slug does not change on rename. Archived channels cannot be edited.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 400 `ANNOUNCEMENTS_STAFF_ONLY`: Announcements cannot be opened to members (`whoCanPost` must stay STAFF).\n- 400 `CITY_REQUIRED`: a CITY channel needs a city.\n- 404 `NOT_FOUND`: the channel does not exist, is archived or belongs to another workspace.", "security": [ { "apiKey": [] @@ -15593,7 +15251,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentPostPin" + "$ref": "#/components/schemas/CommunityChannelUpdate" } } } @@ -15607,7 +15265,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentPostPinned" + "$ref": "#/components/schemas/CommunityChannel" } }, "required": [ @@ -15617,6 +15275,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -15660,14 +15328,14 @@ } } }, - "/content/comments/{id}": { - "delete": { - "operationId": "deleteContentCommentsId", + "/content/channels/order": { + "put": { + "operationId": "putContentChannelsOrder", "tags": [ "content" ], - "summary": "Delete a community comment (moderation)", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a comment from the dashboard.\n\nDESTRUCTIVE: soft-deletes the comment and, if it is a top-level comment, all its live replies; the post's comment count is recomputed. Cannot be undone through the API. To hide it reversibly use `POST /content/moderation/comments/{id}/hide`.\n\nErrors: 404 `NOT_FOUND` (does not exist, already deleted or belongs to another workspace); 403 `EVENT_SCOPE_FORBIDDEN`.", + "summary": "Reorder the community channels", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as dragging channels in the dashboard. Send EVERY active channel id (from `GET /content/channels`) in the new order, Announcements first; a partial list is rejected, not applied halfway.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 400 `BAD_REQUEST`: repeated ids.\n- 400 `ANNOUNCEMENTS_FIRST`: Announcements must stay first.\n- 409 `CHANNEL_LIST_CHANGED`: the ids are not exactly the active channels (one was created/archived, or an id from another workspace); re-read and retry.", "security": [ { "apiKey": [] @@ -15676,16 +15344,7 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -15696,6 +15355,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommunityChannelOrder" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -15705,7 +15374,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentCommentDeleted" + "$ref": "#/components/schemas/CommunityChannelOrder" } }, "required": [ @@ -15715,6 +15384,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -15745,6 +15424,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -15758,14 +15447,14 @@ } } }, - "/content/channels": { - "get": { - "operationId": "getContentChannels", + "/content/channels/{id}/archive": { + "post": { + "operationId": "postContentChannelsIdArchive", "tags": [ "content" ], - "summary": "List the community channels", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Channels screen: active channels in display order (archived ones are omitted). Like the dashboard, the default Announcements and General channels are created on first read if the workspace has none.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Archive a community channel", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Archive\" in the dashboard.\n\nDESTRUCTIVE: the channel tab disappears for members and staff can no longer post to it; its posts remain visible under \"All\". There is no unarchive endpoint, and its slug stays taken.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 404 `NOT_FOUND`: the channel does not exist, is already archived or belongs to another workspace.\n- 409 `ANNOUNCEMENTS_NOT_ARCHIVABLE`: Announcements cannot be archived.", "security": [ { "apiKey": [] @@ -15774,7 +15463,16 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -15791,18 +15489,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommunityChannel" - } - } - }, - "required": [ - "data" - ] + "type": "object" } } } @@ -15837,6 +15524,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -15848,14 +15545,16 @@ } } } - }, - "post": { - "operationId": "postContentChannels", + } + }, + "/content/moderation/queue": { + "get": { + "operationId": "getContentModerationQueue", "tags": [ "content" ], - "summary": "Create a community channel", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New channel\" in the dashboard: a CITY or CUSTOM channel, appended at the end. The slug is derived from the name, unique in the workspace, and never changes afterwards.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 400 `BAD_REQUEST`: `city` missing on a CITY channel.\n- 409 `CHANNEL_LIMIT_REACHED`: the workspace already has the maximum of active channels; archive one first.", + "summary": "List reported community comments (moderation queue)", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same queue as the dashboard's Moderation screen: comments with open reports, most reported first, including auto-hidden ones and comments deleted with reports still open (deleting does not dodge a ban). 50 per page; `page` is 0-based (an empty array means no more pages).\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -15865,6 +15564,16 @@ } ], "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "description": "0-based page", + "schema": { + "type": "integer", + "default": 0 + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -15875,18 +15584,8 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommunityChannelCreate" - } - } - } - }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -15894,7 +15593,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommunityChannel" + "type": "array", + "items": { + "$ref": "#/components/schemas/ModerationQueueItem" + } } }, "required": [ @@ -15904,16 +15606,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -15944,16 +15636,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -15967,14 +15649,14 @@ } } }, - "/content/channels/{id}": { - "patch": { - "operationId": "patchContentChannelsId", + "/content/moderation/bans": { + "get": { + "operationId": "getContentModerationBans", "tags": [ "content" ], - "summary": "Update a community channel", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a channel in the dashboard. Partial: absent fields keep their value; `null` clears `description`/`city`. The slug does not change on rename. Archived channels cannot be edited.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 400 `ANNOUNCEMENTS_STAFF_ONLY`: Announcements cannot be opened to members (`whoCanPost` must stay STAFF).\n- 400 `CITY_REQUIRED`: a CITY channel needs a city.\n- 404 `NOT_FOUND`: the channel does not exist, is archived or belongs to another workspace.", + "summary": "List members banned from the community", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Moderation screen: the latest 200 bans, newest first. Lift one with `DELETE /content/members/{customerId}/ban`.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -15984,14 +15666,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -16002,16 +15676,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommunityChannelUpdate" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -16021,7 +15685,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommunityChannel" + "type": "array", + "items": { + "$ref": "#/components/schemas/CommunityBan" + } } }, "required": [ @@ -16031,16 +15698,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -16084,14 +15741,14 @@ } } }, - "/content/channels/order": { - "put": { - "operationId": "putContentChannelsOrder", + "/content/moderation/member-posts": { + "get": { + "operationId": "getContentModerationMemberPosts", "tags": [ "content" ], - "summary": "Reorder the community channels", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as dragging channels in the dashboard. Send EVERY active channel id (from `GET /content/channels`) in the new order, Announcements first; a partial list is rejected, not applied halfway.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 400 `BAD_REQUEST`: repeated ids.\n- 400 `ANNOUNCEMENTS_FIRST`: Announcements must stay first.\n- 409 `CHANNEL_LIST_CHANGED`: the ids are not exactly the active channels (one was created/archived, or an id from another workspace); re-read and retry.", + "summary": "List member posts awaiting review (or recently published)", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same lists as the dashboard's Moderation → Posts view. `status=PENDING_REVIEW` (default): posts waiting for approval, oldest first, 30 per 0-based `page`; their `imageUrl` is a short-lived signed URL. `status=PUBLISHED`: the latest 30 published member posts (no paging), to remove one. Approving needs the `updatedAt` read here.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `MEMBER_POSTS_UNAVAILABLE`: member posts are not enabled for this workspace.", "security": [ { "apiKey": [] @@ -16101,6 +15758,30 @@ } ], "parameters": [ + { + "name": "status", + "in": "query", + "required": false, + "description": "PENDING_REVIEW (default) or PUBLISHED", + "schema": { + "type": "string", + "enum": [ + "PENDING_REVIEW", + "PUBLISHED" + ], + "default": "PENDING_REVIEW" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "0-based page (PENDING_REVIEW only)", + "schema": { + "type": "integer", + "default": 0 + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -16111,16 +15792,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommunityChannelOrder" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -16130,7 +15801,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommunityChannelOrder" + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberPostQueueItem" + } } }, "required": [ @@ -16140,16 +15814,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -16180,16 +15844,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -16203,14 +15857,14 @@ } } }, - "/content/channels/{id}/archive": { + "/content/moderation/comments/{id}/hide": { "post": { - "operationId": "postContentChannelsIdArchive", + "operationId": "postContentModerationCommentsIdHide", "tags": [ "content" ], - "summary": "Archive a community channel", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Archive\" in the dashboard.\n\nDESTRUCTIVE: the channel tab disappears for members and staff can no longer post to it; its posts remain visible under \"All\". There is no unarchive endpoint, and its slug stays taken.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 404 `NOT_FOUND`: the channel does not exist, is already archived or belongs to another workspace.\n- 409 `ANNOUNCEMENTS_NOT_ARCHIVABLE`: Announcements cannot be archived.", + "summary": "Hide a community comment", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same action as \"Hide\" in the dashboard's moderation queue.\n\nHides the comment (and its replies from the count) and resolves its open reports as HIDDEN. Reversible with `/unhide`. Idempotent: hiding a hidden comment returns `changed: false`.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the comment does not exist, is deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -16219,7 +15873,6 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -16245,7 +15898,15 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CommentModerated" + } + }, + "required": [ + "data" + ] } } } @@ -16280,16 +15941,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -16303,14 +15954,14 @@ } } }, - "/content/moderation/queue": { - "get": { - "operationId": "getContentModerationQueue", + "/content/moderation/comments/{id}/unhide": { + "post": { + "operationId": "postContentModerationCommentsIdUnhide", "tags": [ "content" ], - "summary": "List reported community comments (moderation queue)", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same queue as the dashboard's Moderation screen: comments with open reports, most reported first, including auto-hidden ones and comments deleted with reports still open (deleting does not dodge a ban). 50 per page; `page` is 0-based (an empty array means no more pages).\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Show a hidden community comment again", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same action as \"Show\" in the dashboard's moderation queue.\n\nShows the comment again, marks it as cleared (it will not be auto-hidden again) and resolves its open reports as IGNORED. Idempotent.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the comment does not exist, is deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -16321,13 +15972,11 @@ ], "parameters": [ { - "name": "page", - "in": "query", - "required": false, - "description": "0-based page", + "name": "id", + "in": "path", + "required": true, "schema": { - "type": "integer", - "default": 0 + "type": "string" } }, { @@ -16349,10 +15998,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModerationQueueItem" - } + "$ref": "#/components/schemas/CommentModerated" } }, "required": [ @@ -16405,14 +16051,14 @@ } } }, - "/content/moderation/bans": { - "get": { - "operationId": "getContentModerationBans", + "/content/moderation/comments/{id}/ignore-reports": { + "post": { + "operationId": "postContentModerationCommentsIdIgnoreReports", "tags": [ "content" ], - "summary": "List members banned from the community", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Moderation screen: the latest 200 bans, newest first. Lift one with `DELETE /content/members/{customerId}/ban`.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Dismiss the open reports of a community comment", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same action as \"Ignore\" in the dashboard's moderation queue.\n\nLeaves the comment as it is, resolves its open reports as IGNORED and takes it out of the queue; it will no longer be auto-hidden. New reports put it back in the queue. Works on deleted comments too.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the comment does not exist or belongs to another workspace.", "security": [ { "apiKey": [] @@ -16422,6 +16068,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -16441,10 +16095,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommunityBan" - } + "$ref": "#/components/schemas/CommentModerated" } }, "required": [ @@ -16497,14 +16148,14 @@ } } }, - "/content/moderation/member-posts": { - "get": { - "operationId": "getContentModerationMemberPosts", + "/content/moderation/member-posts/{id}/approve": { + "post": { + "operationId": "postContentModerationMemberPostsIdApprove", "tags": [ "content" ], - "summary": "List member posts awaiting review (or recently published)", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same lists as the dashboard's Moderation → Posts view. `status=PENDING_REVIEW` (default): posts waiting for approval, oldest first, 30 per 0-based `page`; their `imageUrl` is a short-lived signed URL. `status=PUBLISHED`: the latest 30 published member posts (no paging), to remove one. Approving needs the `updatedAt` read here.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `MEMBER_POSTS_UNAVAILABLE`: member posts are not enabled for this workspace.", + "summary": "Approve a pending member post", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same action as \"Approve\" in the dashboard's Moderation → Posts view: the post is published at the top of the feed, its author is notified and mentioned members are notified.\n\nOnly the version you read is approved: send the post's `updatedAt` from `GET /content/moderation/member-posts` as `expectedUpdatedAt`. If the author edited it since, nothing is published (409 `EDITED_SINCE_READ`): re-read and review again.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `MEMBER_POSTS_UNAVAILABLE`: member posts are not enabled for this workspace.\n- 404 `NOT_FOUND`: not a member post of this workspace, or deleted.\n- 409 `ALREADY_REVIEWED`: it is no longer pending.\n- 409 `EDITED_SINCE_READ`: the author edited it after `expectedUpdatedAt`.\n- 502 `IMAGE_PROMOTION_FAILED`: the image could not be published; retry.", "security": [ { "apiKey": [] @@ -16515,27 +16166,11 @@ ], "parameters": [ { - "name": "status", - "in": "query", - "required": false, - "description": "PENDING_REVIEW (default) or PUBLISHED", - "schema": { - "type": "string", - "enum": [ - "PENDING_REVIEW", - "PUBLISHED" - ], - "default": "PENDING_REVIEW" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "0-based page (PENDING_REVIEW only)", + "name": "id", + "in": "path", + "required": true, "schema": { - "type": "integer", - "default": 0 + "type": "string" } }, { @@ -16548,6 +16183,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberPostApprove" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -16557,10 +16202,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemberPostQueueItem" - } + "$ref": "#/components/schemas/MemberPostReviewed" } }, "required": [ @@ -16600,6 +16242,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -16609,18 +16261,28 @@ } } } + }, + "502": { + "description": "The external provider failed to complete the operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } } }, - "/content/moderation/comments/{id}/hide": { + "/content/moderation/member-posts/{id}/reject": { "post": { - "operationId": "postContentModerationCommentsIdHide", + "operationId": "postContentModerationMemberPostsIdReject", "tags": [ "content" ], - "summary": "Hide a community comment", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same action as \"Hide\" in the dashboard's moderation queue.\n\nHides the comment (and its replies from the count) and resolves its open reports as HIDDEN. Reversible with `/unhide`. Idempotent: hiding a hidden comment returns `changed: false`.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the comment does not exist, is deleted or belongs to another workspace.", + "summary": "Reject a pending member post", + "description": "Minimum role: `STAFF` (`ADMIN` with `banAuthor: true`). Active workspace via the `X-Workspace-Id` header. Same action as \"Reject\" in the dashboard's Moderation → Posts view.\n\nDESTRUCTIVE: the pending post is rejected (it never gets published), the author is notified in their inbox and the image is purged from storage. The optional `reason` is shown to the author. With `banAuthor` the author is also banned from the community in the same transaction.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `BAN_REQUIRES_ADMIN`: `banAuthor` with a role below ADMIN.\n- 400 `BAD_REQUEST`: invalid `reason`.\n- 404 `NOT_FOUND`: not a member post of this workspace, or deleted.\n- 409 `ALREADY_REVIEWED`: another moderator already reviewed it.", "security": [ { "apiKey": [] @@ -16629,6 +16291,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -16648,6 +16311,16 @@ } } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberPostDecision" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -16657,7 +16330,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommentModerated" + "$ref": "#/components/schemas/MemberPostReviewed" } }, "required": [ @@ -16667,6 +16340,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -16697,6 +16380,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -16710,14 +16403,14 @@ } } }, - "/content/moderation/comments/{id}/unhide": { + "/content/moderation/member-posts/{id}/remove": { "post": { - "operationId": "postContentModerationCommentsIdUnhide", + "operationId": "postContentModerationMemberPostsIdRemove", "tags": [ "content" ], - "summary": "Show a hidden community comment again", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same action as \"Show\" in the dashboard's moderation queue.\n\nShows the comment again, marks it as cleared (it will not be auto-hidden again) and resolves its open reports as IGNORED. Idempotent.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the comment does not exist, is deleted or belongs to another workspace.", + "summary": "Remove a published member post", + "description": "Minimum role: `STAFF` (`ADMIN` with `banAuthor: true`). Active workspace via the `X-Workspace-Id` header. Same action as \"Remove\" in the dashboard's Moderation → Posts view.\n\nDESTRUCTIVE: the published post is soft-deleted, the author is notified in their inbox and the image is purged from storage. The optional `reason` is shown to the author. With `banAuthor` the author is also banned from the community in the same transaction.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `BAN_REQUIRES_ADMIN`: `banAuthor` with a role below ADMIN.\n- 400 `BAD_REQUEST`: invalid `reason`.\n- 404 `NOT_FOUND`: not a published member post of this workspace.", "security": [ { "apiKey": [] @@ -16726,6 +16419,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -16745,6 +16439,16 @@ } } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberPostDecision" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -16754,7 +16458,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommentModerated" + "$ref": "#/components/schemas/MemberPostReviewed" } }, "required": [ @@ -16764,6 +16468,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -16807,14 +16521,14 @@ } } }, - "/content/moderation/comments/{id}/ignore-reports": { + "/content/members/{id}/ban": { "post": { - "operationId": "postContentModerationCommentsIdIgnoreReports", + "operationId": "postContentMembersIdBan", "tags": [ "content" ], - "summary": "Dismiss the open reports of a community comment", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same action as \"Ignore\" in the dashboard's moderation queue.\n\nLeaves the comment as it is, resolves its open reports as IGNORED and takes it out of the queue; it will no longer be auto-hidden. New reports put it back in the queue. Works on deleted comments too.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the comment does not exist or belongs to another workspace.", + "summary": "Ban a member from the community", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. `{id}` is the member's customer id (`author.customerId` in the moderation queue). Same action as \"Ban\" in the dashboard's moderation queue.\n\nDESTRUCTIVE: the member can no longer post, comment or RSVP in this workspace's community; their RSVPs to upcoming meetups are cancelled (the seat is released); `commentId` (or, with `hideAllComments`, all their comments in this workspace) is hidden and the open reports are resolved as BANNED. Idempotent on the ban itself. Lift it with `DELETE`.\n\nThe ban always comes from a comment of this workspace: the banned member is that comment's author, and `{id}` must match it.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the comment does not exist in this workspace or was not written by `{id}`.", "security": [ { "apiKey": [] @@ -16823,6 +16537,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -16842,6 +16557,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberBanCreate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -16851,7 +16576,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommentModerated" + "$ref": "#/components/schemas/MemberBanResult" } }, "required": [ @@ -16902,16 +16627,14 @@ } } } - } - }, - "/content/moderation/member-posts/{id}/approve": { - "post": { - "operationId": "postContentModerationMemberPostsIdApprove", + }, + "delete": { + "operationId": "deleteContentMembersIdBan", "tags": [ "content" ], - "summary": "Approve a pending member post", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same action as \"Approve\" in the dashboard's Moderation → Posts view: the post is published at the top of the feed, its author is notified and mentioned members are notified.\n\nOnly the version you read is approved: send the post's `updatedAt` from `GET /content/moderation/member-posts` as `expectedUpdatedAt`. If the author edited it since, nothing is published (409 `EDITED_SINCE_READ`): re-read and review again.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `MEMBER_POSTS_UNAVAILABLE`: member posts are not enabled for this workspace.\n- 404 `NOT_FOUND`: not a member post of this workspace, or deleted.\n- 409 `ALREADY_REVIEWED`: it is no longer pending.\n- 409 `EDITED_SINCE_READ`: the author edited it after `expectedUpdatedAt`.\n- 502 `IMAGE_PROMOTION_FAILED`: the image could not be published; retry.", + "summary": "Lift a member's community ban", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Lift ban\" in the dashboard. Deletes the ban (leaving an audit log entry); hidden comments stay hidden and cancelled RSVPs stay cancelled.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the member is not banned in this workspace.", "security": [ { "apiKey": [] @@ -16939,16 +16662,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemberPostApprove" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -16958,7 +16671,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MemberPostReviewed" + "$ref": "#/components/schemas/MemberBanResult" } }, "required": [ @@ -16998,16 +16711,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -17017,28 +16720,18 @@ } } } - }, - "502": { - "description": "The external provider failed to complete the operation.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } } } }, - "/content/moderation/member-posts/{id}/reject": { - "post": { - "operationId": "postContentModerationMemberPostsIdReject", + "/content/meetups": { + "get": { + "operationId": "getContentMeetups", "tags": [ "content" ], - "summary": "Reject a pending member post", - "description": "Minimum role: `STAFF` (`ADMIN` with `banAuthor: true`). Active workspace via the `X-Workspace-Id` header. Same action as \"Reject\" in the dashboard's Moderation → Posts view.\n\nDESTRUCTIVE: the pending post is rejected (it never gets published), the author is notified in their inbox and the image is purged from storage. The optional `reason` is shown to the author. With `banAuthor` the author is also banned from the community in the same transaction.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `BAN_REQUIRES_ADMIN`: `banAuthor` with a role below ADMIN.\n- 400 `BAD_REQUEST`: invalid `reason`.\n- 404 `NOT_FOUND`: not a member post of this workspace, or deleted.\n- 409 `ALREADY_REVIEWED`: another moderator already reviewed it.", + "summary": "List community meetups", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Meetups screen: the latest 100 meetups by start date (newest first), in any status, with confirmed and pending-request counts.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).", "security": [ { "apiKey": [] @@ -17047,16 +16740,7 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -17067,16 +16751,6 @@ } } ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemberPostDecision" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -17086,7 +16760,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MemberPostReviewed" + "type": "array", + "items": { + "$ref": "#/components/schemas/CommunityMeetup" + } } }, "required": [ @@ -17096,16 +16773,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -17136,16 +16803,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -17157,16 +16814,14 @@ } } } - } - }, - "/content/moderation/member-posts/{id}/remove": { + }, "post": { - "operationId": "postContentModerationMemberPostsIdRemove", + "operationId": "postContentMeetups", "tags": [ "content" ], - "summary": "Remove a published member post", - "description": "Minimum role: `STAFF` (`ADMIN` with `banAuthor: true`). Active workspace via the `X-Workspace-Id` header. Same action as \"Remove\" in the dashboard's Moderation → Posts view.\n\nDESTRUCTIVE: the published post is soft-deleted, the author is notified in their inbox and the image is purged from storage. The optional `reason` is shown to the author. With `banAuthor` the author is also banned from the community in the same transaction.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `BAN_REQUIRES_ADMIN`: `banAuthor` with a role below ADMIN.\n- 400 `BAD_REQUEST`: invalid `reason`.\n- 404 `NOT_FOUND`: not a published member post of this workspace.", + "summary": "Create a community meetup (draft)", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same form as \"New meetup\" in the dashboard; it is created as DRAFT (publish it with `POST /content/meetups/{id}/publish`). `startsAt`/`endsAt` are local wall times in the workspace's timezone (`YYYY-MM-DDTHH:mm`). An ONLINE meetup keeps `onlineUrl` and drops the address; IN_PERSON the opposite.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 400 `BAD_REQUEST`: malformed wall time, `endsAt` not after `startsAt`, or `onlineUrl` not https.\n- 400 `STARTS_IN_PAST`: the start must be in the future.", "security": [ { "apiKey": [] @@ -17175,16 +16830,7 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -17196,17 +16842,17 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemberPostDecision" + "$ref": "#/components/schemas/CommunityMeetupCreate" } } } }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -17214,7 +16860,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MemberPostReviewed" + "$ref": "#/components/schemas/CommunityMeetupDetail" } }, "required": [ @@ -17277,14 +16923,14 @@ } } }, - "/content/members/{id}/ban": { - "post": { - "operationId": "postContentMembersIdBan", + "/content/meetups/{id}": { + "get": { + "operationId": "getContentMeetupsId", "tags": [ "content" ], - "summary": "Ban a member from the community", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. `{id}` is the member's customer id (`author.customerId` in the moderation queue). Same action as \"Ban\" in the dashboard's moderation queue.\n\nDESTRUCTIVE: the member can no longer post, comment or RSVP in this workspace's community; their RSVPs to upcoming meetups are cancelled (the seat is released); `commentId` (or, with `hideAllComments`, all their comments in this workspace) is hidden and the open reports are resolved as BANNED. Idempotent on the ban itself. Lift it with `DELETE`.\n\nThe ban always comes from a comment of this workspace: the banned member is that comment's author, and `{id}` must match it.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the comment does not exist in this workspace or was not written by `{id}`.", + "summary": "Get a community meetup with its attendees and requests", + "description": "Minimum role: `STAFF` (includes the name and email of members who requested a seat). Active workspace via the `X-Workspace-Id` header. Same detail as the dashboard: confirmed attendees (with check-in) and RSVP requests (pending first). `local` carries the editable values in the workspace's wall time.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.", "security": [ { "apiKey": [] @@ -17293,7 +16939,6 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -17313,16 +16958,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemberBanCreate" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -17332,7 +16967,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MemberBanResult" + "$ref": "#/components/schemas/CommunityMeetupDetail" } }, "required": [ @@ -17384,13 +17019,13 @@ } } }, - "delete": { - "operationId": "deleteContentMembersIdBan", + "patch": { + "operationId": "patchContentMeetupsId", "tags": [ "content" ], - "summary": "Lift a member's community ban", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Lift ban\" in the dashboard. Deletes the ban (leaving an audit log entry); hidden comments stay hidden and cancelled RSVPs stay cancelled.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the member is not banned in this workspace.", + "summary": "Update a community meetup", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same form as editing a meetup in the dashboard. Partial: absent fields keep the stored value (see `local` in the detail); an empty string clears an optional text field. Times are local wall times in the workspace's timezone.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 400 `BAD_REQUEST`: malformed values (see `POST /content/meetups`).\n- 400 `STARTS_IN_PAST`: a past start is only accepted if it is the one already stored.\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.\n- 409 `EVENT_CANCELLED`: a cancelled meetup cannot be edited.\n- 409 `CAPACITY_BELOW_GOING`: `capacity` lower than the members already confirmed.", "security": [ { "apiKey": [] @@ -17418,6 +17053,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommunityMeetupUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -17427,7 +17072,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MemberBanResult" + "$ref": "#/components/schemas/CommunityMeetupDetail" } }, "required": [ @@ -17437,6 +17082,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -17467,6 +17122,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -17480,14 +17145,14 @@ } } }, - "/content/meetups": { - "get": { - "operationId": "getContentMeetups", + "/content/meetups/{id}/publish": { + "post": { + "operationId": "postContentMeetupsIdPublish", "tags": [ "content" ], - "summary": "List community meetups", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Meetups screen: the latest 100 meetups by start date (newest first), in any status, with confirmed and pending-request counts.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).", + "summary": "Publish a draft community meetup", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Publish\" in the dashboard: the draft becomes visible to members and a notification to the whole community is queued in the same transaction (sent by the background job, not by this request).\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.\n- 409 `NOT_DRAFT`: only a draft can be published.\n- 409 `STARTS_IN_PAST`: its start already passed; update it first.", "security": [ { "apiKey": [] @@ -17497,6 +17162,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -17516,10 +17189,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommunityMeetup" - } + "$ref": "#/components/schemas/CommunityMeetupDetail" } }, "required": [ @@ -17559,6 +17229,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -17570,14 +17250,16 @@ } } } - }, + } + }, + "/content/meetups/{id}/cancel": { "post": { - "operationId": "postContentMeetups", + "operationId": "postContentMeetupsIdCancel", "tags": [ "content" ], - "summary": "Create a community meetup (draft)", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same form as \"New meetup\" in the dashboard; it is created as DRAFT (publish it with `POST /content/meetups/{id}/publish`). `startsAt`/`endsAt` are local wall times in the workspace's timezone (`YYYY-MM-DDTHH:mm`). An ONLINE meetup keeps `onlineUrl` and drops the address; IN_PERSON the opposite.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 400 `BAD_REQUEST`: malformed wall time, `endsAt` not after `startsAt`, or `onlineUrl` not https.\n- 400 `STARTS_IN_PAST`: the start must be in the future.", + "summary": "Cancel a community meetup", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Cancel meetup\" in the dashboard.\n\nDESTRUCTIVE: the meetup (draft or published) moves to CANCELLED, which is terminal: it cannot be edited or published again. Members who confirmed are notified by email/inbox (queued in the same transaction, sent by the background job). RSVPs are kept as they are.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.\n- 409 `ALREADY_CANCELLED`: it was already cancelled.", "security": [ { "apiKey": [] @@ -17586,7 +17268,16 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -17597,18 +17288,8 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommunityMeetupCreate" - } - } - } - }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -17626,8 +17307,8 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", + "401": { + "description": "Missing or invalid credential.", "content": { "application/json": { "schema": { @@ -17636,8 +17317,8 @@ } } }, - "401": { - "description": "Missing or invalid credential.", + "403": { + "description": "Insufficient role or resource not accessible.", "content": { "application/json": { "schema": { @@ -17646,8 +17327,8 @@ } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -17656,8 +17337,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", "content": { "application/json": { "schema": { @@ -17679,14 +17360,14 @@ } } }, - "/content/meetups/{id}": { - "get": { - "operationId": "getContentMeetupsId", + "/content/meetups/{id}/rsvps/{rsvpId}": { + "patch": { + "operationId": "patchContentMeetupsIdRsvpsRsvpId", "tags": [ "content" ], - "summary": "Get a community meetup with its attendees and requests", - "description": "Minimum role: `STAFF` (includes the name and email of members who requested a seat). Active workspace via the `X-Workspace-Id` header. Same detail as the dashboard: confirmed attendees (with check-in) and RSVP requests (pending first). `local` carries the editable values in the workspace's wall time.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.", + "summary": "Approve or reject a meetup RSVP request", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as approving/rejecting a request in the dashboard (meetups with `requiresApproval`). The member gets an email with the decision after the change is committed. APPROVE also works on a previously rejected request (the staff can change its mind); REJECT only on a pending one.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup or the request does not exist in this workspace.\n- 409 `NOT_PENDING`: already reviewed.\n- 409 `EVENT_FULL`: no seats left; raise the capacity first.\n- 409 `EVENT_CLOSED`: the meetup is not published or already started.\n- 409 `MEMBER_BANNED`: the member is banned from the community.\n- 409 `NO_MEMBERSHIP`: the member no longer has an active membership.", "security": [ { "apiKey": [] @@ -17704,6 +17385,14 @@ "type": "string" } }, + { + "name": "rsvpId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -17714,6 +17403,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommunityMeetupRsvpReview" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -17723,7 +17422,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommunityMeetupDetail" + "$ref": "#/components/schemas/CommunityMeetupRsvpReviewed" } }, "required": [ @@ -17763,6 +17462,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -17774,14 +17483,16 @@ } } } - }, - "patch": { - "operationId": "patchContentMeetupsId", + } + }, + "/content/meetups/{id}/attendance": { + "put": { + "operationId": "putContentMeetupsIdAttendance", "tags": [ "content" ], - "summary": "Update a community meetup", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same form as editing a meetup in the dashboard. Partial: absent fields keep the stored value (see `local` in the detail); an empty string clears an optional text field. Times are local wall times in the workspace's timezone.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 400 `BAD_REQUEST`: malformed values (see `POST /content/meetups`).\n- 400 `STARTS_IN_PAST`: a past start is only accepted if it is the one already stored.\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.\n- 409 `EVENT_CANCELLED`: a cancelled meetup cannot be edited.\n- 409 `CAPACITY_BELOW_GOING`: `capacity` lower than the members already confirmed.", + "summary": "Mark or unmark a meetup attendee as checked in", + "description": "Minimum role: `STAFF` (door work, like `POST /tickets/{ticketCode}/checkin`). Active workspace via the `X-Workspace-Id` header. Same action as the \"Attended\" checkbox in the dashboard. Only on a confirmed (GOING) RSVP of a meetup that is not cancelled; repeating the same mark changes nothing (`changed: false`, also when the RSVP is not GOING or does not belong to the meetup).\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.", "security": [ { "apiKey": [] @@ -17814,7 +17525,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommunityMeetupUpdate" + "$ref": "#/components/schemas/CommunityMeetupAttendance" } } } @@ -17828,7 +17539,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommunityMeetupDetail" + "$ref": "#/components/schemas/CommunityMeetupAttendanceResult" } }, "required": [ @@ -17838,8 +17549,8 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", + "401": { + "description": "Missing or invalid credential.", "content": { "application/json": { "schema": { @@ -17848,8 +17559,8 @@ } } }, - "401": { - "description": "Missing or invalid credential.", + "403": { + "description": "Insufficient role or resource not accessible.", "content": { "application/json": { "schema": { @@ -17858,8 +17569,8 @@ } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -17868,8 +17579,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "422": { + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { @@ -17877,9 +17588,81 @@ } } } + } + } + } + }, + "/products": { + "get": { + "operationId": "getProducts", + "tags": [ + "products" + ], + "summary": "List digital products and courses", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Products screen (downloadable products and courses, not the merch store): non-deleted products, newest first, with CONFIRMED sales count and revenue.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "security": [ + { + "apiKey": [] }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Product" + } + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -17899,16 +17682,14 @@ } } } - } - }, - "/content/meetups/{id}/publish": { + }, "post": { - "operationId": "postContentMeetupsIdPublish", + "operationId": "postProducts", "tags": [ - "content" + "products" ], - "summary": "Publish a draft community meetup", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Publish\" in the dashboard: the draft becomes visible to members and a notification to the whole community is queued in the same transaction (sent by the background job, not by this request).\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.\n- 409 `NOT_DRAFT`: only a draft can be published.\n- 409 `STARTS_IN_PAST`: its start already passed; update it first.", + "summary": "Create a digital product or course", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as the dashboard's product wizard. A DOWNLOADABLE needs `fileName`/`filePath` of a file already in the workspace's product files folder; a COURSE needs at least one module with one lesson. Files and lesson videos cannot be uploaded through the API: reference ones uploaded from the dashboard. Created as DRAFT unless `publish: true`. Returns the full product.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: a dashboard validation rule failed (e.g. a DOWNLOADABLE without a file, a COURSE without modules or a module without lessons, decimals in a COP price, more than one free preview lesson per module, a QUIZ lesson without questions). `error.message` says which.\n- 400 `INVALID_FILE`: a `filePath`/`samplePath`/lesson file/resource path is not under this workspace's product files folder.\n- 400 `INVALID_LESSON_THUMBNAIL`: a lesson `thumbnailUrl` is not an image of this workspace's media library.\n- 400 `INVALID_LESSON_VIDEO`: a lesson `videoId` is not a course video of this workspace, or is linked to another product.\n- 400 `DUPLICATE_LESSON_VIDEO`: the same `videoId` is used in two lessons.\n- 403 `LIVE_LESSONS_PLAN_REQUIRED`: a lesson has `isLive: true` and the workspace plan does not include streaming (Icon).\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -17918,14 +17699,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -17936,8 +17709,18 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductCreate" + } + } + } + }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -17945,7 +17728,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommunityMeetupDetail" + "$ref": "#/components/schemas/ProductDetail" } }, "required": [ @@ -17955,8 +17738,8 @@ } } }, - "401": { - "description": "Missing or invalid credential.", + "400": { + "description": "Bad request: malformed parameters.", "content": { "application/json": { "schema": { @@ -17965,8 +17748,8 @@ } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "401": { + "description": "Missing or invalid credential.", "content": { "application/json": { "schema": { @@ -17975,8 +17758,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "403": { + "description": "Insufficient role or resource not accessible.", "content": { "application/json": { "schema": { @@ -17985,8 +17768,8 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -18008,14 +17791,14 @@ } } }, - "/content/meetups/{id}/cancel": { - "post": { - "operationId": "postContentMeetupsIdCancel", + "/products/{id}": { + "get": { + "operationId": "getProductsId", "tags": [ - "content" + "products" ], - "summary": "Cancel a community meetup", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Cancel meetup\" in the dashboard.\n\nDESTRUCTIVE: the meetup (draft or published) moves to CANCELLED, which is terminal: it cannot be edited or published again. Members who confirmed are notified by email/inbox (queued in the same transaction, sent by the background job). RSVPs are kept as they are.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.\n- 409 `ALREADY_CANCELLED`: it was already cancelled.", + "summary": "Get a digital product or course", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same detail the dashboard's product wizard opens: product data, CONFIRMED sales totals and, for courses, modules and lessons in order. Lesson quizzes (with the correct answers) are only included for `ADMIN` keys.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the product does not exist, was deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -18024,7 +17807,6 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -18053,7 +17835,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommunityMeetupDetail" + "$ref": "#/components/schemas/ProductDetail" } }, "required": [ @@ -18093,16 +17875,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -18114,16 +17886,14 @@ } } } - } - }, - "/content/meetups/{id}/rsvps/{rsvpId}": { + }, "patch": { - "operationId": "patchContentMeetupsIdRsvpsRsvpId", + "operationId": "patchProductsId", "tags": [ - "content" + "products" ], - "summary": "Approve or reject a meetup RSVP request", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as approving/rejecting a request in the dashboard (meetups with `requiresApproval`). The member gets an email with the decision after the change is committed. APPROVE also works on a previously rejected request (the staff can change its mind); REJECT only on a pending one.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup or the request does not exist in this workspace.\n- 409 `NOT_PENDING`: already reviewed.\n- 409 `EVENT_FULL`: no seats left; raise the capacity first.\n- 409 `EVENT_CLOSED`: the meetup is not published or already started.\n- 409 `MEMBER_BANNED`: the member is banned from the community.\n- 409 `NO_MEMBERSHIP`: the member no longer has an active membership.", + "summary": "Update a digital product or course", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as saving the dashboard's product wizard. Partial: absent fields keep their saved value. Omit `modules` to leave the course tree untouched (only product fields are written). Sending `modules` replaces the WHOLE tree: modules, lessons and resources are matched by `id` and the ones missing from the list are deleted, along with buyers' progress on those lessons — fetch a fresh `GET /products/{id}` right before and send its tree back with your changes. Changing `type` or `unlockMode` requires sending `modules`. New lessons on a published course with buyers notify them, like the dashboard. Returns the full product.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: a dashboard validation rule failed (e.g. a DOWNLOADABLE without a file, a COURSE without modules or a module without lessons, decimals in a COP price, more than one free preview lesson per module, a QUIZ lesson without questions). `error.message` says which.\n- 400 `INVALID_FILE`: a `filePath`/`samplePath`/lesson file/resource path is not under this workspace's product files folder.\n- 400 `INVALID_LESSON_THUMBNAIL`: a lesson `thumbnailUrl` is not an image of this workspace's media library.\n- 400 `INVALID_LESSON_VIDEO`: a lesson `videoId` is not a course video of this workspace, or is linked to another product.\n- 400 `DUPLICATE_LESSON_VIDEO`: the same `videoId` is used in two lessons.\n- 403 `LIVE_LESSONS_PLAN_REQUIRED`: a lesson has `isLive: true` and the workspace plan does not include streaming (Icon).\n- 400 `MODULES_REQUIRED`: `type` or `unlockMode` changes without `modules`.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the product does not exist, was deleted or belongs to another workspace.\n- 409 `COURSE_CHANGED`: the course changed concurrently (e.g. a lesson id no longer exists); read it again and retry.", "security": [ { "apiKey": [] @@ -18141,14 +17911,6 @@ "type": "string" } }, - { - "name": "rsvpId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -18164,7 +17926,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommunityMeetupRsvpReview" + "$ref": "#/components/schemas/ProductUpdate" } } } @@ -18178,7 +17940,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CommunityMeetupRsvpReviewed" + "$ref": "#/components/schemas/ProductDetail" } }, "required": [ @@ -18188,6 +17950,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -18239,16 +18011,14 @@ } } } - } - }, - "/content/meetups/{id}/attendance": { - "put": { - "operationId": "putContentMeetupsIdAttendance", + }, + "delete": { + "operationId": "deleteProductsId", "tags": [ - "content" + "products" ], - "summary": "Mark or unmark a meetup attendee as checked in", - "description": "Minimum role: `STAFF` (door work, like `POST /tickets/{ticketCode}/checkin`). Active workspace via the `X-Workspace-Id` header. Same action as the \"Attended\" checkbox in the dashboard. Only on a confirmed (GOING) RSVP of a meetup that is not cancelled; repeating the same mark changes nothing (`changed: false`, also when the RSVP is not GOING or does not belong to the meetup).\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `COMMUNITY_UNAVAILABLE`: the community (`community_v2`) is not enabled for this workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (meetups are community content, not ticketed events).\n- 404 `NOT_FOUND`: the meetup does not exist in this workspace.", + "summary": "Delete a digital product or course", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Delete\" in the dashboard.\n\nDESTRUCTIVE: the product disappears from the dashboard, the API and the public pages (soft delete). There is no restore endpoint.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the product does not exist, was already deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -18257,6 +18027,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -18276,31 +18047,13 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommunityMeetupAttendance" - } - } - } - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/CommunityMeetupAttendanceResult" - } - }, - "required": [ - "data" - ] + "type": "object" } } } @@ -18348,14 +18101,14 @@ } } }, - "/products": { - "get": { - "operationId": "getProducts", + "/products/{id}/status": { + "post": { + "operationId": "postProductsIdStatus", "tags": [ "products" ], - "summary": "List digital products and courses", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Products screen (downloadable products and courses, not the merch store): non-deleted products, newest first, with CONFIRMED sales count and revenue.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Publish or unpublish a digital product or course", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as the publish toggle in the dashboard's product list, with the target status explicit: sending the current status is a no-op. Publishing re-checks the plan for live lessons; unpublishing never does.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `LIVE_LESSONS_PLAN_REQUIRED`: the course has live lessons and the workspace plan does not include streaming (Icon).\n- 404 `NOT_FOUND`: the product does not exist, was deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -18365,6 +18118,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -18375,24 +18136,23 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductStatusUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "required": [ - "data" - ] + "type": "object" } } } @@ -18438,14 +18198,16 @@ } } } - }, - "post": { - "operationId": "postProducts", + } + }, + "/content/videos/{id}": { + "patch": { + "operationId": "patchContentVideosId", "tags": [ - "products" + "content" ], - "summary": "Create a digital product or course", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as the dashboard's product wizard. A DOWNLOADABLE needs `fileName`/`filePath` of a file already in the workspace's product files folder; a COURSE needs at least one module with one lesson. Files and lesson videos cannot be uploaded through the API: reference ones uploaded from the dashboard. Created as DRAFT unless `publish: true`. Returns the full product.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: a dashboard validation rule failed (e.g. a DOWNLOADABLE without a file, a COURSE without modules or a module without lessons, decimals in a COP price, more than one free preview lesson per module, a QUIZ lesson without questions). `error.message` says which.\n- 400 `INVALID_FILE`: a `filePath`/`samplePath`/lesson file/resource path is not under this workspace's product files folder.\n- 400 `INVALID_LESSON_THUMBNAIL`: a lesson `thumbnailUrl` is not an image of this workspace's media library.\n- 400 `INVALID_LESSON_VIDEO`: a lesson `videoId` is not a course video of this workspace, or is linked to another product.\n- 400 `DUPLICATE_LESSON_VIDEO`: the same `videoId` is used in two lessons.\n- 403 `LIVE_LESSONS_PLAN_REQUIRED`: a lesson has `isLive: true` and the workspace plan does not include streaming (Icon).\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Update an on-demand video", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a video in the dashboard's Content screen. Partial: only the fields sent are validated and written (at least one); absent fields keep their stored value; `null` or `\"\"` clears `description`. Works on drafts and published videos. Uploading a video is not available through the API (the Mux direct upload needs a browser); course lesson videos are managed from their course and answer 404 here.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `title` empty or longer than 120 characters, or `description` longer than 2000.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the video does not exist, was deleted, is a course video or belongs to another workspace.", "security": [ { "apiKey": [] @@ -18455,6 +18217,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -18470,13 +18240,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProductCreate" + "$ref": "#/components/schemas/ContentVideoUpdate" } } } }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -18484,7 +18254,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ProductDetail" + "$ref": "#/components/schemas/ContentVideoSummary" } }, "required": [ @@ -18545,16 +18315,14 @@ } } } - } - }, - "/products/{id}": { - "get": { - "operationId": "getProductsId", + }, + "delete": { + "operationId": "deleteContentVideosId", "tags": [ - "products" + "content" ], - "summary": "Get a digital product or course", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same detail the dashboard's product wizard opens: product data, CONFIRMED sales totals and, for courses, modules and lessons in order. Lesson quizzes (with the correct answers) are only included for `ADMIN` keys.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the product does not exist, was deleted or belongs to another workspace.", + "summary": "Delete an on-demand video", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a video in the dashboard.\n\nDESTRUCTIVE and irreversible: soft-deletes the video and deletes its asset in Mux (the encoded file is gone; it cannot be restored through the API or the dashboard). Members lose access immediately.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the video does not exist, was already deleted, is a course video or belongs to another workspace.", "security": [ { "apiKey": [] @@ -18563,6 +18331,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -18591,7 +18360,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ProductDetail" + "$ref": "#/components/schemas/ContentMediaDeleted" } }, "required": [ @@ -18642,14 +18411,16 @@ } } } - }, - "patch": { - "operationId": "patchProductsId", + } + }, + "/content/videos/{id}/published": { + "put": { + "operationId": "putContentVideosIdPublished", "tags": [ - "products" + "content" ], - "summary": "Update a digital product or course", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as saving the dashboard's product wizard. Partial: absent fields keep their saved value. Omit `modules` to leave the course tree untouched (only product fields are written). Sending `modules` replaces the WHOLE tree: modules, lessons and resources are matched by `id` and the ones missing from the list are deleted, along with buyers' progress on those lessons — fetch a fresh `GET /products/{id}` right before and send its tree back with your changes. Changing `type` or `unlockMode` requires sending `modules`. New lessons on a published course with buyers notify them, like the dashboard. Returns the full product.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: a dashboard validation rule failed (e.g. a DOWNLOADABLE without a file, a COURSE without modules or a module without lessons, decimals in a COP price, more than one free preview lesson per module, a QUIZ lesson without questions). `error.message` says which.\n- 400 `INVALID_FILE`: a `filePath`/`samplePath`/lesson file/resource path is not under this workspace's product files folder.\n- 400 `INVALID_LESSON_THUMBNAIL`: a lesson `thumbnailUrl` is not an image of this workspace's media library.\n- 400 `INVALID_LESSON_VIDEO`: a lesson `videoId` is not a course video of this workspace, or is linked to another product.\n- 400 `DUPLICATE_LESSON_VIDEO`: the same `videoId` is used in two lessons.\n- 403 `LIVE_LESSONS_PLAN_REQUIRED`: a lesson has `isLive: true` and the workspace plan does not include streaming (Icon).\n- 400 `MODULES_REQUIRED`: `type` or `unlockMode` changes without `modules`.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the product does not exist, was deleted or belongs to another workspace.\n- 409 `COURSE_CHANGED`: the course changed concurrently (e.g. a lesson id no longer exists); read it again and retry.", + "summary": "Publish or unpublish an on-demand video", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as the publish switch in the dashboard. Publishing puts the video in the community feed as a VIDEO post (republishing revives the same post and members are notified once); unpublishing removes it from the feed.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the video does not exist, was deleted, is a course video or belongs to another workspace.\n- 409 `VIDEO_NOT_READY`: publishing a video Mux has not finished processing.\n- 409 `MEMBERSHIP_PREREQ`: the workspace has no active membership plan yet; create one first (members-only content needs something to pay for). Only checked when publishing.", "security": [ { "apiKey": [] @@ -18682,7 +18453,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProductUpdate" + "$ref": "#/components/schemas/ContentVideoPublish" } } } @@ -18696,7 +18467,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ProductDetail" + "$ref": "#/components/schemas/ContentVideoPublished" } }, "required": [ @@ -18706,16 +18477,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -18767,14 +18528,16 @@ } } } - }, - "delete": { - "operationId": "deleteProductsId", + } + }, + "/content/videos/{id}/series": { + "put": { + "operationId": "putContentVideosIdSeries", "tags": [ - "products" + "content" ], - "summary": "Delete a digital product or course", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Delete\" in the dashboard.\n\nDESTRUCTIVE: the product disappears from the dashboard, the API and the public pages (soft delete). There is no restore endpoint.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the product does not exist, was already deleted or belongs to another workspace.", + "summary": "Move a video into a series or out of it", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as choosing a series for a video in the dashboard. `seriesId: null` leaves the video loose. Does not change whether the video is published.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the video, or the `seriesId` (see `error.message`), does not exist, was deleted or belongs to another workspace; course videos also answer 404.", "security": [ { "apiKey": [] @@ -18783,7 +18546,6 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -18803,13 +18565,31 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentVideoSeriesAssign" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ContentVideoSeriesResult" + } + }, + "required": [ + "data" + ] } } } @@ -18857,14 +18637,14 @@ } } }, - "/products/{id}/status": { - "post": { - "operationId": "postProductsIdStatus", + "/content/series": { + "get": { + "operationId": "getContentSeries", "tags": [ - "products" + "content" ], - "summary": "Publish or unpublish a digital product or course", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as the publish toggle in the dashboard's product list, with the target status explicit: sending the current status is a no-op. Publishing re-checks the plan for live lessons; unpublishing never does.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 403 `LIVE_LESSONS_PLAN_REQUIRED`: the course has live lessons and the workspace plan does not include streaming (Icon).\n- 404 `NOT_FOUND`: the product does not exist, was deleted or belongs to another workspace.", + "summary": "List the video series", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Series of the dashboard's Content screen, published and drafts, newest first, with their video count.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -18875,9 +18655,19 @@ ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "description": "1-100, default 20", + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, "schema": { "type": "string" } @@ -18892,23 +18682,28 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductStatusUpdate" - } - } - } - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContentSeries" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "data", + "page" + ] } } } @@ -18954,16 +18749,14 @@ } } } - } - }, - "/content/videos/{id}": { - "patch": { - "operationId": "patchContentVideosId", + }, + "post": { + "operationId": "postContentSeries", "tags": [ "content" ], - "summary": "Update an on-demand video", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a video in the dashboard's Content screen. Partial: only the fields sent are validated and written (at least one); absent fields keep their stored value; `null` or `\"\"` clears `description`. Works on drafts and published videos. Uploading a video is not available through the API (the Mux direct upload needs a browser); course lesson videos are managed from their course and answer 404 here.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `title` empty or longer than 120 characters, or `description` longer than 2000.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the video does not exist, was deleted, is a course video or belongs to another workspace.", + "summary": "Create a video series", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New series\" in the dashboard. The series is born unpublished and empty; add videos with `PUT /content/videos/{id}/series` and publish it with `PUT /content/series/{id}/published`.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `title` empty or longer than 120 characters, `description` longer than 2000, or `coverImageUrl` not an absolute URL.\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 409 `MEMBERSHIP_PREREQ`: the workspace has no active membership plan yet; create one first (members-only content needs something to pay for).", "security": [ { "apiKey": [] @@ -18973,14 +18766,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -18996,13 +18781,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentVideoUpdate" + "$ref": "#/components/schemas/ContentSeriesCreate" } } } }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -19010,7 +18795,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentVideoSummary" + "$ref": "#/components/schemas/ContentSeries" } }, "required": [ @@ -19060,6 +18845,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -19071,14 +18866,16 @@ } } } - }, - "delete": { - "operationId": "deleteContentVideosId", + } + }, + "/content/series/{id}": { + "patch": { + "operationId": "patchContentSeriesId", "tags": [ "content" ], - "summary": "Delete an on-demand video", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a video in the dashboard.\n\nDESTRUCTIVE and irreversible: soft-deletes the video and deletes its asset in Mux (the encoded file is gone; it cannot be restored through the API or the dashboard). Members lose access immediately.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the video does not exist, was already deleted, is a course video or belongs to another workspace.", + "summary": "Update a video series", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a series in the dashboard. Partial: only the fields sent are validated and written (at least one); absent fields keep their stored value; `null` clears `description` / `coverImageUrl`.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `title` empty or longer than 120 characters, `description` longer than 2000, or `coverImageUrl` not an absolute URL.\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the series does not exist, was deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -19087,7 +18884,6 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -19107,6 +18903,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentSeriesUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -19116,7 +18922,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentMediaDeleted" + "$ref": "#/components/schemas/ContentSeries" } }, "required": [ @@ -19126,6 +18932,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -19167,16 +18983,14 @@ } } } - } - }, - "/content/videos/{id}/published": { - "put": { - "operationId": "putContentVideosIdPublished", + }, + "delete": { + "operationId": "deleteContentSeriesId", "tags": [ "content" ], - "summary": "Publish or unpublish an on-demand video", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as the publish switch in the dashboard. Publishing puts the video in the community feed as a VIDEO post (republishing revives the same post and members are notified once); unpublishing removes it from the feed.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the video does not exist, was deleted, is a course video or belongs to another workspace.\n- 409 `VIDEO_NOT_READY`: publishing a video Mux has not finished processing.\n- 409 `MEMBERSHIP_PREREQ`: the workspace has no active membership plan yet; create one first (members-only content needs something to pay for). Only checked when publishing.", + "summary": "Delete a video series", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a series in the dashboard.\n\nDESTRUCTIVE: soft-deletes the series; it cannot be restored through the API. Its videos are NOT deleted or unpublished: they are left loose (no series, position reset), so the original grouping and order are lost.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the series does not exist, was already deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -19185,6 +18999,7 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { "name": "id", @@ -19204,16 +19019,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContentVideoPublish" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -19223,7 +19028,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentVideoPublished" + "$ref": "#/components/schemas/ContentMediaDeleted" } }, "required": [ @@ -19263,16 +19068,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -19286,14 +19081,14 @@ } } }, - "/content/videos/{id}/series": { + "/content/series/{id}/published": { "put": { - "operationId": "putContentVideosIdSeries", + "operationId": "putContentSeriesIdPublished", "tags": [ "content" ], - "summary": "Move a video into a series or out of it", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as choosing a series for a video in the dashboard. `seriesId: null` leaves the video loose. Does not change whether the video is published.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the video, or the `seriesId` (see `error.message`), does not exist, was deleted or belongs to another workspace; course videos also answer 404.", + "summary": "Publish or unpublish a video series", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as the publish switch of a series in the dashboard. Only the series changes: its videos keep their own published state. Publishing again refreshes `publishedAt`.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the series does not exist, was deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -19326,7 +19121,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentVideoSeriesAssign" + "$ref": "#/components/schemas/ContentSeriesPublish" } } } @@ -19340,7 +19135,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentVideoSeriesResult" + "$ref": "#/components/schemas/ContentSeries" } }, "required": [ @@ -19393,14 +19188,14 @@ } } }, - "/content/series": { - "get": { - "operationId": "getContentSeries", + "/content/lives/{id}/reset-key": { + "post": { + "operationId": "postContentLivesIdResetKey", "tags": [ "content" ], - "summary": "List the video series", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Series of the dashboard's Content screen, published and drafts, newest first, with their video count.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Rotate a live stream's stream key", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Reset key\" in the dashboard: Mux issues a new stream key and returns it with the RTMPS server.\n\nDESTRUCTIVE: the current key stops working immediately; any encoder (OBS) configured with it can no longer connect and must be updated with the new one. Use it when the key may have leaked.\n\nSECURITY: `streamKey` is a secret that grants broadcasting rights on this stream in the organization's name. It is returned only here and by `POST /content/lives`; store it like a password.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the stream does not exist, was deleted or belongs to another workspace.\n- 502 `MUX_ERROR`: Mux rejected the request or is not configured; the old key keeps working.", "security": [ { "apiKey": [] @@ -19409,21 +19204,12 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ { - "name": "limit", - "in": "query", - "required": false, - "description": "1-100, default 20", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "cursor", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -19447,18 +19233,11 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContentSeries" - } - }, - "page": { - "$ref": "#/components/schemas/Page" + "$ref": "#/components/schemas/ContentLiveStreamKey" } }, "required": [ - "data", - "page" + "data" ] } } @@ -19503,16 +19282,28 @@ } } } + }, + "502": { + "description": "The external provider failed to complete the operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "post": { - "operationId": "postContentSeries", + } + }, + "/content/lives/{id}/chat": { + "get": { + "operationId": "getContentLivesIdChat", "tags": [ "content" ], - "summary": "Create a video series", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New series\" in the dashboard. The series is born unpublished and empty; add videos with `PUT /content/videos/{id}/series` and publish it with `PUT /content/series/{id}/published`.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `title` empty or longer than 120 characters, `description` longer than 2000, or `coverImageUrl` not an absolute URL.\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 409 `MEMBERSHIP_PREREQ`: the workspace has no active membership plan yet; create one first (members-only content needs something to pay for).", + "summary": "Chat history of a live stream", + "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same history as \"View chat\" in the dashboard, for a stream on air or already ended: oldest to newest, capped (`truncated: true` when the oldest messages were cut). Contains buyers' display names and messages: treat it as personal data.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the stream does not exist, was deleted or belongs to another workspace.", "security": [ { "apiKey": [] @@ -19522,6 +19313,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -19532,18 +19331,8 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContentSeriesCreate" - } - } - } - }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -19551,7 +19340,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentSeries" + "$ref": "#/components/schemas/ContentLiveChat" } }, "required": [ @@ -19561,8 +19350,8 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", + "401": { + "description": "Missing or invalid credential.", "content": { "application/json": { "schema": { @@ -19571,8 +19360,8 @@ } } }, - "401": { - "description": "Missing or invalid credential.", + "403": { + "description": "Insufficient role or resource not accessible.", "content": { "application/json": { "schema": { @@ -19581,8 +19370,8 @@ } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -19591,8 +19380,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "422": { + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { @@ -19600,9 +19389,78 @@ } } } + } + } + } + }, + "/website": { + "get": { + "operationId": "getWebsite", + "tags": [ + "website" + ], + "summary": "Get the workspace website configuration", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same data as the dashboard's Website screen: landing texts, social links, accent color, template, section visibility/order, and the public listing state (`published`, `canPublish`, `profileListable`). `customLandingEnabled` says whether the plan allows `PUT /website`.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (workspace configuration is out of its scope).", + "security": [ + { + "apiKey": [] }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Website" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -19622,16 +19480,14 @@ } } } - } - }, - "/content/series/{id}": { - "patch": { - "operationId": "patchContentSeriesId", + }, + "put": { + "operationId": "putWebsite", "tags": [ - "content" + "website" ], - "summary": "Update a video series", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a series in the dashboard. Partial: only the fields sent are validated and written (at least one); absent fields keep their stored value; `null` clears `description` / `coverImageUrl`.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: `title` empty or longer than 120 characters, `description` longer than 2000, or `coverImageUrl` not an absolute URL.\n- 403 `FEATURE_LOCKED`: the workspace plan does not include Content.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the series does not exist, was deleted or belongs to another workspace.", + "summary": "Save the workspace website configuration", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Save\" in the dashboard's Website editor. FULL replacement: every field is required; `null` clears an optional text. Read `GET /website` first and send everything back. Shared columns: `name`, `bio`, `instagramUrl`, `tiktokUrl` and `youtubeUrl` are the same workspace columns that `PATCH /organization/profile` edits (`artist.name`, `artist.bio`, `social.*`) — a PUT with `null` here wipes them there too. An empty `name` is not accepted, and unlike the profile it is NOT mirrored to the brand. The profile photo and cover are NOT edited here (see `PATCH /organization`). Returns the saved configuration.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include the custom landing.\n- 400 `INVALID_SECTIONS`: `webSections` is malformed.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -19641,14 +19497,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -19664,7 +19512,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentSeriesUpdate" + "$ref": "#/components/schemas/WebsiteUpdate" } } } @@ -19678,7 +19526,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentSeries" + "$ref": "#/components/schemas/Website" } }, "required": [ @@ -19739,14 +19587,16 @@ } } } - }, - "delete": { - "operationId": "deleteContentSeriesId", + } + }, + "/website/published": { + "put": { + "operationId": "putWebsitePublished", "tags": [ - "content" + "website" ], - "summary": "Delete a video series", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a series in the dashboard.\n\nDESTRUCTIVE: soft-deletes the series; it cannot be restored through the API. Its videos are NOT deleted or unpublished: they are left loose (no series, position reset), so the original grouping and order are lost.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the series does not exist, was already deleted or belongs to another workspace.", + "summary": "Publish or unpublish the public profile", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same switch as \"Appear in Artists\" in the dashboard: sets whether the organization's public page is listed. Available on every plan. Idempotent: send the desired state.\n\nErrors (`error.code`):\n- 409 `NO_ORGANIZATION`: the workspace has no umbrella organization.\n- 409 `NOT_PRIMARY_WORKSPACE`: only the organization's primary workspace can publish.\n- 409 `PROFILE_INCOMPLETE`: publishing needs the brand name and profile photo (unpublishing is always allowed).\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -19755,16 +19605,7 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -19775,6 +19616,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebsitePublished" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -19784,7 +19635,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentMediaDeleted" + "$ref": "#/components/schemas/WebsitePublished" } }, "required": [ @@ -19824,6 +19675,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -19837,14 +19698,14 @@ } } }, - "/content/series/{id}/published": { - "put": { - "operationId": "putContentSeriesIdPublished", + "/organization": { + "patch": { + "operationId": "patchOrganization", "tags": [ - "content" + "organization" ], - "summary": "Publish or unpublish a video series", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as the publish switch of a series in the dashboard. Only the series changes: its videos keep their own published state. Publishing again refreshes `publishedAt`.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the series does not exist, was deleted or belongs to another workspace.", + "summary": "Update the organization's public identity", + "description": "Minimum role: `ADMIN`, and the user must be OWNER/ADMIN of the umbrella organization of the active workspace (`X-Workspace-Id`). Same action as the identity card in the dashboard's organization settings: public name, profile photo and cover. Partial: absent fields keep their value; `null` clears an image. The name is mirrored to the primary workspace. The slug (public URL) cannot be changed here. Returns the organization.\n\nErrors (`error.code`):\n- 403 `ORG_ADMIN_REQUIRED`: the user is not OWNER/ADMIN of the organization.\n- 409 `NO_ORGANIZATION`: the workspace has no umbrella organization.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -19854,14 +19715,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -19877,7 +19730,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentSeriesPublish" + "$ref": "#/components/schemas/OrganizationUpdate" } } } @@ -19891,7 +19744,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentSeries" + "$ref": "#/components/schemas/Organization" } }, "required": [ @@ -19931,6 +19784,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -19944,14 +19807,14 @@ } } }, - "/content/lives/{id}/reset-key": { - "post": { - "operationId": "postContentLivesIdResetKey", + "/organization/analytics": { + "patch": { + "operationId": "patchOrganizationAnalytics", "tags": [ - "content" + "organization" ], - "summary": "Rotate a live stream's stream key", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Reset key\" in the dashboard: Mux issues a new stream key and returns it with the RTMPS server.\n\nDESTRUCTIVE: the current key stops working immediately; any encoder (OBS) configured with it can no longer connect and must be updated with the new one. Use it when the key may have leaked.\n\nSECURITY: `streamKey` is a secret that grants broadcasting rights on this stream in the organization's name. It is returned only here and by `POST /content/lives`; store it like a password.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the stream does not exist, was deleted or belongs to another workspace.\n- 502 `MUX_ERROR`: Mux rejected the request or is not configured; the old key keeps working.", + "summary": "Set the organization's GA4 property", + "description": "Minimum role: `ADMIN`, and the user must be OWNER/ADMIN of the umbrella organization of the active workspace (`X-Workspace-Id`). Same action as the analytics card in the dashboard's organization settings: the brand's own GA4 Measurement ID, added to the checkout of its events next to FreeTicket's. `null` (or an empty string) disconnects it.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: not a GA4 Measurement ID (G-XXXXXXXXXX).\n- 403 `ORG_ADMIN_REQUIRED`: the user is not OWNER/ADMIN of the organization.\n- 409 `NO_ORGANIZATION`: the workspace has no umbrella organization.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -19960,16 +19823,7 @@ "apiKeyHeader": [] } ], - "x-ft-destructive": true, "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -19980,6 +19834,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAnalyticsUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -19989,7 +19853,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentLiveStreamKey" + "$ref": "#/components/schemas/OrganizationAnalytics" } }, "required": [ @@ -19999,6 +19863,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -20029,8 +19903,8 @@ } } }, - "422": { - "description": "Request body/parameter validation failed.", + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", "content": { "application/json": { "schema": { @@ -20039,8 +19913,8 @@ } } }, - "502": { - "description": "The external provider failed to complete the operation.", + "422": { + "description": "Request body/parameter validation failed.", "content": { "application/json": { "schema": { @@ -20052,14 +19926,14 @@ } } }, - "/content/lives/{id}/chat": { + "/organization/profile": { "get": { - "operationId": "getContentLivesIdChat", + "operationId": "getOrganizationProfile", "tags": [ - "content" + "organization" ], - "summary": "Chat history of a live stream", - "description": "Minimum role: `STAFF`. Active workspace via the `X-Workspace-Id` header. Same history as \"View chat\" in the dashboard, for a stream on air or already ended: oldest to newest, capped (`truncated: true` when the oldest messages were cut). Contains buyers' display names and messages: treat it as personal data.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `NOT_FOUND`: the stream does not exist, was deleted or belongs to another workspace.", + "summary": "Get the workspace profile", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same data as the dashboard's Profile screen: artist/venue/organizer data, brand photo and cover (from the umbrella organization), contact and social links. Billing/plan data is not included.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -20069,14 +19943,6 @@ } ], "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "X-Workspace-Id", "in": "header", @@ -20096,7 +19962,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ContentLiveChat" + "$ref": "#/components/schemas/OrganizationProfile" } }, "required": [ @@ -20147,16 +20013,14 @@ } } } - } - }, - "/website": { - "get": { - "operationId": "getWebsite", + }, + "patch": { + "operationId": "patchOrganizationProfile", "tags": [ - "website" + "organization" ], - "summary": "Get the workspace website configuration", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same data as the dashboard's Website screen: landing texts, social links, accent color, template, section visibility/order, and the public listing state (`published`, `canPublish`, `profileListable`). `customLandingEnabled` says whether the plan allows `PUT /website`.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (workspace configuration is out of its scope).", + "summary": "Update the workspace profile", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same actions as the four cards of the dashboard's Profile screen, as optional sections: `artist` (name, slug, bio, type, country, timezone), `visual` (brand photo/cover, stored on the umbrella organization), `contact` and `social`. Partial: only the fields sent are written; absent fields keep their value and `null` clears an optional one. Sections are applied in order artist → visual → contact → social; if one fails, the earlier ones stay saved. Changing `artist.slug` changes the workspace's URLs. `visual` and `artist.name` write organization-level columns (the brand photo/cover and the brand name mirror), so they additionally require the user to be OWNER/ADMIN of the umbrella organization — checked before ANY section is written (stricter than the dashboard, same rule as `PATCH /organization`). Returns the updated profile.\n\nErrors (`error.code`):\n- 403 `ORG_ADMIN_REQUIRED`: `visual` or `artist.name` sent by a user who is not OWNER/ADMIN of the organization (nothing is written).\n- 409 `SLUG_TAKEN`: `artist.slug` is used by another workspace, including deleted ones (nothing is written).\n- 409 `ORG_NOT_INITIALIZED`: `visual` sent but the workspace has no umbrella organization (nothing is written).\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -20176,6 +20040,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProfileUpdate" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -20185,7 +20059,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Website" + "$ref": "#/components/schemas/OrganizationProfile" } }, "required": [ @@ -20225,6 +20099,16 @@ } } }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -20236,14 +20120,16 @@ } } } - }, - "put": { - "operationId": "putWebsite", + } + }, + "/ticket-templates": { + "get": { + "operationId": "getTicketTemplates", "tags": [ - "website" + "ticket-templates" ], - "summary": "Save the workspace website configuration", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Save\" in the dashboard's Website editor. FULL replacement: every field is required; `null` clears an optional text. Read `GET /website` first and send everything back. Shared columns: `name`, `bio`, `instagramUrl`, `tiktokUrl` and `youtubeUrl` are the same workspace columns that `PATCH /organization/profile` edits (`artist.name`, `artist.bio`, `social.*`) — a PUT with `null` here wipes them there too. An empty `name` is not accepted, and unlike the profile it is NOT mirrored to the brand. The profile photo and cover are NOT edited here (see `PATCH /organization`). Returns the saved configuration.\n\nErrors (`error.code`):\n- 403 `FEATURE_LOCKED`: the workspace plan does not include the custom landing.\n- 400 `INVALID_SECTIONS`: `webSections` is malformed.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "List the ticket templates", + "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Ticket templates screen: reusable ticket-type definitions (price, capacity, member discount/gate, buyer form fields), ordered for display. Deleted templates are omitted.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (templates are workspace configuration).", "security": [ { "apiKey": [] @@ -20263,16 +20149,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebsiteUpdate" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -20282,7 +20158,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Website" + "type": "array", + "items": { + "$ref": "#/components/schemas/TicketTemplate" + } } }, "required": [ @@ -20292,16 +20171,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -20343,16 +20212,14 @@ } } } - } - }, - "/website/published": { - "put": { - "operationId": "putWebsitePublished", + }, + "post": { + "operationId": "postTicketTemplates", "tags": [ - "website" + "ticket-templates" ], - "summary": "Publish or unpublish the public profile", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same switch as \"Appear in Artists\" in the dashboard: sets whether the organization's public page is listed. Available on every plan. Idempotent: send the desired state.\n\nErrors (`error.code`):\n- 409 `NO_ORGANIZATION`: the workspace has no umbrella organization.\n- 409 `NOT_PRIMARY_WORKSPACE`: only the organization's primary workspace can publish.\n- 409 `PROFILE_INCOMPLETE`: publishing needs the brand name and profile photo (unpublishing is always allowed).\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Create a ticket template", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New template\" in the dashboard. A SELECT field needs at least 2 options (422 otherwise).\n\nErrors (`error.code`):\n- 400 `INVALID_CURRENCY`: the currency is not one the checkout charges.\n- 400 `DISCOUNT_PLAN_INVALID`: `discount.planId` is not an active membership plan of this workspace.\n- 400 `MEMBERS_ONLY_PLAN_INVALID`: `membersOnlyPlanId` cannot gate this workspace's tickets.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -20377,13 +20244,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebsitePublished" + "$ref": "#/components/schemas/TicketTemplateCreate" } } } }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -20391,7 +20258,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/WebsitePublished" + "$ref": "#/components/schemas/TicketTemplate" } }, "required": [ @@ -20401,8 +20268,8 @@ } } }, - "401": { - "description": "Missing or invalid credential.", + "400": { + "description": "Bad request: malformed parameters.", "content": { "application/json": { "schema": { @@ -20411,8 +20278,8 @@ } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "401": { + "description": "Missing or invalid credential.", "content": { "application/json": { "schema": { @@ -20421,8 +20288,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "403": { + "description": "Insufficient role or resource not accessible.", "content": { "application/json": { "schema": { @@ -20431,8 +20298,8 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -20454,14 +20321,14 @@ } } }, - "/organization": { + "/ticket-templates/{id}": { "patch": { - "operationId": "patchOrganization", + "operationId": "patchTicketTemplatesId", "tags": [ - "organization" + "ticket-templates" ], - "summary": "Update the organization's public identity", - "description": "Minimum role: `ADMIN`, and the user must be OWNER/ADMIN of the umbrella organization of the active workspace (`X-Workspace-Id`). Same action as the identity card in the dashboard's organization settings: public name, profile photo and cover. Partial: absent fields keep their value; `null` clears an image. The name is mirrored to the primary workspace. The slug (public URL) cannot be changed here. Returns the organization.\n\nErrors (`error.code`):\n- 403 `ORG_ADMIN_REQUIRED`: the user is not OWNER/ADMIN of the organization.\n- 409 `NO_ORGANIZATION`: the workspace has no umbrella organization.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Update a ticket template", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a template in the dashboard. Partial: only the fields sent are written; `null` clears an optional one (`discount: null` removes the member discount, `membersOnlyPlanId: null` opens it to everyone). `fields` replaces the whole buyer-form list when sent and is left intact when absent. Ticket types already created from the template are copies and do not change. A legacy currency outside the checkout list is accepted only if unchanged.\n\nErrors (`error.code`):\n- 400 `INVALID_CURRENCY`: the currency is not one the checkout charges.\n- 400 `DISCOUNT_PLAN_INVALID`: `discount.planId` is not an active membership plan of this workspace.\n- 400 `MEMBERS_ONLY_PLAN_INVALID`: `membersOnlyPlanId` cannot gate this workspace's tickets.\n- 404 `NOT_FOUND`: the template does not exist, is deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -20471,6 +20338,14 @@ } ], "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -20486,7 +20361,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationUpdate" + "$ref": "#/components/schemas/TicketTemplateUpdate" } } } @@ -20500,7 +20375,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Organization" + "$ref": "#/components/schemas/TicketTemplate" } }, "required": [ @@ -20510,6 +20385,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -20540,16 +20425,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -20561,16 +20436,14 @@ } } } - } - }, - "/organization/analytics": { - "patch": { - "operationId": "patchOrganizationAnalytics", + }, + "delete": { + "operationId": "deleteTicketTemplatesId", "tags": [ - "organization" + "ticket-templates" ], - "summary": "Set the organization's GA4 property", - "description": "Minimum role: `ADMIN`, and the user must be OWNER/ADMIN of the umbrella organization of the active workspace (`X-Workspace-Id`). Same action as the analytics card in the dashboard's organization settings: the brand's own GA4 Measurement ID, added to the checkout of its events next to FreeTicket's. `null` (or an empty string) disconnects it.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: not a GA4 Measurement ID (G-XXXXXXXXXX).\n- 403 `ORG_ADMIN_REQUIRED`: the user is not OWNER/ADMIN of the organization.\n- 409 `NO_ORGANIZATION`: the workspace has no umbrella organization.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Delete a ticket template", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a template in the dashboard.\n\nDESTRUCTIVE: the template is removed from the workspace (soft delete, there is no restore via API). Ticket types already created from it keep working.\n\nErrors (`error.code`):\n- 404 `NOT_FOUND`: the template does not exist, is already deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -20579,7 +20452,16 @@ "apiKeyHeader": [] } ], + "x-ft-destructive": true, "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "X-Workspace-Id", "in": "header", @@ -20590,16 +20472,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationAnalyticsUpdate" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -20609,7 +20481,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/OrganizationAnalytics" + "$ref": "#/components/schemas/WorkspaceConfigDeleted" } }, "required": [ @@ -20619,16 +20491,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -20659,16 +20521,6 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "422": { "description": "Request body/parameter validation failed.", "content": { @@ -20682,14 +20534,14 @@ } } }, - "/organization/profile": { - "get": { - "operationId": "getOrganizationProfile", + "/ticket-templates/{id}/instantiate": { + "post": { + "operationId": "postTicketTemplatesIdInstantiate", "tags": [ - "organization" + "ticket-templates" ], - "summary": "Get the workspace profile", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same data as the dashboard's Profile screen: artist/venue/organizer data, brand photo and cover (from the umbrella organization), contact and social links. Billing/plan data is not included.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Create a ticket type from a template", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Use template\" in the dashboard: creates a ticket type on `eventDateId` copying the template (price, capacity, discount, members-only gate, buyer form). `name`, `price` and `capacity` override the template's. A discount or gate whose plan is no longer valid is dropped instead of failing. Keys restricted to events may use it only on dates of their events.\n\nErrors (`error.code`):\n- 404 `NOT_FOUND`: the template does not exist, is deleted or belongs to another workspace.\n- 404 `EVENT_DATE_NOT_FOUND`: the event date does not exist or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to events and the date's event is not one of them.\n- 400 `CAPACITY_REQUIRED`: the template has no capacity and `capacity` was not sent.\n- 400 `INVALID_CURRENCY`: the template's legacy currency is not one the checkout charges.", "security": [ { "apiKey": [] @@ -20700,92 +20552,13 @@ ], "parameters": [ { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/OrganizationProfile" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "patch": { - "operationId": "patchOrganizationProfile", - "tags": [ - "organization" - ], - "summary": "Update the workspace profile", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same actions as the four cards of the dashboard's Profile screen, as optional sections: `artist` (name, slug, bio, type, country, timezone), `visual` (brand photo/cover, stored on the umbrella organization), `contact` and `social`. Partial: only the fields sent are written; absent fields keep their value and `null` clears an optional one. Sections are applied in order artist → visual → contact → social; if one fails, the earlier ones stay saved. Changing `artist.slug` changes the workspace's URLs. `visual` and `artist.name` write organization-level columns (the brand photo/cover and the brand name mirror), so they additionally require the user to be OWNER/ADMIN of the umbrella organization — checked before ANY section is written (stricter than the dashboard, same rule as `PATCH /organization`). Returns the updated profile.\n\nErrors (`error.code`):\n- 403 `ORG_ADMIN_REQUIRED`: `visual` or `artist.name` sent by a user who is not OWNER/ADMIN of the organization (nothing is written).\n- 409 `SLUG_TAKEN`: `artist.slug` is used by another workspace, including deleted ones (nothing is written).\n- 409 `ORG_NOT_INITIALIZED`: `visual` sent but the workspace has no umbrella organization (nothing is written).\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "parameters": [ { "name": "X-Workspace-Id", "in": "header", @@ -20801,13 +20574,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationProfileUpdate" + "$ref": "#/components/schemas/TicketTemplateInstantiate" } } } }, "responses": { - "200": { + "201": { "description": "OK", "content": { "application/json": { @@ -20815,7 +20588,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/OrganizationProfile" + "$ref": "#/components/schemas/TicketTemplateInstance" } }, "required": [ @@ -20825,8 +20598,8 @@ } } }, - "401": { - "description": "Missing or invalid credential.", + "400": { + "description": "Bad request: malformed parameters.", "content": { "application/json": { "schema": { @@ -20835,8 +20608,8 @@ } } }, - "403": { - "description": "Insufficient role or resource not accessible.", + "401": { + "description": "Missing or invalid credential.", "content": { "application/json": { "schema": { @@ -20845,8 +20618,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "403": { + "description": "Insufficient role or resource not accessible.", "content": { "application/json": { "schema": { @@ -20855,8 +20628,8 @@ } } }, - "409": { - "description": "Conflict: the resource does not allow this operation in its current state.", + "404": { + "description": "Resource does not exist or is out of scope.", "content": { "application/json": { "schema": { @@ -20878,14 +20651,14 @@ } } }, - "/ticket-templates": { + "/master-qrs": { "get": { - "operationId": "getTicketTemplates", + "operationId": "getMasterQrs", "tags": [ - "ticket-templates" + "master-qrs" ], - "summary": "List the ticket templates", - "description": "Minimum role: `VIEWER`. Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Ticket templates screen: reusable ticket-type definitions (price, capacity, member discount/gate, buyer form fields), ordered for display. Deleted templates are omitted.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (templates are workspace configuration).", + "summary": "List the master box-office QR codes", + "description": "Minimum role: `ADMIN` (also for reading, like the dashboard). Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Box-office QR screen: live (not deleted) QR codes, newest first, with scan counters. `code` and `url` are SECRET: they are what the printed QR encodes and open the public sale flow; they cannot be rotated. Do not log or share them.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (org-wide QR codes span every show).", "security": [ { "apiKey": [] @@ -20916,7 +20689,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/TicketTemplate" + "$ref": "#/components/schemas/MasterQr" } } }, @@ -20970,12 +20743,12 @@ } }, "post": { - "operationId": "postTicketTemplates", + "operationId": "postMasterQrs", "tags": [ - "ticket-templates" + "master-qrs" ], - "summary": "Create a ticket template", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New template\" in the dashboard. A SELECT field needs at least 2 options (422 otherwise).\n\nErrors (`error.code`):\n- 400 `INVALID_CURRENCY`: the currency is not one the checkout charges.\n- 400 `DISCOUNT_PLAN_INVALID`: `discount.planId` is not an active membership plan of this workspace.\n- 400 `MEMBERS_ONLY_PLAN_INVALID`: `membersOnlyPlanId` cannot gate this workspace's tickets.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Create a master box-office QR code", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New QR\" in the dashboard. `eventId` absent/null = org-wide QR (all shows); `ticketTypeId` pins a ticket type of that event (not allowed on an org-wide QR → 422). Returns the QR with its code. `code` and `url` are SECRET: they are what the printed QR encodes and open the public sale flow; they cannot be rotated. Do not log or share them.\n\nErrors (`error.code`):\n- 400 `INVALID_TARGET`: the event is not of this workspace, or the ticket type is not a visible ticket type of a sellable date of that event.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -21000,7 +20773,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TicketTemplateCreate" + "$ref": "#/components/schemas/MasterQrCreate" } } } @@ -21014,7 +20787,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/TicketTemplate" + "$ref": "#/components/schemas/MasterQr" } }, "required": [ @@ -21077,14 +20850,14 @@ } } }, - "/ticket-templates/{id}": { + "/master-qrs/{id}": { "patch": { - "operationId": "patchTicketTemplatesId", + "operationId": "patchMasterQrsId", "tags": [ - "ticket-templates" + "master-qrs" ], - "summary": "Update a ticket template", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a template in the dashboard. Partial: only the fields sent are written; `null` clears an optional one (`discount: null` removes the member discount, `membersOnlyPlanId: null` opens it to everyone). `fields` replaces the whole buyer-form list when sent and is left intact when absent. Ticket types already created from the template are copies and do not change. A legacy currency outside the checkout list is accepted only if unchanged.\n\nErrors (`error.code`):\n- 400 `INVALID_CURRENCY`: the currency is not one the checkout charges.\n- 400 `DISCOUNT_PLAN_INVALID`: `discount.planId` is not an active membership plan of this workspace.\n- 400 `MEMBERS_ONLY_PLAN_INVALID`: `membersOnlyPlanId` cannot gate this workspace's tickets.\n- 404 `NOT_FOUND`: the template does not exist, is deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Update a master box-office QR code", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a QR in the dashboard. Partial: `label` and `mode` can be sent alone; the target (`eventId` + `ticketTypeId`, `null` for none / org-wide) must be sent as a pair (422 otherwise). The code does not change, so the printed QR keeps working and now points to the new target.\n\nErrors (`error.code`):\n- 400 `INVALID_TARGET`: the event is not of this workspace, or the ticket type does not belong to it.\n- 404 `NOT_FOUND`: the QR does not exist, is deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -21117,7 +20890,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TicketTemplateUpdate" + "$ref": "#/components/schemas/MasterQrUpdate" } } } @@ -21131,7 +20904,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/TicketTemplate" + "$ref": "#/components/schemas/MasterQr" } }, "required": [ @@ -21194,12 +20967,12 @@ } }, "delete": { - "operationId": "deleteTicketTemplatesId", + "operationId": "deleteMasterQrsId", "tags": [ - "ticket-templates" + "master-qrs" ], - "summary": "Delete a ticket template", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a template in the dashboard.\n\nDESTRUCTIVE: the template is removed from the workspace (soft delete, there is no restore via API). Ticket types already created from it keep working.\n\nErrors (`error.code`):\n- 404 `NOT_FOUND`: the template does not exist, is already deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", + "summary": "Delete a master box-office QR code", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a QR in the dashboard.\n\nDESTRUCTIVE: the QR is deactivated and deleted (soft delete, the scan history is kept); the printed code stops working and cannot be restored via API. To pause it instead, use `PUT /master-qrs/{id}/active`.\n\nErrors (`error.code`):\n- 404 `NOT_FOUND`: the QR does not exist, is already deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -21290,14 +21063,14 @@ } } }, - "/ticket-templates/{id}/instantiate": { - "post": { - "operationId": "postTicketTemplatesIdInstantiate", + "/master-qrs/{id}/active": { + "put": { + "operationId": "putMasterQrsIdActive", "tags": [ - "ticket-templates" + "master-qrs" ], - "summary": "Create a ticket type from a template", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"Use template\" in the dashboard: creates a ticket type on `eventDateId` copying the template (price, capacity, discount, members-only gate, buyer form). `name`, `price` and `capacity` override the template's. A discount or gate whose plan is no longer valid is dropped instead of failing. Keys restricted to events may use it only on dates of their events.\n\nErrors (`error.code`):\n- 404 `NOT_FOUND`: the template does not exist, is deleted or belongs to another workspace.\n- 404 `EVENT_DATE_NOT_FOUND`: the event date does not exist or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to events and the date's event is not one of them.\n- 400 `CAPACITY_REQUIRED`: the template has no capacity and `capacity` was not sent.\n- 400 `INVALID_CURRENCY`: the template's legacy currency is not one the checkout charges.", + "summary": "Activate or deactivate a master box-office QR code", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same switch as in the dashboard's QR table. While inactive, scanning the QR answers 404. Idempotent: send the desired state.\n\nErrors (`error.code`):\n- 404 `NOT_FOUND`: the QR does not exist, is deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", "security": [ { "apiKey": [] @@ -21330,13 +21103,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TicketTemplateInstantiate" + "$ref": "#/components/schemas/MasterQrActive" } } } }, "responses": { - "201": { + "200": { "description": "OK", "content": { "application/json": { @@ -21344,7 +21117,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/TicketTemplateInstance" + "$ref": "#/components/schemas/MasterQrActive" } }, "required": [ @@ -21354,16 +21127,6 @@ } } }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "401": { "description": "Missing or invalid credential.", "content": { @@ -21407,14 +21170,14 @@ } } }, - "/master-qrs": { - "get": { - "operationId": "getMasterQrs", + "/merch/discount-codes/preview": { + "post": { + "operationId": "postMerchDiscountCodesPreview", "tags": [ - "master-qrs" + "merch" ], - "summary": "List the master box-office QR codes", - "description": "Minimum role: `ADMIN` (also for reading, like the dashboard). Active workspace via the `X-Workspace-Id` header. Same list as the dashboard's Box-office QR screen: live (not deleted) QR codes, newest first, with scan counters. `code` and `url` are SECRET: they are what the printed QR encodes and open the public sale flow; they cannot be rotated. Do not log or share them.\n\nErrors (`error.code`):\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events (org-wide QR codes span every show).", + "summary": "Preview what a merch discount code takes off", + "description": "Requires an enterprise service API key AND a valid `X-Customer-Session`. Creates no order, consumes no use of the code and reserves no stock, so the answer is not a guarantee. It is not read-only: like the catalog and order creation, it first releases this store's expired reservations, cancelling those orders and returning their stock and code uses. It validates the code and computes the amounts for THIS store only (a code of another store does not exist here): 422 `DISCOUNT_INVALID`, 409 `DISCOUNT_EXHAUSTED`, 409 `DISCOUNT_CUSTOMER_LIMIT`, 422 `DISCOUNT_TOTAL_ZERO`, and 409 `VARIANT_UNAVAILABLE` for variants that are not on sale here. It does NOT check product rules (`membersOnly`, `maxPerCustomer`, `maxPerOrder`) or stock: `POST /merch/orders` validates those, and the code again, when the order is created. A live PENDING order of the customer that a new order would replace does not count against the code. The response has no field for the code's type, value or uses, although a client can derive the discount from the amounts. Rate limited: 30 previews/min per customer and 10 failed codes per 10 minutes per customer and per `X-Buyer-Ip`, shared with `POST /merch/orders` (429 `RATE_LIMITED`).", "security": [ { "apiKey": [] @@ -21432,210 +21195,21 @@ "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MasterQr" - } - } - }, - "required": [ - "data" - ] - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "post": { - "operationId": "postMasterQrs", - "tags": [ - "master-qrs" - ], - "summary": "Create a master box-office QR code", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as \"New QR\" in the dashboard. `eventId` absent/null = org-wide QR (all shows); `ticketTypeId` pins a ticket type of that event (not allowed on an org-wide QR → 422). Returns the QR with its code. `code` and `url` are SECRET: they are what the printed QR encodes and open the public sale flow; they cannot be rotated. Do not log or share them.\n\nErrors (`error.code`):\n- 400 `INVALID_TARGET`: the event is not of this workspace, or the ticket type is not a visible ticket type of a sellable date of that event.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", - "security": [ - { - "apiKey": [] }, { - "apiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "X-Workspace-Id", + "name": "X-Buyer-Ip", "in": "header", "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MasterQrCreate" - } - } - } - }, - "responses": { - "201": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/MasterQr" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "400": { - "description": "Bad request: malformed parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/master-qrs/{id}": { - "patch": { - "operationId": "patchMasterQrsId", - "tags": [ - "master-qrs" - ], - "summary": "Update a master box-office QR code", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as editing a QR in the dashboard. Partial: `label` and `mode` can be sent alone; the target (`eventId` + `ticketTypeId`, `null` for none / org-wide) must be sent as a pair (422 otherwise). The code does not change, so the printed QR keeps working and now points to the new target.\n\nErrors (`error.code`):\n- 400 `INVALID_TARGET`: the event is not of this workspace, or the ticket type does not belong to it.\n- 404 `NOT_FOUND`: the QR does not exist, is deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, + "description": "Optional IPv4/IPv6 of the end buyer, forwarded by the landing server-to-server. Invalid values are ignored.", "schema": { "type": "string" } }, { - "name": "X-Workspace-Id", + "name": "X-Customer-Session", "in": "header", "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "description": "REQUIRED buyer session token (401 without it).", "schema": { "type": "string" } @@ -21646,7 +21220,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MasterQrUpdate" + "$ref": "#/components/schemas/MerchDiscountPreview" } } } @@ -21660,7 +21234,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MasterQr" + "$ref": "#/components/schemas/MerchDiscountPreviewResult" } }, "required": [ @@ -21681,103 +21255,7 @@ } }, "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "delete": { - "operationId": "deleteMasterQrsId", - "tags": [ - "master-qrs" - ], - "summary": "Delete a master box-office QR code", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same action as deleting a QR in the dashboard.\n\nDESTRUCTIVE: the QR is deactivated and deleted (soft delete, the scan history is kept); the printed code stops working and cannot be restored via API. To pause it instead, use `PUT /master-qrs/{id}/active`.\n\nErrors (`error.code`):\n- 404 `NOT_FOUND`: the QR does not exist, is already deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "x-ft-destructive": true, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/WorkspaceConfigDeleted" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", + "description": "Operation error.", "content": { "application/json": { "schema": { @@ -21787,7 +21265,7 @@ } }, "403": { - "description": "Insufficient role or resource not accessible.", + "description": "Operation error.", "content": { "application/json": { "schema": { @@ -21797,104 +21275,7 @@ } }, "404": { - "description": "Resource does not exist or is out of scope.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/master-qrs/{id}/active": { - "put": { - "operationId": "putMasterQrsIdActive", - "tags": [ - "master-qrs" - ], - "summary": "Activate or deactivate a master box-office QR code", - "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header. Same switch as in the dashboard's QR table. While inactive, scanning the QR answers 404. Idempotent: send the desired state.\n\nErrors (`error.code`):\n- 404 `NOT_FOUND`: the QR does not exist, is deleted or belongs to another workspace.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MasterQrActive" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/MasterQrActive" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Insufficient role or resource not accessible.", + "description": "Operation error.", "content": { "application/json": { "schema": { @@ -21903,8 +21284,8 @@ } } }, - "404": { - "description": "Resource does not exist or is out of scope.", + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", "content": { "application/json": { "schema": { @@ -21914,75 +21295,6 @@ } }, "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/merch/catalog": { - "get": { - "operationId": "getMerchCatalog", - "tags": [ - "merch" - ], - "summary": "Merch store catalog of the key's brand", - "description": "Requires an enterprise service API key (Legend headless landing, called server-side); the store is ALWAYS the one of the key's organization. Returns the store settings (brand, support, shipping fees by zone — Bogotá is DANE 11001 —, free-shipping threshold, delivery modes), the PUBLISHED products with their active variants and `stock` (units available right now, already net of open 15-minute reservations), the active pickup points (only when pickup is enabled) and the MercadoPago public key for the Payment Brick. Prices are COP integers, VAT included; the buyer pays no service fee. 403 `MERCH_STORE_LOCKED` when the brand's Legend plan is not active; 404 `STORE_NOT_READY` when the brand has no store or its onboarding is incomplete.", - "security": [ - { - "apiKey": [] - }, - { - "apiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "X-Workspace-Id", - "in": "header", - "required": false, - "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/MerchCatalog" - } - }, - "required": [ - "data" - ] - } - } - } - }, - "401": { - "description": "Missing or invalid credential.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { "description": "Operation error.", "content": { "application/json": { @@ -21992,23 +21304,24 @@ } } }, - "404": { - "description": "Operation error.", + "429": { + "description": "Too many requests: rate limit exceeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } - } - }, - "422": { - "description": "Request body/parameter validation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + }, + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" } } } @@ -22022,7 +21335,7 @@ "merch" ], "summary": "Create a merch order and reserve its stock", - "description": "Requires an enterprise service API key AND a valid `X-Customer-Session` (401 without it); the buyer email is the session's (it is NOT sent in the body) and the order is always linked to that customer. The order belongs to the key's organization store (variant ids from another store respond 409 `VARIANT_UNAVAILABLE`). Creates a PENDING order and reserves the stock for 15 minutes, all-or-nothing: if any variant lacks units nothing is reserved (409 `OUT_OF_STOCK` with `details: [{ variantId, requested, available }]`). Prices, shipping and totals are computed server-side from the catalog (`total = subtotal + shippingFee`; shipping is 0 for pickup or above the free-shipping threshold). `max_per_order` is per product, adding all its variants (422 `MAX_PER_ORDER`); a delivery mode that is disabled, or an inactive pickup point, responds 422 `DELIVERY_UNAVAILABLE`. DANE codes are validated by shape (department 2 digits, city 5 digits starting with the department). Accepts `Idempotency-Key` (unique per store): retrying with the same key returns the order created on the first attempt (201 with `Idempotent-Replay: true`) without reserving stock again; the replay is only returned to the same customer as the original order (otherwise 422 `IDEMPOTENCY_KEY_REUSED`). A customer with a live PENDING order in the store who places another one REPLACES it (the previous order is cancelled and its stock returned in the same transaction), unless that order already has a payment attempt in flight (409 `ACTIVE_ORDER_EXISTS`). A live PENDING order of ANOTHER customer with the same phone (normalized to E.164, any country code) also responds 409 `ACTIVE_ORDER_EXISTS` (the existing order is never revealed). Optional `X-Buyer-Ip` (the buyer's IPv4/IPv6, sent by the landing server-to-server; invalid values are ignored): at most 10 orders per 10 minutes per store and IP (429 `RATE_LIMITED`). Rate limited: 5 orders/min per customer (429 `RATE_LIMITED` with `Retry-After`). 403 `MERCH_STORE_LOCKED` without an active Legend plan; 404 `STORE_NOT_READY` without a ready store. The buyer document is never returned.", + "description": "Requires an enterprise service API key AND a valid `X-Customer-Session` (401 without it); the buyer email is the session's (it is NOT sent in the body) and the order is always linked to that customer. The order belongs to the key's organization store (variant ids from another store respond 409 `VARIANT_UNAVAILABLE`). Creates a PENDING order and reserves the stock for 15 minutes, all-or-nothing: if any variant lacks units nothing is reserved (409 `OUT_OF_STOCK` with `details: [{ variantId, requested, available }]`). Prices, shipping and totals are computed server-side from the catalog (`total = subtotal - discountAmount + shippingFee`; shipping is 0 for pickup or above the free-shipping threshold). `maxPerOrder` is per product, adding all its variants (422 `MAX_PER_ORDER`). A product may also cap the units per person across ALL their orders that are not cancelled or refunded, matching by email or customer, and by buyer document or phone only on orders that are no longer PENDING; a cancelled order whose charge can still appear also counts (422 `MAX_PER_CUSTOMER` with `details: { productIds }`). On those products a customer can use at most 2 distinct documents in the store (422 `TOO_MANY_DOCUMENTS`). The document must be digits for CC, TI and NIT; separators and leading zeros are ignored when comparing; a delivery mode that is disabled, or an inactive pickup point, responds 422 `DELIVERY_UNAVAILABLE`. DANE codes are validated by shape (department 2 digits, city 5 digits starting with the department). Accepts `Idempotency-Key` (unique per store): retrying with the same key returns the order created on the first attempt (201 with `Idempotent-Replay: true`) without reserving stock again; the replay is only returned to the same customer as the original order (otherwise 422 `IDEMPOTENCY_KEY_REUSED`). A customer with a live PENDING order in the store who places another one REPLACES it (the previous order is cancelled and its stock returned in the same transaction), unless that order already has a payment attempt in flight (409 `ACTIVE_ORDER_EXISTS`). A live PENDING order of ANOTHER customer with the same phone (normalized to E.164, any country code) also responds 409 `ACTIVE_ORDER_EXISTS` (the existing order is never revealed). Optional `X-Buyer-Ip` (the buyer's IPv4/IPv6, sent by the landing server-to-server; invalid values are ignored): at most 10 orders per 10 minutes per store and IP (429 `RATE_LIMITED`). Rate limited: 5 orders/min per customer (429 `RATE_LIMITED` with `Retry-After`). Optional `discountCode`, validated server-side against THIS store only (a code of another store, or of the ticketing checkout, does not exist here): it applies to the products, never to shipping, and the free-shipping threshold is evaluated BEFORE the discount. Unknown, inactive or out-of-dates code: 422 `DISCOUNT_INVALID`; no uses left: 409 `DISCOUNT_EXHAUSTED`; this customer already used it as many times as the code allows: 409 `DISCOUNT_CUSTOMER_LIMIT`; a code that would leave the total at 0: 422 `DISCOUNT_TOTAL_ZERO`. Nothing is reserved on any of those. A rejection for the code leaves the previous PENDING order of the customer alive. The use returns to the code if the order expires unpaid or the customer replaces it with another order; it does NOT return on a refund. 10 failed codes per 10 minutes per customer and per `X-Buyer-Ip` respond 429 `RATE_LIMITED`. `POST /merch/discount-codes/preview` shows the result without creating the order. A product marked `membersOnly` in the catalog can only be ordered by a buyer with an active membership in the store's organization (403 `MEMBERS_ONLY` with `details: { productIds }`); a guest has no session and gets the 401 above. 403 `MERCH_STORE_LOCKED` without an active Legend plan; 404 `STORE_NOT_READY` without a ready store (no onboarding or no connected MercadoPago account). `mpPublicKey` is the public key of the brand's own MercadoPago account. The buyer document is never returned.", "security": [ { "apiKey": [] @@ -22189,7 +21502,7 @@ "merch" ], "summary": "List the merch store's products (all statuses)", - "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` in the active workspace (`X-Workspace-Id`). The store is ALWAYS the one of the workspace's organization. Returns every non-deleted product, DRAFT and PUBLISHED, with its non-deleted variants (active or not), in display order. Prices are COP integers, VAT included; `stock` is the units available right now.\n\nErrors (`error.code`):\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", + "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` in the active workspace (`X-Workspace-Id`). The store is ALWAYS the one of the workspace's organization. Returns every non-deleted product, DRAFT and PUBLISHED, with its non-deleted variants (active or not), in display order. Prices are COP integers, VAT included; `stock` is the units available right now.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: the body is not valid JSON (endpoints with a body).\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", "security": [ { "apiKey": [] @@ -22279,7 +21592,7 @@ "merch" ], "summary": "Create a merch product with its options and variants", - "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` (write key). Same action as the dashboard's product creator: the product, its options and the FULL variant matrix are created in one transaction (all or nothing). The product is ALWAYS created as `DRAFT`; publish it with `PATCH /merch/products/{id}/status`. The variant labels are built by the server from the options. Photos: upload them first with `POST /merch/products/images/upload-url` and pass the `publicUrl`s in `imageUrls`, or set them afterwards with `PUT /merch/products/{id}/images`. Returns the created product.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: a dashboard rule failed (variants that do not match the options, repeated SKU, `compareAtPrice` not greater than `price`, invalid slug or SKU characters…); `message` says which.\n- 409 `SLUG_TAKEN`: the slug already exists in the store.\n- 409 `SKU_TAKEN`: a SKU is already used by another product of the store.\n- 422 `INVALID_IMAGE_URL`: an image URL is not a photo uploaded for this organization.\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", + "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` (write key). Same action as the dashboard's product creator: the product, its options and the FULL variant matrix are created in one transaction (all or nothing). The product is ALWAYS created as `DRAFT`; publish it with `PATCH /merch/products/{id}/status`. The variant labels are built by the server from the options. Photos: upload them first with `POST /merch/products/images/upload-url` and pass the `publicUrl`s in `imageUrls`, or set them afterwards with `PUT /merch/products/{id}/images`. Returns the created product.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: a dashboard rule failed (variants that do not match the options, repeated SKU, `compareAtPrice` not greater than `price`, invalid slug or SKU characters…); `message` says which.\n- 409 `SLUG_TAKEN`: the slug already exists in the store.\n- 409 `SKU_TAKEN`: a SKU is already used by another product of the store.\n- 422 `INVALID_IMAGE_URL`: an image URL is not a photo uploaded for this organization.\n- 400 `BAD_REQUEST`: the body is not valid JSON (endpoints with a body).\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", "security": [ { "apiKey": [] @@ -22398,7 +21711,7 @@ "merch" ], "summary": "Publish or unpublish a merch product", - "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` (write key). Same rules as the dashboard: idempotent (setting the current status is a no-op 200); publishing requires the store onboarding to be complete and at least one active variant. A PUBLISHED product shows up in `GET /merch/catalog`; `DRAFT` hides it (existing orders are kept).\n\nErrors (`error.code`):\n- 404 `PRODUCT_NOT_FOUND`: no such product in this store.\n- 409 `STORE_NOT_ONBOARDED`: finish the store setup in the dashboard before publishing.\n- 409 `NO_ACTIVE_VARIANT`: the product has no active variant.\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", + "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` (write key). Same rules as the dashboard: idempotent (setting the current status is a no-op 200); publishing requires the store onboarding to be complete, a connected MercadoPago account and at least one active variant. A PUBLISHED product shows up in `GET /merch/catalog`; `DRAFT` hides it (existing orders are kept).\n\nErrors (`error.code`):\n- 404 `PRODUCT_NOT_FOUND`: no such product in this store.\n- 409 `STORE_NOT_ONBOARDED`: finish the store setup in the dashboard before publishing.\n- 409 `STORE_PAYMENTS_NOT_CONNECTED`: connect the MercadoPago account in the dashboard (Tienda → Cobros) before publishing.\n- 409 `NO_ACTIVE_VARIANT`: the product has no active variant.\n- 400 `BAD_REQUEST`: the body is not valid JSON (endpoints with a body).\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", "security": [ { "apiKey": [] @@ -22447,6 +21760,16 @@ } } }, + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "401": { "description": "Missing or invalid credential.", "content": { @@ -22507,7 +21830,7 @@ "merch" ], "summary": "Set the ordered photos of a merch product", - "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` (write key). Replaces the product's photos with `imageUrls` (in order; the first is the cover; max 10, no repeats). Each URL must be a `publicUrl` returned by `POST /merch/products/images/upload-url` for this organization, or one the product already has: the server never downloads an external URL. Photos removed from the list are deleted from storage. `[]` clears them.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: more than 10 photos, repeated or malformed URLs.\n- 404 `PRODUCT_NOT_FOUND`: no such product in this store.\n- 422 `INVALID_IMAGE_URL`: a URL is not a photo uploaded for this organization.\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", + "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` (write key). Replaces the product's photos with `imageUrls` (in order; the first is the cover; max 10, no repeats). Each URL must be a `publicUrl` returned by `POST /merch/products/images/upload-url` for this organization, or one the product already has: the server never downloads an external URL. Photos removed from the list are deleted from storage. `[]` clears them.\n\nErrors (`error.code`):\n- 400 `BAD_REQUEST`: more than 10 photos, repeated or malformed URLs.\n- 404 `PRODUCT_NOT_FOUND`: no such product in this store.\n- 422 `INVALID_IMAGE_URL`: a URL is not a photo uploaded for this organization.\n- 400 `BAD_REQUEST`: the body is not valid JSON (endpoints with a body).\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", "security": [ { "apiKey": [] @@ -22616,7 +21939,7 @@ "merch" ], "summary": "Get a signed upload URL for a merch product photo", - "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` (write key). Returns a single-use signed `uploadUrl` in the organization's merch folder and the photo's final `publicUrl`. Flow: call this, `PUT` the file bytes to `uploadUrl` with header `Content-Type: ` (no Authorization header), then pass `publicUrl` in `imageUrls` of `POST /merch/products` or `PUT /merch/products/{id}/images`. JPG, PNG or WebP, up to 6 MB. Rate limited to 30 URLs per 5 minutes per user (shared with the dashboard).\n\nErrors (`error.code`):\n- 429 `RATE_LIMITED`: too many uploads; retry after `Retry-After`.\n- 502 `UPLOAD_URL_FAILED`: storage did not sign the URL; retry.\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", + "description": "Roles: `ADMIN`, `SUPER_ADMIN` or `MERCH_MANAGER` (write key). Returns a single-use signed `uploadUrl` in the organization's merch folder and the photo's final `publicUrl`. Flow: call this, `PUT` the file bytes to `uploadUrl` with header `Content-Type: ` (no Authorization header), then pass `publicUrl` in `imageUrls` of `POST /merch/products` or `PUT /merch/products/{id}/images`. JPG, PNG or WebP, up to 6 MB. Rate limited to 30 URLs per 5 minutes per user (shared with the dashboard).\n\nErrors (`error.code`):\n- 429 `RATE_LIMITED`: too many uploads; retry after `Retry-After`.\n- 502 `UPLOAD_URL_FAILED`: storage did not sign the URL; retry.\n- 400 `BAD_REQUEST`: the body is not valid JSON (endpoints with a body).\n- 403 `FORBIDDEN`: the key's role cannot manage the store catalog (allowed: `ADMIN`, `SUPER_ADMIN`, `MERCH_MANAGER`).\n- 403 `MERCH_STORE_LOCKED`: the brand's settlement workspace has no active Legend plan.\n- 403 `EVENT_SCOPE_FORBIDDEN`: the key is restricted to specific events.\n- 404 `STORE_NOT_FOUND`: the workspace's organization has no merch store yet (it is created from the dashboard).", "security": [ { "apiKey": [] @@ -22665,9 +21988,19 @@ } } }, - "401": { - "description": "Missing or invalid credential.", - "content": { + "400": { + "description": "Bad request: malformed parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" @@ -22885,7 +22218,7 @@ "merch" ], "summary": "Charge a merch order with the Payment Brick token", - "description": "Requires an enterprise service API key AND a valid `X-Customer-Session` (401 without it). Only orders of the key's organization store that belong to the session's customer are reachable (an unknown code, a code from another brand and a code of another customer all respond the same 404 `ORDER_NOT_FOUND`). Receives the token the Payment Brick produced on the landing's domain and charges through the MercadoPago Orders API using the order total from the database (never one sent by the client); the reservation is extended (capped at 45 minutes after creation) before the charge. Card only. `status` is `approved`, `pending` (normal: bank authentication or processing, also for an unrecognized MercadoPago status; confirmed later by webhook — poll `/merch/orders/lookup`) or `rejected` (business decline, reason in `message`; the order stays pending until its reservation expires, so the buyer can retry with another card) — all three return 200. Responds 409 `RESERVATION_EXPIRED` when the reservation lapsed (start a new order), 409 `ORDER_NOT_PAYABLE` when the order is no longer pending, 409 `PAYMENT_IN_PROGRESS` when another charge of the order is still in flight (pending bank authentication or processing, or a concurrent request with a different token): poll `/merch/orders/lookup` instead of charging another card — a definitively rejected charge never blocks a new attempt, and retrying with the SAME token is allowed (idempotent at MercadoPago), 409 `PAYMENT_REFUNDED` when the card was approved after the reservation expired and the stock ran out (the amount is refunded automatically), 502 `PAYMENT_GATEWAY_ERROR` when MercadoPago did not answer or failed (timeout, network, 5xx): the payment may still confirm via webhook, so until it is resolved another card gets 409 `PAYMENT_IN_PROGRESS` — the block lifts when MercadoPago reports the charge rejected, or about 90 seconds later if MercadoPago has no record of it. 403 `MERCH_STORE_LOCKED` when the brand's Legend plan is not active; 404 `STORE_NOT_READY` when the brand has no store. Limited to 10 attempts per minute per API key, customer and order code (429 with `Retry-After`).", + "description": "Requires an enterprise service API key AND a valid `X-Customer-Session` (401 without it). Only orders of the key's organization store that belong to the session's customer are reachable (an unknown code, a code from another brand and a code of another customer all respond the same 404 `ORDER_NOT_FOUND`). Receives the token the Payment Brick produced on the landing's domain and charges it through the MercadoPago Payments API with the brand's own MercadoPago account (FreeTicket's fee is retained per order), using the order total from the database (never one sent by the client); the optional `issuerId` the Brick returns is forwarded as is; the reservation is extended (capped at 45 minutes after creation) before the charge. Card only. `status` is `approved`, `pending` (normal: bank authentication or processing, also for an unrecognized MercadoPago status; confirmed later by webhook — poll `/merch/orders/lookup`) or `rejected` (business decline, reason in `message`; the order stays pending until its reservation expires, so the buyer can retry with another card) — all three return 200. Responds 409 `RESERVATION_EXPIRED` when the reservation lapsed (start a new order), 409 `ORDER_NOT_PAYABLE` when the order is no longer pending, 409 `PAYMENT_IN_PROGRESS` when another charge of the order is still in flight (pending bank authentication or processing, or a concurrent request with a different token): poll `/merch/orders/lookup` instead of charging another card — a definitively rejected charge never blocks a new attempt, and retrying with the SAME token is allowed (idempotent at MercadoPago), 409 `MERCH_PAYMENTS_UNAVAILABLE` when the brand's MercadoPago account cannot charge right now (its authorization was revoked or expired): nothing was charged and this is NOT a declined card — do not show a rejection, tell the buyer the store cannot take payments for the moment, 409 `PAYMENT_REFUNDED` when the card was approved after the reservation expired and the stock ran out (the amount is refunded automatically), 409 `PAYMENT_REFUND_PENDING` when that happened but the automatic refund was REJECTED (the brand's MercadoPago account could not return it): the buyer was charged and has NOT been refunded yet, so tell them to contact the brand's support with the order code (the message includes the brand's support contact) instead of saying it was refunded, 502 `PAYMENT_GATEWAY_ERROR` when MercadoPago did not answer or failed (timeout, network, 5xx): the payment may still confirm via webhook, so until it is resolved another card gets 409 `PAYMENT_IN_PROGRESS` — the block lifts when MercadoPago reports the charge rejected, or about 90 seconds later if MercadoPago has no record of it. 403 `MERCH_STORE_LOCKED` when the brand's Legend plan is not active; 404 `STORE_NOT_READY` when the brand has no store or no connected MercadoPago account. Limited to 10 attempts per minute per API key, customer and order code (429 with `Retry-After`).", "security": [ { "apiKey": [] @@ -23044,1369 +22377,1941 @@ } } } - } - }, - "components": { - "schemas": { - "Error": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "retryable": { - "type": "boolean" - }, - "details": {} - }, - "required": [ - "code", - "message", - "retryable" - ], - "additionalProperties": false + }, + "/sales/{id}/refund": { + "post": { + "operationId": "postSalesIdRefund", + "tags": [ + "sales" + ], + "summary": "Refund a sale (moving the funds depends on the payment gateway)", + "description": "Marks the sale as REFUNDED and releases the associated numbered seats. IMPORTANT: whether the money goes back to the buyer depends on the payment gateway and the payment method used. Sales charged through MercadoPago are fully refunded against the MercadoPago API (stable idempotency key per sale, so retries never refund twice) and marked only once MercadoPago confirms. A 503 GATEWAY_REFUND_PENDING means MercadoPago did not answer clearly: the sale stays CONFIRMED and repeating the same call is safe. Sales charged through Wompi by CARD are voided against the payment gateway before being marked. In every other case this endpoint does NOT trigger the actual refund: the money is NOT returned automatically and a 200 only confirms the accounting status change. Those refunds must be handled separately in the payment gateway's dashboard. PARTIAL REFUND BY TICKET: send `items` with the ids of the sale items to refund (the `id` field of GET /sales/{id}/tickets). Each item refunds its prorated share of the sale total (by item subtotal; shares always add up to the exact total). The refunded tickets are invalidated at the door and their quota returns to stock; when no live item remains the sale becomes REFUNDED. Only MercadoPago (or uncharged / cash sales) support partial refunds: Wompi and Bold answer 409 GATEWAY_REFUND_NOT_SUPPORTED. Items already checked in answer 409 ITEM_ALREADY_CHECKED_IN — also for a FULL refund (no `items`, or all of them): a sale with any checked-in ticket is never refunded whole; refund the unused tickets by item; items from another sale answer 422 ITEM_NOT_IN_SALE; a refund already in flight over the same items answers 409 REFUND_IN_PROGRESS (retry exactly the same items). `block_seats: true` (also valid for a full refund) keeps the refunded numbered seats OUT of sale: seats.io moves them from booked straight to a blocked status, never through free. The `refund` object in the response reports the refunded amount and what happened to the seats. Wompi payment methods without API refunds (PSE, Nequi, Bancolombia transfer) respond 409: return the money in the Wompi dashboard and repeat the call with {\"acknowledge_manual\": true} to reflect the accounting status. A 502 means the gateway rejected the void and the sale remains CONFIRMED.", + "security": [ + { + "apiKey": [] + }, + { + "apiKeyHeader": [] } - }, - "required": [ - "error" ], - "additionalProperties": false - }, - "Warning": { - "type": "object", - "properties": { - "code": { - "type": "string" + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "message": { - "type": "string" + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaleRefundRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SaleRefundResult" + } + }, + "required": [ + "data" + ] + } + } + } }, - "field": { - "type": "string" + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "activeWorkspaceId": { - "type": "string" + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "activeWorkspaceName": { - "type": "string" + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "accessibleWorkspaces": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "suggestedWorkspaceId": { - "type": "string" + "422": { + "description": "Operation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "suggestedWorkspaceName": { - "type": "string" + "502": { + "description": "The external provider failed to complete the operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "ids": { - "type": "array", - "items": { - "type": "string" + "503": { + "description": "Service unavailable: an external dependency is down or initialization failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } - }, - "required": [ - "code", - "message" + } + } + }, + "/sales/{id}/items/{itemId}/transfer": { + "post": { + "operationId": "postSalesIdItemsItemIdTransfer", + "tags": [ + "sales" ], - "additionalProperties": false - }, - "Page": { - "type": "object", - "properties": { - "nextCursor": { - "type": [ - "string", - "null" - ] - }, - "hasMore": { - "type": "boolean" + "summary": "Transfer one ticket of a sale to another person (destructive)", + "description": "DESTRUCTIVE: changes the ticket holder and voids the previous QR code (the ticket code is rotated and any installed Apple Wallet pass stops working). The new holder receives the ticket by email and the buyer is notified. Same rules as the dashboard and the buyer: the recipient must already have a verified FreeTicket buyer account (the holder name comes from that account), each ticket can be transferred only once (no staff override) and only until the show starts. 422 RECIPIENT_NOT_REGISTERED / SELF_TRANSFER: fix the recipient. 409 NOT_CONFIRMED, ALREADY_TRANSFERRED, CHECKED_IN, REFUNDED, ADDON, PRESALE_NOT_TRANSFERABLE, MULTI_QUANTITY, EVENT_STARTED or CONFLICT (the ticket changed in flight; re-read and retry). Not idempotent: a retry after success answers 409 ALREADY_TRANSFERRED. Minimum role: `ADMIN`.", + "security": [ + { + "apiKey": [] }, - "total": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + { + "apiKeyHeader": [] } - }, - "required": [ - "nextCursor", - "hasMore" ], - "additionalProperties": false - }, - "Workspace": { - "type": "object", - "properties": { - "id": { - "type": "string" + "x-ft-destructive": true, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "name": { - "type": "string" + { + "name": "itemId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "slug": { - "type": "string" + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } } - }, - "required": [ - "id", - "name", - "slug" ], - "additionalProperties": false - }, - "WorkspaceAccess": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "role": { - "type": "string", - "enum": [ - "SUPER_ADMIN", - "ADMIN", - "STAFF", - "VIEWER", - "MINCULTURA", - "MERCH_MANAGER" - ], - "description": "The user's effective role IN THIS workspace." - }, - "sections": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaleItemTransferRequest" } - ], - "description": "Enabled sections (slugs). null = unrestricted; [] = access expired or revoked." + } } }, - "required": [ - "id", - "name", - "slug", - "role", - "sections" - ], - "additionalProperties": false - }, - "Me": { - "type": "object", - "properties": { - "userId": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SaleItemTransfer" + } + }, + "required": [ + "data" + ] + } + } + } }, - "name": { - "type": "string" + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "email": { - "type": "string" + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "role": { - "type": "string", - "enum": [ - "SUPER_ADMIN", - "ADMIN", - "STAFF", - "VIEWER", - "MINCULTURA", - "MERCH_MANAGER" - ], - "description": "DEPRECATED: effective role in the ACTIVE workspace. Use the `role` of each `workspaces` row instead. Kept for compatibility with already-published clients." + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "activeWorkspaceId": { - "type": [ - "string", - "null" - ] + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "workspaces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkspaceAccess" + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } - }, - "required": [ - "userId", - "name", - "email", - "role", - "activeWorkspaceId", - "workspaces" + } + } + }, + "/sales/{id}/recipient": { + "patch": { + "operationId": "patchSalesIdRecipient", + "tags": [ + "sales" ], - "additionalProperties": false - }, - "SignupRequest": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, - "name": { - "type": "string", - "minLength": 2, - "maxLength": 120 + "summary": "Correct the recipient of a courtesy sale and resend its tickets", + "description": "DESTRUCTIVE when the email changes (previous QR codes are voided). Only for courtesy sales issued from the dashboard (confirmed, `is_courtesy`); any other sale answers 404. Updates the recipient's name and email and resends the tickets to the corrected address. When the email changes, the ticket codes of the non-transferred tickets are rotated, so the QR codes sent to the wrong address stop working (`ticketCodesRotated: true`). Minimum role: `ADMIN`.", + "security": [ + { + "apiKey": [] }, - "workspaceName": { - "type": "string", - "minLength": 2, - "maxLength": 80 + { + "apiKeyHeader": [] } - }, - "required": [ - "email", - "name" ], - "additionalProperties": false - }, - "SignupResponse": { - "type": "object", - "properties": { - "user_id": { - "type": "string" - }, - "status": { - "type": "string", - "const": "pending_verification" + "x-ft-destructive": true, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "verification_sent_to": { - "type": "string" + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } } - }, - "required": [ - "user_id", - "status", - "verification_sent_to" ], - "additionalProperties": false - }, - "WorkspaceCreate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 2, - "maxLength": 80 - }, - "slug": { - "type": "string", - "minLength": 2, - "maxLength": 50, - "pattern": "^[a-z0-9-]+$" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CourtesyRecipientUpdate" + } + } } }, - "required": [ - "name", - "slug" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CourtesyRecipient" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/tickets/{ticketCode}/resend": { + "post": { + "operationId": "postTicketsTicketCodeResend", + "tags": [ + "tickets" ], - "additionalProperties": false - }, - "DeviceCodeResponse": { - "type": "object", - "properties": { - "device_code": { - "type": "string" + "summary": "Resend the confirmation email with the ticket", + "description": "Minimum role: `ADMIN`. Active workspace via the `X-Workspace-Id` header.", + "security": [ + { + "apiKey": [] }, - "user_code": { - "type": "string" + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "ticketCode", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "verification_uri": { - "type": "string" + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ResendTicket" + } + }, + "required": [ + "data" + ] + } + } + } }, - "verification_uri_complete": { - "type": "string" + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "expires_in": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "interval": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "502": { + "description": "The external provider failed to complete the operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } - }, - "required": [ - "device_code", - "user_code", - "verification_uri", - "verification_uri_complete", - "expires_in", - "interval" + } + } + }, + "/customer/orders": { + "get": { + "operationId": "getCustomerOrders", + "tags": [ + "customer", + "orders" ], - "additionalProperties": false + "summary": "The purchase the buyer left unfinished for this event date", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL: with a key, results are additionally scoped to the workspace pinned to it; without a key, any of the buyer's own unfinished purchases is visible. Returns the PENDING sale whose inventory hold is STILL ALIVE that the buyer has for that event date —with its seats, its total and when it expires—, or `order: null` if there is none. This is what lets reloading the checkout, or coming back from signing in, RESUME the purchase instead of starting from scratch: the seats remain held in that person's name. If `paymentOpened` is true the payment is already open and `POST /customer/orders/{id}/payment` returns the SAME signed configuration; to discard it and pick other seats, use `POST /customer/orders/{id}/release`.", + "security": [ + { + "apiKey": [] + }, + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "eventDateId", + "in": "query", + "required": false, + "description": "Required. The event date being queried.", + "schema": { + "type": "string" + } + }, + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CustomerOrderCurrent" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Operation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } }, - "DeviceTokenRequest": { - "type": "object", - "properties": { - "device_code": { - "type": "string", - "minLength": 1 + "post": { + "operationId": "postCustomerOrders", + "tags": [ + "customer", + "orders" + ], + "summary": "Create the ticket reservation (step 1 of the headless purchase)", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL: with a key, the date and the ticket type must belong to the workspace pinned to it (anything else is 404); without a key, it is enough for the ticket type to exist and be on sale (same eligibility as the first-party checkout). Reserves inventory and creates the PENDING sale with the SAME rules as the first-party checkout (stock under lock, seats validated against seats.io, per-buyer limit, presale, memberships and virtual queue turn). The buyer email comes from the session, never from the body. Rejections carry a stable `reason` in `error.details.reason` (`sold_out`, `queue_turn_required`, `seats_not_held`, `members_only`, `members_only_withdrawn` — a members-only ticket whose artist withdrew the permission or left the lineup: it is no longer sold even to members —, …). With `pending_sale_in_progress` the inventory is taken by a half-paid purchase FROM THE SAME buyer: `error.details.pendingSaleId` and `pendingReference` identify it, and the right step is to reopen its payment with `POST /customer/orders/{pendingSaleId}/payment` (idempotent) instead of reserving again. If `free` is true the sale is already confirmed and `/payment` must NOT be called. Next step: `POST /customer/orders/{id}/payment`.", + "security": [ + { + "apiKey": [] }, - "grant_type": { - "type": "string", - "const": "urn:ietf:params:oauth:grant-type:device_code" + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + }, + { + "name": "X-Purchase-Session", + "in": "header", + "required": false, + "description": "Purchase session id (`POST /customer/purchase-sessions`). Required when the event's workspace enforces a single purchase session; if present, it is always validated. The requirement is decided by the EVENT, not the API key: it applies if the owning workspace, a linked artist or a catalog seller of the show has the flag, with or without a key. Rejections (409; uppercase `error.code` and the slug in `error.details.reason`): `PURCHASE_SESSION_REQUIRED` (missing, or belongs to another buyer or another event date), `PURCHASE_SESSION_SUPERSEDED` (another tab or device replaced it), `PURCHASE_SESSION_EXPIRED` (the map clock ran out before the order was created), `PURCHASE_SESSION_BUSY` (an order is already in flight with this session) and, on `POST /customer/orders` with seats, `HOLD_TOKEN_MISMATCH` (the `holdToken` is not the session's, or belongs to a replaced session or another buyer even if the header is absent). Payment POSTs accept the buyer's live session or the session that created THAT order, as long as no other session has been opened since. Rejecting a new payment NEVER affects a payment already in flight.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerOrderCreateRequest" + } + } } }, - "required": [ - "device_code" + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CustomerOrderCreateResult" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + }, + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" + } + } + }, + "503": { + "description": "Service unavailable: an external dependency is down or initialization failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/customer/orders/{id}/payment": { + "post": { + "operationId": "postCustomerOrdersIdPayment", + "tags": [ + "customer", + "orders" ], - "additionalProperties": false - }, - "DeviceTokenResponse": { - "type": "object", - "properties": { - "access_token": { - "type": "string" + "summary": "Open payment for a reservation (Bold or MercadoPago, depending on the event)", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). The payment rail is chosen on the SERVER: Bold-eligible events (legend plan + allowlist) return the SIGNED configuration of the embedded Bold Payment Button (`apiKey` + `renderMode: \"embedded\"` + `integritySignature`, …), which the landing page mounts with `new BoldCheckout({...})`; all others return `publicKey` + `amount` + `currency` + `reference` + `payerEmail` to mount the MercadoPago Payment Brick (`POST .../payment/card` to charge, `POST .../payment/pse` for PSE). The landing page tells the rails apart by the SHAPE of the response (`apiKey`/`renderMode` ⇒ Bold, `publicKey` ⇒ MercadoPago), never by a separate flag. The sale must belong to the session buyer (and, with a key, to the workspace pinned to it): anything else is 404. Responds 409 with code `PAYMENT_UNAVAILABLE` if the reservation expired, the sale is no longer pending, or (Bold only) the event has no legend plan or a payment attempt is already in flight with another gateway. `{id}` accepts the sale id or its `reference`. Limited to 10 opens per minute per buyer (429 with `Retry-After`).", + "security": [ + { + "apiKey": [] + }, + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + }, + { + "name": "X-Purchase-Session", + "in": "header", + "required": false, + "description": "Purchase session id (`POST /customer/purchase-sessions`). Required when the event's workspace enforces a single purchase session; if present, it is always validated. The requirement is decided by the EVENT, not the API key: it applies if the owning workspace, a linked artist or a catalog seller of the show has the flag, with or without a key. Rejections (409; uppercase `error.code` and the slug in `error.details.reason`): `PURCHASE_SESSION_REQUIRED` (missing, or belongs to another buyer or another event date), `PURCHASE_SESSION_SUPERSEDED` (another tab or device replaced it), `PURCHASE_SESSION_EXPIRED` (the map clock ran out before the order was created), `PURCHASE_SESSION_BUSY` (an order is already in flight with this session) and, on `POST /customer/orders` with seats, `HOLD_TOKEN_MISMATCH` (the `holdToken` is not the session's, or belongs to a replaced session or another buyer even if the header is absent). Payment POSTs accept the buyer's live session or the session that created THAT order, as long as no other session has been opened since. Rejecting a new payment NEVER affects a payment already in flight.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CustomerOrderStartPayment" + } + }, + "required": [ + "data" + ] + } + } + } + }, + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "token_type": { - "type": "string", - "const": "Bearer" + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "string" + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" }, - "email": { - "type": "string" + "RateLimit": { + "$ref": "#/components/headers/RateLimit" }, - "role": { - "type": "string", - "enum": [ - "SUPER_ADMIN", - "ADMIN", - "STAFF", - "VIEWER", - "MINCULTURA", - "MERCH_MANAGER" - ] + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" } - }, - "required": [ - "id", - "email", - "role" - ], - "additionalProperties": false - }, - "workspaces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Workspace" } } - }, - "required": [ - "access_token", - "token_type", - "user", - "workspaces" + } + } + }, + "/customer/orders/{id}/payment/card": { + "post": { + "operationId": "postCustomerOrdersIdPaymentCard", + "tags": [ + "customer", + "orders" ], - "additionalProperties": false - }, - "DeviceTokenError": { - "type": "object", - "properties": { - "error": { - "type": "string", - "enum": [ - "authorization_pending", - "slow_down", - "expired_token", - "access_denied", - "invalid_request" - ] + "summary": "Charge with the MercadoPago Payment Brick token", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). Receives the token the Payment Brick produced on the landing page's domain and charges through the Orders API using the sale amount (never one sent by the client); `payer.email` travels in the body but is ignored — the payer is ALWAYS the sale's. `status` is `approved`, `pending` (normal, may require additional authentication from the bank) or `rejected` (business decline; the reason is in `message`) — all three are returned with 200. With `rejected`, `saleAlive` tells what happened to the purchase: `false` = it was cancelled and a new one must be started; `true` = this payment was declined but the purchase is still pending because another payment is in progress on it (do not start a new purchase: wait and check the order). Responds 409 with code `PAYMENT_UNAVAILABLE` if the reservation expired, the sale is no longer pending, a payment attempt is in flight with another gateway, the event only charges through Bold, or MercadoPago returned an error that cannot be classified as a decline. The sale must belong to the session's buyer (and, with a key, to the workspace pinned to it): anything else is 404. `{id}` accepts the sale id or its `reference`. Limited to 10 attempts per minute per buyer (429 with `Retry-After`).", + "security": [ + { + "apiKey": [] + }, + { + "apiKeyHeader": [] } - }, - "required": [ - "error" ], - "additionalProperties": false - }, - "Venue": { - "type": "object", - "properties": { - "id": { - "type": "string" + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "name": { - "type": "string" + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } }, - "slug": { - "type": "string" + { + "name": "X-Purchase-Session", + "in": "header", + "required": false, + "description": "Purchase session id (`POST /customer/purchase-sessions`). Required when the event's workspace enforces a single purchase session; if present, it is always validated. The requirement is decided by the EVENT, not the API key: it applies if the owning workspace, a linked artist or a catalog seller of the show has the flag, with or without a key. Rejections (409; uppercase `error.code` and the slug in `error.details.reason`): `PURCHASE_SESSION_REQUIRED` (missing, or belongs to another buyer or another event date), `PURCHASE_SESSION_SUPERSEDED` (another tab or device replaced it), `PURCHASE_SESSION_EXPIRED` (the map clock ran out before the order was created), `PURCHASE_SESSION_BUSY` (an order is already in flight with this session) and, on `POST /customer/orders` with seats, `HOLD_TOKEN_MISMATCH` (the `holdToken` is not the session's, or belongs to a replaced session or another buyer even if the header is absent). Payment POSTs accept the buyer's live session or the session that created THAT order, as long as no other session has been opened since. Rejecting a new payment NEVER affects a payment already in flight.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerOrderMercadoPagoChargeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CustomerOrderMercadoPagoChargeResult" + } + }, + "required": [ + "data" + ] + } + } + } }, - "address": { - "type": "string" + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "city": { - "type": "string" + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "country": { - "type": "string" + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "latitude": { - "type": [ - "number", - "null" - ] + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "longitude": { - "type": [ - "number", - "null" - ] + "422": { + "description": "Operation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "capacity": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" }, - { - "type": "null" + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" } - ] - }, - "googlePlaceId": { - "type": [ - "string", - "null" - ] - }, - "portalVisible": { - "type": "boolean" - }, - "organizationId": { - "type": [ - "string", - "null" - ] - }, - "seatsioChartKey": { - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "type": "string" + } } - }, - "required": [ - "id", - "name", - "slug", - "address", - "city", - "country", - "latitude", - "longitude", - "capacity", - "googlePlaceId", - "portalVisible", - "organizationId", - "seatsioChartKey", - "createdAt" + } + } + }, + "/customer/orders/{id}/payment/pse": { + "post": { + "operationId": "postCustomerOrdersIdPaymentPse", + "tags": [ + "customer", + "orders" ], - "additionalProperties": false - }, - "EventNextDate": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "startsAt": { - "type": "string" + "summary": "Open a PSE payment through MercadoPago (redirect)", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). Creates a MercadoPago preference restricted to PSE and returns `redirectUrl` (`init_point`): the landing page must REDIRECT the browser there, not mount it in an iframe. The buyer picks their bank and confirms the transfer inside MercadoPago; on return, they land on `GET /api/mp/return` (our domain), which issues a 302 to the `returnUrl` sent in `POST /customer/orders` — the landing page must call `GET /customer/orders/{id}` for the authoritative status, never infer it from the return URL. The sale is confirmed by webhook when the bank settles the payment (asynchronous: it may take a while). Responds 409 with code `PAYMENT_UNAVAILABLE` if the reservation expired, the sale is no longer pending, a payment attempt is in flight with another gateway, or the event only charges through Bold. The sale must belong to the session's buyer (and, with a key, to the workspace pinned to it): anything else is 404. `{id}` accepts the sale id or its `reference`. Limited to 10 opens per minute per buyer (429 with `Retry-After`).", + "security": [ + { + "apiKey": [] }, - "endsAt": { - "type": [ - "string", - "null" - ] + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "timezone": { - "type": "string" + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } }, - "status": { - "type": "string", - "enum": [ - "DRAFT", - "PUBLISHED", - "SOLD_OUT", - "CANCELLED", - "COMPLETED" - ] + { + "name": "X-Purchase-Session", + "in": "header", + "required": false, + "description": "Purchase session id (`POST /customer/purchase-sessions`). Required when the event's workspace enforces a single purchase session; if present, it is always validated. The requirement is decided by the EVENT, not the API key: it applies if the owning workspace, a linked artist or a catalog seller of the show has the flag, with or without a key. Rejections (409; uppercase `error.code` and the slug in `error.details.reason`): `PURCHASE_SESSION_REQUIRED` (missing, or belongs to another buyer or another event date), `PURCHASE_SESSION_SUPERSEDED` (another tab or device replaced it), `PURCHASE_SESSION_EXPIRED` (the map clock ran out before the order was created), `PURCHASE_SESSION_BUSY` (an order is already in flight with this session) and, on `POST /customer/orders` with seats, `HOLD_TOKEN_MISMATCH` (the `holdToken` is not the session's, or belongs to a replaced session or another buyer even if the header is absent). Payment POSTs accept the buyer's live session or the session that created THAT order, as long as no other session has been opened since. Rejecting a new payment NEVER affects a payment already in flight.", + "schema": { + "type": "string" + } } - }, - "required": [ - "id", - "label", - "startsAt", - "endsAt", - "timezone", - "status" ], - "additionalProperties": false - }, - "EventArtist": { - "type": "object", - "properties": { - "id": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CustomerOrderMercadoPagoPse" + } + }, + "required": [ + "data" + ] + } + } + } }, - "name": { - "type": "string" + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "slug": { - "type": [ - "string", - "null" - ] + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "type": { - "type": "string", - "enum": [ - "ARTIST", - "VENUE", - "ORGANIZER" - ] - } - }, - "required": [ - "id", - "name", - "slug", - "type" - ], - "additionalProperties": false - }, - "Event": { - "type": "object", - "properties": { - "id": { - "type": "string" + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "name": { - "type": "string" + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "slug": { - "type": "string" + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "description": { - "type": [ - "string", - "null" - ] + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + }, + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" + } + } + } + } + } + }, + "/customer/orders/{id}/release": { + "post": { + "operationId": "postCustomerOrdersIdRelease", + "tags": [ + "customer", + "orders" + ], + "summary": "Release a reservation the buyer will not pay for", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). Abandons the PENDING sale and returns its inventory (and its seats) to stock, so the buyer can start over without waiting for the reservation to expire. It is the counterpart of `pending_sale_in_progress`: when `POST /customer/orders` rejects with that `reason`, the landing page can offer *continue paying* (`/payment`, idempotent) or *start over* (this route). It ONLY releases with evidence that nobody started the payment: if Bold reports any transaction, if a provider response is already stored, or if the payment goes through a rail we cannot query, it responds 409 with `details.reason` = `payment_in_flight` and the sale is left intact. If the gateway does not respond, 503 (`gateway_unreachable`): retry later. The sale must belong to the session's buyer (and, with a key, to the workspace pinned to it): anything else is 404. `{id}` accepts the sale id or its `reference`. Limited to 10 calls per minute per buyer.", + "security": [ + { + "apiKey": [] }, - "status": { - "type": "string", - "enum": [ - "DRAFT", - "PUBLISHED", - "SOLD_OUT", - "CANCELLED", - "COMPLETED" - ] + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "coverImageUrl": { - "type": [ - "string", - "null" - ] + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CustomerOrderRelease" + } + }, + "required": [ + "data" + ] + } + } + } }, - "bannerImageUrl": { - "type": [ - "string", - "null" - ] + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "squareImageUrl": { - "type": [ - "string", - "null" - ] + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "storyImageUrl": { - "type": [ - "string", - "null" - ] + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "organizationId": { - "type": "string" + "409": { + "description": "Conflict: the resource does not allow this operation in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "venueId": { - "type": [ - "string", - "null" - ] + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "venue": { - "anyOf": [ - { - "$ref": "#/components/schemas/Venue" + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" }, - { - "type": "null" + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" } - ] - }, - "externalTicketUrl": { - "type": [ - "string", - "null" - ] - }, - "access": { - "type": "string", - "enum": [ - "owner", - "artist" - ], - "description": "owner = the key's workspace owns the event (editable). artist = read-only: linked artist or catalog access." + } }, - "nextDate": { - "anyOf": [ - { - "$ref": "#/components/schemas/EventNextDate" - }, - { - "type": "null" + "503": { + "description": "Service unavailable: an external dependency is down or initialization failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - ] + } + } + } + } + }, + "/customer/orders/{id}": { + "get": { + "operationId": "getCustomerOrdersId", + "tags": [ + "customer", + "orders" + ], + "summary": "Status of a headless purchase (and its tickets, once paid)", + "description": "Requires the `X-Customer-Session` header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). `{id}` accepts the `reference` (FT-…) or the sale id. If the sale is still PENDING and its payment goes through Bold, the authoritative payment status is re-read from Bold; between re-reads it responds with the internal status, which the webhook keeps up to date. `status` is `approved`, `pending` or `rejected`; `pending` is a NORMAL state (asynchronous payment methods take time) and the landing page must retry. `tickets` —with each ticket's `ticketCode`— is only present when `status` is `approved`. The purchase must belong to the session's buyer (and, with a key, to the workspace pinned to it): anything else is 404. The route MAY rate-limit polling and respond 429: honor `Retry-After` and apply backoff. Polling every ~2 s fits comfortably, but do not treat any threshold as a guarantee.", + "security": [ + { + "apiKey": [] }, - "artists": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventArtist" + { + "apiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" } }, - "publishAt": { - "description": "Scheduled publication instant (ISO 8601, UTC) of a DRAFT event; null = not scheduled. See `POST /events/{id}/schedule`.", - "type": [ - "string", - "null" - ] + { + "name": "X-Workspace-Id", + "in": "header", + "required": false, + "description": "Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CustomerOrderStatus" + } + }, + "required": [ + "data" + ] + } + } + } }, - "pulepCode": { - "description": "PULEP registration code (Colombian Ministry of Culture). Required for performing-arts events with capacity above 400.", - "type": [ - "string", - "null" - ] + "401": { + "description": "Missing or invalid credential.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "listedOnPortal": { - "description": "false = hidden from portal discovery (listings, search, home); still reachable by direct link.", - "type": "boolean" + "403": { + "description": "Insufficient role or resource not accessible.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "genreOther": { - "description": "Free-text event type, only when the genre is \"otro\".", - "type": [ - "string", - "null" - ] + "404": { + "description": "Resource does not exist or is out of scope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "createdAt": { - "type": "string" + "422": { + "description": "Request body/parameter validation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "updatedAt": { - "type": "string" + "429": { + "description": "Too many requests: rate limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "headers": { + "Retry-After": { + "$ref": "#/components/headers/RetryAfter" + }, + "RateLimit": { + "$ref": "#/components/headers/RateLimit" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimitPolicy" + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Error": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "details": {} + }, + "required": [ + "code", + "message", + "retryable" + ], + "additionalProperties": false } }, "required": [ - "id", - "name", - "slug", - "description", - "status", - "coverImageUrl", - "bannerImageUrl", - "squareImageUrl", - "storyImageUrl", - "organizationId", - "venueId", - "venue", - "externalTicketUrl", - "access", - "createdAt", - "updatedAt" + "error" ], "additionalProperties": false }, - "TicketPriceStage": { + "Warning": { "type": "object", "properties": { - "id": { + "code": { "type": "string" }, - "name": { + "message": { "type": "string" }, - "price": { - "type": "number" + "field": { + "type": "string" }, - "sortOrder": { + "activeWorkspaceId": { + "type": "string" + }, + "activeWorkspaceName": { + "type": "string" + }, + "accessibleWorkspaces": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "endsAt": { - "description": "Closes once this date passes (ISO 8601). null = no date cutoff.", - "type": [ - "string", - "null" - ] + "suggestedWorkspaceId": { + "type": "string" }, - "quantity": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ], - "description": "Tickets at this price. The cutoff is CUMULATIVE across the ticket type: the stage closes when sold + reserved reaches the sum of `quantity` for this stage and all previous ones. null = no quantity cutoff." + "suggestedWorkspaceName": { + "type": "string" }, - "isCurrent": { - "type": "boolean", - "description": "true for the stage currently in effect (the first one still open). If none is, the ticket type's `price` applies." + "ids": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "id", - "name", - "price", - "sortOrder", - "endsAt", - "quantity", - "isCurrent" + "code", + "message" ], "additionalProperties": false }, - "TicketType": { + "Page": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "eventDateId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { + "nextCursor": { "type": [ "string", "null" ] }, - "price": { - "type": "number" - }, - "currency": { - "type": "string" - }, - "capacity": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "sold": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "available": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "soldOut": { + "hasMore": { "type": "boolean" }, - "maxPerOrder": { + "total": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 + } + }, + "required": [ + "nextCursor", + "hasMore" + ], + "additionalProperties": false + }, + "Workspace": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "saleStartsAt": { - "type": [ - "string", - "null" - ] - }, - "saleEndsAt": { - "type": [ - "string", - "null" - ] - }, - "isVisible": { - "type": "boolean" - }, - "organizerAbsorbsFee": { - "type": "boolean" - }, - "buyerServiceFee": { - "type": "number" - }, - "seatingSurcharge": { - "type": "number" - }, - "iva": { - "type": "number" - }, - "buyerTotal": { - "type": "number" - }, - "seatsioCategoryKey": { - "type": [ - "string", - "null" - ] - }, - "priceStages": { - "description": "Price stages preceding the final price, ordered by `sortOrder`. `[]` = fixed price. Absent if the response does not include them.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TicketPriceStage" - } - }, - "currentPrice": { - "description": "CURRENT base price per unit (the open stage, or `price` if none). Present alongside `priceStages`.", - "type": "number" + "name": { + "type": "string" }, - "createdAt": { + "slug": { "type": "string" } }, "required": [ "id", - "eventDateId", "name", - "description", - "price", - "currency", - "capacity", - "sold", - "available", - "soldOut", - "maxPerOrder", - "saleStartsAt", - "saleEndsAt", - "isVisible", - "organizerAbsorbsFee", - "buyerServiceFee", - "seatingSurcharge", - "iva", - "buyerTotal", - "seatsioCategoryKey", - "createdAt" + "slug" ], "additionalProperties": false }, - "EventDate": { + "WorkspaceAccess": { "type": "object", "properties": { "id": { "type": "string" }, - "eventId": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "startsAt": { + "name": { "type": "string" }, - "endsAt": { - "type": [ - "string", - "null" - ] - }, - "doorsOpenAt": { - "type": [ - "string", - "null" - ] - }, - "timezone": { + "slug": { "type": "string" }, - "venueId": { - "type": [ - "string", - "null" - ] - }, - "venue": { - "anyOf": [ - { - "$ref": "#/components/schemas/Venue" - }, - { - "type": "null" - } - ] - }, - "ticketTypes": { - "default": [], - "type": "array", - "items": { - "$ref": "#/components/schemas/TicketType" - } - }, - "seatsioEventKey": { - "readOnly": true, - "description": "seats.io event key. Read-only: issued by automatic provisioning; writing it by hand orphans seats already sold.", - "type": [ - "string", - "null" - ] - }, - "status": { + "role": { "type": "string", "enum": [ - "DRAFT", - "PUBLISHED", - "SOLD_OUT", - "CANCELLED", - "COMPLETED" - ] - }, - "streamType": { - "type": "string" + "SUPER_ADMIN", + "ADMIN", + "STAFF", + "VIEWER", + "MINCULTURA", + "MERCH_MANAGER" + ], + "description": "The user's effective role IN THIS workspace." }, - "maxPerCustomer": { - "description": "Cumulative per-buyer cap across ALL ticket types of this date. null = no date-level cap (each ticket type's own cap applies).", + "sections": { "anyOf": [ { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "array", + "items": { + "type": "string" + } }, { "type": "null" } - ] - }, - "createdAt": { - "type": "string" + ], + "description": "Enabled sections (slugs). null = unrestricted; [] = access expired or revoked." } }, "required": [ "id", - "eventId", - "label", - "startsAt", - "endsAt", - "doorsOpenAt", - "timezone", - "venueId", - "venue", - "ticketTypes", - "seatsioEventKey", - "status", - "streamType", - "createdAt" + "name", + "slug", + "role", + "sections" ], "additionalProperties": false }, - "EventCreate": { + "Me": { "type": "object", "properties": { - "name": { - "type": "string", - "minLength": 1 + "userId": { + "type": "string" }, - "slug": { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-]+$" + "name": { + "type": "string" }, - "description": { + "email": { "type": "string" }, - "venueId": { + "role": { + "type": "string", + "enum": [ + "SUPER_ADMIN", + "ADMIN", + "STAFF", + "VIEWER", + "MINCULTURA", + "MERCH_MANAGER" + ], + "description": "DEPRECATED: effective role in the ACTIVE workspace. Use the `role` of each `workspaces` row instead. Kept for compatibility with already-published clients." + }, + "activeWorkspaceId": { "type": [ "string", "null" ] }, - "dates": { - "minItems": 1, + "workspaces": { "type": "array", "items": { - "type": "object", - "properties": { - "startsAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - "endsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - }, - "timezone": { - "default": "America/Bogota", - "type": "string", - "minLength": 1 - } - }, - "required": [ - "startsAt", - "timezone" - ], - "additionalProperties": false + "$ref": "#/components/schemas/WorkspaceAccess" } } }, "required": [ + "userId", "name", - "slug", - "dates" + "email", + "role", + "activeWorkspaceId", + "workspaces" ], "additionalProperties": false }, - "EventUpdate": { + "SignupRequest": { "type": "object", "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, "name": { "type": "string", - "minLength": 1 + "minLength": 2, + "maxLength": 120 }, - "description": { - "type": [ - "string", - "null" - ] + "workspaceName": { + "type": "string", + "minLength": 2, + "maxLength": 80 + } + }, + "required": [ + "email", + "name" + ], + "additionalProperties": false + }, + "SignupResponse": { + "type": "object", + "properties": { + "user_id": { + "type": "string" }, - "venueId": { - "type": [ - "string", - "null" - ] + "status": { + "type": "string", + "const": "pending_verification" }, - "coverImageUrl": { - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "null" - } - ] + "verification_sent_to": { + "type": "string" + } + }, + "required": [ + "user_id", + "status", + "verification_sent_to" + ], + "additionalProperties": false + }, + "WorkspaceCreate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 80 }, "slug": { - "description": "Public URL slug. Must be unique across live events (409 `SLUG_TAKEN`).", "type": "string", - "minLength": 1, - "maxLength": 100, + "minLength": 2, + "maxLength": 50, "pattern": "^[a-z0-9-]+$" + } + }, + "required": [ + "name", + "slug" + ], + "additionalProperties": false + }, + "DeviceCodeResponse": { + "type": "object", + "properties": { + "device_code": { + "type": "string" }, - "squareImageUrl": { - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "null" - } - ] + "user_code": { + "type": "string" }, - "storyImageUrl": { - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "null" - } - ] + "verification_uri": { + "type": "string" }, - "pulepCode": { - "description": "PULEP code. Required (422 `PULEP_REQUIRED`) when the event is performing arts (or has no genre) and its capacity per date exceeds 400.", - "anyOf": [ - { - "type": "string", - "maxLength": 50 - }, - { - "type": "null" - } - ] + "verification_uri_complete": { + "type": "string" }, - "listedOnPortal": { - "type": "boolean" + "expires_in": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "genre": { - "description": "Event type from the taxonomy.", + "interval": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "device_code", + "user_code", + "verification_uri", + "verification_uri_complete", + "expires_in", + "interval" + ], + "additionalProperties": false + }, + "DeviceTokenRequest": { + "type": "object", + "properties": { + "device_code": { "type": "string", - "enum": [ - "comedia", - "musica", - "teatro", - "danza", - "cultura", - "familiar", - "fiesta", - "deporte", - "conferencia", - "otro" - ] + "minLength": 1 }, - "subgenre": { - "description": "Subtype; must belong to `genre`, which must be sent in the same request. null = no subtype.", - "anyOf": [ - { - "type": "string", - "enum": [ - "stand_up", - "impro", - "sketch", - "satira", - "rock", - "indie", - "pop", - "urbano", - "salsa", - "vallenato", - "electronica", - "tributo", - "opera", - "musical" - ] - }, - { - "type": "null" - } - ] + "grant_type": { + "type": "string", + "const": "urn:ietf:params:oauth:grant-type:device_code" + } + }, + "required": [ + "device_code" + ], + "additionalProperties": false + }, + "DeviceTokenResponse": { + "type": "object", + "properties": { + "access_token": { + "type": "string" }, - "genreOther": { - "description": "Free-text type. Required when `genre` is \"otro\".", + "token_type": { "type": "string", - "minLength": 1, - "maxLength": 60 + "const": "Bearer" }, - "audience": { - "description": "Minimum age classification. null = unspecified.", - "anyOf": [ - { + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role": { "type": "string", "enum": [ - "todo_publico", - "mayores_14", - "mayores_18", - "infantil" + "SUPER_ADMIN", + "ADMIN", + "STAFF", + "VIEWER", + "MINCULTURA", + "MERCH_MANAGER" ] - }, - { - "type": "null" } + }, + "required": [ + "id", + "email", + "role" + ], + "additionalProperties": false + }, + "workspaces": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Workspace" + } + } + }, + "required": [ + "access_token", + "token_type", + "user", + "workspaces" + ], + "additionalProperties": false + }, + "DeviceTokenError": { + "type": "object", + "properties": { + "error": { + "type": "string", + "enum": [ + "authorization_pending", + "slow_down", + "expired_token", + "access_denied", + "invalid_request" ] } }, + "required": [ + "error" + ], "additionalProperties": false }, - "EventDateCreate": { + "Venue": { "type": "object", "properties": { - "label": { - "anyOf": [ - { - "type": "string", - "maxLength": 200 - }, - { - "type": "null" - } + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "latitude": { + "type": [ + "number", + "null" ] }, - "startsAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + "longitude": { + "type": [ + "number", + "null" + ] }, - "endsAt": { + "capacity": { "anyOf": [ { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, { "type": "null" } ] }, - "doorsOpenAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } + "googlePlaceId": { + "type": [ + "string", + "null" ] }, - "timezone": { - "default": "America/Bogota", - "type": "string", - "minLength": 1 + "portalVisible": { + "type": "boolean" }, - "venueId": { + "organizationId": { "type": [ "string", "null" ] }, - "streamType": { - "default": "PRESENCIAL", - "type": "string", - "enum": [ - "PRESENCIAL", - "ONLINE", - "HIBRIDO" + "seatsioChartKey": { + "type": [ + "string", + "null" ] }, - "maxPerCustomer": { - "anyOf": [ - { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 10000 - }, - { - "type": "null" - } - ] + "createdAt": { + "type": "string" } }, "required": [ - "startsAt", - "timezone" + "id", + "name", + "slug", + "address", + "city", + "country", + "latitude", + "longitude", + "capacity", + "googlePlaceId", + "portalVisible", + "organizationId", + "seatsioChartKey", + "createdAt" ], "additionalProperties": false }, - "EventDateUpdate": { + "EventNextDate": { "type": "object", "properties": { + "id": { + "type": "string" + }, "label": { - "anyOf": [ - { - "type": "string", - "maxLength": 200 - }, - { - "type": "null" - } + "type": [ + "string", + "null" ] }, "startsAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + "type": "string" }, "endsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - }, - "doorsOpenAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - }, - "timezone": { - "type": "string", - "minLength": 1 - }, - "venueId": { "type": [ "string", "null" ] }, - "streamType": { - "type": "string", - "enum": [ - "PRESENCIAL", - "ONLINE", - "HIBRIDO" - ] + "timezone": { + "type": "string" }, "status": { "type": "string", @@ -24417,120 +24322,61 @@ "CANCELLED", "COMPLETED" ] - }, - "maxPerCustomer": { - "anyOf": [ - { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 10000 - }, - { - "type": "null" - } - ] } }, + "required": [ + "id", + "label", + "startsAt", + "endsAt", + "timezone", + "status" + ], "additionalProperties": false }, - "TicketTypeCreate": { + "EventArtist": { "type": "object", "properties": { - "eventDateId": { - "type": "string", - "minLength": 1 + "id": { + "type": "string" }, "name": { - "type": "string", - "minLength": 1 - }, - "description": { "type": "string" }, - "price": { - "type": "number", - "minimum": 0 + "slug": { + "type": [ + "string", + "null" + ] }, - "currency": { - "default": "COP", + "type": { "type": "string", "enum": [ - "COP" - ] - }, - "capacity": { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - "maxPerOrder": { - "default": 10, - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - "isVisible": { - "default": true, - "type": "boolean" - }, - "organizerAbsorbsFee": { - "default": false, - "type": "boolean" - }, - "saleStartsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - }, - "saleEndsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - }, - "seatsioCategoryKey": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "null" - } + "ARTIST", + "VENUE", + "ORGANIZER" ] } }, "required": [ - "eventDateId", + "id", "name", - "price", - "currency", - "capacity", - "maxPerOrder", - "isVisible", - "organizerAbsorbsFee" + "slug", + "type" ], "additionalProperties": false }, - "TicketTypeUpdate": { + "Event": { "type": "object", "properties": { + "id": { + "type": "string" + }, "name": { - "type": "string", - "minLength": 1 + "type": "string" + }, + "slug": { + "type": "string" }, "description": { "type": [ @@ -24538,123 +24384,114 @@ "null" ] }, - "price": { - "type": "number", - "minimum": 0 - }, - "currency": { - "description": "Solo COP; se tolera la moneda ya guardada si no cambia.", + "status": { "type": "string", - "minLength": 3, - "maxLength": 3 - }, - "capacity": { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 + "enum": [ + "DRAFT", + "PUBLISHED", + "SOLD_OUT", + "CANCELLED", + "COMPLETED" + ] }, - "maxPerOrder": { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 + "coverImageUrl": { + "type": [ + "string", + "null" + ] }, - "isVisible": { - "type": "boolean" + "bannerImageUrl": { + "type": [ + "string", + "null" + ] }, - "organizerAbsorbsFee": { - "type": "boolean" + "squareImageUrl": { + "type": [ + "string", + "null" + ] }, - "saleStartsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } + "storyImageUrl": { + "type": [ + "string", + "null" ] }, - "saleEndsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } + "organizationId": { + "type": "string" + }, + "venueId": { + "type": [ + "string", + "null" ] }, - "seatsioCategoryKey": { + "venue": { "anyOf": [ { - "type": "string", - "minLength": 1 + "$ref": "#/components/schemas/Venue" }, { "type": "null" } ] - } - }, - "additionalProperties": false - }, - "EventSchedule": { - "type": "object", - "properties": { - "publishAt": { - "description": "Publish the DRAFT automatically at this instant (UTC). Must be in the future and before at least one of its dates.", - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - "saleStartsAt": { - "description": "Publish the DRAFT NOW and open ticket sales at this instant (UTC): sets `saleStartsAt` on every ticket type of the upcoming dates. Must be in the future and before the first upcoming date.", - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - } - }, - "additionalProperties": false - }, - "PresaleWindow": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "ticketTypeId": { - "type": "string" + "externalTicketUrl": { + "type": [ + "string", + "null" + ] }, - "planId": { + "access": { "type": "string", - "description": "Membership plan whose active members get early access." - }, - "presaleStartsAt": { - "type": "string" - }, - "presaleEndsAt": { - "type": "string" + "enum": [ + "owner", + "artist" + ], + "description": "owner = the key's workspace owns the event (editable). artist = read-only: linked artist or catalog access." }, - "presaleCapacity": { + "nextDate": { "anyOf": [ { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "$ref": "#/components/schemas/EventNextDate" }, { "type": "null" } - ], - "description": "Sub-cap of tickets sellable during the presale. null = shares the ticket type's whole capacity." + ] }, - "isActive": { + "artists": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventArtist" + } + }, + "publishAt": { + "description": "Scheduled publication instant (ISO 8601, UTC) of a DRAFT event; null = not scheduled. See `POST /events/{id}/schedule`.", + "type": [ + "string", + "null" + ] + }, + "pulepCode": { + "description": "PULEP registration code (Colombian Ministry of Culture). Required for performing-arts events with capacity above 400.", + "type": [ + "string", + "null" + ] + }, + "listedOnPortal": { + "description": "false = hidden from portal discovery (listings, search, home); still reachable by direct link.", "type": "boolean" }, + "genreOther": { + "description": "Free-text event type, only when the genre is \"otro\".", + "type": [ + "string", + "null" + ] + }, "createdAt": { "type": "string" }, @@ -24664,526 +24501,695 @@ }, "required": [ "id", - "ticketTypeId", - "planId", - "presaleStartsAt", - "presaleEndsAt", - "presaleCapacity", - "isActive", + "name", + "slug", + "description", + "status", + "coverImageUrl", + "bannerImageUrl", + "squareImageUrl", + "storyImageUrl", + "organizationId", + "venueId", + "venue", + "externalTicketUrl", + "access", "createdAt", "updatedAt" ], "additionalProperties": false }, - "PresaleWindowCreate": { + "TicketPriceStage": { "type": "object", "properties": { - "planId": { - "type": "string", - "minLength": 1 - }, - "presaleStartsAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - "presaleEndsAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - "presaleCapacity": { - "anyOf": [ - { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ] + "id": { + "type": "string" }, - "isActive": { - "default": true, - "type": "boolean" - } - }, - "required": [ - "planId", - "presaleStartsAt", - "presaleEndsAt" - ], - "additionalProperties": false - }, - "PresaleWindowUpdate": { - "type": "object", - "properties": { - "planId": { - "type": "string", - "minLength": 1 + "name": { + "type": "string" }, - "presaleStartsAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + "price": { + "type": "number" }, - "presaleEndsAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + "sortOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "presaleCapacity": { + "endsAt": { + "description": "Closes once this date passes (ISO 8601). null = no date cutoff.", + "type": [ + "string", + "null" + ] + }, + "quantity": { "anyOf": [ { "type": "integer", - "exclusiveMinimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } - ] + ], + "description": "Tickets at this price. The cutoff is CUMULATIVE across the ticket type: the stage closes when sold + reserved reaches the sum of `quantity` for this stage and all previous ones. null = no quantity cutoff." }, - "isActive": { - "type": "boolean" + "isCurrent": { + "type": "boolean", + "description": "true for the stage currently in effect (the first one still open). If none is, the ticket type's `price` applies." } }, + "required": [ + "id", + "name", + "price", + "sortOrder", + "endsAt", + "quantity", + "isCurrent" + ], "additionalProperties": false }, - "SaleItem": { + "TicketType": { "type": "object", "properties": { "id": { "type": "string" }, - "ticketTypeId": { + "eventDateId": { "type": "string" }, - "quantity": { + "name": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "price": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "capacity": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "unitPrice": { - "type": "number" + "sold": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "subtotal": { - "type": "number" + "available": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "ticketCode": { - "type": "string" + "soldOut": { + "type": "boolean" }, - "checkedInAt": { - "type": [ - "string", - "null" - ] + "maxPerOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "seatLabel": { + "saleStartsAt": { "type": [ "string", "null" ] }, - "refundedAt": { + "saleEndsAt": { "type": [ "string", "null" ] - } - }, - "required": [ - "id", - "ticketTypeId", - "quantity", - "unitPrice", - "subtotal", - "ticketCode", - "checkedInAt", - "seatLabel", - "refundedAt" - ], - "additionalProperties": false - }, - "Sale": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "reference": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "PENDING", - "CONFIRMED", - "ABANDONED", - "CANCELLED", - "REFUNDED" - ] + "isVisible": { + "type": "boolean" }, - "channel": { - "type": "string" + "organizerAbsorbsFee": { + "type": "boolean" }, - "subtotal": { + "buyerServiceFee": { "type": "number" }, - "discountAmount": { + "seatingSurcharge": { "type": "number" }, - "serviceFee": { + "iva": { "type": "number" }, - "iva": { + "buyerTotal": { "type": "number" }, - "total": { + "seatsioCategoryKey": { + "type": [ + "string", + "null" + ] + }, + "priceStages": { + "description": "Price stages preceding the final price, ordered by `sortOrder`. `[]` = fixed price. Absent if the response does not include them.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TicketPriceStage" + } + }, + "currentPrice": { + "description": "CURRENT base price per unit (the open stage, or `price` if none). Present alongside `priceStages`.", "type": "number" }, - "currency": { + "createdAt": { "type": "string" - }, - "buyerName": { + } + }, + "required": [ + "id", + "eventDateId", + "name", + "description", + "price", + "currency", + "capacity", + "sold", + "available", + "soldOut", + "maxPerOrder", + "saleStartsAt", + "saleEndsAt", + "isVisible", + "organizerAbsorbsFee", + "buyerServiceFee", + "seatingSurcharge", + "iva", + "buyerTotal", + "seatsioCategoryKey", + "createdAt" + ], + "additionalProperties": false + }, + "EventDate": { + "type": "object", + "properties": { + "id": { "type": "string" }, - "buyerEmail": { + "eventId": { "type": "string" }, - "buyerPhone": { + "label": { "type": [ "string", "null" ] }, - "buyerDocumentType": { - "type": [ - "string", - "null" - ] + "startsAt": { + "type": "string" }, - "buyerDocumentNumber": { + "endsAt": { "type": [ "string", "null" ] }, - "organizationId": { + "doorsOpenAt": { "type": [ "string", "null" ] }, - "paymentProvider": { - "type": [ - "string", - "null" - ] + "timezone": { + "type": "string" }, - "paymentRef": { + "venueId": { "type": [ "string", "null" ] }, - "confirmedAt": { - "type": [ - "string", - "null" + "venue": { + "anyOf": [ + { + "$ref": "#/components/schemas/Venue" + }, + { + "type": "null" + } ] }, - "createdAt": { - "type": "string" + "ticketTypes": { + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/TicketType" + } }, - "failureReason": { + "seatsioEventKey": { + "readOnly": true, + "description": "seats.io event key. Read-only: issued by automatic provisioning; writing it by hand orphans seats already sold.", "type": [ "string", "null" ] }, - "paymentStatus": { - "description": "Status of the latest payment event. Usually the payment gateway's RAW status in its own vocabulary. Values prefixed with `FT_` come from FreeTicket, not the gateway: currently `FT_SALE_APPROVED_POST_CONFIRM`, which marks that the gateway re-notified an already-confirmed charge — this is how Bold reports its refunds. A CONFIRMED sale with this status may have money refunded that is not yet recorded.", - "type": [ - "string", - "null" + "status": { + "type": "string", + "enum": [ + "DRAFT", + "PUBLISHED", + "SOLD_OUT", + "CANCELLED", + "COMPLETED" ] }, - "declineCode": { - "type": [ - "string", - "null" + "streamType": { + "type": "string" + }, + "maxPerCustomer": { + "description": "Cumulative per-buyer cap across ALL ticket types of this date. null = no date-level cap (each ticket type's own cap applies).", + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } ] + }, + "createdAt": { + "type": "string" } }, "required": [ "id", - "reference", + "eventId", + "label", + "startsAt", + "endsAt", + "doorsOpenAt", + "timezone", + "venueId", + "venue", + "ticketTypes", + "seatsioEventKey", "status", - "channel", - "subtotal", - "discountAmount", - "serviceFee", - "iva", - "total", - "currency", - "buyerName", - "buyerEmail", - "buyerPhone", - "buyerDocumentType", - "buyerDocumentNumber", - "organizationId", - "paymentProvider", - "paymentRef", - "confirmedAt", - "createdAt", - "failureReason", - "paymentStatus", - "declineCode" + "streamType", + "createdAt" ], "additionalProperties": false }, - "SaleDetail": { + "EventCreate": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "reference": { - "type": "string" - }, - "status": { + "name": { "type": "string", - "enum": [ - "PENDING", - "CONFIRMED", - "ABANDONED", - "CANCELLED", - "REFUNDED" - ] - }, - "channel": { - "type": "string" - }, - "subtotal": { - "type": "number" - }, - "discountAmount": { - "type": "number" - }, - "serviceFee": { - "type": "number" - }, - "iva": { - "type": "number" - }, - "total": { - "type": "number" - }, - "currency": { - "type": "string" + "minLength": 1 }, - "buyerName": { - "type": "string" + "slug": { + "type": "string", + "minLength": 1, + "pattern": "^[a-z0-9-]+$" }, - "buyerEmail": { + "description": { "type": "string" }, - "buyerPhone": { + "venueId": { "type": [ "string", "null" ] }, - "buyerDocumentType": { + "dates": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "startsAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + "endsAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } + ] + }, + "timezone": { + "default": "America/Bogota", + "type": "string", + "minLength": 1 + } + }, + "required": [ + "startsAt", + "timezone" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "slug", + "dates" + ], + "additionalProperties": false + }, + "EventUpdate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "description": { "type": [ "string", "null" ] }, - "buyerDocumentNumber": { + "venueId": { "type": [ "string", "null" ] - }, - "organizationId": { - "type": [ - "string", - "null" + }, + "coverImageUrl": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "slug": { + "description": "Public URL slug. Must be unique across live events (409 `SLUG_TAKEN`).", + "type": "string", + "minLength": 1, + "maxLength": 100, + "pattern": "^[a-z0-9-]+$" + }, + "squareImageUrl": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "storyImageUrl": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "pulepCode": { + "description": "PULEP code. Required (422 `PULEP_REQUIRED`) when the event is performing arts (or has no genre) and its capacity per date exceeds 400.", + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ] + }, + "listedOnPortal": { + "type": "boolean" + }, + "genre": { + "description": "Event type from the taxonomy.", + "type": "string", + "enum": [ + "comedia", + "musica", + "teatro", + "danza", + "cultura", + "familiar", + "fiesta", + "deporte", + "conferencia", + "otro" + ] + }, + "subgenre": { + "description": "Subtype; must belong to `genre`, which must be sent in the same request. null = no subtype.", + "anyOf": [ + { + "type": "string", + "enum": [ + "stand_up", + "impro", + "sketch", + "satira", + "rock", + "indie", + "pop", + "urbano", + "salsa", + "vallenato", + "electronica", + "tributo", + "opera", + "musical" + ] + }, + { + "type": "null" + } + ] + }, + "genreOther": { + "description": "Free-text type. Required when `genre` is \"otro\".", + "type": "string", + "minLength": 1, + "maxLength": 60 + }, + "audience": { + "description": "Minimum age classification. null = unspecified.", + "anyOf": [ + { + "type": "string", + "enum": [ + "todo_publico", + "mayores_14", + "mayores_18", + "infantil" + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "EventDateCreate": { + "type": "object", + "properties": { + "label": { + "anyOf": [ + { + "type": "string", + "maxLength": 200 + }, + { + "type": "null" + } ] }, - "paymentProvider": { - "type": [ - "string", - "null" - ] + "startsAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, - "paymentRef": { - "type": [ - "string", - "null" + "endsAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } ] }, - "confirmedAt": { - "type": [ - "string", - "null" + "doorsOpenAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } ] }, - "createdAt": { - "type": "string" + "timezone": { + "default": "America/Bogota", + "type": "string", + "minLength": 1 }, - "failureReason": { + "venueId": { "type": [ "string", "null" ] }, - "paymentStatus": { - "description": "Status of the latest payment event. Usually the payment gateway's RAW status in its own vocabulary. Values prefixed with `FT_` come from FreeTicket, not the gateway: currently `FT_SALE_APPROVED_POST_CONFIRM`, which marks that the gateway re-notified an already-confirmed charge — this is how Bold reports its refunds. A CONFIRMED sale with this status may have money refunded that is not yet recorded.", - "type": [ - "string", - "null" + "streamType": { + "default": "PRESENCIAL", + "type": "string", + "enum": [ + "PRESENCIAL", + "ONLINE", + "HIBRIDO" ] }, - "declineCode": { - "type": [ - "string", - "null" + "maxPerCustomer": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 10000 + }, + { + "type": "null" + } ] - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SaleItem" - } } }, "required": [ - "id", - "reference", - "status", - "channel", - "subtotal", - "discountAmount", - "serviceFee", - "iva", - "total", - "currency", - "buyerName", - "buyerEmail", - "buyerPhone", - "buyerDocumentType", - "buyerDocumentNumber", - "organizationId", - "paymentProvider", - "paymentRef", - "confirmedAt", - "createdAt", - "failureReason", - "paymentStatus", - "declineCode", - "items" + "startsAt", + "timezone" ], "additionalProperties": false }, - "MembershipPlan": { + "EventDateUpdate": { "type": "object", "properties": { - "id": { - "type": "string" + "label": { + "anyOf": [ + { + "type": "string", + "maxLength": 200 + }, + { + "type": "null" + } + ] }, - "organizationId": { - "type": [ - "string", - "null" + "startsAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + "endsAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } ] }, - "name": { - "type": "string" + "doorsOpenAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } + ] }, - "description": { + "timezone": { + "type": "string", + "minLength": 1 + }, + "venueId": { "type": [ "string", "null" ] }, - "price": { - "type": "number" - }, - "currency": { - "type": "string" + "streamType": { + "type": "string", + "enum": [ + "PRESENCIAL", + "ONLINE", + "HIBRIDO" + ] }, - "billingCycle": { + "status": { "type": "string", "enum": [ - "MONTHLY", - "QUARTERLY", - "SEMIANNUAL", - "ANNUAL", - "LIFETIME" + "DRAFT", + "PUBLISHED", + "SOLD_OUT", + "CANCELLED", + "COMPLETED" ] }, - "benefits": { - "type": "object", - "properties": { - "presale": { - "type": "boolean" - }, - "freeTicket": { - "type": "boolean" - }, - "discount": { - "type": "boolean" - }, - "exclusiveContent": { - "type": "boolean" + "maxPerCustomer": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 10000 }, - "merch": { - "type": "boolean" + { + "type": "null" } - }, - "required": [ - "presale", - "freeTicket", - "discount", - "exclusiveContent", - "merch" - ], - "additionalProperties": false - }, - "isActive": { - "type": "boolean" - }, - "sortOrder": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "createdAt": { - "type": "string" + ] } }, - "required": [ - "id", - "organizationId", - "name", - "description", - "price", - "currency", - "billingCycle", - "benefits", - "isActive", - "sortOrder", - "createdAt" - ], "additionalProperties": false }, - "MembershipPlanCreate": { + "TicketTypeCreate": { "type": "object", "properties": { + "eventDateId": { + "type": "string", + "minLength": 1 + }, "name": { "type": "string", "minLength": 1 @@ -25197,65 +25203,79 @@ }, "currency": { "default": "COP", - "type": "string" - }, - "billingCycle": { "type": "string", "enum": [ - "MONTHLY", - "QUARTERLY", - "SEMIANNUAL", - "ANNUAL", - "LIFETIME" + "COP" ] }, - "benefitPresale": { - "default": false, - "type": "boolean" + "capacity": { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 }, - "benefitFreeTicket": { - "default": false, - "type": "boolean" + "maxPerOrder": { + "default": 10, + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 }, - "benefitDiscount": { - "default": false, + "isVisible": { + "default": true, "type": "boolean" }, - "benefitExclusiveContent": { + "organizerAbsorbsFee": { "default": false, "type": "boolean" }, - "benefitMerch": { - "default": false, - "type": "boolean" + "saleStartsAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } + ] }, - "isActive": { - "default": true, - "type": "boolean" + "saleEndsAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } + ] }, - "sortOrder": { - "default": 0, - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "seatsioCategoryKey": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ] } }, "required": [ + "eventDateId", "name", "price", "currency", - "billingCycle", - "benefitPresale", - "benefitFreeTicket", - "benefitDiscount", - "benefitExclusiveContent", - "benefitMerch", - "isActive", - "sortOrder" + "capacity", + "maxPerOrder", + "isVisible", + "organizerAbsorbsFee" ], "additionalProperties": false }, - "MembershipPlanUpdate": { + "TicketTypeUpdate": { "type": "object", "properties": { "name": { @@ -25273,371 +25293,279 @@ "minimum": 0 }, "currency": { - "type": "string" - }, - "billingCycle": { + "description": "Solo COP; se tolera la moneda ya guardada si no cambia.", "type": "string", - "enum": [ - "MONTHLY", - "QUARTERLY", - "SEMIANNUAL", - "ANNUAL", - "LIFETIME" - ] - }, - "benefitPresale": { - "type": "boolean" - }, - "benefitFreeTicket": { - "type": "boolean" - }, - "benefitDiscount": { - "type": "boolean" - }, - "benefitExclusiveContent": { - "type": "boolean" - }, - "benefitMerch": { - "type": "boolean" - }, - "isActive": { - "type": "boolean" + "minLength": 3, + "maxLength": 3 }, - "sortOrder": { + "capacity": { "type": "integer", - "minimum": 0, + "exclusiveMinimum": 0, "maximum": 9007199254740991 - } - }, - "additionalProperties": false - }, - "VenueCreate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1 - }, - "address": { - "type": "string", - "minLength": 1 - }, - "city": { - "type": "string", - "minLength": 1 - }, - "country": { - "default": "CO", - "type": "string" }, - "capacity": { + "maxPerOrder": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, - "latitude": { - "type": "number", - "minimum": -90, - "maximum": 90 - }, - "longitude": { - "type": "number", - "minimum": -180, - "maximum": 180 - } - }, - "required": [ - "name", - "address", - "city", - "country" - ], - "additionalProperties": false - }, - "VenueUpdate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1 - }, - "address": { - "type": "string", - "minLength": 1 - }, - "city": { - "type": "string", - "minLength": 1 + "isVisible": { + "type": "boolean" }, - "country": { - "type": "string", - "minLength": 2, - "maxLength": 2 + "organizerAbsorbsFee": { + "type": "boolean" }, - "capacity": { + "saleStartsAt": { "anyOf": [ { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, - "latitude": { + "saleEndsAt": { "anyOf": [ { - "type": "number", - "minimum": -90, - "maximum": 90 + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, - "longitude": { + "seatsioCategoryKey": { "anyOf": [ { - "type": "number", - "minimum": -180, - "maximum": 180 + "type": "string", + "minLength": 1 }, { "type": "null" } ] - }, - "portalVisible": { - "type": "boolean" } }, "additionalProperties": false }, - "StaffUser": { + "EventSchedule": { "type": "object", "properties": { - "id": { - "type": "string" + "publishAt": { + "description": "Publish the DRAFT automatically at this instant (UTC). Must be in the future and before at least one of its dates.", + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, - "name": { + "saleStartsAt": { + "description": "Publish the DRAFT NOW and open ticket sales at this instant (UTC): sets `saleStartsAt` on every ticket type of the upcoming dates. Must be in the future and before the first upcoming date.", + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + } + }, + "additionalProperties": false + }, + "PresaleWindow": { + "type": "object", + "properties": { + "id": { "type": "string" }, - "email": { + "ticketTypeId": { "type": "string" }, - "role": { + "planId": { "type": "string", - "enum": [ - "SUPER_ADMIN", - "ADMIN", - "STAFF", - "VIEWER", - "MINCULTURA", - "MERCH_MANAGER" - ] - }, - "organizationId": { - "type": [ - "string", - "null" - ] + "description": "Membership plan whose active members get early access." }, - "workspaceId": { + "presaleStartsAt": { "type": "string" }, - "workspaceName": { + "presaleEndsAt": { "type": "string" }, + "presaleCapacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ], + "description": "Sub-cap of tickets sellable during the presale. null = shares the ticket type's whole capacity." + }, + "isActive": { + "type": "boolean" + }, "createdAt": { "type": "string" + }, + "updatedAt": { + "type": "string" } }, "required": [ "id", - "name", - "email", - "role", - "organizationId", - "createdAt" + "ticketTypeId", + "planId", + "presaleStartsAt", + "presaleEndsAt", + "presaleCapacity", + "isActive", + "createdAt", + "updatedAt" ], "additionalProperties": false }, - "StaffCreate": { + "PresaleWindowCreate": { "type": "object", "properties": { - "name": { + "planId": { "type": "string", "minLength": 1 }, - "email": { + "presaleStartsAt": { "type": "string", - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + "presaleEndsAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + "presaleCapacity": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "isActive": { + "default": true, + "type": "boolean" } }, "required": [ - "name", - "email" + "planId", + "presaleStartsAt", + "presaleEndsAt" ], "additionalProperties": false }, - "RoleUpdate": { + "PresaleWindowUpdate": { "type": "object", "properties": { - "role": { + "planId": { "type": "string", - "enum": [ - "SUPER_ADMIN", - "ADMIN", - "STAFF", - "VIEWER", - "MINCULTURA", - "MERCH_MANAGER" + "minLength": 1 + }, + "presaleStartsAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + "presaleEndsAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + "presaleCapacity": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, + { + "type": "null" + } ] + }, + "isActive": { + "type": "boolean" } }, - "required": [ - "role" - ], "additionalProperties": false }, - "ReportSummary": { + "SaleItem": { "type": "object", "properties": { - "period": { + "id": { "type": "string" }, - "currency": { + "ticketTypeId": { "type": "string" }, - "revenue": { - "type": "number" - }, - "ticketsSold": { + "quantity": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "salesCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "unitPrice": { + "type": "number" }, - "activeMemberships": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "period", - "currency", - "revenue", - "ticketsSold", - "salesCount", - "activeMemberships" - ], - "additionalProperties": false - }, - "MatchStatus": { - "type": "string", - "enum": [ - "OK", - "MISSING_INVOICE", - "MISSING_CUFE", - "AMOUNT_MISMATCH", - "MISSING_PAYMENT" - ] - }, - "InventoryRow": { - "type": "object", - "properties": { - "eventId": { - "type": "string" + "subtotal": { + "type": "number" }, - "eventName": { + "ticketCode": { "type": "string" }, - "eventStatus": { - "type": "string", - "enum": [ - "DRAFT", - "PUBLISHED", - "SOLD_OUT", - "CANCELLED", - "COMPLETED" - ] - }, - "eventDateId": { - "type": [ - "string", - "null" - ] - }, - "startsAt": { + "checkedInAt": { "type": [ "string", "null" ] }, - "ticketTypeId": { + "seatLabel": { "type": [ "string", "null" ] }, - "ticketTypeName": { + "refundedAt": { "type": [ "string", "null" ] - }, - "capacity": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "sold": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "reserved": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "available": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 } }, "required": [ - "eventId", - "eventName", - "eventStatus", - "eventDateId", - "startsAt", + "id", "ticketTypeId", - "ticketTypeName", - "capacity", - "sold", - "reserved", - "available" + "quantity", + "unitPrice", + "subtotal", + "ticketCode", + "checkedInAt", + "seatLabel", + "refundedAt" ], "additionalProperties": false }, - "ReconciliationRow": { + "Sale": { "type": "object", "properties": { - "sale_reference": { + "id": { "type": "string" }, - "sale_status": { + "reference": { + "type": "string" + }, + "status": { "type": "string", "enum": [ "PENDING", @@ -25647,61 +25575,92 @@ "REFUNDED" ] }, - "sale_amount": { + "channel": { + "type": "string" + }, + "subtotal": { "type": "number" }, - "mp_payment_ref": { + "discountAmount": { + "type": "number" + }, + "serviceFee": { + "type": "number" + }, + "iva": { + "type": "number" + }, + "total": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "buyerName": { + "type": "string" + }, + "buyerEmail": { + "type": "string" + }, + "buyerPhone": { "type": [ "string", "null" ] }, - "mp_provider": { + "buyerDocumentType": { "type": [ "string", "null" ] }, - "mp_amount": { + "buyerDocumentNumber": { "type": [ - "number", + "string", "null" ] }, - "siigo_invoice_name": { + "organizationId": { "type": [ "string", "null" ] }, - "siigo_invoice_status": { + "paymentProvider": { "type": [ "string", "null" ] }, - "siigo_cufe": { + "paymentRef": { "type": [ "string", "null" ] }, - "match_status": { - "$ref": "#/components/schemas/MatchStatus" + "confirmedAt": { + "type": [ + "string", + "null" + ] }, - "event_id": { + "createdAt": { + "type": "string" + }, + "failureReason": { "type": [ "string", "null" ] }, - "event_name": { + "paymentStatus": { + "description": "Status of the latest payment event. Usually the payment gateway's RAW status in its own vocabulary. Values prefixed with `FT_` come from FreeTicket, not the gateway: currently `FT_SALE_APPROVED_POST_CONFIRM`, which marks that the gateway re-notified an already-confirmed charge — this is how Bold reports its refunds. A CONFIRMED sale with this status may have money refunded that is not yet recorded.", "type": [ "string", "null" ] }, - "event_date_id": { + "declineCode": { "type": [ "string", "null" @@ -25709,97 +25668,42 @@ } }, "required": [ - "sale_reference", - "sale_status", - "sale_amount", - "mp_payment_ref", - "mp_provider", - "mp_amount", - "siigo_invoice_name", - "siigo_invoice_status", - "siigo_cufe", - "match_status", - "event_id", - "event_name", - "event_date_id" + "id", + "reference", + "status", + "channel", + "subtotal", + "discountAmount", + "serviceFee", + "iva", + "total", + "currency", + "buyerName", + "buyerEmail", + "buyerPhone", + "buyerDocumentType", + "buyerDocumentNumber", + "organizationId", + "paymentProvider", + "paymentRef", + "confirmedAt", + "createdAt", + "failureReason", + "paymentStatus", + "declineCode" ], "additionalProperties": false }, - "ExportSaleItem": { + "SaleDetail": { "type": "object", "properties": { - "eventId": { - "type": "string" - }, - "eventName": { - "type": "string" - }, - "eventDateId": { - "type": "string" - }, - "eventDateStartsAt": { - "type": "string" - }, - "ticketTypeId": { - "type": "string" - }, - "ticketTypeName": { + "id": { "type": "string" }, - "quantity": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "eventId", - "eventName", - "eventDateId", - "eventDateStartsAt", - "ticketTypeId", - "ticketTypeName", - "quantity" - ], - "additionalProperties": false - }, - "ExportBuyer": { - "type": "object", - "properties": { "reference": { "type": "string" }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": [ - "string", - "null" - ] - }, - "documentType": { - "type": [ - "string", - "null" - ] - }, - "documentNumber": { - "type": [ - "string", - "null" - ] - }, - "total": { - "type": "number" - }, - "currency": { - "type": "string" - }, - "saleStatus": { + "status": { "type": "string", "enum": [ "PENDING", @@ -25809,245 +25713,204 @@ "REFUNDED" ] }, - "createdAt": { + "channel": { "type": "string" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExportSaleItem" - } - } - }, - "required": [ - "reference", - "name", - "email", - "phone", - "documentType", - "documentNumber", - "total", - "currency", - "saleStatus", - "createdAt", - "items" - ], - "additionalProperties": false - }, - "ExportAttendee": { - "type": "object", - "properties": { - "reference": { + "subtotal": { + "type": "number" + }, + "discountAmount": { + "type": "number" + }, + "serviceFee": { + "type": "number" + }, + "iva": { + "type": "number" + }, + "total": { + "type": "number" + }, + "currency": { "type": "string" }, - "name": { + "buyerName": { "type": "string" }, - "email": { + "buyerEmail": { "type": "string" }, - "phone": { + "buyerPhone": { "type": [ "string", "null" ] }, - "documentType": { + "buyerDocumentType": { "type": [ "string", "null" ] }, - "documentNumber": { + "buyerDocumentNumber": { "type": [ "string", "null" ] }, - "ticketCode": { - "type": "string" - }, - "quantity": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "checkedInAt": { + "organizationId": { "type": [ "string", "null" ] }, - "checkedInSource": { + "paymentProvider": { "type": [ "string", "null" ] }, - "eventId": { - "type": "string" - }, - "eventName": { - "type": "string" - }, - "eventDateId": { - "type": "string" - }, - "eventDateStartsAt": { - "type": "string" - }, - "ticketTypeId": { - "type": "string" - }, - "ticketTypeName": { - "type": "string" - }, - "saleStatus": { - "type": "string", - "enum": [ - "PENDING", - "CONFIRMED", - "ABANDONED", - "CANCELLED", - "REFUNDED" + "paymentRef": { + "type": [ + "string", + "null" ] }, - "createdAt": { - "type": "string" - } - }, - "required": [ - "reference", - "name", - "email", - "phone", - "documentType", - "documentNumber", - "ticketCode", - "quantity", - "checkedInAt", - "checkedInSource", - "eventId", - "eventName", - "eventDateId", - "eventDateStartsAt", - "ticketTypeId", - "ticketTypeName", - "saleStatus", - "createdAt" - ], - "additionalProperties": false - }, - "ExportSubscriber": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" + "confirmedAt": { + "type": [ + "string", + "null" + ] }, - "plan": { + "createdAt": { "type": "string" }, - "status": { - "type": "string" + "failureReason": { + "type": [ + "string", + "null" + ] }, - "since": { - "type": "string" + "paymentStatus": { + "description": "Status of the latest payment event. Usually the payment gateway's RAW status in its own vocabulary. Values prefixed with `FT_` come from FreeTicket, not the gateway: currently `FT_SALE_APPROVED_POST_CONFIRM`, which marks that the gateway re-notified an already-confirmed charge — this is how Bold reports its refunds. A CONFIRMED sale with this status may have money refunded that is not yet recorded.", + "type": [ + "string", + "null" + ] }, - "expiresAt": { + "declineCode": { "type": [ "string", "null" ] - } - }, - "required": [ - "name", - "email", - "plan", - "status", - "since", - "expiresAt" - ], - "additionalProperties": false - }, - "EventArtistsReplace": { - "type": "object", - "properties": { - "artistIds": { - "maxItems": 50, - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 64 - } }, - "inviteEmails": { - "maxItems": 20, + "items": { "type": "array", "items": { - "type": "string", - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "$ref": "#/components/schemas/SaleItem" } } }, "required": [ - "artistIds" + "id", + "reference", + "status", + "channel", + "subtotal", + "discountAmount", + "serviceFee", + "iva", + "total", + "currency", + "buyerName", + "buyerEmail", + "buyerPhone", + "buyerDocumentType", + "buyerDocumentNumber", + "organizationId", + "paymentProvider", + "paymentRef", + "confirmedAt", + "createdAt", + "failureReason", + "paymentStatus", + "declineCode", + "items" ], "additionalProperties": false }, - "ArtistSummary": { + "MembershipPlan": { "type": "object", "properties": { "id": { "type": "string" }, - "name": { - "type": "string" - }, - "slug": { + "organizationId": { "type": [ "string", "null" ] }, - "logoUrl": { + "name": { + "type": "string" + }, + "description": { "type": [ "string", "null" ] - } - }, - "required": [ - "id", - "name", - "slug", - "logoUrl" - ], - "additionalProperties": false - }, - "ArtistInvitation": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "email": { + "price": { + "type": "number" + }, + "currency": { "type": "string" }, - "status": { + "billingCycle": { "type": "string", "enum": [ - "PENDING", - "EXPIRED" + "MONTHLY", + "QUARTERLY", + "SEMIANNUAL", + "ANNUAL", + "LIFETIME" ] }, - "expiresAt": { - "type": "string" + "benefits": { + "type": "object", + "properties": { + "presale": { + "type": "boolean" + }, + "freeTicket": { + "type": "boolean" + }, + "discount": { + "type": "boolean" + }, + "exclusiveContent": { + "type": "boolean" + }, + "merch": { + "type": "boolean" + } + }, + "required": [ + "presale", + "freeTicket", + "discount", + "exclusiveContent", + "merch" + ], + "additionalProperties": false + }, + "isActive": { + "type": "boolean" + }, + "sortOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "createdAt": { "type": "string" @@ -26055,173 +25918,312 @@ }, "required": [ "id", - "email", - "status", - "expiresAt", + "organizationId", + "name", + "description", + "price", + "currency", + "billingCycle", + "benefits", + "isActive", + "sortOrder", "createdAt" ], "additionalProperties": false }, - "EventArtistUnlink": { + "MembershipPlanCreate": { "type": "object", "properties": { - "eventId": { + "name": { + "type": "string", + "minLength": 1 + }, + "description": { "type": "string" }, - "organizationId": { + "price": { + "type": "number", + "minimum": 0 + }, + "currency": { + "default": "COP", "type": "string" }, - "unlinked": { + "billingCycle": { + "type": "string", + "enum": [ + "MONTHLY", + "QUARTERLY", + "SEMIANNUAL", + "ANNUAL", + "LIFETIME" + ] + }, + "benefitPresale": { + "default": false, "type": "boolean" - } - }, - "required": [ - "eventId", - "organizationId", - "unlinked" - ], - "additionalProperties": false - }, - "ArtistInvitationDeleted": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "deleted": { - "type": "boolean", - "const": true + "benefitFreeTicket": { + "default": false, + "type": "boolean" + }, + "benefitDiscount": { + "default": false, + "type": "boolean" + }, + "benefitExclusiveContent": { + "default": false, + "type": "boolean" + }, + "benefitMerch": { + "default": false, + "type": "boolean" + }, + "isActive": { + "default": true, + "type": "boolean" + }, + "sortOrder": { + "default": 0, + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 } }, "required": [ - "id", - "deleted" + "name", + "price", + "currency", + "billingCycle", + "benefitPresale", + "benefitFreeTicket", + "benefitDiscount", + "benefitExclusiveContent", + "benefitMerch", + "isActive", + "sortOrder" ], "additionalProperties": false }, - "EventViewer": { + "MembershipPlanUpdate": { "type": "object", "properties": { - "id": { - "type": "string" + "name": { + "type": "string", + "minLength": 1 }, - "email": { - "type": "string" + "description": { + "type": [ + "string", + "null" + ] }, - "createdAt": { + "price": { + "type": "number", + "minimum": 0 + }, + "currency": { "type": "string" - } - }, - "required": [ - "id", - "email", - "createdAt" - ], - "additionalProperties": false - }, - "EventViewerInvite": { - "type": "object", - "properties": { - "email": { + }, + "billingCycle": { "type": "string", - "maxLength": 255, - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "enum": [ + "MONTHLY", + "QUARTERLY", + "SEMIANNUAL", + "ANNUAL", + "LIFETIME" + ] + }, + "benefitPresale": { + "type": "boolean" + }, + "benefitFreeTicket": { + "type": "boolean" + }, + "benefitDiscount": { + "type": "boolean" + }, + "benefitExclusiveContent": { + "type": "boolean" + }, + "benefitMerch": { + "type": "boolean" + }, + "isActive": { + "type": "boolean" + }, + "sortOrder": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 } }, - "required": [ - "email" - ], "additionalProperties": false }, - "EventViewerInviteResult": { + "VenueCreate": { "type": "object", "properties": { - "id": { - "type": "string" + "name": { + "type": "string", + "minLength": 1 }, - "email": { - "type": "string" + "address": { + "type": "string", + "minLength": 1 }, - "createdAt": { + "city": { + "type": "string", + "minLength": 1 + }, + "country": { + "default": "CO", "type": "string" }, - "newAccount": { - "deprecated": true, - "description": "Deprecated, never sent: it revealed whether the email already had a FreeTicket account.", - "type": "boolean" + "capacity": { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, + "latitude": { + "type": "number", + "minimum": -90, + "maximum": 90 + }, + "longitude": { + "type": "number", + "minimum": -180, + "maximum": 180 } }, "required": [ - "id", - "email", - "createdAt" + "name", + "address", + "city", + "country" ], "additionalProperties": false }, - "EventViewerRevoke": { + "VenueUpdate": { "type": "object", "properties": { - "id": { - "type": "string" + "name": { + "type": "string", + "minLength": 1 }, - "eventId": { - "type": "string" + "address": { + "type": "string", + "minLength": 1 }, - "revoked": { + "city": { + "type": "string", + "minLength": 1 + }, + "country": { + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "latitude": { + "anyOf": [ + { + "type": "number", + "minimum": -90, + "maximum": 90 + }, + { + "type": "null" + } + ] + }, + "longitude": { + "anyOf": [ + { + "type": "number", + "minimum": -180, + "maximum": 180 + }, + { + "type": "null" + } + ] + }, + "portalVisible": { "type": "boolean" } }, - "required": [ - "id", - "eventId", - "revoked" - ], "additionalProperties": false }, - "EventValidator": { + "StaffUser": { "type": "object", "properties": { "id": { "type": "string" }, - "userId": { - "description": "Only present when the person is a member of the active workspace.", - "type": "string" - }, "name": { - "description": "Only present when the person is a member of the active workspace.", "type": "string" }, "email": { "type": "string" }, - "isActive": { - "type": "boolean" + "role": { + "type": "string", + "enum": [ + "SUPER_ADMIN", + "ADMIN", + "STAFF", + "VIEWER", + "MINCULTURA", + "MERCH_MANAGER" + ] }, - "allEvents": { - "type": "boolean" + "organizationId": { + "type": [ + "string", + "null" + ] + }, + "workspaceId": { + "type": "string" + }, + "workspaceName": { + "type": "string" + }, + "createdAt": { + "type": "string" } }, "required": [ "id", + "name", "email", - "isActive", - "allEvents" + "role", + "organizationId", + "createdAt" ], "additionalProperties": false }, - "EventValidatorCreate": { + "StaffCreate": { "type": "object", "properties": { "name": { - "type": "string", - "minLength": 2, - "maxLength": 100 + "type": "string", + "minLength": 1 }, "email": { "type": "string", - "maxLength": 255, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" } @@ -26232,172 +26234,224 @@ ], "additionalProperties": false }, - "EventValidatorCreateResult": { + "RoleUpdate": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "userId": { - "description": "Only present when the person is a member of the active workspace.", - "type": "string" - }, - "name": { - "description": "Only present when the person is a member of the active workspace.", - "type": "string" - }, - "email": { - "type": "string" - }, - "isActive": { - "type": "boolean" - }, - "allEvents": { - "type": "boolean" - }, - "invited": { - "type": "boolean" + "role": { + "type": "string", + "enum": [ + "SUPER_ADMIN", + "ADMIN", + "STAFF", + "VIEWER", + "MINCULTURA", + "MERCH_MANAGER" + ] } }, "required": [ - "id", - "email", - "isActive", - "allEvents", - "invited" + "role" ], "additionalProperties": false }, - "StaffInviteResend": { + "ReportSummary": { "type": "object", "properties": { - "id": { + "period": { "type": "string" }, - "email": { + "currency": { "type": "string" }, - "sent": { - "type": "boolean" + "revenue": { + "type": "number" + }, + "ticketsSold": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "salesCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "activeMemberships": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "id", - "email", - "sent" + "period", + "currency", + "revenue", + "ticketsSold", + "salesCount", + "activeMemberships" ], "additionalProperties": false }, - "StaffAccessUpdate": { + "MatchStatus": { + "type": "string", + "enum": [ + "OK", + "MISSING_INVOICE", + "MISSING_CUFE", + "AMOUNT_MISMATCH", + "MISSING_PAYMENT" + ] + }, + "InventoryRow": { "type": "object", "properties": { - "accessType": { + "eventId": { + "type": "string" + }, + "eventName": { + "type": "string" + }, + "eventStatus": { "type": "string", "enum": [ - "admin", - "validador", - "personalizado", - "lectura" + "DRAFT", + "PUBLISHED", + "SOLD_OUT", + "CANCELLED", + "COMPLETED" ] }, - "sections": { - "maxItems": 50, - "type": "array", - "items": { - "type": "string", - "enum": [ - "inicio", - "eventos", - "validar", - "membresias", - "contenido", - "productos", - "pagina_web", - "comunicacion", - "informes", - "liquidaciones", - "tienda", - "perfil" - ] - } + "eventDateId": { + "type": [ + "string", + "null" + ] }, - "validatorEventIds": { - "maxItems": 200, - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 64 - } + "startsAt": { + "type": [ + "string", + "null" + ] }, - "viewerEventIds": { - "maxItems": 200, - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 64 - } + "ticketTypeId": { + "type": [ + "string", + "null" + ] }, - "expiresAt": { - "anyOf": [ - { - "type": "string", - "pattern": "^\\d{4}-\\d{2}-\\d{2}$" - }, - { - "type": "null" - } + "ticketTypeName": { + "type": [ + "string", + "null" ] + }, + "capacity": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sold": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "reserved": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "available": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "accessType" + "eventId", + "eventName", + "eventStatus", + "eventDateId", + "startsAt", + "ticketTypeId", + "ticketTypeName", + "capacity", + "sold", + "reserved", + "available" ], "additionalProperties": false }, - "StaffAccess": { + "ReconciliationRow": { "type": "object", "properties": { - "userId": { + "sale_reference": { "type": "string" }, - "accessType": { + "sale_status": { "type": "string", "enum": [ - "admin", - "validador", - "personalizado", - "lectura" + "PENDING", + "CONFIRMED", + "ABANDONED", + "CANCELLED", + "REFUNDED" ] }, - "role": { - "type": "string", - "enum": [ - "ADMIN", - "STAFF", - "VIEWER" + "sale_amount": { + "type": "number" + }, + "mp_payment_ref": { + "type": [ + "string", + "null" ] }, - "sections": { - "type": "array", - "items": { - "type": "string" - } + "mp_provider": { + "type": [ + "string", + "null" + ] }, - "validatorEventIds": { - "type": "array", - "items": { - "type": "string" - } + "mp_amount": { + "type": [ + "number", + "null" + ] }, - "viewerEventIds": { - "type": "array", - "items": { - "type": "string" - } + "siigo_invoice_name": { + "type": [ + "string", + "null" + ] }, - "expiresAt": { + "siigo_invoice_status": { + "type": [ + "string", + "null" + ] + }, + "siigo_cufe": { + "type": [ + "string", + "null" + ] + }, + "match_status": { + "$ref": "#/components/schemas/MatchStatus" + }, + "event_id": { + "type": [ + "string", + "null" + ] + }, + "event_name": { + "type": [ + "string", + "null" + ] + }, + "event_date_id": { "type": [ "string", "null" @@ -26405,139 +26459,97 @@ } }, "required": [ - "userId", - "accessType", - "role", - "sections", - "validatorEventIds", - "viewerEventIds", - "expiresAt" + "sale_reference", + "sale_status", + "sale_amount", + "mp_payment_ref", + "mp_provider", + "mp_amount", + "siigo_invoice_name", + "siigo_invoice_status", + "siigo_cufe", + "match_status", + "event_id", + "event_name", + "event_date_id" ], "additionalProperties": false }, - "SaleCreate": { + "ExportSaleItem": { "type": "object", "properties": { - "buyer": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1 - }, - "email": { - "type": "string", - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, - "phone": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "name", - "email" - ], - "additionalProperties": false + "eventId": { + "type": "string" }, - "items": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "ticketTypeId": { - "type": "string", - "minLength": 1 - }, - "quantity": { - "type": "integer", - "minimum": 1, - "maximum": 9007199254740991 - }, - "seats": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - } - }, - "required": [ - "ticketTypeId", - "quantity" - ], - "additionalProperties": false - } + "eventName": { + "type": "string" }, - "channel": { - "default": "ADMIN", - "type": "string", - "enum": [ - "WEB", - "MOBILE", - "POS", - "ADMIN" - ] + "eventDateId": { + "type": "string" }, - "comp": { - "default": false, - "type": "boolean" + "eventDateStartsAt": { + "type": "string" }, - "notes": { + "ticketTypeId": { "type": "string" + }, + "ticketTypeName": { + "type": "string" + }, + "quantity": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "buyer", - "items", - "channel", - "comp" + "eventId", + "eventName", + "eventDateId", + "eventDateStartsAt", + "ticketTypeId", + "ticketTypeName", + "quantity" ], "additionalProperties": false }, - "SaleCancelRequest": { - "type": "object", - "properties": { - "acknowledge_open_payment": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "SaleRefundRequest": { + "ExportBuyer": { "type": "object", "properties": { - "acknowledge_manual": { - "type": "boolean" + "reference": { + "type": "string" }, - "items": { - "minItems": 1, - "maxItems": 200, - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 64 - } + "name": { + "type": "string" }, - "block_seats": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "SaleRefundResult": { - "type": "object", - "properties": { - "id": { + "email": { "type": "string" }, - "reference": { + "phone": { + "type": [ + "string", + "null" + ] + }, + "documentType": { + "type": [ + "string", + "null" + ] + }, + "documentNumber": { + "type": [ + "string", + "null" + ] + }, + "total": { + "type": "number" + }, + "currency": { "type": "string" }, - "status": { + "saleStatus": { "type": "string", "enum": [ "PENDING", @@ -26547,883 +26559,1241 @@ "REFUNDED" ] }, - "channel": { + "createdAt": { "type": "string" }, - "subtotal": { - "type": "number" - }, - "discountAmount": { - "type": "number" - }, - "serviceFee": { - "type": "number" - }, - "iva": { - "type": "number" - }, - "total": { - "type": "number" - }, - "currency": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportSaleItem" + } + } + }, + "required": [ + "reference", + "name", + "email", + "phone", + "documentType", + "documentNumber", + "total", + "currency", + "saleStatus", + "createdAt", + "items" + ], + "additionalProperties": false + }, + "ExportAttendee": { + "type": "object", + "properties": { + "reference": { "type": "string" }, - "buyerName": { + "name": { "type": "string" }, - "buyerEmail": { + "email": { "type": "string" }, - "buyerPhone": { + "phone": { "type": [ "string", "null" ] }, - "buyerDocumentType": { + "documentType": { "type": [ "string", "null" ] }, - "buyerDocumentNumber": { + "documentNumber": { "type": [ "string", "null" ] }, - "organizationId": { - "type": [ - "string", - "null" - ] + "ticketCode": { + "type": "string" }, - "paymentProvider": { - "type": [ - "string", - "null" - ] + "quantity": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "paymentRef": { + "checkedInAt": { "type": [ "string", "null" ] }, - "confirmedAt": { + "checkedInSource": { "type": [ "string", "null" ] }, - "createdAt": { + "eventId": { "type": "string" }, - "failureReason": { - "type": [ - "string", - "null" - ] + "eventName": { + "type": "string" }, - "paymentStatus": { - "description": "Status of the latest payment event. Usually the payment gateway's RAW status in its own vocabulary. Values prefixed with `FT_` come from FreeTicket, not the gateway: currently `FT_SALE_APPROVED_POST_CONFIRM`, which marks that the gateway re-notified an already-confirmed charge — this is how Bold reports its refunds. A CONFIRMED sale with this status may have money refunded that is not yet recorded.", - "type": [ - "string", - "null" - ] + "eventDateId": { + "type": "string" }, - "declineCode": { - "type": [ - "string", - "null" + "eventDateStartsAt": { + "type": "string" + }, + "ticketTypeId": { + "type": "string" + }, + "ticketTypeName": { + "type": "string" + }, + "saleStatus": { + "type": "string", + "enum": [ + "PENDING", + "CONFIRMED", + "ABANDONED", + "CANCELLED", + "REFUNDED" ] }, - "refund": { - "type": "object", - "properties": { - "amount": { - "type": [ - "number", - "null" - ] - }, - "refundedItemIds": { - "type": "array", - "items": { - "type": "string" - } - }, - "saleRefunded": { - "type": "boolean" - }, - "gatewayRefunded": { - "type": "boolean" - }, - "seats": { - "type": "string", - "enum": [ - "blocked", - "block_failed", - "released", - "release_failed", - "none" - ] - } - }, - "required": [ - "amount", - "refundedItemIds", - "saleRefunded", - "gatewayRefunded", - "seats" - ], - "additionalProperties": false + "createdAt": { + "type": "string" } }, "required": [ - "id", "reference", - "status", - "channel", - "subtotal", - "discountAmount", - "serviceFee", - "iva", - "total", - "currency", - "buyerName", - "buyerEmail", - "buyerPhone", - "buyerDocumentType", - "buyerDocumentNumber", - "organizationId", - "paymentProvider", - "paymentRef", - "confirmedAt", - "createdAt", - "failureReason", - "paymentStatus", - "declineCode" - ], - "additionalProperties": false - }, - "SaleItemTransferRequest": { - "type": "object", - "properties": { - "email": { - "type": "string", - "maxLength": 254, - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } - }, - "required": [ - "email" + "name", + "email", + "phone", + "documentType", + "documentNumber", + "ticketCode", + "quantity", + "checkedInAt", + "checkedInSource", + "eventId", + "eventName", + "eventDateId", + "eventDateStartsAt", + "ticketTypeId", + "ticketTypeName", + "saleStatus", + "createdAt" ], "additionalProperties": false }, - "SaleItemTransfer": { + "ExportSubscriber": { "type": "object", "properties": { - "saleId": { + "name": { "type": "string" }, - "itemId": { + "email": { "type": "string" }, - "ticketCode": { - "type": "string", - "description": "New ticket code (the previous QR is void)." - }, - "holderName": { + "plan": { "type": "string" }, - "holderEmail": { + "status": { "type": "string" }, - "transferredAt": { + "since": { "type": "string" - } - }, - "required": [ - "saleId", - "itemId", - "ticketCode", - "holderName", - "holderEmail", - "transferredAt" - ], - "additionalProperties": false - }, - "CourtesyRecipientUpdate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 2, - "maxLength": 120 }, - "email": { - "type": "string", - "maxLength": 254, - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "expiresAt": { + "type": [ + "string", + "null" + ] } }, "required": [ "name", - "email" + "email", + "plan", + "status", + "since", + "expiresAt" ], "additionalProperties": false }, - "CourtesyRecipient": { + "MerchOrderCreate": { "type": "object", "properties": { - "saleId": { - "type": "string" - }, - "name": { - "type": "string" + "buyer": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 120 + }, + "phone": { + "type": "string", + "pattern": "^\\+?[0-9 -]{7,20}$" + }, + "documentType": { + "type": "string", + "enum": [ + "CC", + "CE", + "PP", + "NIT", + "TI", + "PEP" + ] + }, + "document": { + "type": "string", + "minLength": 3, + "maxLength": 20 + } + }, + "required": [ + "name", + "phone", + "documentType", + "document" + ], + "additionalProperties": false }, - "email": { - "type": "string" + "delivery": { + "oneOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "SHIPPING" + }, + "departmentCode": { + "type": "string", + "pattern": "^\\d{2}$" + }, + "department": { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + "cityCode": { + "type": "string", + "pattern": "^\\d{5}$" + }, + "city": { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + "address": { + "type": "string", + "minLength": 5, + "maxLength": 200 + }, + "addressExtra": { + "anyOf": [ + { + "type": "string", + "maxLength": 200 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "kind", + "departmentCode", + "department", + "cityCode", + "city", + "address" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "PICKUP" + }, + "pickupPointId": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "kind", + "pickupPointId" + ], + "additionalProperties": false + } + ] }, - "resent": { - "type": "boolean" + "items": { + "minItems": 1, + "maxItems": 20, + "type": "array", + "items": { + "type": "object", + "properties": { + "variantId": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "quantity": { + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + "required": [ + "variantId", + "quantity" + ], + "additionalProperties": false + } }, - "ticketCodesRotated": { - "type": "boolean", - "description": "true when the email changed: the previous QR codes are void (transferred tickets keep theirs)." + "discountCode": { + "description": "Optional discount code of this store (case-insensitive). It applies to products only, never to shipping.", + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + { + "type": "null" + } + ] } }, "required": [ - "saleId", - "name", - "email", - "resent", - "ticketCodesRotated" + "buyer", + "delivery", + "items" ], "additionalProperties": false }, - "CourtesySeats": { + "MerchDiscountPreview": { "type": "object", "properties": { - "eventDateId": { - "type": "string" - }, - "eventId": { - "type": "string" + "discountCode": { + "type": "string", + "minLength": 1, + "maxLength": 40 }, - "ticketTypes": { + "items": { + "minItems": 1, + "maxItems": 20, "type": "array", "items": { "type": "object", "properties": { - "ticketTypeId": { - "type": "string" - }, - "name": { - "type": "string" + "variantId": { + "type": "string", + "minLength": 1, + "maxLength": 64 }, - "labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Blocked seat labels of this ticket type's category that no live sale claims, in natural order." + "quantity": { + "type": "integer", + "minimum": 1, + "maximum": 50 } }, "required": [ - "ticketTypeId", - "name", - "labels" + "variantId", + "quantity" ], "additionalProperties": false } + }, + "delivery": { + "oneOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "SHIPPING" + }, + "cityCode": { + "type": "string", + "pattern": "^\\d{5}$" + } + }, + "required": [ + "kind", + "cityCode" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "PICKUP" + } + }, + "required": [ + "kind" + ], + "additionalProperties": false + } + ] } }, "required": [ - "eventDateId", - "eventId", - "ticketTypes" + "discountCode", + "items", + "delivery" ], "additionalProperties": false }, - "ReportByEventRow": { + "MerchDiscountPreviewResult": { "type": "object", "properties": { - "eventId": { - "type": "string" + "discountCode": { + "type": "string", + "description": "The code as the store saved it." }, - "eventName": { - "type": "string" + "subtotal": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Products before the discount." }, - "revenue": { - "type": "number" + "discountAmount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "ticketsSold": { + "shippingFee": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "salesCount": { + "total": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "`total = subtotal - discountAmount + shippingFee`." + } + }, + "required": [ + "discountCode", + "subtotal", + "discountAmount", + "shippingFee", + "total" + ], + "additionalProperties": false + }, + "MerchOrderLookup": { + "type": "object", + "properties": { + "code": { + "type": "string", + "minLength": 3, + "maxLength": 20 + } + }, + "required": [ + "code" + ], + "additionalProperties": false + }, + "MerchCardPayment": { + "type": "object", + "properties": { + "token": { + "type": "string", + "minLength": 1, + "description": "Card token returned by the Payment Brick when tokenizing." + }, + "paymentMethodId": { + "type": "string", + "minLength": 1, + "description": "`payment_method_id` returned by the Brick (e.g. `visa`, `debmaster`)." + }, + "installments": { + "default": 1, "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "minimum": 1, + "maximum": 36 }, - "available": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "issuerId": { + "description": "`issuer_id` returned by the Brick (card issuer). Optional: forwarded to MercadoPago as is when present.", + "type": "string", + "pattern": "^\\d{1,12}$" + }, + "payer": { + "type": "object", + "properties": { + "identification": { + "type": "object", + "properties": { + "type": { + "type": "string", + "minLength": 1 + }, + "number": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "type", + "number" + ], + "additionalProperties": false + } + }, + "additionalProperties": false } }, "required": [ - "eventId", - "eventName", - "revenue", - "ticketsSold", - "salesCount", - "available" + "token", + "paymentMethodId", + "installments" ], "additionalProperties": false }, - "ReportTimeseriesRow": { + "MerchCardPaymentResult": { "type": "object", "properties": { - "bucket": { - "type": "string" - }, - "revenue": { - "type": "number" + "status": { + "type": "string", + "enum": [ + "approved", + "pending", + "rejected" + ], + "description": "`pending` is normal (bank authentication): the order is confirmed by webhook, poll the lookup. `rejected` is a business decline: the order stays pending until its reservation expires and the buyer can retry with another card." }, - "ticketsSold": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "code": { + "type": "string" }, - "salesCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "message": { + "description": "Human-readable message. Only present with `rejected`.", + "type": "string" } }, "required": [ - "bucket", - "revenue", - "ticketsSold", - "salesCount" + "status", + "code" ], "additionalProperties": false }, - "ReportFinancialsRow": { + "MerchOrder": { "type": "object", "properties": { - "eventId": { + "code": { "type": "string" }, - "eventName": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "PENDING", + "PAID", + "PREPARING", + "SHIPPED", + "DELIVERED", + "READY_FOR_PICKUP", + "PICKED_UP", + "CANCELLED", + "REFUNDED" + ] }, - "eventDateId": { - "type": "string" + "currency": { + "type": "string", + "const": "COP" }, - "startsAt": { + "reservedUntil": { + "type": [ + "string", + "null" + ] + }, + "createdAt": { "type": "string" }, - "past": { - "type": "boolean" + "paidAt": { + "type": [ + "string", + "null" + ] }, - "unitsSold": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "buyer": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "phone": { + "type": "string" + } + }, + "required": [ + "email", + "name", + "phone" + ], + "additionalProperties": false }, - "gross": { - "type": "number" + "fulfillment": { + "type": "string", + "enum": [ + "SHIPPING", + "PICKUP" + ] }, - "platformFee": { - "type": "number" + "shipping": { + "anyOf": [ + { + "type": "object", + "properties": { + "departmentCode": { + "type": [ + "string", + "null" + ] + }, + "department": { + "type": [ + "string", + "null" + ] + }, + "cityCode": { + "type": [ + "string", + "null" + ] + }, + "city": { + "type": [ + "string", + "null" + ] + }, + "address": { + "type": [ + "string", + "null" + ] + }, + "addressExtra": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "departmentCode", + "department", + "cityCode", + "city", + "address", + "addressExtra" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] }, - "facial": { - "type": "number" + "pickupPoint": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": [ + "string", + "null" + ] + }, + "schedule": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name", + "address", + "city", + "schedule" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] }, - "paymentFee": { - "type": "number" + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "variantId": { + "type": "string" + }, + "productName": { + "type": "string" + }, + "variantLabel": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "quantity": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "unitPrice": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "imageUrl": { + "description": "First image of the variant's product at read time; null if the product has no image or was deleted.", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "variantId", + "productName", + "variantLabel", + "sku", + "quantity", + "unitPrice", + "imageUrl" + ], + "additionalProperties": false + } }, - "wompiSalesWithoutRate": { + "subtotal": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991 + "maximum": 9007199254740991, + "description": "Products before the discount, in COP." }, - "gmf": { - "type": "number" + "discountCode": { + "description": "Discount code frozen on the order; null if none was used.", + "type": [ + "string", + "null" + ] }, - "net": { - "type": "number" + "discountAmount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "COP taken off the products: `total = subtotal - discountAmount + shippingFee`." }, - "currency": { - "type": "string" + "shippingFee": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "settlementStatus": { + "total": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "tracking": { "anyOf": [ { - "type": "string", - "enum": [ - "SENT", - "AWAITING_PAYMENT", - "PAID" - ] + "type": "object", + "properties": { + "carrier": { + "type": [ + "string", + "null" + ] + }, + "carrierName": { + "type": [ + "string", + "null" + ] + }, + "carrierLabel": { + "type": [ + "string", + "null" + ] + }, + "trackingNumber": { + "type": [ + "string", + "null" + ] + }, + "trackingUrl": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "carrier", + "carrierName", + "carrierLabel", + "trackingNumber", + "trackingUrl" + ], + "additionalProperties": false }, { "type": "null" } ] }, - "settlementId": { - "type": [ - "string", - "null" - ] + "statusDates": { + "type": "object", + "properties": { + "paidAt": { + "type": [ + "string", + "null" + ] + }, + "preparingAt": { + "type": [ + "string", + "null" + ] + }, + "shippedAt": { + "type": [ + "string", + "null" + ] + }, + "deliveredAt": { + "type": [ + "string", + "null" + ] + }, + "readyForPickupAt": { + "type": [ + "string", + "null" + ] + }, + "pickedUpAt": { + "type": [ + "string", + "null" + ] + }, + "cancelledAt": { + "type": [ + "string", + "null" + ] + }, + "refundedAt": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "paidAt", + "preparingAt", + "shippedAt", + "deliveredAt", + "readyForPickupAt", + "pickedUpAt", + "cancelledAt", + "refundedAt" + ], + "additionalProperties": false }, - "settlementAmount": { + "mpPublicKey": { + "description": "Public key of the brand's own MercadoPago account, for the Payment Brick. null when the store has no connected account.", "type": [ - "number", + "string", "null" ] } }, "required": [ - "eventId", - "eventName", - "eventDateId", - "startsAt", - "past", - "unitsSold", - "gross", - "platformFee", - "facial", - "paymentFee", - "wompiSalesWithoutRate", - "gmf", - "net", + "code", + "status", "currency", - "settlementStatus", - "settlementId", - "settlementAmount" + "reservedUntil", + "createdAt", + "paidAt", + "buyer", + "fulfillment", + "shipping", + "pickupPoint", + "items", + "subtotal", + "discountCode", + "discountAmount", + "shippingFee", + "total", + "tracking", + "statusDates", + "mpPublicKey" ], "additionalProperties": false }, - "Settlement": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "reference": { - "type": "string" - }, - "label": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "SENT", - "AWAITING_PAYMENT", - "PAID" - ] - }, - "amount": { - "type": "number" - }, - "grossAmount": { - "type": [ - "number", - "null" - ] - }, - "unitsSold": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "MerchCatalog": { + "type": "object", + "properties": { + "store": { + "type": "object", + "properties": { + "brandName": { + "type": "string" }, - { - "type": "null" - } - ] - }, - "currency": { - "type": "string" - }, - "notes": { - "type": [ - "string", - "null" - ] - }, - "rejectionReason": { - "type": [ - "string", - "null" - ] - }, - "event": { - "anyOf": [ - { + "brandLogoUrl": { + "type": [ + "string", + "null" + ] + }, + "landingUrl": { + "type": [ + "string", + "null" + ] + }, + "support": { "type": "object", "properties": { - "id": { - "type": "string" + "phone": { + "type": [ + "string", + "null" + ] }, - "name": { - "type": "string" + "isWhatsapp": { + "type": "boolean" + }, + "email": { + "type": [ + "string", + "null" + ] } }, "required": [ - "id", - "name" + "phone", + "isWhatsapp", + "email" ], "additionalProperties": false }, - { - "type": "null" - } - ] - }, - "eventDate": { - "anyOf": [ - { + "shipping": { "type": "object", "properties": { - "id": { - "type": "string" + "enabled": { + "type": "boolean" }, - "startsAt": { - "type": "string" + "feeBogota": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "feeNational": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "freeShippingThreshold": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] } }, "required": [ - "id", - "startsAt" + "enabled", + "feeBogota", + "feeNational", + "freeShippingThreshold" ], "additionalProperties": false }, - { - "type": "null" + "pickupEnabled": { + "type": "boolean" } - ] - }, - "hasDocument": { - "type": "boolean" + }, + "required": [ + "brandName", + "brandLogoUrl", + "landingUrl", + "support", + "shipping", + "pickupEnabled" + ], + "additionalProperties": false }, - "paymentProofs": { + "products": { "type": "array", "items": { "type": "object", "properties": { - "fileName": { + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "imageUrls": { + "type": "array", + "items": { + "type": "string" + } + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "values" + ], + "additionalProperties": false + } + }, + "maxPerOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "membersOnly": { + "type": "boolean", + "description": "Only a buyer with an active membership in this organization can order it; anyone else gets 403 `MEMBERS_ONLY`. Show a lock." + }, + "status": { + "type": "string", + "enum": [ + "PUBLISHED", + "DRAFT" + ], + "description": "`DRAFT` only appears in preview responses (valid `X-Merch-Preview`). Drafts cannot be ordered." + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "label": { + "type": "string" + }, + "attributes": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "price": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "compareAtPrice": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "stock": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "sku", + "label", + "attributes", + "price", + "compareAtPrice", + "stock" + ], + "additionalProperties": false + } } }, "required": [ - "fileName" + "id", + "slug", + "name", + "description", + "imageUrls", + "options", + "maxPerOrder", + "membersOnly", + "status", + "variants" ], "additionalProperties": false } }, - "allocations": { + "pickupPoints": { "type": "array", "items": { "type": "object", "properties": { - "bankAccountId": { + "id": { "type": "string" }, - "percentage": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "name": { + "type": "string" }, - "amount": { - "type": "number" + "address": { + "type": "string" }, - "mode": { - "type": "string", - "enum": [ - "PERCENT", - "AMOUNT" + "city": { + "type": [ + "string", + "null" + ] + }, + "schedule": { + "type": [ + "string", + "null" ] } }, "required": [ - "bankAccountId", - "percentage" + "id", + "name", + "address", + "city", + "schedule" ], "additionalProperties": false } }, - "requestedAt": { - "type": [ - "string", - "null" - ] - }, - "paidAt": { - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "type": "string" - } - }, - "required": [ - "id", - "reference", - "label", - "status", - "amount", - "grossAmount", - "unitsSold", - "currency", - "notes", - "rejectionReason", - "event", - "eventDate", - "hasDocument", - "paymentProofs", - "allocations", - "requestedAt", - "paidAt", - "createdAt" - ], - "additionalProperties": false - }, - "DiscountType": { - "type": "string", - "enum": [ - "PERCENT", - "FIXED" - ] - }, - "Discount": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "value": { - "type": "number" - }, - "eventId": { - "type": [ - "string", - "null" - ] - }, - "active": { - "type": "boolean" - }, - "maxUses": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ] - }, - "uses": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "startsAt": { - "type": [ - "string", - "null" - ] - }, - "endsAt": { - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "type": "string" - } - }, - "required": [ - "id", - "code", - "type", - "value", - "eventId", - "active", - "maxUses", - "uses", - "startsAt", - "endsAt", - "createdAt" - ], - "additionalProperties": false - }, - "DiscountCreate": { - "type": "object", - "properties": { - "code": { - "type": "string", - "minLength": 1 - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "value": { - "type": "number", - "exclusiveMinimum": 0 - }, - "eventId": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "null" - } - ] - }, - "maxUses": { - "anyOf": [ - { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ] - }, - "startsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - }, - "endsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "code", - "type", - "value" - ], - "additionalProperties": false - }, - "DiscountUpdate": { - "type": "object", - "properties": { - "active": { - "type": "boolean" - }, - "value": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maxUses": { - "anyOf": [ - { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ] - }, - "startsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - }, - "endsAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } + "currency": { + "type": "string", + "const": "COP" + }, + "mpPublicKey": { + "description": "Public key of the brand's own MercadoPago account, for the Payment Brick. null in a preview when the store has no connected account yet.", + "type": [ + "string", + "null" ] + }, + "preview": { + "type": "boolean", + "description": "`true` when the response honored a valid `X-Merch-Preview` token: it includes DRAFT products and the landing must not allow checkout." } }, + "required": [ + "store", + "products", + "pickupPoints", + "currency", + "mpPublicKey", + "preview" + ], "additionalProperties": false }, - "Webhook": { + "ContentVideo": { "type": "object", "properties": { "id": { "type": "string" }, - "url": { + "title": { "type": "string" }, - "events": { - "type": "array", - "items": { - "type": "string" - } - }, - "active": { - "type": "boolean" - }, - "lastDeliveryAt": { + "description": { "type": [ "string", "null" ] }, - "lastDeliveryStatus": { + "durationSeconds": { "anyOf": [ { "type": "integer", @@ -27435,535 +27805,579 @@ } ] }, - "failureCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "posterUrl": { + "type": [ + "string", + "null" + ] }, - "createdAt": { - "type": "string" + "series": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "id", + "title" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] }, - "updatedAt": { + "memberOnly": { + "type": "boolean", + "description": "true = only current members of the organization can play it." + }, + "publishedAt": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "title", + "description", + "durationSeconds", + "posterUrl", + "series", + "memberOnly", + "publishedAt" + ], + "additionalProperties": false + }, + "ContentMediaDeleted": { + "type": "object", + "properties": { + "id": { "type": "string" + }, + "deleted": { + "type": "boolean", + "const": true } }, "required": [ "id", - "url", - "events", - "active", - "lastDeliveryAt", - "lastDeliveryStatus", - "failureCount", - "createdAt", - "updatedAt" + "deleted" ], "additionalProperties": false }, - "WebhookUpdate": { + "ContentVideoUpdate": { "type": "object", "properties": { - "url": { - "type": "string", - "format": "uri" + "title": { + "type": "string" }, - "events": { - "minItems": 1, - "type": "array", - "items": { - "type": "string", - "enum": [ - "sale.confirmed", - "sale.refunded" - ] - } + "description": { + "description": "`null` or empty clears the description.", + "type": [ + "string", + "null" + ] }, - "active": { + "memberOnly": { + "description": "true = only current members can play it.", "type": "boolean" } }, "additionalProperties": false }, - "WebhookCreated": { + "ContentVideoSummary": { "type": "object", "properties": { "id": { "type": "string" }, - "url": { + "title": { "type": "string" }, - "events": { - "type": "array", - "items": { - "type": "string" - } - }, - "active": { - "type": "boolean" - }, - "lastDeliveryAt": { + "description": { "type": [ "string", "null" ] }, - "lastDeliveryStatus": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ] - }, - "failureCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { + "memberOnly": { + "type": "boolean" + } + }, + "required": [ + "id", + "title", + "description", + "memberOnly" + ], + "additionalProperties": false + }, + "ContentVideoPublish": { + "type": "object", + "properties": { + "published": { + "type": "boolean" + } + }, + "required": [ + "published" + ], + "additionalProperties": false + }, + "ContentVideoPublished": { + "type": "object", + "properties": { + "id": { "type": "string" }, - "signingSecret": { - "type": "string" + "published": { + "type": "boolean" } }, "required": [ "id", - "url", - "events", - "active", - "lastDeliveryAt", - "lastDeliveryStatus", - "failureCount", - "createdAt", - "updatedAt", - "signingSecret" + "published" ], "additionalProperties": false }, - "WebhookCreate": { + "ContentVideoSeriesAssign": { "type": "object", "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "events": { - "minItems": 1, - "type": "array", - "items": { - "type": "string", - "enum": [ - "sale.confirmed", - "sale.refunded" - ] - }, - "description": "Subset of: sale.confirmed, sale.refunded" - }, - "secret": { - "type": "string", - "minLength": 1 + "seriesId": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "description": "Series to put the video in; `null` removes it from its series." } }, "required": [ - "url", - "events" + "seriesId" ], "additionalProperties": false }, - "Subscriber": { + "ContentVideoSeriesResult": { "type": "object", "properties": { "id": { "type": "string" }, - "customerName": { + "seriesId": { "type": [ "string", "null" ] + } + }, + "required": [ + "id", + "seriesId" + ], + "additionalProperties": false + }, + "ContentSeries": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "customerEmail": { + "title": { "type": "string" }, - "status": { - "type": "string", - "enum": [ - "PENDING", - "ACTIVE", - "EXPIRED", - "CANCELLED", - "PAUSED" + "description": { + "type": [ + "string", + "null" ] }, - "startedAt": { + "coverImageUrl": { "type": [ "string", "null" ] }, - "currentPeriodEnd": { + "memberOnly": { + "type": "boolean" + }, + "published": { + "type": "boolean" + }, + "publishedAt": { "type": [ "string", "null" ] + }, + "videoCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Videos in the series (published or not, course videos excluded)." + }, + "createdAt": { + "type": "string" } }, "required": [ "id", - "customerName", - "customerEmail", - "status", - "startedAt", - "currentPeriodEnd" + "title", + "description", + "coverImageUrl", + "memberOnly", + "published", + "publishedAt", + "videoCount", + "createdAt" ], "additionalProperties": false }, - "SubscriptionCancelResult": { + "ContentSeriesCreate": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "status": { + "title": { "type": "string", - "enum": [ - "PENDING", - "ACTIVE", - "EXPIRED", - "CANCELLED", - "PAUSED" + "description": "1–120 characters." + }, + "description": { + "description": "Up to 2000 characters.", + "type": [ + "string", + "null" ] }, - "cancelledAt": { + "coverImageUrl": { + "description": "Absolute URL of the cover.", "type": [ "string", "null" ] + }, + "memberOnly": { + "description": "Default true.", + "type": "boolean" } }, "required": [ - "id", - "status", - "cancelledAt" + "title" ], "additionalProperties": false }, - "SaleTicket": { + "ContentSeriesUpdate": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "ticketCode": { - "type": "string" - }, - "ticketTypeId": { - "type": "string" - }, - "ticketTypeName": { + "title": { "type": "string" }, - "quantity": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "seatLabel": { + "description": { + "description": "`null` clears it.", "type": [ "string", "null" ] }, - "checkedInAt": { + "coverImageUrl": { + "description": "`null` clears it.", "type": [ "string", "null" ] }, - "refundedAt": { + "memberOnly": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ContentSeriesPublish": { + "type": "object", + "properties": { + "published": { + "type": "boolean" + } + }, + "required": [ + "published" + ], + "additionalProperties": false + }, + "ContentLiveCreate": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "1–120 characters." + }, + "eventDateId": { + "description": "Show date to tie the stream to (owned by the workspace or with the workspace as a linked artist). One stream per date.", "type": [ "string", "null" ] }, - "refundAmount": { + "memberOnly": { + "description": "Default true. Ignored (stream is public) when the workspace has no active membership plan.", + "type": "boolean" + }, + "scheduledAt": { + "description": "Wall-clock time \"YYYY-MM-DDTHH:mm\" in the WORKSPACE time zone (not UTC, no offset). Must be in the future and at most 2 years ahead. Absent: inherits the show date's start time when `eventDateId` is set.", "type": [ - "number", + "string", "null" ] - }, - "seatBlocked": { - "type": "boolean" } }, "required": [ - "id", - "ticketCode", - "ticketTypeId", - "ticketTypeName", - "quantity", - "seatLabel", - "checkedInAt", - "refundedAt", - "refundAmount", - "seatBlocked" + "title" ], "additionalProperties": false }, - "PaymentAttempt": { + "ContentLiveCreated": { "type": "object", "properties": { "id": { "type": "string" }, - "provider": { + "title": { "type": "string" }, - "status": { - "type": "string", - "description": "Status of the payment event. Usually this is the gateway's RAW status in its own vocabulary (PAID, APPROVED, REJECTED, VOID_APPROVED…). Values prefixed with `FT_` come from FreeTicket, not the gateway: currently `FT_SALE_APPROVED_POST_CONFIRM`, which flags that the gateway re-notified a payment that was already confirmed — this is how Bold reports its refunds, and the sale may remain CONFIRMED while someone verifies the refunded amount." + "memberOnly": { + "type": "boolean" }, - "declineCode": { + "scheduledAt": { + "description": "UTC ISO 8601.", "type": [ "string", "null" ] }, - "declineReason": { + "eventDateId": { "type": [ "string", "null" ] }, - "amount": { - "type": [ - "number", - "null" - ] - }, - "externalRef": { - "type": [ - "string", - "null" - ] + "rtmpUrl": { + "type": "string", + "description": "RTMPS ingest server for OBS / the encoder." }, - "createdAt": { - "type": "string" + "streamKey": { + "type": "string", + "description": "SECRET. RTMP stream key: whoever has it can broadcast on this stream in the organization's name. Store it like a password; it is never returned by any read endpoint. Rotate it with `POST /content/lives/{id}/reset-key`." } }, "required": [ "id", - "provider", - "status", - "declineCode", - "declineReason", - "amount", - "externalRef", - "createdAt" + "title", + "memberOnly", + "scheduledAt", + "eventDateId", + "rtmpUrl", + "streamKey" ], "additionalProperties": false }, - "TicketReassign": { + "ContentLiveStreamKey": { "type": "object", "properties": { - "eventDateId": { - "type": "string", - "minLength": 1 + "id": { + "type": "string" }, - "ticketTypeId": { - "type": "string", - "minLength": 1 + "rtmpUrl": { + "type": "string" }, - "seatLabel": { + "streamKey": { "type": "string", - "minLength": 1 + "description": "SECRET. RTMP stream key: whoever has it can broadcast on this stream in the organization's name. Store it like a password; it is never returned by any read endpoint. Rotate it with `POST /content/lives/{id}/reset-key`." } }, + "required": [ + "id", + "rtmpUrl", + "streamKey" + ], "additionalProperties": false }, - "ResendTicket": { + "ContentLiveUpdate": { "type": "object", "properties": { - "ticketCode": { - "type": "string" - }, - "sentTo": { - "type": "string" + "scheduledAt": { + "description": "Wall-clock time \"YYYY-MM-DDTHH:mm\" in the WORKSPACE time zone (not UTC, no offset). Must be in the future and at most 2 years ahead. `null` removes the scheduled time. Only while the stream is IDLE.", + "type": [ + "string", + "null" + ] }, - "sentAt": { - "type": "string" + "memberOnly": { + "type": "boolean" } }, - "required": [ - "ticketCode", - "sentTo", - "sentAt" - ], "additionalProperties": false }, - "CheckinResult": { + "ContentLiveSettings": { "type": "object", "properties": { - "ticketCode": { + "id": { "type": "string" }, - "checkedInAt": { - "type": [ - "string", - "null" - ] + "memberOnly": { + "type": "boolean" }, - "checkedInBy": { + "scheduledAt": { + "description": "UTC ISO 8601.", "type": [ "string", "null" ] - }, - "alreadyCheckedIn": { - "type": "boolean" } }, "required": [ - "ticketCode", - "checkedInAt", - "checkedInBy", - "alreadyCheckedIn" + "id", + "memberOnly", + "scheduledAt" ], "additionalProperties": false }, - "CheckinRequest": { + "ContentLiveChat": { "type": "object", "properties": { - "source": { - "anyOf": [ - { - "type": "string", - "enum": [ - "pdf", - "web", - "apple", - "google" - ] + "messages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "authorId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "text": { + "type": "string" + }, + "sentAt": { + "type": "string" + }, + "host": { + "description": "Present (true) on messages sent by the organization.", + "type": "boolean" + } }, - { - "type": "null" - } - ] + "required": [ + "id", + "authorId", + "name", + "text", + "sentAt" + ], + "additionalProperties": false + } + }, + "truncated": { + "type": "boolean", + "description": "true if the history cap was reached and the oldest messages are missing." } }, + "required": [ + "messages", + "truncated" + ], "additionalProperties": false }, - "CheckinUndoResult": { + "ContentLive": { "type": "object", "properties": { - "ticketCode": { + "id": { "type": "string" }, - "undone": { - "type": "boolean", - "description": "true when this call reverted the check-in; false when the ticket was not checked in (idempotent no-op)." + "title": { + "type": "string" }, - "previousCheckedInAt": { + "status": { + "type": "string", + "enum": [ + "IDLE", + "ACTIVE", + "COMPLETED", + "DISABLED" + ], + "description": "ACTIVE = streaming right now (live banner)." + }, + "memberOnly": { + "type": "boolean" + }, + "startedAt": { "type": [ "string", "null" ] }, - "previousCheckedInBy": { + "endedAt": { "type": [ "string", "null" ] + }, + "hasRecording": { + "type": "boolean", + "description": "true if a playable recording remains after the stream." } }, "required": [ - "ticketCode", - "undone", - "previousCheckedInAt", - "previousCheckedInBy" + "id", + "title", + "status", + "memberOnly", + "startedAt", + "endedAt", + "hasRecording" ], "additionalProperties": false }, - "TicketAccess": { + "EventArtistsReplace": { "type": "object", "properties": { - "ticketCode": { - "type": "string" - }, - "valid": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "VALID", - "USED", - "INVALID" - ] - }, - "saleStatus": { - "type": "string", - "enum": [ - "PENDING", - "CONFIRMED", - "ABANDONED", - "CANCELLED", - "REFUNDED" - ] - }, - "eventId": { - "type": "string" - }, - "eventName": { - "type": "string" - }, - "eventDateId": { - "type": "string" - }, - "startsAt": { - "type": "string" - }, - "ticketTypeName": { - "type": "string" + "artistIds": { + "maxItems": 50, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } }, - "checkedInAt": { - "type": [ - "string", - "null" - ] + "inviteEmails": { + "maxItems": 20, + "type": "array", + "items": { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } } }, "required": [ - "ticketCode", - "valid", - "status", - "saleStatus", - "eventId", - "eventName", - "eventDateId", - "startsAt", - "ticketTypeName", - "checkedInAt" + "artistIds" ], "additionalProperties": false }, - "ApiKeyScope": { - "type": "string", - "enum": [ - "read", - "write" - ] - }, - "ApiKey": { + "ArtistSummary": { "type": "object", "properties": { "id": { @@ -27972,243 +28386,132 @@ "name": { "type": "string" }, - "scope": { - "$ref": "#/components/schemas/ApiKeyScope" - }, - "keyPrefix": { - "type": "string" - }, - "lastUsedAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - }, - "expiresAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } + "slug": { + "type": [ + "string", + "null" ] }, - "revokedAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } + "logoUrl": { + "type": [ + "string", + "null" ] - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "name", - "scope", - "keyPrefix", - "lastUsedAt", - "expiresAt", - "revokedAt", - "createdAt" + "slug", + "logoUrl" ], "additionalProperties": false }, - "ApiKeyCreated": { + "ArtistInvitation": { "type": "object", "properties": { "id": { "type": "string" }, - "name": { - "type": "string" - }, - "scope": { - "$ref": "#/components/schemas/ApiKeyScope" - }, - "keyPrefix": { + "email": { "type": "string" }, - "lastUsedAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } + "status": { + "type": "string", + "enum": [ + "PENDING", + "EXPIRED" ] }, "expiresAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] - }, - "revokedAt": { - "anyOf": [ - { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - { - "type": "null" - } - ] + "type": "string" }, "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - "key": { "type": "string" } }, "required": [ "id", - "name", - "scope", - "keyPrefix", - "lastUsedAt", + "email", + "status", "expiresAt", - "revokedAt", - "createdAt", - "key" + "createdAt" ], "additionalProperties": false }, - "ApiKeyCreate": { + "EventArtistUnlink": { "type": "object", "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 120 + "eventId": { + "type": "string" }, - "scope": { - "default": "read", - "$ref": "#/components/schemas/ApiKeyScope" + "organizationId": { + "type": "string" }, - "expiresAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + "unlinked": { + "type": "boolean" } }, "required": [ - "name", - "scope" + "eventId", + "organizationId", + "unlinked" ], "additionalProperties": false }, - "CustomerAuthRequest": { + "ArtistInvitationDeleted": { "type": "object", "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "id": { + "type": "string" + }, + "deleted": { + "type": "boolean", + "const": true } }, "required": [ - "email" + "id", + "deleted" ], "additionalProperties": false }, - "CustomerAuthRequestResult": { + "EventViewer": { "type": "object", "properties": { - "status": { - "type": "string", - "const": "sent" + "id": { + "type": "string" }, - "sent_to": { - "type": "string", - "description": "Masked email (`c***@mail.com`). Never the full address." + "email": { + "type": "string" }, - "expires_in": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "Code lifetime, in seconds." + "createdAt": { + "type": "string" } }, "required": [ - "status", - "sent_to", - "expires_in" + "id", + "email", + "createdAt" ], "additionalProperties": false }, - "CustomerAuthVerify": { + "EventViewerInvite": { "type": "object", "properties": { "email": { "type": "string", + "maxLength": 255, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, - "code": { - "type": "string", - "minLength": 6, - "maxLength": 6 - } - }, - "required": [ - "email", - "code" - ], - "additionalProperties": false - }, - "CustomerAuthVerifyResult": { - "type": "object", - "properties": { - "session_token": { - "type": "string", - "description": "Usable as-is as the `X-Customer-Session` header on /api/v1/customer/*." - }, - "expires_in": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "Session lifetime, in seconds." } }, "required": [ - "session_token", - "expires_in" + "email" ], "additionalProperties": false }, - "CustomerMe": { + "EventViewerInviteResult": { "type": "object", "properties": { "id": { @@ -28217,461 +28520,607 @@ "email": { "type": "string" }, - "name": { + "createdAt": { "type": "string" }, - "emailVerified": { + "newAccount": { + "deprecated": true, + "description": "Deprecated, never sent: it revealed whether the email already had a FreeTicket account.", "type": "boolean" - }, - "expiresAt": { - "type": "string", - "description": "Buyer session expiry (ISO 8601)." } }, "required": [ "id", "email", - "name", - "emailVerified", - "expiresAt" + "createdAt" ], "additionalProperties": false }, - "CustomerTicketItem": { + "EventViewerRevoke": { "type": "object", "properties": { - "ticketTypeName": { + "id": { "type": "string" }, - "quantity": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "ticketCode": { - "type": "string", - "description": "Opaque ticket code. The QR code must encode the validator URL (`https://admin.appfreeticket.com/dashboard/tickets/validar?code=`)." + "eventId": { + "type": "string" }, - "seatLabel": { - "description": "Exact seat for seated events (seats.io), or null.", - "type": [ - "string", - "null" - ] + "revoked": { + "type": "boolean" } }, "required": [ - "ticketTypeName", - "quantity", - "ticketCode", - "seatLabel" + "id", + "eventId", + "revoked" ], "additionalProperties": false }, - "CustomerSale": { + "EventValidator": { "type": "object", "properties": { "id": { "type": "string" }, - "reference": { + "userId": { + "description": "Only present when the person is a member of the active workspace.", "type": "string" }, - "status": { + "name": { + "description": "Only present when the person is a member of the active workspace.", "type": "string" }, - "event": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "slug": { - "type": "string" - } - }, - "required": [ - "name", - "slug" - ], - "additionalProperties": false - }, - "eventDate": { - "type": "object", - "properties": { - "startsAt": { - "type": "string", - "description": "Event start instant in ISO 8601 UTC." - }, - "timezone": { - "type": "string", - "description": "IANA time zone of the event." - } - }, - "required": [ - "startsAt", - "timezone" - ], - "additionalProperties": false - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerTicketItem" - } + "email": { + "type": "string" }, - "total": { - "type": "number" + "isActive": { + "type": "boolean" }, - "currency": { - "type": "string" + "allEvents": { + "type": "boolean" } }, "required": [ "id", - "reference", - "status", - "event", - "eventDate", - "items", - "total", - "currency" + "email", + "isActive", + "allEvents" ], "additionalProperties": false }, - "CustomerTicketCancelResult": { + "EventValidatorCreate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 100 + }, + "email": { + "type": "string", + "maxLength": 255, + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": [ + "name", + "email" + ], + "additionalProperties": false + }, + "EventValidatorCreateResult": { "type": "object", "properties": { "id": { "type": "string" }, - "reference": { + "userId": { + "description": "Only present when the person is a member of the active workspace.", "type": "string" }, - "status": { + "name": { + "description": "Only present when the person is a member of the active workspace.", "type": "string" + }, + "email": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "allEvents": { + "type": "boolean" + }, + "invited": { + "type": "boolean" } }, "required": [ "id", - "reference", - "status" + "email", + "isActive", + "allEvents", + "invited" ], "additionalProperties": false }, - "CustomerLogout": { + "StaffInviteResend": { "type": "object", "properties": { - "revoked": { - "type": "boolean", - "description": "true if the session existed and was deleted; false if the token was no longer valid (it ends up closed either way)." + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sent": { + "type": "boolean" } }, "required": [ - "revoked" + "id", + "email", + "sent" ], "additionalProperties": false }, - "EnterpriseExchangeRequest": { + "StaffAccessUpdate": { "type": "object", "properties": { - "token": { + "accessType": { "type": "string", - "minLength": 1, - "maxLength": 256, - "description": "One-time token received on the landing page callback (format `{slug}.{token}`, forwarded as is)." + "enum": [ + "admin", + "validador", + "personalizado", + "lectura" + ] + }, + "sections": { + "maxItems": 50, + "type": "array", + "items": { + "type": "string", + "enum": [ + "inicio", + "eventos", + "validar", + "membresias", + "contenido", + "productos", + "pagina_web", + "comunicacion", + "informes", + "liquidaciones", + "tienda", + "perfil" + ] + } + }, + "validatorEventIds": { + "maxItems": 200, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + "viewerEventIds": { + "maxItems": 200, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + "expiresAt": { + "anyOf": [ + { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}$" + }, + { + "type": "null" + } + ] } }, "required": [ - "token" + "accessType" ], "additionalProperties": false }, - "EnterpriseExchangeResponse": { + "StaffAccess": { "type": "object", "properties": { - "session_token": { + "userId": { + "type": "string" + }, + "accessType": { "type": "string", - "description": "Buyer session token. Send it as the `X-Customer-Session` header on /api/v1/customer/*." + "enum": [ + "admin", + "validador", + "personalizado", + "lectura" + ] }, - "expires_at": { + "role": { "type": "string", - "description": "Session expiry (ISO 8601, 7-day sliding window)." + "enum": [ + "ADMIN", + "STAFF", + "VIEWER" + ] }, - "customer": { + "sections": { + "type": "array", + "items": { + "type": "string" + } + }, + "validatorEventIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "viewerEventIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "expiresAt": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "userId", + "accessType", + "role", + "sections", + "validatorEventIds", + "viewerEventIds", + "expiresAt" + ], + "additionalProperties": false + }, + "SaleCreate": { + "type": "object", + "properties": { + "buyer": { "type": "object", "properties": { - "id": { - "type": "string" + "name": { + "type": "string", + "minLength": 1 }, "email": { - "type": "string" - }, - "name": { - "type": "string" + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, - "email_verified": { - "type": "boolean" + "phone": { + "type": "string", + "minLength": 1 } }, "required": [ - "id", - "email", "name", - "email_verified" + "email" ], "additionalProperties": false - } - }, - "required": [ - "session_token", - "expires_at", - "customer" - ], - "additionalProperties": false - }, - "CustomerMembershipState": { - "type": "object", - "properties": { - "active": { - "type": "boolean", - "description": "true only with an ACTIVE, unexpired membership in this workspace." }, - "membership": { - "anyOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "status": { + "items": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "ticketTypeId": { + "type": "string", + "minLength": 1 + }, + "quantity": { + "type": "integer", + "minimum": 1, + "maximum": 9007199254740991 + }, + "seats": { + "type": "array", + "items": { "type": "string", - "enum": [ - "PENDING", - "ACTIVE", - "EXPIRED", - "CANCELLED", - "PAUSED" - ] - }, - "plan": { - "$ref": "#/components/schemas/MembershipPlan" - }, - "startedAt": { - "type": [ - "string", - "null" - ] - }, - "expiresAt": { - "description": "null = LIFETIME or a membership with no expiry.", - "type": [ - "string", - "null" - ] - }, - "autoRenew": { - "type": "boolean" + "minLength": 1 } - }, - "required": [ - "id", - "status", - "plan", - "startedAt", - "expiresAt", - "autoRenew" - ], - "additionalProperties": false + } }, - { - "type": "null" - } + "required": [ + "ticketTypeId", + "quantity" + ], + "additionalProperties": false + } + }, + "channel": { + "default": "ADMIN", + "type": "string", + "enum": [ + "WEB", + "MOBILE", + "POS", + "ADMIN" ] + }, + "comp": { + "default": false, + "type": "boolean" + }, + "notes": { + "type": "string" } }, "required": [ - "active", - "membership" + "buyer", + "items", + "channel", + "comp" ], "additionalProperties": false }, - "CustomerSubscribeRequest": { + "SaleCancelRequest": { "type": "object", "properties": { - "planId": { - "type": "string", - "minLength": 1, - "description": "Id of an active MembershipPlan in the key's workspace." + "acknowledge_open_payment": { + "type": "boolean" } }, - "required": [ - "planId" - ], "additionalProperties": false }, - "CustomerSubscribeResult": { + "CourtesySeats": { "type": "object", "properties": { - "checkoutUrl": { - "type": "string", - "description": "Membership checkout URL on the canonical host. The landing page must redirect the buyer there." + "eventDateId": { + "type": "string" }, - "planId": { + "eventId": { "type": "string" + }, + "ticketTypes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ticketTypeId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Blocked seat labels of this ticket type's category that no live sale claims, in natural order." + } + }, + "required": [ + "ticketTypeId", + "name", + "labels" + ], + "additionalProperties": false + } } }, "required": [ - "checkoutUrl", - "planId" + "eventDateId", + "eventId", + "ticketTypes" ], "additionalProperties": false }, - "CustomerSubscriptionCancelResult": { + "ReportByEventRow": { "type": "object", "properties": { - "id": { + "eventId": { "type": "string" }, - "status": { - "type": "string", - "enum": [ - "PENDING", - "ACTIVE", - "EXPIRED", - "CANCELLED", - "PAUSED" - ] + "eventName": { + "type": "string" }, - "cancelledAt": { - "type": [ - "string", - "null" - ] + "revenue": { + "type": "number" + }, + "ticketsSold": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "salesCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "available": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "id", - "status", - "cancelledAt" + "eventId", + "eventName", + "revenue", + "ticketsSold", + "salesCount", + "available" ], "additionalProperties": false }, - "CustomerSubscriptionCancelRequest": { - "type": "object", - "properties": { - "workspaceId": { - "description": "Required only without an enterprise service API key: which membership (by workspace) to cancel. Ignored with a key — the workspace is the one pinned to it.", - "type": "string", - "minLength": 1 - } - }, - "additionalProperties": false - }, - "CustomerProfile": { + "ReportTimeseriesRow": { "type": "object", "properties": { - "id": { + "bucket": { "type": "string" }, - "email": { - "type": "string" + "revenue": { + "type": "number" }, - "name": { - "type": "string" + "ticketsSold": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "phone": { - "type": [ - "string", - "null" - ] + "salesCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "id", - "email", - "name", - "phone" + "bucket", + "revenue", + "ticketsSold", + "salesCount" ], "additionalProperties": false }, - "CustomerProfileUpdate": { + "ReportFinancialsRow": { "type": "object", "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 120 + "eventId": { + "type": "string" + }, + "eventName": { + "type": "string" + }, + "eventDateId": { + "type": "string" + }, + "startsAt": { + "type": "string" + }, + "past": { + "type": "boolean" + }, + "unitsSold": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gross": { + "type": "number" + }, + "platformFee": { + "type": "number" + }, + "facial": { + "type": "number" + }, + "paymentFee": { + "type": "number" }, - "phone": { - "description": "null or an empty string clears the phone.", + "wompiSalesWithoutRate": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gmf": { + "type": "number" + }, + "net": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "settlementStatus": { "anyOf": [ { "type": "string", - "maxLength": 30 + "enum": [ + "SENT", + "AWAITING_PAYMENT", + "PAID" + ] }, { "type": "null" } ] - } - }, - "additionalProperties": false - }, - "PurchaseSessionCreateRequest": { - "type": "object", - "properties": { - "eventDateId": { - "type": "string", - "minLength": 1, - "maxLength": 64 }, - "deviceKey": { - "type": "string", - "minLength": 8, - "maxLength": 200, - "description": "Stable browser identifier (e.g. stored in localStorage). If the SAME browser reopens the SAME event date while its session is still alive, it gets that same session (same `holdToken`, same clock) instead of a new one." + "settlementId": { + "type": [ + "string", + "null" + ] + }, + "settlementAmount": { + "type": [ + "number", + "null" + ] } }, "required": [ + "eventId", + "eventName", "eventDateId", - "deviceKey" + "startsAt", + "past", + "unitsSold", + "gross", + "platformFee", + "facial", + "paymentFee", + "wompiSalesWithoutRate", + "gmf", + "net", + "currency", + "settlementStatus", + "settlementId", + "settlementAmount" ], "additionalProperties": false }, - "PurchaseSessionCreated": { + "Settlement": { "type": "object", "properties": { "id": { "type": "string" }, - "eventDateId": { + "reference": { "type": "string" }, - "state": { - "type": "string", - "const": "live" - }, - "seated": { - "type": "boolean", - "description": "true = the event date has a seats.io map." + "label": { + "type": "string" }, - "holdToken": { - "description": "seats.io hold token ISSUED BY THE SERVER. Mount the chart with `session: \"manual\"` and this `holdToken` (https://docs.seats.io/docs/renderer/config-session/), never with `session: \"continue\"`. It is the ONLY token `POST /customer/orders` accepts for this session. null for event dates without a map.", - "type": [ - "string", - "null" + "status": { + "type": "string", + "enum": [ + "SENT", + "AWAITING_PAYMENT", + "PAID" ] }, - "seatsDeadline": { - "description": "Instant (ISO 8601 UTC) until which the order with seats can be created. This is the clock to display over the map. The seats.io hold expires AFTER this instant, never before. null for event dates without a map.", + "amount": { + "type": "number" + }, + "grossAmount": { "type": [ - "string", + "number", "null" ] }, - "budgetSeconds": { + "unitsSold": { "anyOf": [ { "type": "integer", @@ -28681,1524 +29130,1799 @@ { "type": "null" } - ], - "description": "Budget seconds granted to this session (= seatsDeadline − now). The budget is CUMULATIVE per buyer and event date: opening another tab does not reset it." + ] }, - "replacedSessionId": { - "description": "Live session that this one replaced (now `superseded`), or null. That tab can no longer create an order or start a new payment.", + "currency": { + "type": "string" + }, + "notes": { "type": [ "string", "null" ] - } - }, - "required": [ - "id", - "eventDateId", - "state", - "seated", - "holdToken", - "seatsDeadline", - "budgetSeconds", - "replacedSessionId" - ], - "additionalProperties": false - }, - "PurchaseSessionStatus": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "state": { - "type": "string", - "enum": [ - "live", - "superseded", - "expired", - "converted" - ], - "description": "`live`: can create the order. `superseded`: another tab/device replaced it. `expired`: the map clock ran out or it was released. `converted`: it already created its order (`orderId`)." + "rejectionReason": { + "type": [ + "string", + "null" + ] }, - "seatsDeadline": { + "event": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "eventDate": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "startsAt": { + "type": "string" + } + }, + "required": [ + "id", + "startsAt" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "hasDocument": { + "type": "boolean" + }, + "paymentProofs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fileName": { + "type": "string" + } + }, + "required": [ + "fileName" + ], + "additionalProperties": false + } + }, + "allocations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "bankAccountId": { + "type": "string" + }, + "percentage": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "amount": { + "type": "number" + }, + "mode": { + "type": "string", + "enum": [ + "PERCENT", + "AMOUNT" + ] + } + }, + "required": [ + "bankAccountId", + "percentage" + ], + "additionalProperties": false + } + }, + "requestedAt": { "type": [ "string", "null" ] }, - "orderId": { - "description": "Sale created with this session, if any.", + "paidAt": { "type": [ "string", "null" ] + }, + "createdAt": { + "type": "string" } }, "required": [ "id", - "state", - "seatsDeadline", - "orderId" + "reference", + "label", + "status", + "amount", + "grossAmount", + "unitsSold", + "currency", + "notes", + "rejectionReason", + "event", + "eventDate", + "hasDocument", + "paymentProofs", + "allocations", + "requestedAt", + "paidAt", + "createdAt" ], "additionalProperties": false }, - "CustomerOrderCreateResult": { + "DiscountType": { + "type": "string", + "enum": [ + "PERCENT", + "FIXED" + ] + }, + "Discount": { "type": "object", "properties": { - "free": { - "type": "boolean", - "description": "true = the purchase was CONFIRMED without a payment gateway (100% discount). In that case do NOT call /payment: there is nothing to charge and the other fields are null." + "id": { + "type": "string" }, - "reference": { - "type": "string", - "description": "Sale reference (FT-…). Always identifies the purchase." + "code": { + "type": "string" }, - "saleId": { - "description": "Sale id. null when `free` is true.", + "type": { + "$ref": "#/components/schemas/DiscountType" + }, + "value": { + "type": "number" + }, + "eventId": { "type": [ "string", "null" ] }, - "total": { - "description": "Amount to charge. null when `free` is true.", - "type": [ - "number", - "null" + "active": { + "type": "boolean" + }, + "maxUses": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } ] }, - "currency": { + "uses": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startsAt": { "type": [ "string", "null" ] }, - "expiresAt": { - "description": "Instant (ISO 8601 UTC) at which the inventory reservation expires. After that, the purchase must be started over.", + "endsAt": { "type": [ "string", "null" ] + }, + "createdAt": { + "type": "string" } }, "required": [ - "free", - "reference", - "saleId", - "total", - "currency", - "expiresAt" + "id", + "code", + "type", + "value", + "eventId", + "active", + "maxUses", + "uses", + "startsAt", + "endsAt", + "createdAt" ], "additionalProperties": false }, - "CustomerOrderCurrent": { + "DiscountCreate": { "type": "object", "properties": { - "order": { + "code": { + "type": "string", + "minLength": 1 + }, + "type": { + "$ref": "#/components/schemas/DiscountType" + }, + "value": { + "type": "number", + "exclusiveMinimum": 0 + }, + "eventId": { "anyOf": [ { - "type": "object", - "properties": { - "saleId": { - "type": "string" - }, - "reference": { - "type": "string" - }, - "total": { - "type": "number" - }, - "currency": { - "type": "string" - }, - "expiresAt": { - "type": "string", - "description": "Instant (ISO 8601 UTC) at which the inventory hold expires. This is the countdown to display." - }, - "paymentOpened": { - "type": "boolean", - "description": "true = payment has already been opened for this sale. Reopening it with /payment returns the SAME signed configuration while the reservation is still alive." - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ticketTypeId": { - "type": "string" - }, - "ticketTypeName": { - "type": "string" - }, - "quantity": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "seatLabel": { - "description": "seats.io numbered seat, or null if not seated.", - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "ticketTypeId", - "ticketTypeName", - "quantity", - "seatLabel" - ], - "additionalProperties": false - } - } - }, - "required": [ - "saleId", - "reference", - "total", - "currency", - "expiresAt", - "paymentOpened", - "items" - ], - "additionalProperties": false + "type": "string", + "minLength": 1 }, { "type": "null" } - ], - "description": "The purchase the buyer left unfinished for this event date, or null if there is none." - } - }, - "required": [ - "order" - ], - "additionalProperties": false - }, - "CustomerOrderRelease": { - "type": "object", - "properties": { - "released": { - "type": "boolean", - "const": true, - "description": "The sale is now ABANDONED and its inventory went back to stock. A rejection never lands here: it is returned as an error with `details.reason`." - } - }, - "required": [ - "released" - ], - "additionalProperties": false - }, - "CustomerOrderPayment": { - "type": "object", - "properties": { - "orderId": { - "type": "string", - "description": "Merchant reference = `reference`." - }, - "amount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "Whole pesos, no decimals." - }, - "currency": { - "type": "string" - }, - "apiKey": { - "type": "string", - "description": "Bold IDENTITY key (public, sent to the browser)." - }, - "integritySignature": { - "type": "string", - "description": "SHA256 that binds the charge to the amount. Computed on the server." - }, - "renderMode": { - "type": "string", - "const": "embedded" + ] }, - "redirectionUrl": { - "type": "string" + "maxUses": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] }, - "description": { - "type": "string" + "startsAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } + ] }, - "expirationDate": { - "type": "number", - "description": "Epoch in NANOSECONDS (what the Bold library expects)." + "endsAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } + ] } }, "required": [ - "orderId", - "amount", - "currency", - "apiKey", - "integritySignature", - "renderMode", - "redirectionUrl", - "description", - "expirationDate" + "code", + "type", + "value" ], "additionalProperties": false }, - "CustomerOrderMercadoPagoConfig": { + "DiscountUpdate": { "type": "object", "properties": { - "publicKey": { - "type": "string", - "description": "MercadoPago (Tickets) public key. Sent to the browser: it is what `initMercadoPago()`/`` from the `@mercadopago/sdk-react` SDK (or equivalent) receives to mount the Payment Brick. Present ONLY on the MercadoPago rail — it is the marker the landing page uses to tell it apart from the Bold rail (which carries `apiKey`+`renderMode` and NEVER `publicKey`)." + "active": { + "type": "boolean" }, - "amount": { + "value": { "type": "number", - "description": "Amount to charge, in the currency's major unit (pesos, not cents) — the same `total` already returned by `POST /customer/orders`. It is re-read from the sale on every call: do not treat it as final if a long time passes between mounting the Brick and charging." + "exclusiveMinimum": 0 }, - "currency": { - "type": "string" + "maxUses": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] }, - "reference": { - "type": "string", - "description": "Sale reference (FT-…)." + "startsAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } + ] }, - "payerEmail": { - "type": "string", - "description": "Buyer email (from the sale, not editable). Informational: the charge ALWAYS uses the sale's email, never one sent by the client." + "endsAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } + ] } }, - "required": [ - "publicKey", - "amount", - "currency", - "reference", - "payerEmail" - ], "additionalProperties": false }, - "CustomerOrderStartPayment": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomerOrderPayment" - }, - { - "$ref": "#/components/schemas/CustomerOrderMercadoPagoConfig" - } - ] - }, - "CustomerOrderMercadoPagoChargeRequest": { + "Webhook": { "type": "object", "properties": { - "token": { - "type": "string", - "minLength": 1, - "description": "Card token returned by the Payment Brick when tokenizing." + "id": { + "type": "string" }, - "paymentMethodId": { - "type": "string", - "minLength": 1, - "description": "`payment_method_id` returned by the Brick (e.g. `visa`, `debmaster`)." + "url": { + "type": "string" }, - "installments": { - "default": 1, - "type": "integer", - "minimum": 1, - "maximum": 9007199254740991 + "events": { + "type": "array", + "items": { + "type": "string" + } }, - "issuerId": { - "description": "`issuer_id` returned by the Brick. Some BINs require it.", - "type": "string" + "active": { + "type": "boolean" }, - "payer": { - "type": "object", - "properties": { - "email": { - "description": "Ignored: the charge ALWAYS uses the sale's email, never one sent by the client.", - "type": "string" + "lastDeliveryAt": { + "type": [ + "string", + "null" + ] + }, + "lastDeliveryStatus": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "identification": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "number": { - "type": "string" - } - }, - "required": [ - "type", - "number" - ], - "additionalProperties": false + { + "type": "null" } - }, - "additionalProperties": false - } - }, - "required": [ - "token", - "paymentMethodId", - "installments" - ], - "additionalProperties": false - }, - "CustomerOrderMercadoPagoChargeResult": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "approved", - "pending", - "rejected" - ], - "description": "`pending` is normal: it may require additional authentication from the bank. `rejected` is a business decline (funds, card details, …) — the buyer can retry with another card." + ] }, - "reference": { - "type": "string" + "failureCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "message": { - "description": "Human-readable message for the buyer. Only present with `rejected`.", + "createdAt": { "type": "string" }, - "saleAlive": { - "description": "Only present with `rejected`. `false`: the purchase was cancelled and its tickets (and seats) went back to inventory — a new purchase must be started. `true`: THIS payment was declined but the purchase is still pending because another payment is in progress on it (e.g. a PSE payment waiting on the bank); do NOT start a new purchase: show the message, wait, and check the order status.", - "type": "boolean" + "updatedAt": { + "type": "string" } }, "required": [ - "status", - "reference" + "id", + "url", + "events", + "active", + "lastDeliveryAt", + "lastDeliveryStatus", + "failureCount", + "createdAt", + "updatedAt" ], "additionalProperties": false }, - "CustomerOrderMercadoPagoPse": { + "WebhookUpdate": { "type": "object", "properties": { - "redirectUrl": { + "url": { "type": "string", - "description": "`init_point` of the MercadoPago preference. Redirect the buyer there (it is not an iframe): they pick their bank and confirm the transfer on MercadoPago." + "format": "uri" + }, + "events": { + "minItems": 1, + "type": "array", + "items": { + "type": "string", + "enum": [ + "sale.confirmed", + "sale.refunded" + ] + } + }, + "active": { + "type": "boolean" } }, - "required": [ - "redirectUrl" - ], "additionalProperties": false }, - "CustomerOrderStatus": { + "WebhookCreated": { "type": "object", "properties": { - "reference": { + "id": { "type": "string" }, - "status": { - "type": "string", - "enum": [ - "approved", - "pending", - "rejected" - ], - "description": "`pending` is a NORMAL state: Bold may take a while to reflect the payment (PSE, Nequi and the Bancolombia button approve asynchronously) and the webhook settles it. The landing page must retry, not treat the purchase as lost." + "url": { + "type": "string" }, - "saleStatus": { - "type": "string", - "description": "Internal sale status (PENDING, CONFIRMED, …)." + "events": { + "type": "array", + "items": { + "type": "string" + } }, - "total": { - "type": "number" + "active": { + "type": "boolean" }, - "currency": { - "type": "string" + "lastDeliveryAt": { + "type": [ + "string", + "null" + ] }, - "tickets": { + "lastDeliveryStatus": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerTicketItem" - } + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, { "type": "null" } - ], - "description": "Tickets with their `ticketCode`. ONLY present when `status` is `approved`; null in any other case. A code handed out before the payment settles would be a valid ticket with no money behind it." + ] + }, + "failureCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "signingSecret": { + "type": "string" } }, "required": [ - "reference", - "status", - "saleStatus", - "total", - "currency", - "tickets" + "id", + "url", + "events", + "active", + "lastDeliveryAt", + "lastDeliveryStatus", + "failureCount", + "createdAt", + "updatedAt", + "signingSecret" ], "additionalProperties": false }, - "CustomerOrderItem": { + "WebhookCreate": { "type": "object", "properties": { - "ticketTypeId": { + "url": { "type": "string", - "minLength": 1 - }, - "quantity": { - "type": "integer", - "minimum": 1, - "maximum": 30 + "format": "uri" }, - "seats": { - "description": "seats.io labels. Only for seated events.", - "maxItems": 30, + "events": { + "minItems": 1, "type": "array", "items": { "type": "string", - "minLength": 1, - "maxLength": 120 - } + "enum": [ + "sale.confirmed", + "sale.refunded" + ] + }, + "description": "Subset of: sale.confirmed, sale.refunded" + }, + "secret": { + "type": "string", + "minLength": 1 } }, "required": [ - "ticketTypeId", - "quantity" + "url", + "events" ], "additionalProperties": false }, - "CustomerOrderCreateRequest": { + "Subscriber": { "type": "object", "properties": { - "eventDateId": { - "type": "string", - "minLength": 1 + "id": { + "type": "string" }, - "items": { - "minItems": 1, - "maxItems": 1, - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerOrderItem" - } + "customerName": { + "type": [ + "string", + "null" + ] }, - "holdToken": { - "description": "Hold token of the seats.io map session. Required if seats are sent.", - "type": "string", - "maxLength": 120 + "customerEmail": { + "type": "string" }, - "discountCode": { + "status": { "type": "string", - "maxLength": 40 + "enum": [ + "PENDING", + "ACTIVE", + "EXPIRED", + "CANCELLED", + "PAUSED" + ] }, - "buyer": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 2, - "maxLength": 120 - }, - "phone": { - "type": "string", - "maxLength": 40 - }, - "idType": { - "type": "string", - "enum": [ - "CC", - "CE", - "NIT", - "PP", - "TI", - "PEP" - ] - }, - "idNumber": { - "type": "string", - "minLength": 5, - "maxLength": 20 - }, - "nitDigit": { - "description": "Check digit. Required if idType is NIT.", - "type": "string", - "maxLength": 1 - } - }, - "required": [ - "name", - "phone", - "idType", - "idNumber" - ], - "additionalProperties": false + "startedAt": { + "type": [ + "string", + "null" + ] }, - "returnUrl": { - "type": "string", - "maxLength": 2048, - "description": "Absolute URL of the landing page the buyer returns to. Validated against the enterprise domain allowlist and the workspace that owns the event; if it fails validation it is ignored and the purchase proceeds as usual." + "currentPeriodEnd": { + "type": [ + "string", + "null" + ] } }, "required": [ - "eventDateId", - "items", - "buyer", - "returnUrl" + "id", + "customerName", + "customerEmail", + "status", + "startedAt", + "currentPeriodEnd" ], "additionalProperties": false }, - "ContentVideo": { + "SubscriptionCancelResult": { "type": "object", "properties": { "id": { "type": "string" }, - "title": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "PENDING", + "ACTIVE", + "EXPIRED", + "CANCELLED", + "PAUSED" + ] }, - "description": { + "cancelledAt": { "type": [ "string", "null" ] + } + }, + "required": [ + "id", + "status", + "cancelledAt" + ], + "additionalProperties": false + }, + "SaleTicket": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "durationSeconds": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ] + "ticketCode": { + "type": "string" }, - "posterUrl": { + "ticketTypeId": { + "type": "string" + }, + "ticketTypeName": { + "type": "string" + }, + "quantity": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "seatLabel": { "type": [ "string", "null" ] }, - "series": { - "anyOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "title" - ], - "additionalProperties": false - }, - { - "type": "null" - } + "checkedInAt": { + "type": [ + "string", + "null" ] }, - "memberOnly": { - "type": "boolean", - "description": "true = only current members of the organization can play it." - }, - "publishedAt": { + "refundedAt": { "type": [ "string", "null" ] + }, + "refundAmount": { + "type": [ + "number", + "null" + ] + }, + "seatBlocked": { + "type": "boolean" } }, "required": [ "id", - "title", - "description", - "durationSeconds", - "posterUrl", - "series", - "memberOnly", - "publishedAt" + "ticketCode", + "ticketTypeId", + "ticketTypeName", + "quantity", + "seatLabel", + "checkedInAt", + "refundedAt", + "refundAmount", + "seatBlocked" ], "additionalProperties": false }, - "ContentPostUpdate": { + "PaymentAttempt": { "type": "object", "properties": { - "type": { - "description": "TEXT/IMAGE posts only. An ARTICLE stays an ARTICLE (and vice versa).", - "type": "string", - "enum": [ - "TEXT", - "IMAGE" - ] + "id": { + "type": "string" }, - "content": { + "provider": { + "type": "string" + }, + "status": { "type": "string", - "maxLength": 5000 + "description": "Status of the payment event. Usually this is the gateway's RAW status in its own vocabulary (PAID, APPROVED, REJECTED, VOID_APPROVED…). Values prefixed with `FT_` come from FreeTicket, not the gateway: currently `FT_SALE_APPROVED_POST_CONFIRM`, which flags that the gateway re-notified a payment that was already confirmed — this is how Bold reports its refunds, and the sale may remain CONFIRMED while someone verifies the refunded amount." }, - "imageUrl": { - "description": "ARTICLE posts: the cover image. null removes it.", - "anyOf": [ - { - "type": "string", - "maxLength": 2048, - "format": "uri" - }, - { - "type": "null" - } + "declineCode": { + "type": [ + "string", + "null" ] }, - "locked": { - "type": "boolean" - }, - "eventId": { - "description": "null unlinks the event.", - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "null" - } + "declineReason": { + "type": [ + "string", + "null" ] }, - "channelId": { - "description": "TEXT/IMAGE posts only. Active channel of the workspace; null moves it back to Announcements.", - "anyOf": [ - { - "type": "string", - "minLength": 1, - "maxLength": 64 - }, - { - "type": "null" - } + "amount": { + "type": [ + "number", + "null" ] }, - "publishedAt": { - "description": "Reschedules the post (and its member notification, if any).", - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" - }, - "title": { - "type": "string", - "minLength": 1, - "maxLength": 140 - }, - "subtitle": { - "anyOf": [ - { - "type": "string", - "maxLength": 280 - }, - { - "type": "null" - } + "externalRef": { + "type": [ + "string", + "null" ] }, - "body": { - "type": "string", - "minLength": 1, - "maxLength": 100000 - }, - "slug": { - "description": "ARTICLE only. null re-derives it from the title.", - "anyOf": [ - { - "type": "string", - "maxLength": 200 - }, - { - "type": "null" - } - ] + "createdAt": { + "type": "string" } }, + "required": [ + "id", + "provider", + "status", + "declineCode", + "declineReason", + "amount", + "externalRef", + "createdAt" + ], "additionalProperties": false }, - "ContentPostPin": { + "TicketReassign": { "type": "object", "properties": { - "pinned": { - "type": "boolean" + "eventDateId": { + "type": "string", + "minLength": 1 + }, + "ticketTypeId": { + "type": "string", + "minLength": 1 + }, + "seatLabel": { + "type": "string", + "minLength": 1 } }, - "required": [ - "pinned" - ], "additionalProperties": false }, - "ContentPostPinned": { + "CheckinResult": { "type": "object", "properties": { - "id": { + "ticketCode": { "type": "string" }, - "pinnedAt": { - "description": "null when unpinned. At most one pinned post per workspace.", + "checkedInAt": { + "type": [ + "string", + "null" + ] + }, + "checkedInBy": { "type": [ "string", "null" ] + }, + "alreadyCheckedIn": { + "type": "boolean" } }, "required": [ - "id", - "pinnedAt" + "ticketCode", + "checkedInAt", + "checkedInBy", + "alreadyCheckedIn" ], "additionalProperties": false }, - "ContentCommentDeleted": { + "CheckinRequest": { "type": "object", "properties": { - "id": { + "source": { + "anyOf": [ + { + "type": "string", + "enum": [ + "pdf", + "web", + "apple", + "google" + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "CheckinUndoResult": { + "type": "object", + "properties": { + "ticketCode": { "type": "string" }, - "deleted": { + "undone": { "type": "boolean", - "const": true + "description": "true when this call reverted the check-in; false when the ticket was not checked in (idempotent no-op)." }, - "deletedIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The comment plus its live replies (top-level comments)." + "previousCheckedInAt": { + "type": [ + "string", + "null" + ] + }, + "previousCheckedInBy": { + "type": [ + "string", + "null" + ] } }, "required": [ - "id", - "deleted", - "deletedIds" + "ticketCode", + "undone", + "previousCheckedInAt", + "previousCheckedInBy" ], "additionalProperties": false }, - "CommunityChannel": { + "TicketAccess": { "type": "object", "properties": { - "id": { + "ticketCode": { "type": "string" }, - "kind": { + "valid": { + "type": "boolean" + }, + "status": { "type": "string", "enum": [ - "ANNOUNCEMENTS", - "GENERAL", - "CITY", - "CUSTOM" + "VALID", + "USED", + "INVALID" ] }, - "name": { + "saleStatus": { + "type": "string", + "enum": [ + "PENDING", + "CONFIRMED", + "ABANDONED", + "CANCELLED", + "REFUNDED" + ] + }, + "eventId": { "type": "string" }, - "slug": { - "type": "string", - "description": "Tab URL slug. Does not change on rename." + "eventName": { + "type": "string" }, - "description": { - "type": [ - "string", - "null" - ] + "eventDateId": { + "type": "string" }, - "city": { + "startsAt": { + "type": "string" + }, + "ticketTypeName": { + "type": "string" + }, + "checkedInAt": { "type": [ "string", "null" ] - }, - "whoCanPost": { - "type": "string", - "enum": [ - "STAFF", - "MEMBERS" - ] - }, - "requiresApproval": { - "type": "boolean" - }, - "position": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 } }, "required": [ - "id", - "kind", - "name", - "slug", - "description", - "city", - "whoCanPost", - "requiresApproval", - "position" + "ticketCode", + "valid", + "status", + "saleStatus", + "eventId", + "eventName", + "eventDateId", + "startsAt", + "ticketTypeName", + "checkedInAt" ], "additionalProperties": false }, - "CommunityChannelCreate": { + "ApiKeyScope": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "ApiKey": { "type": "object", "properties": { - "kind": { - "type": "string", - "enum": [ - "CITY", - "CUSTOM" - ] + "id": { + "type": "string" }, "name": { - "type": "string", - "minLength": 1, - "maxLength": 40 + "type": "string" }, - "description": { + "scope": { + "$ref": "#/components/schemas/ApiKeyScope" + }, + "keyPrefix": { + "type": "string" + }, + "lastUsedAt": { "anyOf": [ { "type": "string", - "maxLength": 200 + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, - "city": { - "description": "Required when kind=CITY; ignored otherwise.", + "expiresAt": { "anyOf": [ { "type": "string", - "maxLength": 60 + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, - "whoCanPost": { - "default": "STAFF", - "type": "string", - "enum": [ - "STAFF", - "MEMBERS" + "revokedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } ] }, - "requiresApproval": { - "default": true, - "type": "boolean" + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ - "kind", + "id", "name", - "whoCanPost", - "requiresApproval" + "scope", + "keyPrefix", + "lastUsedAt", + "expiresAt", + "revokedAt", + "createdAt" ], "additionalProperties": false }, - "CommunityChannelUpdate": { + "ApiKeyCreated": { "type": "object", "properties": { + "id": { + "type": "string" + }, "name": { - "type": "string", - "minLength": 1, - "maxLength": 40 + "type": "string" }, - "description": { + "scope": { + "$ref": "#/components/schemas/ApiKeyScope" + }, + "keyPrefix": { + "type": "string" + }, + "lastUsedAt": { "anyOf": [ { "type": "string", - "maxLength": 200 + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, - "city": { + "expiresAt": { "anyOf": [ { "type": "string", - "maxLength": 60 + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, - "whoCanPost": { + "revokedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + "key": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "scope", + "keyPrefix", + "lastUsedAt", + "expiresAt", + "revokedAt", + "createdAt", + "key" + ], + "additionalProperties": false + }, + "ApiKeyCreate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 120 + }, + "scope": { + "default": "read", + "$ref": "#/components/schemas/ApiKeyScope" + }, + "expiresAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + } + }, + "required": [ + "name", + "scope" + ], + "additionalProperties": false + }, + "CustomerAuthRequest": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": [ + "email" + ], + "additionalProperties": false + }, + "CustomerAuthRequestResult": { + "type": "object", + "properties": { + "status": { + "type": "string", + "const": "sent" + }, + "sent_to": { + "type": "string", + "description": "Masked email (`c***@mail.com`). Never the full address." + }, + "expires_in": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Code lifetime, in seconds." + } + }, + "required": [ + "status", + "sent_to", + "expires_in" + ], + "additionalProperties": false + }, + "CustomerAuthVerify": { + "type": "object", + "properties": { + "email": { "type": "string", - "enum": [ - "STAFF", - "MEMBERS" - ] + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, - "requiresApproval": { - "type": "boolean" + "code": { + "type": "string", + "minLength": 6, + "maxLength": 6 } }, + "required": [ + "email", + "code" + ], "additionalProperties": false }, - "CommunityChannelOrder": { + "CustomerAuthVerifyResult": { "type": "object", "properties": { - "orderedIds": { - "minItems": 1, - "maxItems": 20, - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 64 - }, - "description": "EVERY active channel id, in the new order, Announcements first." + "session_token": { + "type": "string", + "description": "Usable as-is as the `X-Customer-Session` header on /api/v1/customer/*." + }, + "expires_in": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Session lifetime, in seconds." } }, "required": [ - "orderedIds" + "session_token", + "expires_in" ], "additionalProperties": false }, - "ModerationQueueItem": { + "CustomerMe": { "type": "object", "properties": { - "commentId": { + "id": { "type": "string" }, - "body": { + "email": { "type": "string" }, - "createdAt": { + "name": { "type": "string" }, - "isReply": { + "emailVerified": { "type": "boolean" }, - "hidden": { - "type": "boolean" + "expiresAt": { + "type": "string", + "description": "Buyer session expiry (ISO 8601)." + } + }, + "required": [ + "id", + "email", + "name", + "emailVerified", + "expiresAt" + ], + "additionalProperties": false + }, + "CustomerTicketItem": { + "type": "object", + "properties": { + "ticketTypeName": { + "type": "string" }, - "deleted": { - "type": "boolean", - "description": "Deleted (by its author or the team) with reports still open." + "quantity": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "hiddenSource": { - "description": "MODERATOR | AUTO_REPORTS", + "ticketCode": { + "type": "string", + "description": "Opaque ticket code. The QR code must encode the validator URL (`https://admin.appfreeticket.com/dashboard/tickets/validar?code=`)." + }, + "seatLabel": { + "description": "Exact seat for seated events (seats.io), or null.", "type": [ "string", "null" ] + } + }, + "required": [ + "ticketTypeName", + "quantity", + "ticketCode", + "seatLabel" + ], + "additionalProperties": false + }, + "CustomerSale": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "openReportCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "reference": { + "type": "string" }, - "author": { + "status": { + "type": "string" + }, + "event": { "type": "object", "properties": { - "customerId": { - "type": "string" - }, "name": { "type": "string" }, - "image": { - "type": [ - "string", - "null" - ] - }, - "banned": { - "type": "boolean" + "slug": { + "type": "string" } }, "required": [ - "customerId", "name", - "image", - "banned" + "slug" ], "additionalProperties": false }, - "post": { + "eventDate": { "type": "object", "properties": { - "id": { - "type": "string" + "startsAt": { + "type": "string", + "description": "Event start instant in ISO 8601 UTC." }, - "label": { - "type": "string" + "timezone": { + "type": "string", + "description": "IANA time zone of the event." } }, "required": [ - "id", - "label" + "startsAt", + "timezone" ], "additionalProperties": false }, - "reasons": { + "items": { "type": "array", "items": { - "type": "object", - "properties": { - "reason": { - "type": "string" - }, - "count": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "reason", - "count" - ], - "additionalProperties": false + "$ref": "#/components/schemas/CustomerTicketItem" } }, - "details": { - "type": "array", - "items": { - "type": "string" - } + "total": { + "type": "number" }, - "lastReportAt": { - "type": [ - "string", - "null" - ] + "currency": { + "type": "string" } }, "required": [ - "commentId", - "body", - "createdAt", - "isReply", - "hidden", - "deleted", - "hiddenSource", - "openReportCount", - "author", - "post", - "reasons", - "details", - "lastReportAt" + "id", + "reference", + "status", + "event", + "eventDate", + "items", + "total", + "currency" ], "additionalProperties": false }, - "CommunityBan": { + "CustomerTicketCancelResult": { "type": "object", "properties": { "id": { "type": "string" }, - "customerName": { + "reference": { "type": "string" }, - "customerImage": { - "type": [ - "string", - "null" - ] - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "createdAt": { + "status": { "type": "string" } }, "required": [ "id", - "customerName", - "customerImage", - "reason", - "createdAt" + "reference", + "status" ], "additionalProperties": false }, - "MemberPostQueueItem": { + "CustomerLogout": { "type": "object", "properties": { - "postId": { - "type": "string" - }, - "status": { + "revoked": { + "type": "boolean", + "description": "true if the session existed and was deleted; false if the token was no longer valid (it ends up closed either way)." + } + }, + "required": [ + "revoked" + ], + "additionalProperties": false + }, + "EnterpriseExchangeRequest": { + "type": "object", + "properties": { + "token": { "type": "string", - "enum": [ - "PENDING_REVIEW", - "PUBLISHED" - ] - }, - "content": { - "type": [ - "string", - "null" - ] - }, - "imageUrl": { - "description": "PENDING_REVIEW: short-lived signed URL (the image lives in a private bucket until approved).", - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "type": "string" - }, - "publishedAt": { - "type": "string" - }, - "updatedAt": { + "minLength": 1, + "maxLength": 256, + "description": "One-time token received on the landing page callback (format `{slug}.{token}`, forwarded as is)." + } + }, + "required": [ + "token" + ], + "additionalProperties": false + }, + "EnterpriseExchangeResponse": { + "type": "object", + "properties": { + "session_token": { "type": "string", - "description": "Version read by the moderator: pass it as `expectedUpdatedAt` to approve." + "description": "Buyer session token. Send it as the `X-Customer-Session` header on /api/v1/customer/*." }, - "channelName": { - "type": [ - "string", - "null" - ] + "expires_at": { + "type": "string", + "description": "Session expiry (ISO 8601, 7-day sliding window)." }, - "author": { + "customer": { "type": "object", "properties": { - "customerId": { + "id": { "type": "string" }, - "displayName": { + "email": { "type": "string" }, - "handle": { - "type": [ - "string", - "null" - ] - }, - "avatarUrl": { - "type": [ - "string", - "null" - ] + "name": { + "type": "string" }, - "banned": { + "email_verified": { "type": "boolean" } }, "required": [ - "customerId", - "displayName", - "handle", - "avatarUrl", - "banned" + "id", + "email", + "name", + "email_verified" ], "additionalProperties": false - }, - "openReportCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 } }, "required": [ - "postId", - "status", - "content", - "imageUrl", - "createdAt", - "publishedAt", - "updatedAt", - "channelName", - "author", - "openReportCount" + "session_token", + "expires_at", + "customer" ], "additionalProperties": false }, - "CommentModerated": { + "CustomerMembershipState": { "type": "object", "properties": { - "commentId": { - "type": "string" - }, - "changed": { + "active": { "type": "boolean", - "description": "false = it was already in that state (idempotent)." + "description": "true only with an ACTIVE, unexpired membership in this workspace." + }, + "membership": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "PENDING", + "ACTIVE", + "EXPIRED", + "CANCELLED", + "PAUSED" + ] + }, + "plan": { + "$ref": "#/components/schemas/MembershipPlan" + }, + "startedAt": { + "type": [ + "string", + "null" + ] + }, + "expiresAt": { + "description": "null = LIFETIME or a membership with no expiry.", + "type": [ + "string", + "null" + ] + }, + "autoRenew": { + "type": "boolean" + } + }, + "required": [ + "id", + "status", + "plan", + "startedAt", + "expiresAt", + "autoRenew" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] } }, "required": [ - "commentId", - "changed" + "active", + "membership" ], "additionalProperties": false }, - "MemberBanCreate": { + "CustomerSubscribeRequest": { "type": "object", "properties": { - "commentId": { + "planId": { "type": "string", "minLength": 1, - "description": "Comment of this member in the workspace that motivates the ban (required: a ban always comes from a reported comment)." - }, - "reason": { + "description": "Id of an active MembershipPlan in the key's workspace." + } + }, + "required": [ + "planId" + ], + "additionalProperties": false + }, + "CustomerSubscribeResult": { + "type": "object", + "properties": { + "checkoutUrl": { "type": "string", - "maxLength": 500 + "description": "Membership checkout URL on the canonical host. The landing page must redirect the buyer there." }, - "hideAllComments": { - "default": false, - "description": "true = hide every comment of the member in this workspace, not only `commentId`.", - "type": "boolean" + "planId": { + "type": "string" } }, "required": [ - "commentId", - "hideAllComments" + "checkoutUrl", + "planId" ], "additionalProperties": false }, - "MemberBanResult": { + "CustomerSubscriptionCancelResult": { "type": "object", "properties": { - "customerId": { + "id": { "type": "string" }, - "banned": { - "type": "boolean" + "status": { + "type": "string", + "enum": [ + "PENDING", + "ACTIVE", + "EXPIRED", + "CANCELLED", + "PAUSED" + ] + }, + "cancelledAt": { + "type": [ + "string", + "null" + ] } }, "required": [ - "customerId", - "banned" + "id", + "status", + "cancelledAt" ], "additionalProperties": false }, - "MemberPostApprove": { + "CustomerSubscriptionCancelRequest": { "type": "object", "properties": { - "expectedUpdatedAt": { + "workspaceId": { + "description": "Required only without an enterprise service API key: which membership (by workspace) to cancel. Ignored with a key — the workspace is the one pinned to it.", "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", - "description": "`updatedAt` of the post as read from `GET /content/moderation/member-posts`." + "minLength": 1 + } + }, + "additionalProperties": false + }, + "CustomerProfile": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "phone": { + "type": [ + "string", + "null" + ] } }, "required": [ - "expectedUpdatedAt" + "id", + "email", + "name", + "phone" ], "additionalProperties": false }, - "MemberPostDecision": { + "CustomerProfileUpdate": { "type": "object", "properties": { - "reason": { - "description": "Shown to the author in their inbox.", + "name": { "type": "string", - "maxLength": 1000 + "minLength": 1, + "maxLength": 120 }, - "banAuthor": { - "default": false, - "description": "Also bans the author from the community. Requires ADMIN.", - "type": "boolean" + "phone": { + "description": "null or an empty string clears the phone.", + "anyOf": [ + { + "type": "string", + "maxLength": 30 + }, + { + "type": "null" + } + ] } }, - "required": [ - "banAuthor" - ], "additionalProperties": false }, - "MemberPostReviewed": { + "CustomerAddress": { "type": "object", "properties": { - "postId": { + "id": { "type": "string" }, - "status": { + "label": { + "type": [ + "string", + "null" + ] + }, + "recipientName": { + "type": "string" + }, + "phone": { + "type": [ + "string", + "null" + ] + }, + "departmentCode": { "type": "string", - "enum": [ - "PUBLISHED", - "REJECTED", - "REMOVED" + "description": "DANE department code (2 digits)." + }, + "cityCode": { + "type": "string", + "description": "DANE municipality code (5 digits, e.g. `11001` = Bogotá)." + }, + "address": { + "type": "string" + }, + "addressExtra": { + "type": [ + "string", + "null" ] + }, + "isDefault": { + "type": "boolean" + }, + "createdAt": { + "type": "string" } }, "required": [ - "postId", - "status" + "id", + "label", + "recipientName", + "phone", + "departmentCode", + "cityCode", + "address", + "addressExtra", + "isDefault", + "createdAt" ], "additionalProperties": false }, - "CommunityMeetupCreate": { + "CustomerAddressCreate": { "type": "object", "properties": { - "title": { - "type": "string", - "minLength": 3, - "maxLength": 120 - }, - "description": { - "type": "string", - "maxLength": 5000 - }, - "format": { - "type": "string", - "enum": [ - "IN_PERSON", - "ONLINE" + "label": { + "description": "null or an empty string clears it.", + "anyOf": [ + { + "type": "string", + "maxLength": 60 + }, + { + "type": "null" + } ] }, - "startsAt": { + "recipientName": { "type": "string", - "description": "Local wall time in the workspace's timezone, `YYYY-MM-DDTHH:mm` (same as the dashboard form)." - }, - "endsAt": { - "description": "Local wall time in the workspace's timezone, `YYYY-MM-DDTHH:mm` (same as the dashboard form). Empty = none.", - "type": "string" + "minLength": 2, + "maxLength": 120 }, - "city": { - "type": "string", - "maxLength": 80 + "phone": { + "description": "null or an empty string clears it.", + "anyOf": [ + { + "type": "string", + "pattern": "^\\+?[0-9 -]{7,20}$" + }, + { + "type": "null" + } + ] }, - "locationName": { + "departmentCode": { "type": "string", - "maxLength": 120 + "pattern": "^\\d{2}$" }, - "locationDetail": { + "cityCode": { "type": "string", - "maxLength": 500 + "pattern": "^\\d{5}$" }, - "onlineUrl": { - "description": "ONLINE only; must start with https://", + "address": { "type": "string", - "maxLength": 500 + "minLength": 5, + "maxLength": 200 }, - "capacity": { - "description": "null = unlimited.", + "addressExtra": { + "description": "null or an empty string clears it.", "anyOf": [ { - "type": "integer", - "minimum": 1, - "maximum": 100000 + "type": "string", + "maxLength": 200 }, { "type": "null" } ] }, - "requiresApproval": { - "description": "true = the staff approves each RSVP request.", + "isDefault": { + "description": "Make it the default address (clears the previous default). The first address is always the default.", "type": "boolean" } }, "required": [ - "title", - "format", - "startsAt" + "recipientName", + "departmentCode", + "cityCode", + "address" ], "additionalProperties": false }, - "CommunityMeetupUpdate": { + "CustomerAddressUpdate": { "type": "object", "properties": { - "title": { - "type": "string", - "minLength": 3, - "maxLength": 120 - }, - "description": { - "type": "string", - "maxLength": 5000 - }, - "format": { - "type": "string", - "enum": [ - "IN_PERSON", - "ONLINE" + "label": { + "description": "null or an empty string clears it.", + "anyOf": [ + { + "type": "string", + "maxLength": 60 + }, + { + "type": "null" + } ] }, - "startsAt": { + "recipientName": { "type": "string", - "description": "Local wall time in the workspace's timezone, `YYYY-MM-DDTHH:mm` (same as the dashboard form)." - }, - "endsAt": { - "description": "Local wall time in the workspace's timezone, `YYYY-MM-DDTHH:mm` (same as the dashboard form). Empty = none.", - "type": "string" + "minLength": 2, + "maxLength": 120 }, - "city": { - "type": "string", - "maxLength": 80 + "phone": { + "description": "null or an empty string clears it.", + "anyOf": [ + { + "type": "string", + "pattern": "^\\+?[0-9 -]{7,20}$" + }, + { + "type": "null" + } + ] }, - "locationName": { + "departmentCode": { "type": "string", - "maxLength": 120 + "pattern": "^\\d{2}$" }, - "locationDetail": { + "cityCode": { "type": "string", - "maxLength": 500 + "pattern": "^\\d{5}$" }, - "onlineUrl": { - "description": "ONLINE only; must start with https://", + "address": { "type": "string", - "maxLength": 500 + "minLength": 5, + "maxLength": 200 }, - "capacity": { - "description": "null = unlimited.", + "addressExtra": { + "description": "null or an empty string clears it.", "anyOf": [ { - "type": "integer", - "minimum": 1, - "maximum": 100000 + "type": "string", + "maxLength": 200 }, { "type": "null" } ] }, - "requiresApproval": { - "description": "true = the staff approves each RSVP request.", + "isDefault": { + "description": "`true` makes it the default (clears the previous one). `false` on the default address moves the default to the most recent other address; if it is the only one, it stays the default.", "type": "boolean" } }, "additionalProperties": false }, - "CommunityMeetup": { + "PurchaseSessionCreateRequest": { + "type": "object", + "properties": { + "eventDateId": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "deviceKey": { + "type": "string", + "minLength": 8, + "maxLength": 200, + "description": "Stable browser identifier (e.g. stored in localStorage). If the SAME browser reopens the SAME event date while its session is still alive, it gets that same session (same `holdToken`, same clock) instead of a new one." + } + }, + "required": [ + "eventDateId", + "deviceKey" + ], + "additionalProperties": false + }, + "PurchaseSessionCreated": { "type": "object", "properties": { "id": { "type": "string" }, - "title": { + "eventDateId": { "type": "string" }, - "format": { + "state": { "type": "string", - "enum": [ - "IN_PERSON", - "ONLINE" - ] + "const": "live" }, - "status": { - "type": "string", - "enum": [ - "DRAFT", - "PUBLISHED", - "CANCELLED" - ] + "seated": { + "type": "boolean", + "description": "true = the event date has a seats.io map." }, - "startsAt": { - "type": "string" + "holdToken": { + "description": "seats.io hold token ISSUED BY THE SERVER. Mount the chart with `session: \"manual\"` and this `holdToken` (https://docs.seats.io/docs/renderer/config-session/), never with `session: \"continue\"`. It is the ONLY token `POST /customer/orders` accepts for this session. null for event dates without a map.", + "type": [ + "string", + "null" + ] }, - "city": { + "seatsDeadline": { + "description": "Instant (ISO 8601 UTC) until which the order with seats can be created. This is the clock to display over the map. The seats.io hold expires AFTER this instant, never before. null for event dates without a map.", "type": [ "string", "null" ] }, - "capacity": { + "budgetSeconds": { "anyOf": [ { "type": "integer", @@ -30208,512 +30932,468 @@ { "type": "null" } - ] - }, - "goingCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "requiresApproval": { - "type": "boolean" + ], + "description": "Budget seconds granted to this session (= seatsDeadline − now). The budget is CUMULATIVE per buyer and event date: opening another tab does not reset it." }, - "pendingCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "PENDING RSVP requests." + "replacedSessionId": { + "description": "Live session that this one replaced (now `superseded`), or null. That tab can no longer create an order or start a new payment.", + "type": [ + "string", + "null" + ] } }, "required": [ "id", - "title", - "format", - "status", - "startsAt", - "city", - "capacity", - "goingCount", - "requiresApproval", - "pendingCount" + "eventDateId", + "state", + "seated", + "holdToken", + "seatsDeadline", + "budgetSeconds", + "replacedSessionId" ], "additionalProperties": false }, - "CommunityMeetupDetail": { + "PurchaseSessionStatus": { "type": "object", "properties": { "id": { "type": "string" }, - "title": { - "type": "string" - }, - "format": { - "type": "string", - "enum": [ - "IN_PERSON", - "ONLINE" - ] - }, - "status": { + "state": { "type": "string", "enum": [ - "DRAFT", - "PUBLISHED", - "CANCELLED" - ] - }, - "startsAt": { - "type": "string" + "live", + "superseded", + "expired", + "converted" + ], + "description": "`live`: can create the order. `superseded`: another tab/device replaced it. `expired`: the map clock ran out or it was released. `converted`: it already created its order (`orderId`)." }, - "city": { + "seatsDeadline": { "type": [ "string", "null" ] }, - "capacity": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } + "orderId": { + "description": "Sale created with this session, if any.", + "type": [ + "string", + "null" ] + } + }, + "required": [ + "id", + "state", + "seatsDeadline", + "orderId" + ], + "additionalProperties": false + }, + "CustomerOrderCreateResult": { + "type": "object", + "properties": { + "free": { + "type": "boolean", + "description": "true = the purchase was CONFIRMED without a payment gateway (100% discount). In that case do NOT call /payment: there is nothing to charge and the other fields are null." }, - "goingCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "requiresApproval": { - "type": "boolean" - }, - "pendingCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "PENDING RSVP requests." + "reference": { + "type": "string", + "description": "Sale reference (FT-…). Always identifies the purchase." }, - "endsAt": { + "saleId": { + "description": "Sale id. null when `free` is true.", "type": [ "string", "null" ] }, - "publishedAt": { + "total": { + "description": "Amount to charge. null when `free` is true.", "type": [ - "string", + "number", "null" ] }, - "cancelledAt": { + "currency": { "type": [ "string", "null" ] }, - "local": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "format": { - "type": "string", - "enum": [ - "IN_PERSON", - "ONLINE" - ] - }, - "startsAt": { - "type": "string" - }, - "endsAt": { - "type": "string" - }, - "city": { - "type": "string" - }, - "locationName": { - "type": "string" - }, - "locationDetail": { - "type": "string" - }, - "onlineUrl": { - "type": "string" - }, - "capacity": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "expiresAt": { + "description": "Instant (ISO 8601 UTC) at which the inventory reservation expires. After that, the purchase must be started over.", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "free", + "reference", + "saleId", + "total", + "currency", + "expiresAt" + ], + "additionalProperties": false + }, + "CustomerOrderCurrent": { + "type": "object", + "properties": { + "order": { + "anyOf": [ + { + "type": "object", + "properties": { + "saleId": { + "type": "string" }, - { - "type": "null" - } - ] - }, - "requiresApproval": { - "type": "boolean" - } - }, - "required": [ - "title", - "description", - "format", - "startsAt", - "endsAt", - "city", - "locationName", - "locationDetail", - "onlineUrl", - "capacity", - "requiresApproval" - ], - "additionalProperties": false, - "description": "Editable values in the workspace's local wall time (the shape `PATCH /content/meetups/{id}` accepts)." - }, - "attendees": { - "type": "array", - "items": { - "type": "object", - "properties": { - "rsvpId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "confirmedAt": { - "type": "string" - }, - "checkedInAt": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "rsvpId", - "name", - "confirmedAt", - "checkedInAt" - ], - "additionalProperties": false - } - }, - "requests": { - "type": "array", - "items": { - "type": "object", - "properties": { - "rsvpId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "requestedAt": { - "type": "string" + "reference": { + "type": "string" + }, + "total": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "description": "Instant (ISO 8601 UTC) at which the inventory hold expires. This is the countdown to display." + }, + "paymentOpened": { + "type": "boolean", + "description": "true = payment has already been opened for this sale. Reopening it with /payment returns the SAME signed configuration while the reservation is still alive." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ticketTypeId": { + "type": "string" + }, + "ticketTypeName": { + "type": "string" + }, + "quantity": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "seatLabel": { + "description": "seats.io numbered seat, or null if not seated.", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "ticketTypeId", + "ticketTypeName", + "quantity", + "seatLabel" + ], + "additionalProperties": false + } + } }, - "status": { - "type": "string", - "enum": [ - "PENDING", - "GOING", - "DECLINED" - ] - } + "required": [ + "saleId", + "reference", + "total", + "currency", + "expiresAt", + "paymentOpened", + "items" + ], + "additionalProperties": false }, - "required": [ - "rsvpId", - "name", - "email", - "requestedAt", - "status" - ], - "additionalProperties": false - } + { + "type": "null" + } + ], + "description": "The purchase the buyer left unfinished for this event date, or null if there is none." } }, "required": [ - "id", - "title", - "format", - "status", - "startsAt", - "city", - "capacity", - "goingCount", - "requiresApproval", - "pendingCount", - "endsAt", - "publishedAt", - "cancelledAt", - "local", - "attendees", - "requests" + "order" ], "additionalProperties": false }, - "CommunityMeetupRsvpReview": { + "CustomerOrderRelease": { "type": "object", "properties": { - "decision": { + "released": { + "type": "boolean", + "const": true, + "description": "The sale is now ABANDONED and its inventory went back to stock. A rejection never lands here: it is returned as an error with `details.reason`." + } + }, + "required": [ + "released" + ], + "additionalProperties": false + }, + "CustomerOrderPayment": { + "type": "object", + "properties": { + "orderId": { "type": "string", - "enum": [ - "APPROVE", - "REJECT" - ] + "description": "Merchant reference = `reference`." + }, + "amount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Whole pesos, no decimals." + }, + "currency": { + "type": "string" + }, + "apiKey": { + "type": "string", + "description": "Bold IDENTITY key (public, sent to the browser)." + }, + "integritySignature": { + "type": "string", + "description": "SHA256 that binds the charge to the amount. Computed on the server." + }, + "renderMode": { + "type": "string", + "const": "embedded" + }, + "redirectionUrl": { + "type": "string" + }, + "description": { + "type": "string" + }, + "expirationDate": { + "type": "number", + "description": "Epoch in NANOSECONDS (what the Bold library expects)." } }, "required": [ - "decision" + "orderId", + "amount", + "currency", + "apiKey", + "integritySignature", + "renderMode", + "redirectionUrl", + "description", + "expirationDate" ], "additionalProperties": false }, - "CommunityMeetupRsvpReviewed": { + "CustomerOrderMercadoPagoConfig": { "type": "object", "properties": { - "rsvpId": { + "publicKey": { + "type": "string", + "description": "MercadoPago (Tickets) public key. Sent to the browser: it is what `initMercadoPago()`/`` from the `@mercadopago/sdk-react` SDK (or equivalent) receives to mount the Payment Brick. Present ONLY on the MercadoPago rail — it is the marker the landing page uses to tell it apart from the Bold rail (which carries `apiKey`+`renderMode` and NEVER `publicKey`)." + }, + "amount": { + "type": "number", + "description": "Amount to charge, in the currency's major unit (pesos, not cents) — the same `total` already returned by `POST /customer/orders`. It is re-read from the sale on every call: do not treat it as final if a long time passes between mounting the Brick and charging." + }, + "currency": { "type": "string" }, - "status": { + "reference": { "type": "string", - "enum": [ - "GOING", - "DECLINED" - ] + "description": "Sale reference (FT-…)." + }, + "payerEmail": { + "type": "string", + "description": "Buyer email (from the sale, not editable). Informational: the charge ALWAYS uses the sale's email, never one sent by the client." } }, "required": [ - "rsvpId", - "status" + "publicKey", + "amount", + "currency", + "reference", + "payerEmail" ], "additionalProperties": false }, - "CommunityMeetupAttendance": { + "CustomerOrderStartPayment": { + "anyOf": [ + { + "$ref": "#/components/schemas/CustomerOrderPayment" + }, + { + "$ref": "#/components/schemas/CustomerOrderMercadoPagoConfig" + } + ] + }, + "CustomerOrderMercadoPagoChargeRequest": { "type": "object", "properties": { - "rsvpId": { + "token": { "type": "string", "minLength": 1, - "maxLength": 64 + "description": "Card token returned by the Payment Brick when tokenizing." }, - "attended": { - "type": "boolean" + "paymentMethodId": { + "type": "string", + "minLength": 1, + "description": "`payment_method_id` returned by the Brick (e.g. `visa`, `debmaster`)." + }, + "installments": { + "default": 1, + "type": "integer", + "minimum": 1, + "maximum": 9007199254740991 + }, + "issuerId": { + "description": "`issuer_id` returned by the Brick. Some BINs require it.", + "type": "string" + }, + "payer": { + "type": "object", + "properties": { + "email": { + "description": "Ignored: the charge ALWAYS uses the sale's email, never one sent by the client.", + "type": "string" + }, + "identification": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "number": { + "type": "string" + } + }, + "required": [ + "type", + "number" + ], + "additionalProperties": false + } + }, + "additionalProperties": false } }, "required": [ - "rsvpId", - "attended" + "token", + "paymentMethodId", + "installments" ], "additionalProperties": false }, - "CommunityMeetupAttendanceResult": { + "CustomerOrderMercadoPagoChargeResult": { "type": "object", "properties": { - "rsvpId": { + "status": { + "type": "string", + "enum": [ + "approved", + "pending", + "rejected" + ], + "description": "`pending` is normal: it may require additional authentication from the bank. `rejected` is a business decline (funds, card details, …) — the buyer can retry with another card." + }, + "reference": { "type": "string" }, - "attended": { - "type": "boolean" + "message": { + "description": "Human-readable message for the buyer. Only present with `rejected`.", + "type": "string" }, - "changed": { - "type": "boolean", - "description": "false = already in that state, or the RSVP is not GOING / the meetup is cancelled." + "saleAlive": { + "description": "Only present with `rejected`. `false`: the purchase was cancelled and its tickets (and seats) went back to inventory — a new purchase must be started. `true`: THIS payment was declined but the purchase is still pending because another payment is in progress on it (e.g. a PSE payment waiting on the bank); do NOT start a new purchase: show the message, wait, and check the order status.", + "type": "boolean" } }, "required": [ - "rsvpId", - "attended", - "changed" + "status", + "reference" ], "additionalProperties": false }, - "ContentPost": { + "CustomerOrderMercadoPagoPse": { "type": "object", "properties": { - "id": { + "redirectUrl": { + "type": "string", + "description": "`init_point` of the MercadoPago preference. Redirect the buyer there (it is not an iframe): they pick their bank and confirm the transfer on MercadoPago." + } + }, + "required": [ + "redirectUrl" + ], + "additionalProperties": false + }, + "CustomerOrderStatus": { + "type": "object", + "properties": { + "reference": { "type": "string" }, - "type": { + "status": { "type": "string", "enum": [ - "TEXT", - "IMAGE", - "VIDEO", - "ARTICLE" - ] - }, - "content": { - "type": [ - "string", - "null" - ] - }, - "imageUrl": { - "description": "ARTICLE post: also serves as the article's cover image.", - "type": [ - "string", - "null" - ] - }, - "videoId": { - "description": "VIDEO post: id of the ContentVideo, to cross-reference with `GET /content/videos`.", - "type": [ - "string", - "null" - ] - }, - "eventId": { - "type": [ - "string", - "null" - ] - }, - "locked": { - "type": "boolean", - "description": "true = post restricted to current members; its content arrives redacted." - }, - "title": { - "description": "ARTICLE posts only; null for every other type.", - "type": [ - "string", - "null" - ] - }, - "subtitle": { - "description": "ARTICLE posts only.", - "type": [ - "string", - "null" - ] + "approved", + "pending", + "rejected" + ], + "description": "`pending` is a NORMAL state: Bold may take a while to reflect the payment (PSE, Nequi and the Bancolombia button approve asynchronously) and the webhook settles it. The landing page must retry, not treat the purchase as lost." }, - "slug": { - "description": "ARTICLE posts only. Permalink at /comunidades/articulos/{slug}, unique per organization.", - "type": [ - "string", - "null" - ] + "saleStatus": { + "type": "string", + "description": "Internal sale status (PENDING, CONFIRMED, …)." }, - "body": { - "description": "ARTICLE posts only. Body in Markdown.", - "type": [ - "string", - "null" - ] + "total": { + "type": "number" }, - "readingMinutes": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ], - "description": "ARTICLE posts only. Not redacted when `locked`: it does not leak content, only its length." + "currency": { + "type": "string" }, - "link": { + "tickets": { "anyOf": [ { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "title": { - "type": [ - "string", - "null" - ] - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "imageUrl": { - "type": [ - "string", - "null" - ] - }, - "domain": { - "type": "string" - } - }, - "required": [ - "url", - "title", - "description", - "imageUrl", - "domain" - ], - "additionalProperties": false + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomerTicketItem" + } }, { "type": "null" } ], - "description": "Open Graph snapshot of the first link in the text. Always null for ARTICLE posts." - }, - "commentsCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "Visible comments: excludes deleted ones and those hidden by moderation (and replies to a hidden comment). 0 if the post arrives redacted." - }, - "publishedAt": { - "type": "string" + "description": "Tickets with their `ticketCode`. ONLY present when `status` is `approved`; null in any other case. A code handed out before the payment settles would be a valid ticket with no money behind it." } }, "required": [ - "id", - "type", - "content", - "imageUrl", - "videoId", - "eventId", - "locked", - "title", - "subtitle", - "slug", - "body", - "readingMinutes", - "link", - "commentsCount", - "publishedAt" + "reference", + "status", + "saleStatus", + "total", + "currency", + "tickets" ], "additionalProperties": false }, - "ContentPostCreate": { + "ContentPostUpdate": { "type": "object", "properties": { "type": { - "default": "TEXT", + "description": "TEXT/IMAGE posts only. An ARTICLE stays an ARTICLE (and vice versa).", "type": "string", "enum": [ "TEXT", - "IMAGE", - "ARTICLE" + "IMAGE" ] }, "content": { @@ -30721,6 +31401,7 @@ "maxLength": 5000 }, "imageUrl": { + "description": "ARTICLE posts: the cover image. null removes it.", "anyOf": [ { "type": "string", @@ -30732,1100 +31413,1053 @@ } ] }, - "title": { - "description": "Required when type=ARTICLE.", - "type": "string", - "minLength": 1, - "maxLength": 140 + "locked": { + "type": "boolean" }, - "subtitle": { + "eventId": { + "description": "null unlinks the event.", "anyOf": [ { "type": "string", - "maxLength": 280 + "minLength": 1 }, { "type": "null" } ] }, - "slug": { - "description": "Manual; if omitted it is derived from the title.", + "channelId": { + "description": "TEXT/IMAGE posts only. Active channel of the workspace; null moves it back to Announcements.", "anyOf": [ { "type": "string", - "maxLength": 200 + "minLength": 1, + "maxLength": 64 }, { "type": "null" } ] }, - "body": { - "description": "Markdown. Required when type=ARTICLE.", + "publishedAt": { + "description": "Reschedules the post (and its member notification, if any).", + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" + }, + "title": { "type": "string", "minLength": 1, - "maxLength": 100000 + "maxLength": 140 }, - "locked": { - "default": false, - "description": "true = restricted to current members.", - "type": "boolean" + "subtitle": { + "anyOf": [ + { + "type": "string", + "maxLength": 280 + }, + { + "type": "null" + } + ] + }, + "body": { + "type": "string", + "minLength": 1, + "maxLength": 100000 }, - "eventId": { + "slug": { + "description": "ARTICLE only. null re-derives it from the title.", "anyOf": [ { "type": "string", - "minLength": 1 + "maxLength": 200 }, { "type": "null" } ] - }, - "publishedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, - "required": [ - "type", - "locked" - ], "additionalProperties": false }, - "ContentMediaDeleted": { + "ContentPostPin": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "deleted": { - "type": "boolean", - "const": true + "pinned": { + "type": "boolean" } }, "required": [ - "id", - "deleted" + "pinned" ], "additionalProperties": false }, - "ContentVideoUpdate": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "description": { - "description": "`null` or empty clears the description.", - "type": [ - "string", - "null" - ] - }, - "memberOnly": { - "description": "true = only current members can play it.", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ContentVideoSummary": { + "ContentPostPinned": { "type": "object", "properties": { "id": { "type": "string" }, - "title": { - "type": "string" - }, - "description": { + "pinnedAt": { + "description": "null when unpinned. At most one pinned post per workspace.", "type": [ "string", "null" ] - }, - "memberOnly": { - "type": "boolean" } }, "required": [ "id", - "title", - "description", - "memberOnly" - ], - "additionalProperties": false - }, - "ContentVideoPublish": { - "type": "object", - "properties": { - "published": { - "type": "boolean" - } - }, - "required": [ - "published" + "pinnedAt" ], "additionalProperties": false }, - "ContentVideoPublished": { + "ContentCommentDeleted": { "type": "object", "properties": { "id": { "type": "string" }, - "published": { - "type": "boolean" + "deleted": { + "type": "boolean", + "const": true + }, + "deletedIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The comment plus its live replies (top-level comments)." } }, "required": [ "id", - "published" - ], - "additionalProperties": false - }, - "ContentVideoSeriesAssign": { - "type": "object", - "properties": { - "seriesId": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "null" - } - ], - "description": "Series to put the video in; `null` removes it from its series." - } - }, - "required": [ - "seriesId" + "deleted", + "deletedIds" ], "additionalProperties": false }, - "ContentVideoSeriesResult": { + "CommunityChannel": { "type": "object", "properties": { "id": { "type": "string" }, - "seriesId": { - "type": [ - "string", - "null" + "kind": { + "type": "string", + "enum": [ + "ANNOUNCEMENTS", + "GENERAL", + "CITY", + "CUSTOM" ] - } - }, - "required": [ - "id", - "seriesId" - ], - "additionalProperties": false - }, - "ContentSeries": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "title": { + "name": { "type": "string" }, + "slug": { + "type": "string", + "description": "Tab URL slug. Does not change on rename." + }, "description": { "type": [ "string", "null" ] }, - "coverImageUrl": { + "city": { "type": [ "string", "null" ] }, - "memberOnly": { - "type": "boolean" + "whoCanPost": { + "type": "string", + "enum": [ + "STAFF", + "MEMBERS" + ] }, - "published": { + "requiresApproval": { "type": "boolean" }, - "publishedAt": { - "type": [ - "string", - "null" - ] - }, - "videoCount": { + "position": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "Videos in the series (published or not, course videos excluded)." - }, - "createdAt": { - "type": "string" + "maximum": 9007199254740991 } }, "required": [ "id", - "title", + "kind", + "name", + "slug", "description", - "coverImageUrl", - "memberOnly", - "published", - "publishedAt", - "videoCount", - "createdAt" + "city", + "whoCanPost", + "requiresApproval", + "position" ], "additionalProperties": false }, - "ContentSeriesCreate": { + "CommunityChannelCreate": { "type": "object", "properties": { - "title": { + "kind": { "type": "string", - "description": "1–120 characters." + "enum": [ + "CITY", + "CUSTOM" + ] + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 40 }, "description": { - "description": "Up to 2000 characters.", - "type": [ - "string", - "null" + "anyOf": [ + { + "type": "string", + "maxLength": 200 + }, + { + "type": "null" + } ] }, - "coverImageUrl": { - "description": "Absolute URL of the cover.", - "type": [ - "string", - "null" + "city": { + "description": "Required when kind=CITY; ignored otherwise.", + "anyOf": [ + { + "type": "string", + "maxLength": 60 + }, + { + "type": "null" + } ] }, - "memberOnly": { - "description": "Default true.", + "whoCanPost": { + "default": "STAFF", + "type": "string", + "enum": [ + "STAFF", + "MEMBERS" + ] + }, + "requiresApproval": { + "default": true, "type": "boolean" } }, "required": [ - "title" + "kind", + "name", + "whoCanPost", + "requiresApproval" ], "additionalProperties": false }, - "ContentSeriesUpdate": { + "CommunityChannelUpdate": { "type": "object", "properties": { - "title": { - "type": "string" + "name": { + "type": "string", + "minLength": 1, + "maxLength": 40 }, "description": { - "description": "`null` clears it.", - "type": [ - "string", - "null" + "anyOf": [ + { + "type": "string", + "maxLength": 200 + }, + { + "type": "null" + } ] }, - "coverImageUrl": { - "description": "`null` clears it.", - "type": [ - "string", - "null" + "city": { + "anyOf": [ + { + "type": "string", + "maxLength": 60 + }, + { + "type": "null" + } ] }, - "memberOnly": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ContentSeriesPublish": { - "type": "object", - "properties": { - "published": { - "type": "boolean" - } - }, - "required": [ - "published" - ], - "additionalProperties": false - }, - "ContentLiveCreate": { - "type": "object", - "properties": { - "title": { + "whoCanPost": { "type": "string", - "description": "1–120 characters." - }, - "eventDateId": { - "description": "Show date to tie the stream to (owned by the workspace or with the workspace as a linked artist). One stream per date.", - "type": [ - "string", - "null" + "enum": [ + "STAFF", + "MEMBERS" ] }, - "memberOnly": { - "description": "Default true. Ignored (stream is public) when the workspace has no active membership plan.", + "requiresApproval": { "type": "boolean" - }, - "scheduledAt": { - "description": "Wall-clock time \"YYYY-MM-DDTHH:mm\" in the WORKSPACE time zone (not UTC, no offset). Must be in the future and at most 2 years ahead. Absent: inherits the show date's start time when `eventDateId` is set.", - "type": [ - "string", - "null" - ] } }, - "required": [ - "title" - ], "additionalProperties": false }, - "ContentLiveCreated": { + "CommunityChannelOrder": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "memberOnly": { - "type": "boolean" - }, - "scheduledAt": { - "description": "UTC ISO 8601.", - "type": [ - "string", - "null" - ] - }, - "eventDateId": { - "type": [ - "string", - "null" - ] - }, - "rtmpUrl": { - "type": "string", - "description": "RTMPS ingest server for OBS / the encoder." - }, - "streamKey": { - "type": "string", - "description": "SECRET. RTMP stream key: whoever has it can broadcast on this stream in the organization's name. Store it like a password; it is never returned by any read endpoint. Rotate it with `POST /content/lives/{id}/reset-key`." + "orderedIds": { + "minItems": 1, + "maxItems": 20, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "description": "EVERY active channel id, in the new order, Announcements first." } }, "required": [ - "id", - "title", - "memberOnly", - "scheduledAt", - "eventDateId", - "rtmpUrl", - "streamKey" + "orderedIds" ], "additionalProperties": false }, - "ContentLiveStreamKey": { + "ModerationQueueItem": { "type": "object", "properties": { - "id": { + "commentId": { "type": "string" }, - "rtmpUrl": { + "body": { "type": "string" }, - "streamKey": { - "type": "string", - "description": "SECRET. RTMP stream key: whoever has it can broadcast on this stream in the organization's name. Store it like a password; it is never returned by any read endpoint. Rotate it with `POST /content/lives/{id}/reset-key`." - } - }, - "required": [ - "id", - "rtmpUrl", - "streamKey" - ], - "additionalProperties": false - }, - "ContentLiveUpdate": { - "type": "object", - "properties": { - "scheduledAt": { - "description": "Wall-clock time \"YYYY-MM-DDTHH:mm\" in the WORKSPACE time zone (not UTC, no offset). Must be in the future and at most 2 years ahead. `null` removes the scheduled time. Only while the stream is IDLE.", - "type": [ - "string", - "null" - ] + "createdAt": { + "type": "string" }, - "memberOnly": { + "isReply": { "type": "boolean" - } - }, - "additionalProperties": false - }, - "ContentLiveSettings": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "memberOnly": { + "hidden": { "type": "boolean" }, - "scheduledAt": { - "description": "UTC ISO 8601.", + "deleted": { + "type": "boolean", + "description": "Deleted (by its author or the team) with reports still open." + }, + "hiddenSource": { + "description": "MODERATOR | AUTO_REPORTS", "type": [ "string", "null" ] - } - }, - "required": [ - "id", - "memberOnly", - "scheduledAt" - ], - "additionalProperties": false - }, - "ContentLiveChat": { - "type": "object", - "properties": { - "messages": { + }, + "openReportCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "author": { + "type": "object", + "properties": { + "customerId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "image": { + "type": [ + "string", + "null" + ] + }, + "banned": { + "type": "boolean" + } + }, + "required": [ + "customerId", + "name", + "image", + "banned" + ], + "additionalProperties": false + }, + "post": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "id", + "label" + ], + "additionalProperties": false + }, + "reasons": { "type": "array", "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "authorId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "text": { - "type": "string" - }, - "sentAt": { + "reason": { "type": "string" }, - "host": { - "description": "Present (true) on messages sent by the organization.", - "type": "boolean" + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "id", - "authorId", - "name", - "text", - "sentAt" + "reason", + "count" ], "additionalProperties": false } }, - "truncated": { - "type": "boolean", - "description": "true if the history cap was reached and the oldest messages are missing." + "details": { + "type": "array", + "items": { + "type": "string" + } + }, + "lastReportAt": { + "type": [ + "string", + "null" + ] } }, "required": [ - "messages", - "truncated" + "commentId", + "body", + "createdAt", + "isReply", + "hidden", + "deleted", + "hiddenSource", + "openReportCount", + "author", + "post", + "reasons", + "details", + "lastReportAt" ], "additionalProperties": false }, - "ContentLive": { + "CommunityBan": { "type": "object", "properties": { "id": { "type": "string" }, - "title": { + "customerName": { "type": "string" }, - "status": { - "type": "string", - "enum": [ - "IDLE", - "ACTIVE", - "COMPLETED", - "DISABLED" - ], - "description": "ACTIVE = streaming right now (live banner)." - }, - "memberOnly": { - "type": "boolean" - }, - "startedAt": { + "customerImage": { "type": [ "string", "null" ] }, - "endedAt": { + "reason": { "type": [ "string", "null" ] }, - "hasRecording": { - "type": "boolean", - "description": "true if a playable recording remains after the stream." + "createdAt": { + "type": "string" } }, "required": [ "id", - "title", - "status", - "memberOnly", - "startedAt", - "endedAt", - "hasRecording" + "customerName", + "customerImage", + "reason", + "createdAt" ], "additionalProperties": false }, - "ContentPlaybackTokenRequest": { + "MemberPostQueueItem": { "type": "object", "properties": { - "kind": { + "postId": { + "type": "string" + }, + "status": { "type": "string", "enum": [ - "video", - "live" + "PENDING_REVIEW", + "PUBLISHED" ] }, - "id": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "kind", - "id" - ], - "additionalProperties": false - }, - "ContentPlaybackToken": { - "type": "object", - "properties": { - "playbackId": { + "content": { + "type": [ + "string", + "null" + ] + }, + "imageUrl": { + "description": "PENDING_REVIEW: short-lived signed URL (the image lives in a private bucket until approved).", + "type": [ + "string", + "null" + ] + }, + "createdAt": { "type": "string" }, - "tokens": { + "publishedAt": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "description": "Version read by the moderator: pass it as `expectedUpdatedAt` to approve." + }, + "channelName": { + "type": [ + "string", + "null" + ] + }, + "author": { "type": "object", "properties": { - "playback": { + "customerId": { "type": "string" }, - "drm": { + "displayName": { "type": "string" }, - "thumbnail": { - "type": "string" + "handle": { + "type": [ + "string", + "null" + ] }, - "storyboard": { - "type": "string" + "avatarUrl": { + "type": [ + "string", + "null" + ] + }, + "banned": { + "type": "boolean" } }, "required": [ - "playback", - "drm" + "customerId", + "displayName", + "handle", + "avatarUrl", + "banned" ], "additionalProperties": false + }, + "openReportCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "playbackId", - "tokens" + "postId", + "status", + "content", + "imageUrl", + "createdAt", + "publishedAt", + "updatedAt", + "channelName", + "author", + "openReportCount" ], "additionalProperties": false }, - "WaitlistEntryCreate": { + "CommentModerated": { "type": "object", "properties": { - "city": { - "type": "string", - "minLength": 1, - "maxLength": 60 + "commentId": { + "type": "string" }, - "name": { + "changed": { + "type": "boolean", + "description": "false = it was already in that state (idempotent)." + } + }, + "required": [ + "commentId", + "changed" + ], + "additionalProperties": false + }, + "MemberBanCreate": { + "type": "object", + "properties": { + "commentId": { "type": "string", "minLength": 1, - "maxLength": 80 + "description": "Comment of this member in the workspace that motivates the ban (required: a ban always comes from a reported comment)." }, - "contact": { + "reason": { "type": "string", - "minLength": 1, - "maxLength": 120 + "maxLength": 500 }, - "source": { - "type": "string", - "maxLength": 40 + "hideAllComments": { + "default": false, + "description": "true = hide every comment of the member in this workspace, not only `commentId`.", + "type": "boolean" } }, "required": [ - "city", - "name", - "contact" + "commentId", + "hideAllComments" ], "additionalProperties": false }, - "WaitlistEntryResult": { + "MemberBanResult": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "city": { + "customerId": { "type": "string" }, - "created": { + "banned": { "type": "boolean" } }, "required": [ - "id", - "city", - "created" + "customerId", + "banned" ], "additionalProperties": false }, - "WaitlistEntry": { + "MemberPostApprove": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "city": { - "type": "string" - }, - "name": { - "type": "string" - }, - "contact": { - "type": "string" - }, - "customerId": { - "type": [ - "string", - "null" - ] - }, - "source": { - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "type": "string" + "expectedUpdatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "`updatedAt` of the post as read from `GET /content/moderation/member-posts`." } }, "required": [ - "id", - "city", - "name", - "contact", - "customerId", - "source", - "createdAt" + "expectedUpdatedAt" ], "additionalProperties": false }, - "LiveAttendance": { + "MemberPostDecision": { "type": "object", "properties": { - "eventDateId": { - "type": "string" - }, - "eventId": { - "type": "string" - }, - "eventName": { - "type": "string" - }, - "city": { - "type": [ - "string", - "null" - ] - }, - "imageUrl": { - "type": [ - "string", - "null" - ] - }, - "sold": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "validated": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "reason": { + "description": "Shown to the author in their inbox.", + "type": "string", + "maxLength": 1000 }, - "validatedPct": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "banAuthor": { + "default": false, + "description": "Also bans the author from the community. Requires ADMIN.", + "type": "boolean" } }, "required": [ - "eventDateId", - "eventId", - "eventName", - "city", - "imageUrl", - "sold", - "validated", - "validatedPct" + "banAuthor" ], "additionalProperties": false }, - "AccessCloseStatus": { + "MemberPostReviewed": { "type": "object", "properties": { - "eventDateId": { - "type": "string" - }, - "eventId": { - "type": "string" - }, - "eventName": { + "postId": { "type": "string" }, - "venueName": { - "type": [ - "string", - "null" + "status": { + "type": "string", + "enum": [ + "PUBLISHED", + "REJECTED", + "REMOVED" ] + } + }, + "required": [ + "postId", + "status" + ], + "additionalProperties": false + }, + "CommunityMeetupCreate": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 3, + "maxLength": 120 }, - "label": { - "type": "string" + "description": { + "type": "string", + "maxLength": 5000 }, - "status": { + "format": { "type": "string", "enum": [ - "pending", - "manual", - "auto" + "IN_PERSON", + "ONLINE" ] }, - "closed": { - "type": "boolean" - }, - "signable": { - "type": "boolean" + "startsAt": { + "type": "string", + "description": "Local wall time in the workspace's timezone, `YYYY-MM-DDTHH:mm` (same as the dashboard form)." }, - "signableFromLabel": { + "endsAt": { + "description": "Local wall time in the workspace's timezone, `YYYY-MM-DDTHH:mm` (same as the dashboard form). Empty = none.", "type": "string" }, - "closedByName": { - "type": [ - "string", - "null" - ] + "city": { + "type": "string", + "maxLength": 80 }, - "closedAtLabel": { - "type": [ - "string", - "null" - ] + "locationName": { + "type": "string", + "maxLength": 120 }, - "closedCheckins": { + "locationDetail": { + "type": "string", + "maxLength": 500 + }, + "onlineUrl": { + "description": "ONLINE only; must start with https://", + "type": "string", + "maxLength": 500 + }, + "capacity": { + "description": "null = unlimited.", "anyOf": [ { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "minimum": 1, + "maximum": 100000 }, { "type": "null" } ] }, - "live": { - "type": "object", - "properties": { - "issued": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "checkins": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "issued", - "checkins" - ], - "additionalProperties": false - } - }, - "required": [ - "eventDateId", - "eventId", - "eventName", - "venueName", - "label", - "status", - "closed", - "signable", - "signableFromLabel", - "closedByName", - "closedAtLabel", - "closedCheckins", - "live" - ], - "additionalProperties": false - }, - "AccessCloseSignRequest": { - "type": "object", - "properties": { - "confirm": { - "type": "boolean", - "const": true + "requiresApproval": { + "description": "true = the staff approves each RSVP request.", + "type": "boolean" } }, "required": [ - "confirm" + "title", + "format", + "startsAt" ], "additionalProperties": false }, - "AccessCloseSigned": { + "CommunityMeetupUpdate": { "type": "object", "properties": { - "eventDateId": { - "type": "string" + "title": { + "type": "string", + "minLength": 3, + "maxLength": 120 }, - "eventId": { - "type": "string" + "description": { + "type": "string", + "maxLength": 5000 }, - "status": { + "format": { "type": "string", - "const": "manual" + "enum": [ + "IN_PERSON", + "ONLINE" + ] }, - "closedAt": { + "startsAt": { + "type": "string", + "description": "Local wall time in the workspace's timezone, `YYYY-MM-DDTHH:mm` (same as the dashboard form)." + }, + "endsAt": { + "description": "Local wall time in the workspace's timezone, `YYYY-MM-DDTHH:mm` (same as the dashboard form). Empty = none.", "type": "string" }, - "checkins": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "city": { + "type": "string", + "maxLength": 80 + }, + "locationName": { + "type": "string", + "maxLength": 120 + }, + "locationDetail": { + "type": "string", + "maxLength": 500 + }, + "onlineUrl": { + "description": "ONLINE only; must start with https://", + "type": "string", + "maxLength": 500 + }, + "capacity": { + "description": "null = unlimited.", + "anyOf": [ + { + "type": "integer", + "minimum": 1, + "maximum": 100000 + }, + { + "type": "null" + } + ] }, - "closedByName": { - "type": "string" + "requiresApproval": { + "description": "true = the staff approves each RSVP request.", + "type": "boolean" } }, - "required": [ - "eventDateId", - "eventId", - "status", - "closedAt", - "checkins", - "closedByName" - ], "additionalProperties": false }, - "PaymentIntentRow": { + "CommunityMeetup": { "type": "object", "properties": { - "threadId": { + "id": { "type": "string" }, - "deviceTag": { + "title": { "type": "string" }, - "hasAccount": { - "type": "boolean" - }, - "customerId": { - "type": [ - "string", - "null" + "format": { + "type": "string", + "enum": [ + "IN_PERSON", + "ONLINE" ] }, - "personName": { - "type": [ - "string", - "null" + "status": { + "type": "string", + "enum": [ + "DRAFT", + "PUBLISHED", + "CANCELLED" ] }, - "personEmail": { + "startsAt": { + "type": "string" + }, + "city": { "type": [ "string", "null" ] }, - "personSource": { + "capacity": { "anyOf": [ { - "type": "string", - "enum": [ - "account", - "checkout" - ] + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, { "type": "null" } ] }, - "seats": { - "type": "array", - "items": { - "type": "string" - } - }, - "category": { - "type": [ - "string", - "null" - ] + "goingCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "eventDateId": { - "type": [ - "string", - "null" - ] + "requiresApproval": { + "type": "boolean" }, - "firstAt": { + "pendingCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "PENDING RSVP requests." + } + }, + "required": [ + "id", + "title", + "format", + "status", + "startsAt", + "city", + "capacity", + "goingCount", + "requiresApproval", + "pendingCount" + ], + "additionalProperties": false + }, + "CommunityMeetupDetail": { + "type": "object", + "properties": { + "id": { "type": "string" }, - "lastAt": { + "title": { "type": "string" }, - "stage": { + "format": { "type": "string", "enum": [ - "seatmap", - "seats", - "continue", - "checkout", - "payment", - "purchased" + "IN_PERSON", + "ONLINE" ] }, - "outcome": { + "status": { "type": "string", "enum": [ - "NO_SALE", - "REJECTED", - "PENDING", - "CONFIRMED", - "ABANDONED", - "CANCELLED", - "REFUNDED" + "DRAFT", + "PUBLISHED", + "CANCELLED" ] }, - "reason": { + "startsAt": { + "type": "string" + }, + "city": { "type": [ "string", "null" ] }, - "paymentStatus": { - "type": [ - "string", - "null" + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } ] }, - "mapFailed": { + "goingCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "requiresApproval": { "type": "boolean" }, - "saleId": { + "pendingCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "PENDING RSVP requests." + }, + "endsAt": { "type": [ "string", "null" ] }, - "saleReference": { + "publishedAt": { "type": [ "string", "null" ] }, - "saleTotal": { + "cancelledAt": { "type": [ - "number", + "string", "null" ] - } - }, - "required": [ - "threadId", - "deviceTag", - "hasAccount", - "customerId", - "personName", - "personEmail", - "personSource", - "seats", - "category", - "eventDateId", - "firstAt", - "lastAt", - "stage", - "outcome", - "reason", - "paymentStatus", - "mapFailed", - "saleId", - "saleReference", - "saleTotal" - ], - "additionalProperties": false - }, - "PaymentIntentsPage": { - "type": "object", - "properties": { - "event": { + }, + "local": { "type": "object", "properties": { - "id": { + "title": { "type": "string" }, - "name": { + "description": { + "type": "string" + }, + "format": { + "type": "string", + "enum": [ + "IN_PERSON", + "ONLINE" + ] + }, + "startsAt": { + "type": "string" + }, + "endsAt": { "type": "string" }, "city": { - "type": [ - "string", - "null" + "type": "string" + }, + "locationName": { + "type": "string" + }, + "locationDetail": { + "type": "string" + }, + "onlineUrl": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } ] + }, + "requiresApproval": { + "type": "boolean" } }, "required": [ - "id", - "name", - "city" + "title", + "description", + "format", + "startsAt", + "endsAt", + "city", + "locationName", + "locationDetail", + "onlineUrl", + "capacity", + "requiresApproval" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Editable values in the workspace's local wall time (the shape `PATCH /content/meetups/{id}` accepts)." }, - "dates": { + "attendees": { "type": "array", "items": { "type": "object", "properties": { - "id": { + "rsvpId": { "type": "string" }, - "startsAt": { + "name": { "type": "string" }, - "timezone": { + "confirmedAt": { "type": "string" }, - "label": { + "checkedInAt": { "type": [ "string", "null" @@ -31833,146 +32467,220 @@ } }, "required": [ - "id", - "startsAt", - "timezone", - "label" + "rsvpId", + "name", + "confirmedAt", + "checkedInAt" ], "additionalProperties": false } }, - "selectedDateId": { - "type": [ - "string", - "null" - ] - }, - "funnel": { - "type": "object", - "properties": { - "threads": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "opened": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "selected": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "continued": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "checkout": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "payment": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "purchased": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "abandoned": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "inferred": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "threads", - "opened", - "selected", - "continued", - "checkout", - "payment", - "purchased", - "abandoned", - "inferred" - ], - "additionalProperties": false - }, - "rows": { + "requests": { "type": "array", "items": { - "$ref": "#/components/schemas/PaymentIntentRow" + "type": "object", + "properties": { + "rsvpId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "requestedAt": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "PENDING", + "GOING", + "DECLINED" + ] + } + }, + "required": [ + "rsvpId", + "name", + "email", + "requestedAt", + "status" + ], + "additionalProperties": false } + } + }, + "required": [ + "id", + "title", + "format", + "status", + "startsAt", + "city", + "capacity", + "goingCount", + "requiresApproval", + "pendingCount", + "endsAt", + "publishedAt", + "cancelledAt", + "local", + "attendees", + "requests" + ], + "additionalProperties": false + }, + "CommunityMeetupRsvpReview": { + "type": "object", + "properties": { + "decision": { + "type": "string", + "enum": [ + "APPROVE", + "REJECT" + ] + } + }, + "required": [ + "decision" + ], + "additionalProperties": false + }, + "CommunityMeetupRsvpReviewed": { + "type": "object", + "properties": { + "rsvpId": { + "type": "string" }, - "nextCursor": { - "type": [ - "string", - "null" + "status": { + "type": "string", + "enum": [ + "GOING", + "DECLINED" ] } }, "required": [ - "event", - "dates", - "selectedDateId", - "funnel", - "rows", - "nextCursor" + "rsvpId", + "status" ], "additionalProperties": false }, - "ProductLessonResourceInput": { + "CommunityMeetupAttendance": { + "type": "object", + "properties": { + "rsvpId": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "attended": { + "type": "boolean" + } + }, + "required": [ + "rsvpId", + "attended" + ], + "additionalProperties": false + }, + "CommunityMeetupAttendanceResult": { + "type": "object", + "properties": { + "rsvpId": { + "type": "string" + }, + "attended": { + "type": "boolean" + }, + "changed": { + "type": "boolean", + "description": "false = already in that state, or the RSVP is not GOING / the meetup is cancelled." + } + }, + "required": [ + "rsvpId", + "attended", + "changed" + ], + "additionalProperties": false + }, + "ContentPost": { "type": "object", "properties": { "id": { - "description": "Id of a saved resource; absent/null creates a new one.", + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "TEXT", + "IMAGE", + "VIDEO", + "ARTICLE" + ] + }, + "content": { + "type": [ + "string", + "null" + ] + }, + "imageUrl": { + "description": "ARTICLE post: also serves as the article's cover image.", + "type": [ + "string", + "null" + ] + }, + "videoId": { + "description": "VIDEO post: id of the ContentVideo, to cross-reference with `GET /content/videos`.", "type": [ "string", "null" ] }, - "kind": { - "type": "string", - "enum": [ - "FILE", - "LINK" + "eventId": { + "type": [ + "string", + "null" ] }, - "label": { - "type": "string" + "locked": { + "type": "boolean", + "description": "true = post restricted to current members; its content arrives redacted." }, - "url": { - "description": "LINK only: http(s) URL.", + "title": { + "description": "ARTICLE posts only; null for every other type.", "type": [ "string", "null" ] }, - "filePath": { - "description": "FILE only: path in the private product files bucket, under this workspace.", + "subtitle": { + "description": "ARTICLE posts only.", "type": [ "string", "null" ] }, - "fileName": { + "slug": { + "description": "ARTICLE posts only. Permalink at /comunidades/articulos/{slug}, unique per organization.", "type": [ "string", "null" ] }, - "fileSize": { + "body": { + "description": "ARTICLE posts only. Body in Markdown.", + "type": [ + "string", + "null" + ] + }, + "readingMinutes": { "anyOf": [ { "type": "integer", @@ -31982,582 +32690,949 @@ { "type": "null" } - ] - } - }, - "required": [ - "kind", - "label" - ], - "additionalProperties": false - }, - "ProductLessonQuiz": { - "type": "object", - "properties": { - "questions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "prompt": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "text": { - "type": "string" - } - }, - "required": [ - "id", - "text" - ], - "additionalProperties": false + ], + "description": "ARTICLE posts only. Not redacted when `locked`: it does not leak content, only its length." + }, + "link": { + "anyOf": [ + { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "imageUrl": { + "type": [ + "string", + "null" + ] + }, + "domain": { + "type": "string" } }, - "correctOptionId": { - "type": "string" - } + "required": [ + "url", + "title", + "description", + "imageUrl", + "domain" + ], + "additionalProperties": false }, - "required": [ - "id", - "prompt", - "options", - "correctOptionId" - ], - "additionalProperties": false - } + { + "type": "null" + } + ], + "description": "Open Graph snapshot of the first link in the text. Always null for ARTICLE posts." }, - "passScore": { + "commentsCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, - "description": "Minimum score to pass, 0–100." + "description": "Visible comments: excludes deleted ones and those hidden by moderation (and replies to a hidden comment). 0 if the post arrives redacted." }, - "showAnswers": { - "type": "boolean" + "publishedAt": { + "type": "string" } }, "required": [ - "questions", - "passScore", - "showAnswers" + "id", + "type", + "content", + "imageUrl", + "videoId", + "eventId", + "locked", + "title", + "subtitle", + "slug", + "body", + "readingMinutes", + "link", + "commentsCount", + "publishedAt" ], "additionalProperties": false }, - "ProductLessonInput": { + "ContentPostCreate": { "type": "object", "properties": { - "id": { - "description": "Id of a saved lesson; absent/null creates a new one. Keep ids on edit so buyers keep their progress.", - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "isLive": { - "type": "boolean" - }, - "content": { + "type": { + "default": "TEXT", "type": "string", "enum": [ - "VIDEO", - "FILE", "TEXT", - "QUIZ" + "IMAGE", + "ARTICLE" ] }, - "body": { - "description": "Markdown; TEXT lessons only.", - "type": [ - "string", - "null" - ] + "content": { + "type": "string", + "maxLength": 5000 }, - "thumbnailUrl": { - "type": [ - "string", - "null" + "imageUrl": { + "anyOf": [ + { + "type": "string", + "maxLength": 2048, + "format": "uri" + }, + { + "type": "null" + } ] }, - "videoId": { - "description": "Course video id; VIDEO lessons only. Uploading a video is not available through the API.", - "type": [ - "string", - "null" - ] + "title": { + "description": "Required when type=ARTICLE.", + "type": "string", + "minLength": 1, + "maxLength": 140 }, - "fileName": { - "type": [ - "string", - "null" + "subtitle": { + "anyOf": [ + { + "type": "string", + "maxLength": 280 + }, + { + "type": "null" + } ] }, - "filePath": { - "type": [ - "string", - "null" + "slug": { + "description": "Manual; if omitted it is derived from the title.", + "anyOf": [ + { + "type": "string", + "maxLength": 200 + }, + { + "type": "null" + } ] }, - "resources": { - "description": "Absent keeps the saved resources; [] removes them all.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductLessonResourceInput" - } + "body": { + "description": "Markdown. Required when type=ARTICLE.", + "type": "string", + "minLength": 1, + "maxLength": 100000 }, - "isPreview": { - "description": "Free preview on the public page (VIDEO/TEXT only, max one per module). Absent keeps the saved value.", + "locked": { + "default": false, + "description": "true = restricted to current members.", "type": "boolean" }, - "quiz": { - "description": "QUIZ lessons only.", + "eventId": { "anyOf": [ { - "$ref": "#/components/schemas/ProductLessonQuiz" + "type": "string", + "minLength": 1 }, { "type": "null" } ] + }, + "publishedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ - "title", - "isLive", - "content" + "type", + "locked" ], "additionalProperties": false }, - "ProductModuleInput": { + "ContentPlaybackTokenRequest": { "type": "object", "properties": { + "kind": { + "type": "string", + "enum": [ + "video", + "live" + ] + }, "id": { - "description": "Id of a saved module; absent/null creates a new one.", + "type": "string", + "minLength": 1 + } + }, + "required": [ + "kind", + "id" + ], + "additionalProperties": false + }, + "ContentPlaybackToken": { + "type": "object", + "properties": { + "playbackId": { + "type": "string" + }, + "tokens": { + "type": "object", + "properties": { + "playback": { + "type": "string" + }, + "drm": { + "type": "string" + }, + "thumbnail": { + "type": "string" + }, + "storyboard": { + "type": "string" + } + }, + "required": [ + "playback", + "drm" + ], + "additionalProperties": false + } + }, + "required": [ + "playbackId", + "tokens" + ], + "additionalProperties": false + }, + "WaitlistEntryCreate": { + "type": "object", + "properties": { + "city": { + "type": "string", + "minLength": 1, + "maxLength": 60 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + "contact": { + "type": "string", + "minLength": 1, + "maxLength": 120 + }, + "source": { + "type": "string", + "maxLength": 40 + } + }, + "required": [ + "city", + "name", + "contact" + ], + "additionalProperties": false + }, + "WaitlistEntryResult": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "city": { + "type": "string" + }, + "created": { + "type": "boolean" + } + }, + "required": [ + "id", + "city", + "created" + ], + "additionalProperties": false + }, + "WaitlistEntry": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "city": { + "type": "string" + }, + "name": { + "type": "string" + }, + "contact": { + "type": "string" + }, + "customerId": { "type": [ "string", "null" ] }, - "title": { - "type": "string" - }, - "description": { + "source": { "type": [ "string", "null" ] }, - "unlockAfterDays": { - "description": "Drip by days after purchase (unlockMode DAYS).", - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } + "createdAt": { + "type": "string" + } + }, + "required": [ + "id", + "city", + "name", + "contact", + "customerId", + "source", + "createdAt" + ], + "additionalProperties": false + }, + "LiveAttendance": { + "type": "object", + "properties": { + "eventDateId": { + "type": "string" + }, + "eventId": { + "type": "string" + }, + "eventName": { + "type": "string" + }, + "city": { + "type": [ + "string", + "null" ] }, - "unlockAt": { - "description": "Drip by date, ISO 8601 with offset (unlockMode DATE).", + "imageUrl": { "type": [ "string", "null" ] }, - "lessons": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductLessonInput" - } + "sold": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "validated": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "validatedPct": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ - "title", - "lessons" + "eventDateId", + "eventId", + "eventName", + "city", + "imageUrl", + "sold", + "validated", + "validatedPct" ], "additionalProperties": false }, - "ProductCourseMeta": { + "AccessCloseStatus": { "type": "object", "properties": { - "learn": { - "description": "\"What you will learn\": empty, or 3 to 8 items.", - "type": "array", - "items": { - "type": "string" - } + "eventDateId": { + "type": "string" + }, + "eventId": { + "type": "string" + }, + "eventName": { + "type": "string" + }, + "venueName": { + "type": [ + "string", + "null" + ] + }, + "label": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "manual", + "auto" + ] }, - "audience": { + "closed": { + "type": "boolean" + }, + "signable": { + "type": "boolean" + }, + "signableFromLabel": { + "type": "string" + }, + "closedByName": { "type": [ "string", "null" ] }, - "requirements": { + "closedAtLabel": { "type": [ "string", "null" ] }, - "level": { + "closedCheckins": { "anyOf": [ { - "type": "string", - "enum": [ - "BEGINNER", - "INTERMEDIATE", - "ADVANCED" - ] + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, { "type": "null" } ] + }, + "live": { + "type": "object", + "properties": { + "issued": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "checkins": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "issued", + "checkins" + ], + "additionalProperties": false } }, + "required": [ + "eventDateId", + "eventId", + "eventName", + "venueName", + "label", + "status", + "closed", + "signable", + "signableFromLabel", + "closedByName", + "closedAtLabel", + "closedCheckins", + "live" + ], "additionalProperties": false }, - "ProductCreate": { + "AccessCloseSignRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "DOWNLOADABLE", - "COURSE" - ] - }, - "name": { + "confirm": { + "type": "boolean", + "const": true + } + }, + "required": [ + "confirm" + ], + "additionalProperties": false + }, + "AccessCloseSigned": { + "type": "object", + "properties": { + "eventDateId": { "type": "string" }, - "description": { - "default": "", + "eventId": { "type": "string" }, - "coverImageUrl": { - "default": null, - "type": [ - "string", - "null" - ] + "status": { + "type": "string", + "const": "manual" }, - "price": { - "type": "number", - "description": "COP: integer. USD: up to 2 decimals." + "closedAt": { + "type": "string" }, - "currency": { - "default": "COP", - "type": "string", - "enum": [ - "COP", - "USD" - ] + "checkins": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "access": { - "default": "PUBLIC", - "type": "string", - "enum": [ - "PUBLIC", - "SUBSCRIBERS" - ] + "closedByName": { + "type": "string" + } + }, + "required": [ + "eventDateId", + "eventId", + "status", + "closedAt", + "checkins", + "closedByName" + ], + "additionalProperties": false + }, + "PaymentIntentRow": { + "type": "object", + "properties": { + "threadId": { + "type": "string" }, - "includedInMembership": { - "default": false, - "type": "boolean", - "description": "Members of the workspace get it at no cost." + "deviceTag": { + "type": "string" }, - "fileName": { - "default": null, - "type": [ - "string", - "null" - ] + "hasAccount": { + "type": "boolean" }, - "filePath": { - "default": null, - "description": "DOWNLOADABLE only (required there): path in the private product files bucket, under this workspace. Uploading files is not available through the API.", + "customerId": { "type": [ "string", "null" ] }, - "sampleName": { - "default": null, + "personName": { "type": [ "string", "null" ] }, - "samplePath": { - "default": null, + "personEmail": { "type": [ "string", "null" ] }, - "modules": { - "default": [], - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductModuleInput" - }, - "description": "COURSE only (at least one module with one lesson)." - }, - "courseMeta": { - "description": "COURSE only. Absent keeps the saved one; null clears it.", + "personSource": { "anyOf": [ { - "$ref": "#/components/schemas/ProductCourseMeta" + "type": "string", + "enum": [ + "account", + "checkout" + ] }, { "type": "null" } ] }, - "unlockMode": { - "description": "COURSE drip rule. Absent keeps the saved one (OPEN on create).", - "type": "string", - "enum": [ - "OPEN", - "SEQUENTIAL", - "DAYS", - "DATE" - ] + "seats": { + "type": "array", + "items": { + "type": "string" + } }, - "publish": { - "default": false, - "description": "true creates it PUBLISHED; default DRAFT.", - "type": "boolean" - } - }, - "required": [ - "type", - "name", - "description", - "coverImageUrl", - "price", - "currency", - "access", - "includedInMembership", - "fileName", - "filePath", - "sampleName", - "samplePath", - "modules", - "publish" - ], - "additionalProperties": false - }, - "ProductUpdate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "DOWNLOADABLE", - "COURSE" + "category": { + "type": [ + "string", + "null" ] }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "coverImageUrl": { + "eventDateId": { "type": [ "string", "null" ] }, - "price": { - "type": "number", - "description": "COP: integer. USD: up to 2 decimals." + "firstAt": { + "type": "string" }, - "currency": { + "lastAt": { + "type": "string" + }, + "stage": { "type": "string", "enum": [ - "COP", - "USD" + "seatmap", + "seats", + "continue", + "checkout", + "payment", + "purchased" ] }, - "access": { + "outcome": { "type": "string", "enum": [ - "PUBLIC", - "SUBSCRIBERS" + "NO_SALE", + "REJECTED", + "PENDING", + "CONFIRMED", + "ABANDONED", + "CANCELLED", + "REFUNDED" ] }, - "includedInMembership": { - "type": "boolean", - "description": "Members of the workspace get it at no cost." - }, - "fileName": { + "reason": { "type": [ "string", "null" ] }, - "filePath": { - "description": "DOWNLOADABLE only (required there): path in the private product files bucket, under this workspace. Uploading files is not available through the API.", + "paymentStatus": { "type": [ "string", "null" ] }, - "sampleName": { + "mapFailed": { + "type": "boolean" + }, + "saleId": { "type": [ "string", "null" ] }, - "samplePath": { + "saleReference": { "type": [ "string", "null" ] }, - "modules": { - "description": "Omit to leave the course tree untouched. When sent, it replaces the WHOLE tree: modules, lessons and resources missing from the list are deleted, along with buyers' progress on those lessons. Fetch a fresh GET right before and send its tree back with your changes. Required when changing `type` or `unlockMode`.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductModuleInput" - } - }, - "courseMeta": { - "description": "COURSE only. Absent keeps the saved one; null clears it.", - "anyOf": [ - { - "$ref": "#/components/schemas/ProductCourseMeta" - }, - { - "type": "null" - } - ] - }, - "unlockMode": { - "description": "COURSE drip rule. Absent keeps the saved one (OPEN on create).", - "type": "string", - "enum": [ - "OPEN", - "SEQUENTIAL", - "DAYS", - "DATE" + "saleTotal": { + "type": [ + "number", + "null" ] } }, + "required": [ + "threadId", + "deviceTag", + "hasAccount", + "customerId", + "personName", + "personEmail", + "personSource", + "seats", + "category", + "eventDateId", + "firstAt", + "lastAt", + "stage", + "outcome", + "reason", + "paymentStatus", + "mapFailed", + "saleId", + "saleReference", + "saleTotal" + ], "additionalProperties": false }, - "ProductStatusUpdate": { + "PaymentIntentsPage": { "type": "object", "properties": { - "status": { - "type": "string", - "enum": [ - "DRAFT", - "PUBLISHED" + "event": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "city": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name", + "city" + ], + "additionalProperties": false + }, + "dates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "startsAt": { + "type": "string" + }, + "timezone": { + "type": "string" + }, + "label": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "startsAt", + "timezone", + "label" + ], + "additionalProperties": false + } + }, + "selectedDateId": { + "type": [ + "string", + "null" + ] + }, + "funnel": { + "type": "object", + "properties": { + "threads": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "opened": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "selected": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "continued": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "checkout": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "payment": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "purchased": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "abandoned": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "inferred": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "threads", + "opened", + "selected", + "continued", + "checkout", + "payment", + "purchased", + "abandoned", + "inferred" + ], + "additionalProperties": false + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentIntentRow" + } + }, + "nextCursor": { + "type": [ + "string", + "null" ] } }, "required": [ - "status" + "event", + "dates", + "selectedDateId", + "funnel", + "rows", + "nextCursor" ], "additionalProperties": false }, - "Product": { + "ProductLessonResourceInput": { "type": "object", "properties": { "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "DOWNLOADABLE", - "COURSE" + "description": "Id of a saved resource; absent/null creates a new one.", + "type": [ + "string", + "null" ] }, - "status": { + "kind": { "type": "string", "enum": [ - "DRAFT", - "PUBLISHED" + "FILE", + "LINK" ] }, - "price": { - "type": "number" + "label": { + "type": "string" + }, + "url": { + "description": "LINK only: http(s) URL.", + "type": [ + "string", + "null" + ] }, - "currency": { - "type": "string", - "enum": [ - "COP", - "USD" + "filePath": { + "description": "FILE only: path in the private product files bucket, under this workspace.", + "type": [ + "string", + "null" ] }, - "coverImageUrl": { + "fileName": { "type": [ "string", "null" ] }, - "salesCount": { + "fileSize": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "kind", + "label" + ], + "additionalProperties": false + }, + "ProductLessonQuiz": { + "type": "object", + "properties": { + "questions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "id", + "text" + ], + "additionalProperties": false + } + }, + "correctOptionId": { + "type": "string" + } + }, + "required": [ + "id", + "prompt", + "options", + "correctOptionId" + ], + "additionalProperties": false + } + }, + "passScore": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, - "description": "CONFIRMED purchases." - }, - "revenue": { - "type": "number", - "description": "Sum of CONFIRMED purchase amounts." + "description": "Minimum score to pass, 0–100." }, - "includedInMembership": { + "showAnswers": { "type": "boolean" } }, "required": [ - "id", - "name", - "type", - "status", - "price", - "currency", - "coverImageUrl", - "salesCount", - "revenue", - "includedInMembership" + "questions", + "passScore", + "showAnswers" ], "additionalProperties": false }, - "ProductLesson": { + "ProductLessonInput": { "type": "object", "properties": { "id": { - "type": "string" + "description": "Id of a saved lesson; absent/null creates a new one. Keep ids on edit so buyers keep their progress.", + "type": [ + "string", + "null" + ] }, "title": { "type": "string" @@ -32613,16 +33688,18 @@ ] }, "resources": { + "description": "Absent keeps the saved resources; [] removes them all.", "type": "array", "items": { "$ref": "#/components/schemas/ProductLessonResourceInput" } }, "isPreview": { + "description": "Free preview on the public page (VIDEO/TEXT only, max one per module). Absent keeps the saved value.", "type": "boolean" }, "quiz": { - "description": "Only for ADMIN keys (it includes the correct answers).", + "description": "QUIZ lessons only.", "anyOf": [ { "$ref": "#/components/schemas/ProductLessonQuiz" @@ -32631,47 +33708,24 @@ "type": "null" } ] - }, - "videoStatus": { - "anyOf": [ - { - "type": "string", - "enum": [ - "DRAFT", - "PROCESSING", - "READY", - "ERROR" - ] - }, - { - "type": "null" - } - ] - }, - "durationSeconds": { - "type": [ - "number", - "null" - ] } }, "required": [ - "id", "title", "isLive", - "content", - "resources", - "isPreview", - "videoStatus", - "durationSeconds" + "content" ], "additionalProperties": false }, - "ProductModule": { + "ProductModuleInput": { "type": "object", "properties": { "id": { - "type": "string" + "description": "Id of a saved module; absent/null creates a new one.", + "type": [ + "string", + "null" + ] }, "title": { "type": "string" @@ -32705,1025 +33759,783 @@ "lessons": { "type": "array", "items": { - "$ref": "#/components/schemas/ProductLesson" + "$ref": "#/components/schemas/ProductLessonInput" } } }, "required": [ - "id", "title", "lessons" ], "additionalProperties": false }, - "ProductDetail": { + "ProductCourseMeta": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "DOWNLOADABLE", - "COURSE" - ] - }, - "status": { - "type": "string", - "enum": [ - "DRAFT", - "PUBLISHED" - ] - }, - "price": { - "type": "number" - }, - "currency": { - "type": "string", - "enum": [ - "COP", - "USD" - ] - }, - "coverImageUrl": { - "type": [ - "string", - "null" - ] - }, - "salesCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "CONFIRMED purchases." - }, - "revenue": { - "type": "number", - "description": "Sum of CONFIRMED purchase amounts." - }, - "includedInMembership": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "access": { - "type": "string", - "enum": [ - "PUBLIC", - "SUBSCRIBERS" - ] - }, - "fileName": { - "type": [ - "string", - "null" - ] - }, - "filePath": { - "type": [ - "string", - "null" - ] - }, - "sampleName": { - "type": [ - "string", - "null" - ] - }, - "samplePath": { - "type": [ - "string", - "null" - ] - }, - "modules": { + "learn": { + "description": "\"What you will learn\": empty, or 3 to 8 items.", "type": "array", "items": { - "$ref": "#/components/schemas/ProductModule" + "type": "string" } }, - "courseMeta": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductCourseMeta" - }, - { - "type": "null" - } - ] - }, - "unlockMode": { - "type": "string", - "enum": [ - "OPEN", - "SEQUENTIAL", - "DAYS", - "DATE" - ] - } - }, - "required": [ - "id", - "name", - "type", - "status", - "price", - "currency", - "coverImageUrl", - "salesCount", - "revenue", - "includedInMembership", - "description", - "access", - "fileName", - "filePath", - "sampleName", - "samplePath", - "modules", - "courseMeta", - "unlockMode" - ], - "additionalProperties": false - }, - "Website": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "description": "Public slug (organization subdomain)." - }, - "name": { - "type": "string" - }, - "tagline": { - "type": [ - "string", - "null" - ] - }, - "bio": { - "type": [ - "string", - "null" - ] - }, - "accentColor": { - "type": [ - "string", - "null" - ] - }, - "webTemplate": { - "type": [ - "string", - "null" - ] - }, - "webSections": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } - }, - { - "type": "null" - } - ], - "description": "Per-section visibility booleans plus the reserved `order` key (array of section ids)." - }, - "instagramUrl": { - "type": [ - "string", - "null" - ] - }, - "tiktokUrl": { - "type": [ - "string", - "null" - ] - }, - "youtubeUrl": { - "type": [ - "string", - "null" - ] - }, - "customLandingEnabled": { - "type": "boolean", - "description": "The plan includes the custom landing (`PUT /website` answers 403 FEATURE_LOCKED otherwise)." - }, - "published": { - "type": "boolean", - "description": "Listed publicly (/artistas)." - }, - "canPublish": { - "type": "boolean", - "description": "Only the organization's primary workspace can publish/unpublish." - }, - "profileListable": { - "type": "boolean", - "description": "The brand has the name and photo required to publish." - } - }, - "required": [ - "slug", - "name", - "tagline", - "bio", - "accentColor", - "webTemplate", - "webSections", - "instagramUrl", - "tiktokUrl", - "youtubeUrl", - "customLandingEnabled", - "published", - "canPublish", - "profileListable" - ], - "additionalProperties": false - }, - "WebsiteUpdate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "tagline": { - "anyOf": [ - { - "type": "string", - "maxLength": 200 - }, - { - "type": "null" - } - ] - }, - "bio": { - "anyOf": [ - { - "type": "string", - "maxLength": 5000 - }, - { - "type": "null" - } - ] - }, - "instagramUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500 - }, - { - "type": "null" - } - ] - }, - "tiktokUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500 - }, - { - "type": "null" - } - ] - }, - "youtubeUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500 - }, - { - "type": "null" - } - ] - }, - "accentColor": { - "type": "string", - "pattern": "^#[0-9a-fA-F]{6}$", - "description": "#RRGGBB." - }, - "webTemplate": { - "type": "string", - "minLength": 1, - "maxLength": 32 - }, - "webSections": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "description": "Visibility booleans for the known sections (shows, productos, posts, membresias, contenido, bio, redes) and `order` (array of section ids). Unknown keys are dropped." - } - }, - "required": [ - "name", - "tagline", - "bio", - "instagramUrl", - "tiktokUrl", - "youtubeUrl", - "accentColor", - "webTemplate", - "webSections" - ], - "additionalProperties": false - }, - "WebsitePublished": { - "type": "object", - "properties": { - "published": { - "type": "boolean" + "audience": { + "type": [ + "string", + "null" + ] + }, + "requirements": { + "type": [ + "string", + "null" + ] + }, + "level": { + "anyOf": [ + { + "type": "string", + "enum": [ + "BEGINNER", + "INTERMEDIATE", + "ADVANCED" + ] + }, + { + "type": "null" + } + ] } }, - "required": [ - "published" - ], "additionalProperties": false }, - "OrganizationProfile": { + "ProductCreate": { "type": "object", "properties": { - "id": { + "type": { "type": "string", - "description": "Workspace id." + "enum": [ + "DOWNLOADABLE", + "COURSE" + ] }, "name": { - "type": "string", - "description": "Workspace name." - }, - "brandName": { - "type": "string", - "description": "Public brand name (from the umbrella organization)." + "type": "string" }, - "slug": { + "description": { + "default": "", "type": "string" }, - "bio": { + "coverImageUrl": { + "default": null, "type": [ "string", "null" ] }, - "type": { + "price": { + "type": "number", + "description": "COP: integer. USD: up to 2 decimals." + }, + "currency": { + "default": "COP", "type": "string", "enum": [ - "ARTIST", - "VENUE", - "ORGANIZER" + "COP", + "USD" ] }, - "country": { - "type": "string" + "access": { + "default": "PUBLIC", + "type": "string", + "enum": [ + "PUBLIC", + "SUBSCRIBERS" + ] }, - "timezone": { - "type": "string" + "includedInMembership": { + "default": false, + "type": "boolean", + "description": "Members of the workspace get it at no cost." }, - "logoUrl": { + "fileName": { + "default": null, "type": [ "string", "null" ] }, - "coverUrl": { + "filePath": { + "default": null, + "description": "DOWNLOADABLE only (required there): path in the private product files bucket, under this workspace. Uploading files is not available through the API.", "type": [ "string", "null" ] }, - "email": { + "sampleName": { + "default": null, "type": [ "string", "null" ] }, - "phone": { + "samplePath": { + "default": null, "type": [ "string", "null" ] }, - "website": { - "type": [ - "string", - "null" + "modules": { + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductModuleInput" + }, + "description": "COURSE only (at least one module with one lesson)." + }, + "courseMeta": { + "description": "COURSE only. Absent keeps the saved one; null clears it.", + "anyOf": [ + { + "$ref": "#/components/schemas/ProductCourseMeta" + }, + { + "type": "null" + } ] }, - "instagramUrl": { - "type": [ - "string", - "null" + "unlockMode": { + "description": "COURSE drip rule. Absent keeps the saved one (OPEN on create).", + "type": "string", + "enum": [ + "OPEN", + "SEQUENTIAL", + "DAYS", + "DATE" ] }, - "facebookUrl": { + "publish": { + "default": false, + "description": "true creates it PUBLISHED; default DRAFT.", + "type": "boolean" + } + }, + "required": [ + "type", + "name", + "description", + "coverImageUrl", + "price", + "currency", + "access", + "includedInMembership", + "fileName", + "filePath", + "sampleName", + "samplePath", + "modules", + "publish" + ], + "additionalProperties": false + }, + "ProductUpdate": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "DOWNLOADABLE", + "COURSE" + ] + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "coverImageUrl": { "type": [ "string", "null" ] }, - "twitterUrl": { + "price": { + "type": "number", + "description": "COP: integer. USD: up to 2 decimals." + }, + "currency": { + "type": "string", + "enum": [ + "COP", + "USD" + ] + }, + "access": { + "type": "string", + "enum": [ + "PUBLIC", + "SUBSCRIBERS" + ] + }, + "includedInMembership": { + "type": "boolean", + "description": "Members of the workspace get it at no cost." + }, + "fileName": { "type": [ "string", "null" ] }, - "spotifyUrl": { + "filePath": { + "description": "DOWNLOADABLE only (required there): path in the private product files bucket, under this workspace. Uploading files is not available through the API.", "type": [ "string", "null" ] }, - "youtubeUrl": { + "sampleName": { "type": [ "string", "null" ] }, - "tiktokUrl": { + "samplePath": { "type": [ "string", "null" ] + }, + "modules": { + "description": "Omit to leave the course tree untouched. When sent, it replaces the WHOLE tree: modules, lessons and resources missing from the list are deleted, along with buyers' progress on those lessons. Fetch a fresh GET right before and send its tree back with your changes. Required when changing `type` or `unlockMode`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductModuleInput" + } + }, + "courseMeta": { + "description": "COURSE only. Absent keeps the saved one; null clears it.", + "anyOf": [ + { + "$ref": "#/components/schemas/ProductCourseMeta" + }, + { + "type": "null" + } + ] + }, + "unlockMode": { + "description": "COURSE drip rule. Absent keeps the saved one (OPEN on create).", + "type": "string", + "enum": [ + "OPEN", + "SEQUENTIAL", + "DAYS", + "DATE" + ] + } + }, + "additionalProperties": false + }, + "ProductStatusUpdate": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "DRAFT", + "PUBLISHED" + ] } }, "required": [ - "id", - "name", - "brandName", - "slug", - "bio", - "type", - "country", - "timezone", - "logoUrl", - "coverUrl", - "email", - "phone", - "website", - "instagramUrl", - "facebookUrl", - "twitterUrl", - "spotifyUrl", - "youtubeUrl", - "tiktokUrl" + "status" ], "additionalProperties": false }, - "OrganizationProfileUpdate": { + "Product": { "type": "object", "properties": { - "artist": { - "description": "Same fields as the dashboard's Artist card.", - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "slug": { - "type": "string", - "minLength": 1, - "maxLength": 50, - "pattern": "^[a-z0-9-]+$" - }, - "bio": { - "anyOf": [ - { - "type": "string", - "maxLength": 5000 - }, - { - "type": "null" - } - ] - }, - "type": { - "type": "string", - "enum": [ - "ARTIST", - "VENUE", - "ORGANIZER" - ] - }, - "country": { - "description": "ISO 3166-1 alpha-2.", - "type": "string", - "minLength": 2, - "maxLength": 2 - }, - "timezone": { - "description": "IANA time zone.", - "type": "string", - "minLength": 1 - } - }, - "additionalProperties": false + "id": { + "type": "string" }, - "visual": { - "description": "Brand profile photo and cover (stored on the umbrella organization).", - "type": "object", - "properties": { - "logoUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "format": "uri" - }, - { - "type": "null" - } - ] - }, - "coverUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "format": "uri" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false + "name": { + "type": "string" }, - "contact": { - "type": "object", - "properties": { - "email": { - "anyOf": [ - { - "type": "string", - "maxLength": 200, - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string", - "maxLength": 40 - }, - { - "type": "null" - } - ] - }, - "website": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "format": "uri" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false + "type": { + "type": "string", + "enum": [ + "DOWNLOADABLE", + "COURSE" + ] }, - "social": { - "type": "object", - "properties": { - "instagramUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "format": "uri" - }, - { - "type": "null" - } - ] - }, - "facebookUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "format": "uri" - }, - { - "type": "null" - } - ] - }, - "twitterUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "format": "uri" - }, - { - "type": "null" - } - ] - }, - "spotifyUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "format": "uri" - }, - { - "type": "null" - } - ] - }, - "youtubeUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "format": "uri" - }, - { - "type": "null" - } - ] - }, - "tiktokUrl": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "format": "uri" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false + "status": { + "type": "string", + "enum": [ + "DRAFT", + "PUBLISHED" + ] + }, + "price": { + "type": "number" + }, + "currency": { + "type": "string", + "enum": [ + "COP", + "USD" + ] + }, + "coverImageUrl": { + "type": [ + "string", + "null" + ] + }, + "salesCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "CONFIRMED purchases." + }, + "revenue": { + "type": "number", + "description": "Sum of CONFIRMED purchase amounts." + }, + "includedInMembership": { + "type": "boolean" } }, + "required": [ + "id", + "name", + "type", + "status", + "price", + "currency", + "coverImageUrl", + "salesCount", + "revenue", + "includedInMembership" + ], "additionalProperties": false }, - "Organization": { + "ProductLesson": { "type": "object", "properties": { "id": { - "type": "string", - "description": "Umbrella organization id." - }, - "name": { "type": "string" }, - "slug": { + "title": { "type": "string" }, - "logoUrl": { + "description": { "type": [ "string", "null" ] }, - "coverUrl": { + "isLive": { + "type": "boolean" + }, + "content": { + "type": "string", + "enum": [ + "VIDEO", + "FILE", + "TEXT", + "QUIZ" + ] + }, + "body": { + "description": "Markdown; TEXT lessons only.", "type": [ "string", "null" ] }, - "ga4MeasurementId": { + "thumbnailUrl": { "type": [ "string", "null" ] - } - }, - "required": [ - "id", - "name", - "slug", - "logoUrl", - "coverUrl", - "ga4MeasurementId" - ], - "additionalProperties": false - }, - "OrganizationUpdate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 2, - "maxLength": 80 }, - "logoUrl": { + "videoId": { + "description": "Course video id; VIDEO lessons only. Uploading a video is not available through the API.", + "type": [ + "string", + "null" + ] + }, + "fileName": { + "type": [ + "string", + "null" + ] + }, + "filePath": { + "type": [ + "string", + "null" + ] + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductLessonResourceInput" + } + }, + "isPreview": { + "type": "boolean" + }, + "quiz": { + "description": "Only for ADMIN keys (it includes the correct answers).", "anyOf": [ { - "type": "string", - "maxLength": 500, - "format": "uri" + "$ref": "#/components/schemas/ProductLessonQuiz" }, { "type": "null" } ] }, - "coverUrl": { + "videoStatus": { "anyOf": [ { "type": "string", - "maxLength": 500, - "format": "uri" + "enum": [ + "DRAFT", + "PROCESSING", + "READY", + "ERROR" + ] }, { "type": "null" } ] + }, + "durationSeconds": { + "type": [ + "number", + "null" + ] } }, + "required": [ + "id", + "title", + "isLive", + "content", + "resources", + "isPreview", + "videoStatus", + "durationSeconds" + ], "additionalProperties": false }, - "OrganizationAnalyticsUpdate": { + "ProductModule": { "type": "object", "properties": { - "ga4MeasurementId": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "unlockAfterDays": { + "description": "Drip by days after purchase (unlockMode DAYS).", "anyOf": [ { - "type": "string", - "maxLength": 32 + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, { "type": "null" } - ], - "description": "GA4 Measurement ID (G-XXXXXXXXXX); null disconnects it." - } - }, - "required": [ - "ga4MeasurementId" - ], - "additionalProperties": false - }, - "OrganizationAnalytics": { - "type": "object", - "properties": { - "id": { - "type": "string" + ] }, - "ga4MeasurementId": { + "unlockAt": { + "description": "Drip by date, ISO 8601 with offset (unlockMode DATE).", "type": [ "string", "null" ] + }, + "lessons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductLesson" + } } }, "required": [ "id", - "ga4MeasurementId" + "title", + "lessons" ], "additionalProperties": false }, - "TicketTemplateCreate": { + "ProductDetail": { "type": "object", "properties": { + "id": { + "type": "string" + }, "name": { + "type": "string" + }, + "type": { "type": "string", - "minLength": 1, - "maxLength": 100 + "enum": [ + "DOWNLOADABLE", + "COURSE" + ] }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 500 - }, - { - "type": "null" - } + "status": { + "type": "string", + "enum": [ + "DRAFT", + "PUBLISHED" ] }, "price": { - "type": "number", - "minimum": 0 + "type": "number" }, "currency": { - "default": "COP", "type": "string", - "minLength": 3, - "maxLength": 3 + "enum": [ + "COP", + "USD" + ] }, - "capacity": { - "anyOf": [ - { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - { - "type": "null" - } + "coverImageUrl": { + "type": [ + "string", + "null" ] }, - "maxPerOrder": { - "default": 10, + "salesCount": { "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "CONFIRMED purchases." }, - "accentColor": { + "revenue": { + "type": "number", + "description": "Sum of CONFIRMED purchase amounts." + }, + "includedInMembership": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "access": { + "type": "string", + "enum": [ + "PUBLIC", + "SUBSCRIBERS" + ] + }, + "fileName": { "type": [ "string", "null" ] }, - "includes": { - "anyOf": [ - { - "type": "string", - "maxLength": 500 - }, - { - "type": "null" - } + "filePath": { + "type": [ + "string", + "null" ] }, - "instructions": { + "sampleName": { + "type": [ + "string", + "null" + ] + }, + "samplePath": { + "type": [ + "string", + "null" + ] + }, + "modules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductModule" + } + }, + "courseMeta": { "anyOf": [ { - "type": "string", - "maxLength": 2000 + "$ref": "#/components/schemas/ProductCourseMeta" }, { "type": "null" } ] }, - "organizerAbsorbsFee": { - "default": false, - "type": "boolean" + "unlockMode": { + "type": "string", + "enum": [ + "OPEN", + "SEQUENTIAL", + "DAYS", + "DATE" + ] + } + }, + "required": [ + "id", + "name", + "type", + "status", + "price", + "currency", + "coverImageUrl", + "salesCount", + "revenue", + "includedInMembership", + "description", + "access", + "fileName", + "filePath", + "sampleName", + "samplePath", + "modules", + "courseMeta", + "unlockMode" + ], + "additionalProperties": false + }, + "Website": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "Public slug (organization subdomain)." }, - "discount": { + "name": { + "type": "string" + }, + "tagline": { + "type": [ + "string", + "null" + ] + }, + "bio": { + "type": [ + "string", + "null" + ] + }, + "accentColor": { + "type": [ + "string", + "null" + ] + }, + "webTemplate": { + "type": [ + "string", + "null" + ] + }, + "webSections": { "anyOf": [ { "type": "object", - "properties": { - "planId": { - "type": "string", - "minLength": 1, - "maxLength": 50, - "description": "Active membership plan of this workspace." - }, - "percent": { - "type": "integer", - "minimum": 1, - "maximum": 100 - } + "propertyNames": { + "type": "string" }, - "required": [ - "planId", - "percent" - ], - "additionalProperties": false + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } }, { "type": "null" } ], - "description": "Member discount; null = none." + "description": "Per-section visibility booleans plus the reserved `order` key (array of section ids)." }, - "membersOnlyPlanId": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - { - "type": "null" - } - ], - "description": "Members-only gate plan; null = open to everyone." + "instagramUrl": { + "type": [ + "string", + "null" + ] }, - "isActive": { - "default": true, - "type": "boolean" + "tiktokUrl": { + "type": [ + "string", + "null" + ] }, - "sortOrder": { - "default": 0, - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "youtubeUrl": { + "type": [ + "string", + "null" + ] }, - "fields": { - "default": [], - "maxItems": 15, - "type": "array", - "items": { - "type": "object", - "properties": { - "label": { - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "fieldType": { - "type": "string", - "enum": [ - "TEXT", - "NUMBER", - "SELECT", - "EMAIL", - "PHONE" - ] - }, - "options": { - "maxItems": 20, - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 100 - } - }, - "isRequired": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "label", - "fieldType", - "isRequired" - ], - "additionalProperties": false - }, - "description": "Buyer form fields; the list is replaced as a whole." + "customLandingEnabled": { + "type": "boolean", + "description": "The plan includes the custom landing (`PUT /website` answers 403 FEATURE_LOCKED otherwise)." + }, + "published": { + "type": "boolean", + "description": "Listed publicly (/artistas)." + }, + "canPublish": { + "type": "boolean", + "description": "Only the organization's primary workspace can publish/unpublish." + }, + "profileListable": { + "type": "boolean", + "description": "The brand has the name and photo required to publish." } }, "required": [ + "slug", "name", - "price", - "currency", - "maxPerOrder", - "organizerAbsorbsFee", - "isActive", - "sortOrder", - "fields" + "tagline", + "bio", + "accentColor", + "webTemplate", + "webSections", + "instagramUrl", + "tiktokUrl", + "youtubeUrl", + "customLandingEnabled", + "published", + "canPublish", + "profileListable" ], "additionalProperties": false }, - "TicketTemplateUpdate": { + "WebsiteUpdate": { "type": "object", "properties": { "name": { @@ -33731,447 +34543,476 @@ "minLength": 1, "maxLength": 100 }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 500 - }, - { - "type": "null" - } - ] - }, - "price": { - "type": "number", - "minimum": 0 - }, - "currency": { - "type": "string", - "minLength": 3, - "maxLength": 3 - }, - "capacity": { + "tagline": { "anyOf": [ { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 + "type": "string", + "maxLength": 200 }, { "type": "null" } ] }, - "maxPerOrder": { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - "accentColor": { - "type": [ - "string", - "null" - ] - }, - "includes": { + "bio": { "anyOf": [ { "type": "string", - "maxLength": 500 + "maxLength": 5000 }, { "type": "null" } ] }, - "instructions": { + "instagramUrl": { "anyOf": [ { "type": "string", - "maxLength": 2000 + "maxLength": 500 }, { "type": "null" } ] }, - "organizerAbsorbsFee": { - "type": "boolean" - }, - "discount": { + "tiktokUrl": { "anyOf": [ { - "type": "object", - "properties": { - "planId": { - "type": "string", - "minLength": 1, - "maxLength": 50, - "description": "Active membership plan of this workspace." - }, - "percent": { - "type": "integer", - "minimum": 1, - "maximum": 100 - } - }, - "required": [ - "planId", - "percent" - ], - "additionalProperties": false + "type": "string", + "maxLength": 500 }, { "type": "null" } - ], - "description": "Member discount; null = none." + ] }, - "membersOnlyPlanId": { + "youtubeUrl": { "anyOf": [ { "type": "string", - "minLength": 1, - "maxLength": 50 + "maxLength": 500 }, { "type": "null" } - ], - "description": "Members-only gate plan; null = open to everyone." + ] }, - "isActive": { - "type": "boolean" + "accentColor": { + "type": "string", + "pattern": "^#[0-9a-fA-F]{6}$", + "description": "#RRGGBB." }, - "sortOrder": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "webTemplate": { + "type": "string", + "minLength": 1, + "maxLength": 32 }, - "fields": { - "maxItems": 15, - "type": "array", - "items": { - "type": "object", - "properties": { - "label": { - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "fieldType": { - "type": "string", - "enum": [ - "TEXT", - "NUMBER", - "SELECT", - "EMAIL", - "PHONE" - ] + "webSections": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" }, - "options": { - "maxItems": 20, + { "type": "array", "items": { - "type": "string", - "minLength": 1, - "maxLength": 100 + "type": "string" } - }, - "isRequired": { - "default": false, - "type": "boolean" } - }, - "required": [ - "label", - "fieldType", - "isRequired" - ], - "additionalProperties": false + ] }, - "description": "Buyer form fields; the list is replaced as a whole." + "description": "Visibility booleans for the known sections (shows, productos, posts, membresias, contenido, bio, redes) and `order` (array of section ids). Unknown keys are dropped." + } + }, + "required": [ + "name", + "tagline", + "bio", + "instagramUrl", + "tiktokUrl", + "youtubeUrl", + "accentColor", + "webTemplate", + "webSections" + ], + "additionalProperties": false + }, + "WebsitePublished": { + "type": "object", + "properties": { + "published": { + "type": "boolean" } }, + "required": [ + "published" + ], "additionalProperties": false }, - "TicketTemplate": { + "OrganizationProfile": { "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "Workspace id." }, "name": { + "type": "string", + "description": "Workspace name." + }, + "brandName": { + "type": "string", + "description": "Public brand name (from the umbrella organization)." + }, + "slug": { "type": "string" }, - "description": { + "bio": { "type": [ "string", "null" ] }, - "price": { - "type": "number" + "type": { + "type": "string", + "enum": [ + "ARTIST", + "VENUE", + "ORGANIZER" + ] }, - "currency": { + "country": { "type": "string" }, - "capacity": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } + "timezone": { + "type": "string" + }, + "logoUrl": { + "type": [ + "string", + "null" ] }, - "maxPerOrder": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "coverUrl": { + "type": [ + "string", + "null" + ] }, - "accentColor": { + "email": { "type": [ "string", "null" ] }, - "includes": { + "phone": { "type": [ "string", "null" ] }, - "instructions": { + "website": { "type": [ "string", "null" ] }, - "organizerAbsorbsFee": { - "type": "boolean" + "instagramUrl": { + "type": [ + "string", + "null" + ] }, - "discount": { - "anyOf": [ - { - "type": "object", - "properties": { - "planId": { - "type": "string" - }, - "percent": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "planId", - "percent" - ], - "additionalProperties": false - }, - { - "type": "null" - } + "facebookUrl": { + "type": [ + "string", + "null" ] }, - "membersOnlyPlanId": { + "twitterUrl": { "type": [ "string", "null" ] }, - "isActive": { - "type": "boolean" + "spotifyUrl": { + "type": [ + "string", + "null" + ] }, - "fields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "fieldType": { - "type": "string", - "enum": [ - "TEXT", - "NUMBER", - "SELECT", - "EMAIL", - "PHONE" - ] - }, - "options": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "isRequired": { - "type": "boolean" - }, - "sortOrder": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } + "youtubeUrl": { + "type": [ + "string", + "null" + ] + }, + "tiktokUrl": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name", + "brandName", + "slug", + "bio", + "type", + "country", + "timezone", + "logoUrl", + "coverUrl", + "email", + "phone", + "website", + "instagramUrl", + "facebookUrl", + "twitterUrl", + "spotifyUrl", + "youtubeUrl", + "tiktokUrl" + ], + "additionalProperties": false + }, + "OrganizationProfileUpdate": { + "type": "object", + "properties": { + "artist": { + "description": "Same fields as the dashboard's Artist card.", + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "slug": { + "type": "string", + "minLength": 1, + "maxLength": 50, + "pattern": "^[a-z0-9-]+$" + }, + "bio": { + "anyOf": [ + { + "type": "string", + "maxLength": 5000 + }, + { + "type": "null" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "ARTIST", + "VENUE", + "ORGANIZER" + ] + }, + "country": { + "description": "ISO 3166-1 alpha-2.", + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "timezone": { + "description": "IANA time zone.", + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "visual": { + "description": "Brand profile photo and cover (stored on the umbrella organization).", + "type": "object", + "properties": { + "logoUrl": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "coverUrl": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "format": "uri" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "contact": { + "type": "object", + "properties": { + "email": { + "anyOf": [ + { + "type": "string", + "maxLength": 200, + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string", + "maxLength": 40 + }, + { + "type": "null" + } + ] + }, + "website": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "format": "uri" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "social": { + "type": "object", + "properties": { + "instagramUrl": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "facebookUrl": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "twitterUrl": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "spotifyUrl": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "youtubeUrl": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "format": "uri" + }, + { + "type": "null" + } + ] }, - "required": [ - "id", - "label", - "fieldType", - "options", - "isRequired", - "sortOrder" - ], - "additionalProperties": false - } + "tiktokUrl": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "format": "uri" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false } }, - "required": [ - "id", - "name", - "description", - "price", - "currency", - "capacity", - "maxPerOrder", - "accentColor", - "includes", - "instructions", - "organizerAbsorbsFee", - "discount", - "membersOnlyPlanId", - "isActive", - "fields" - ], "additionalProperties": false }, - "TicketTemplateInstantiate": { + "Organization": { "type": "object", "properties": { - "eventDateId": { + "id": { "type": "string", - "minLength": 1, - "description": "Event date of this workspace." + "description": "Umbrella organization id." }, "name": { - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "price": { - "type": "number", - "minimum": 0 - }, - "capacity": { - "description": "Required when the template has no capacity.", - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - } - }, - "required": [ - "eventDateId" - ], - "additionalProperties": false - }, - "TicketTemplateInstance": { - "type": "object", - "properties": { - "ticketTypeId": { - "type": "string" - }, - "eventId": { - "type": "string" - }, - "eventDateId": { - "type": "string" - } - }, - "required": [ - "ticketTypeId", - "eventId", - "eventDateId" - ], - "additionalProperties": false - }, - "MasterQr": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "label": { + "slug": { "type": "string" }, - "mode": { - "type": "string", - "enum": [ - "EVENT", - "TODAY" - ], - "description": "EVENT: opens the event page (or the tenant listings when org-wide). TODAY: jumps to today's show." - }, - "eventId": { - "description": "null = org-wide QR (all shows of the workspace).", - "type": [ - "string", - "null" - ] - }, - "ticketTypeId": { + "logoUrl": { "type": [ "string", "null" ] }, - "active": { - "type": "boolean" - }, - "scans": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "lastScanAt": { + "coverUrl": { "type": [ "string", "null" ] }, - "createdAt": { - "type": "string" - }, - "code": { - "type": "string", - "description": "SECRET: public code printed in the QR; whoever has it reaches the sale flow. It cannot be rotated." - }, - "url": { - "description": "SECRET: the URL encoded in the QR (null if the workspace has no public organization yet).", + "ga4MeasurementId": { "type": [ "string", "null" @@ -34180,52 +35021,40 @@ }, "required": [ "id", - "label", - "mode", - "eventId", - "ticketTypeId", - "active", - "scans", - "lastScanAt", - "createdAt", - "code", - "url" + "name", + "slug", + "logoUrl", + "coverUrl", + "ga4MeasurementId" ], "additionalProperties": false }, - "MasterQrCreate": { + "OrganizationUpdate": { "type": "object", "properties": { - "label": { + "name": { "type": "string", - "minLength": 1, + "minLength": 2, "maxLength": 80 }, - "mode": { - "type": "string", - "enum": [ - "EVENT", - "TODAY" - ] - }, - "eventId": { + "logoUrl": { "anyOf": [ { "type": "string", - "minLength": 1, - "maxLength": 60 + "maxLength": 500, + "format": "uri" }, { "type": "null" } ] }, - "ticketTypeId": { + "coverUrl": { "anyOf": [ { "type": "string", - "minLength": 1, - "maxLength": 60 + "maxLength": 500, + "format": "uri" }, { "type": "null" @@ -34233,746 +35062,478 @@ ] } }, - "required": [ - "label", - "mode" - ], "additionalProperties": false }, - "MasterQrUpdate": { + "OrganizationAnalyticsUpdate": { "type": "object", "properties": { - "label": { - "type": "string", - "minLength": 1, - "maxLength": 80 - }, - "mode": { - "type": "string", - "enum": [ - "EVENT", - "TODAY" - ] - }, - "eventId": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "maxLength": 60 - }, - { - "type": "null" - } - ] - }, - "ticketTypeId": { + "ga4MeasurementId": { "anyOf": [ { "type": "string", - "minLength": 1, - "maxLength": 60 + "maxLength": 32 }, { "type": "null" } - ] - } - }, - "additionalProperties": false - }, - "MasterQrActive": { - "type": "object", - "properties": { - "active": { - "type": "boolean" + ], + "description": "GA4 Measurement ID (G-XXXXXXXXXX); null disconnects it." } }, "required": [ - "active" + "ga4MeasurementId" ], "additionalProperties": false }, - "WorkspaceConfigDeleted": { + "OrganizationAnalytics": { "type": "object", "properties": { "id": { "type": "string" }, - "deleted": { - "type": "boolean", - "const": true + "ga4MeasurementId": { + "type": [ + "string", + "null" + ] } }, "required": [ "id", - "deleted" + "ga4MeasurementId" ], "additionalProperties": false }, - "MerchOrderCreate": { + "TicketTemplateCreate": { "type": "object", "properties": { - "buyer": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 2, - "maxLength": 120 - }, - "phone": { - "type": "string", - "pattern": "^\\+?[0-9 -]{7,20}$" - }, - "documentType": { - "type": "string", - "enum": [ - "CC", - "CE", - "PP", - "NIT", - "TI", - "PEP" - ] - }, - "document": { - "type": "string", - "minLength": 3, - "maxLength": 20 - } - }, - "required": [ - "name", - "phone", - "documentType", - "document" - ], - "additionalProperties": false + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100 }, - "delivery": { - "oneOf": [ + "description": { + "anyOf": [ { - "type": "object", - "properties": { - "kind": { - "type": "string", - "const": "SHIPPING" - }, - "departmentCode": { - "type": "string", - "pattern": "^\\d{2}$" - }, - "department": { - "type": "string", - "minLength": 1, - "maxLength": 80 - }, - "cityCode": { - "type": "string", - "pattern": "^\\d{5}$" - }, - "city": { - "type": "string", - "minLength": 1, - "maxLength": 80 - }, - "address": { - "type": "string", - "minLength": 5, - "maxLength": 200 - }, - "addressExtra": { - "anyOf": [ - { - "type": "string", - "maxLength": 200 - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "kind", - "departmentCode", - "department", - "cityCode", - "city", - "address" - ], - "additionalProperties": false + "type": "string", + "maxLength": 500 }, { - "type": "object", - "properties": { - "kind": { - "type": "string", - "const": "PICKUP" - }, - "pickupPointId": { - "type": "string", - "minLength": 1, - "maxLength": 64 - } - }, - "required": [ - "kind", - "pickupPointId" - ], - "additionalProperties": false + "type": "null" } ] }, - "items": { - "minItems": 1, - "maxItems": 20, - "type": "array", - "items": { - "type": "object", - "properties": { - "variantId": { - "type": "string", - "minLength": 1, - "maxLength": 64 - }, - "quantity": { - "type": "integer", - "minimum": 1, - "maximum": 50 - } - }, - "required": [ - "variantId", - "quantity" - ], - "additionalProperties": false - } - } - }, - "required": [ - "buyer", - "delivery", - "items" - ], - "additionalProperties": false - }, - "MerchOrderLookup": { - "type": "object", - "properties": { - "code": { - "type": "string", - "minLength": 3, - "maxLength": 20 - } - }, - "required": [ - "code" - ], - "additionalProperties": false - }, - "MerchCardPayment": { - "type": "object", - "properties": { - "token": { - "type": "string", - "minLength": 1, - "description": "Card token returned by the Payment Brick when tokenizing." - }, - "paymentMethodId": { - "type": "string", - "minLength": 1, - "description": "`payment_method_id` returned by the Brick (e.g. `visa`, `debmaster`)." - }, - "installments": { - "default": 1, - "type": "integer", - "minimum": 1, - "maximum": 36 + "price": { + "type": "number", + "minimum": 0 }, - "payer": { - "type": "object", - "properties": { - "identification": { - "type": "object", - "properties": { - "type": { - "type": "string", - "minLength": 1 - }, - "number": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "type", - "number" - ], - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "required": [ - "token", - "paymentMethodId", - "installments" - ], - "additionalProperties": false - }, - "MerchCardPaymentResult": { - "type": "object", - "properties": { - "status": { + "currency": { + "default": "COP", "type": "string", - "enum": [ - "approved", - "pending", - "rejected" - ], - "description": "`pending` is normal (bank authentication): the order is confirmed by webhook, poll the lookup. `rejected` is a business decline: the order stays pending until its reservation expires and the buyer can retry with another card." - }, - "code": { - "type": "string" - }, - "message": { - "description": "Human-readable message. Only present with `rejected`.", - "type": "string" - } - }, - "required": [ - "status", - "code" - ], - "additionalProperties": false - }, - "MerchOrder": { - "type": "object", - "properties": { - "code": { - "type": "string" + "minLength": 3, + "maxLength": 3 }, - "status": { - "type": "string", - "enum": [ - "PENDING", - "PAID", - "PREPARING", - "SHIPPED", - "DELIVERED", - "READY_FOR_PICKUP", - "PICKED_UP", - "CANCELLED", - "REFUNDED" + "capacity": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, + { + "type": "null" + } ] }, - "currency": { - "type": "string", - "const": "COP" + "maxPerOrder": { + "default": 10, + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 }, - "reservedUntil": { + "accentColor": { "type": [ "string", "null" ] }, - "createdAt": { - "type": "string" - }, - "paidAt": { - "type": [ - "string", - "null" + "includes": { + "anyOf": [ + { + "type": "string", + "maxLength": 500 + }, + { + "type": "null" + } ] }, - "buyer": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "name": { - "type": "string" + "instructions": { + "anyOf": [ + { + "type": "string", + "maxLength": 2000 }, - "phone": { - "type": "string" + { + "type": "null" } - }, - "required": [ - "email", - "name", - "phone" - ], - "additionalProperties": false - }, - "fulfillment": { - "type": "string", - "enum": [ - "SHIPPING", - "PICKUP" ] }, - "shipping": { + "organizerAbsorbsFee": { + "default": false, + "type": "boolean" + }, + "discount": { "anyOf": [ { "type": "object", "properties": { - "departmentCode": { - "type": [ - "string", - "null" - ] - }, - "department": { - "type": [ - "string", - "null" - ] - }, - "cityCode": { - "type": [ - "string", - "null" - ] - }, - "city": { - "type": [ - "string", - "null" - ] - }, - "address": { - "type": [ - "string", - "null" - ] + "planId": { + "type": "string", + "minLength": 1, + "maxLength": 50, + "description": "Active membership plan of this workspace." }, - "addressExtra": { - "type": [ - "string", - "null" - ] + "percent": { + "type": "integer", + "minimum": 1, + "maximum": 100 } }, "required": [ - "departmentCode", - "department", - "cityCode", - "city", - "address", - "addressExtra" + "planId", + "percent" ], "additionalProperties": false }, { "type": "null" } - ] + ], + "description": "Member discount; null = none." }, - "pickupPoint": { + "membersOnlyPlanId": { "anyOf": [ { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": [ - "string", - "null" - ] - }, - "schedule": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "id", - "name", - "address", - "city", - "schedule" - ], - "additionalProperties": false + "type": "string", + "minLength": 1, + "maxLength": 50 }, { "type": "null" } - ] + ], + "description": "Members-only gate plan; null = open to everyone." }, - "items": { + "isActive": { + "default": true, + "type": "boolean" + }, + "sortOrder": { + "default": 0, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "fields": { + "default": [], + "maxItems": 15, "type": "array", "items": { "type": "object", "properties": { - "variantId": { - "type": "string" - }, - "productName": { - "type": "string" - }, - "variantLabel": { - "type": "string" + "label": { + "type": "string", + "minLength": 1, + "maxLength": 100 }, - "sku": { - "type": "string" + "fieldType": { + "type": "string", + "enum": [ + "TEXT", + "NUMBER", + "SELECT", + "EMAIL", + "PHONE" + ] }, - "quantity": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "options": { + "maxItems": 20, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } }, - "unitPrice": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "isRequired": { + "default": false, + "type": "boolean" } }, "required": [ - "variantId", - "productName", - "variantLabel", - "sku", - "quantity", - "unitPrice" + "label", + "fieldType", + "isRequired" ], "additionalProperties": false - } + }, + "description": "Buyer form fields; the list is replaced as a whole." + } + }, + "required": [ + "name", + "price", + "currency", + "maxPerOrder", + "organizerAbsorbsFee", + "isActive", + "sortOrder", + "fields" + ], + "additionalProperties": false + }, + "TicketTemplateUpdate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100 }, - "subtotal": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 500 + }, + { + "type": "null" + } + ] }, - "shippingFee": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "price": { + "type": "number", + "minimum": 0 }, - "total": { + "currency": { + "type": "string", + "minLength": 3, + "maxLength": 3 + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "maxPerOrder": { "type": "integer", - "minimum": -9007199254740991, + "exclusiveMinimum": 0, "maximum": 9007199254740991 }, - "tracking": { + "accentColor": { + "type": [ + "string", + "null" + ] + }, + "includes": { + "anyOf": [ + { + "type": "string", + "maxLength": 500 + }, + { + "type": "null" + } + ] + }, + "instructions": { + "anyOf": [ + { + "type": "string", + "maxLength": 2000 + }, + { + "type": "null" + } + ] + }, + "organizerAbsorbsFee": { + "type": "boolean" + }, + "discount": { "anyOf": [ { "type": "object", "properties": { - "carrier": { - "type": [ - "string", - "null" - ] - }, - "carrierName": { - "type": [ - "string", - "null" - ] - }, - "carrierLabel": { - "type": [ - "string", - "null" - ] - }, - "trackingNumber": { - "type": [ - "string", - "null" - ] + "planId": { + "type": "string", + "minLength": 1, + "maxLength": 50, + "description": "Active membership plan of this workspace." }, - "trackingUrl": { - "type": [ - "string", - "null" - ] + "percent": { + "type": "integer", + "minimum": 1, + "maximum": 100 } }, "required": [ - "carrier", - "carrierName", - "carrierLabel", - "trackingNumber", - "trackingUrl" + "planId", + "percent" ], "additionalProperties": false }, { "type": "null" } - ] + ], + "description": "Member discount; null = none." }, - "statusDates": { - "type": "object", - "properties": { - "paidAt": { - "type": [ - "string", - "null" - ] - }, - "preparingAt": { - "type": [ - "string", - "null" - ] - }, - "shippedAt": { - "type": [ - "string", - "null" - ] - }, - "deliveredAt": { - "type": [ - "string", - "null" - ] - }, - "readyForPickupAt": { - "type": [ - "string", - "null" - ] - }, - "pickedUpAt": { - "type": [ - "string", - "null" - ] - }, - "cancelledAt": { - "type": [ - "string", - "null" - ] + "membersOnlyPlanId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 50 }, - "refundedAt": { - "type": [ - "string", - "null" - ] + { + "type": "null" } - }, - "required": [ - "paidAt", - "preparingAt", - "shippedAt", - "deliveredAt", - "readyForPickupAt", - "pickedUpAt", - "cancelledAt", - "refundedAt" ], - "additionalProperties": false + "description": "Members-only gate plan; null = open to everyone." }, - "mpPublicKey": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "code", - "status", - "currency", - "reservedUntil", - "createdAt", - "paidAt", - "buyer", - "fulfillment", - "shipping", - "pickupPoint", - "items", - "subtotal", - "shippingFee", - "total", - "tracking", - "statusDates", - "mpPublicKey" - ], + "isActive": { + "type": "boolean" + }, + "sortOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "fields": { + "maxItems": 15, + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "fieldType": { + "type": "string", + "enum": [ + "TEXT", + "NUMBER", + "SELECT", + "EMAIL", + "PHONE" + ] + }, + "options": { + "maxItems": 20, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 100 + } + }, + "isRequired": { + "default": false, + "type": "boolean" + } + }, + "required": [ + "label", + "fieldType", + "isRequired" + ], + "additionalProperties": false + }, + "description": "Buyer form fields; the list is replaced as a whole." + } + }, "additionalProperties": false }, - "MerchCatalog": { + "TicketTemplate": { "type": "object", "properties": { - "store": { - "type": "object", - "properties": { - "brandName": { - "type": "string" - }, - "brandLogoUrl": { - "type": [ - "string", - "null" - ] - }, - "landingUrl": { - "type": [ - "string", - "null" - ] - }, - "support": { - "type": "object", - "properties": { - "phone": { - "type": [ - "string", - "null" - ] - }, - "isWhatsapp": { - "type": "boolean" - }, - "email": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "phone", - "isWhatsapp", - "email" - ], - "additionalProperties": false + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "price": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "shipping": { + { + "type": "null" + } + ] + }, + "maxPerOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "accentColor": { + "type": [ + "string", + "null" + ] + }, + "includes": { + "type": [ + "string", + "null" + ] + }, + "instructions": { + "type": [ + "string", + "null" + ] + }, + "organizerAbsorbsFee": { + "type": "boolean" + }, + "discount": { + "anyOf": [ + { "type": "object", "properties": { - "enabled": { - "type": "boolean" - }, - "feeBogota": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "feeNational": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "planId": { + "type": "string" }, - "freeShippingThreshold": { + "percent": { "anyOf": [ { "type": "integer", @@ -34986,28 +35547,26 @@ } }, "required": [ - "enabled", - "feeBogota", - "feeNational", - "freeShippingThreshold" + "planId", + "percent" ], "additionalProperties": false }, - "pickupEnabled": { - "type": "boolean" + { + "type": "null" } - }, - "required": [ - "brandName", - "brandLogoUrl", - "landingUrl", - "support", - "shipping", - "pickupEnabled" - ], - "additionalProperties": false + ] }, - "products": { + "membersOnlyPlanId": { + "type": [ + "string", + "null" + ] + }, + "isActive": { + "type": "boolean" + }, + "fields": { "type": "array", "items": { "type": "object", @@ -35015,175 +35574,309 @@ "id": { "type": "string" }, - "slug": { - "type": "string" - }, - "name": { + "label": { "type": "string" }, - "description": { - "type": [ - "string", - "null" + "fieldType": { + "type": "string", + "enum": [ + "TEXT", + "NUMBER", + "SELECT", + "EMAIL", + "PHONE" ] }, - "imageUrls": { - "type": "array", - "items": { - "type": "string" - } - }, "options": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { + "anyOf": [ + { + "type": "array", + "items": { "type": "string" - }, - "values": { - "type": "array", - "items": { - "type": "string" - } } }, - "required": [ - "name", - "values" - ], - "additionalProperties": false - } + { + "type": "null" + } + ] }, - "maxPerOrder": { + "isRequired": { + "type": "boolean" + }, + "sortOrder": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "label": { - "type": "string" - }, - "attributes": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "price": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "compareAtPrice": { - "anyOf": [ - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - { - "type": "null" - } - ] - }, - "stock": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "sku", - "label", - "attributes", - "price", - "compareAtPrice", - "stock" - ], - "additionalProperties": false - } } }, "required": [ "id", - "slug", - "name", - "description", - "imageUrls", + "label", + "fieldType", "options", - "maxPerOrder", - "variants" + "isRequired", + "sortOrder" ], "additionalProperties": false } + } + }, + "required": [ + "id", + "name", + "description", + "price", + "currency", + "capacity", + "maxPerOrder", + "accentColor", + "includes", + "instructions", + "organizerAbsorbsFee", + "discount", + "membersOnlyPlanId", + "isActive", + "fields" + ], + "additionalProperties": false + }, + "TicketTemplateInstantiate": { + "type": "object", + "properties": { + "eventDateId": { + "type": "string", + "minLength": 1, + "description": "Event date of this workspace." }, - "pickupPoints": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": [ - "string", - "null" - ] - }, - "schedule": { - "type": [ - "string", - "null" - ] - } + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "price": { + "type": "number", + "minimum": 0 + }, + "capacity": { + "description": "Required when the template has no capacity.", + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "eventDateId" + ], + "additionalProperties": false + }, + "TicketTemplateInstance": { + "type": "object", + "properties": { + "ticketTypeId": { + "type": "string" + }, + "eventId": { + "type": "string" + }, + "eventDateId": { + "type": "string" + } + }, + "required": [ + "ticketTypeId", + "eventId", + "eventDateId" + ], + "additionalProperties": false + }, + "MasterQr": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "mode": { + "type": "string", + "enum": [ + "EVENT", + "TODAY" + ], + "description": "EVENT: opens the event page (or the tenant listings when org-wide). TODAY: jumps to today's show." + }, + "eventId": { + "description": "null = org-wide QR (all shows of the workspace).", + "type": [ + "string", + "null" + ] + }, + "ticketTypeId": { + "type": [ + "string", + "null" + ] + }, + "active": { + "type": "boolean" + }, + "scans": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "lastScanAt": { + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "type": "string" + }, + "code": { + "type": "string", + "description": "SECRET: public code printed in the QR; whoever has it reaches the sale flow. It cannot be rotated." + }, + "url": { + "description": "SECRET: the URL encoded in the QR (null if the workspace has no public organization yet).", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "label", + "mode", + "eventId", + "ticketTypeId", + "active", + "scans", + "lastScanAt", + "createdAt", + "code", + "url" + ], + "additionalProperties": false + }, + "MasterQrCreate": { + "type": "object", + "properties": { + "label": { + "type": "string", + "minLength": 1, + "maxLength": 80 + }, + "mode": { + "type": "string", + "enum": [ + "EVENT", + "TODAY" + ] + }, + "eventId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 60 }, - "required": [ - "id", - "name", - "address", - "city", - "schedule" - ], - "additionalProperties": false - } + { + "type": "null" + } + ] }, - "currency": { + "ticketTypeId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 60 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "label", + "mode" + ], + "additionalProperties": false + }, + "MasterQrUpdate": { + "type": "object", + "properties": { + "label": { "type": "string", - "const": "COP" + "minLength": 1, + "maxLength": 80 + }, + "mode": { + "type": "string", + "enum": [ + "EVENT", + "TODAY" + ] + }, + "eventId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 60 + }, + { + "type": "null" + } + ] }, - "mpPublicKey": { - "type": [ - "string", - "null" + "ticketTypeId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 60 + }, + { + "type": "null" + } ] } }, + "additionalProperties": false + }, + "MasterQrActive": { + "type": "object", + "properties": { + "active": { + "type": "boolean" + } + }, "required": [ - "store", - "products", - "pickupPoints", - "currency", - "mpPublicKey" + "active" + ], + "additionalProperties": false + }, + "WorkspaceConfigDeleted": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "deleted": { + "type": "boolean", + "const": true + } + }, + "required": [ + "id", + "deleted" ], "additionalProperties": false }, @@ -35217,6 +35910,23 @@ "maximum": 100, "description": "Maximum units of this product per order." }, + "maxPerCustomer": { + "description": "Maximum units per person across all their orders that are not cancelled or refunded, including cancelled orders whose charge can still appear. Matches by email or customer on any of those orders, and by buyer document or phone only on orders that are no longer PENDING. Document and phone are not verified, so the limit is soft. Omitted or null: no limit.", + "anyOf": [ + { + "type": "integer", + "minimum": 1, + "maximum": 1000000 + }, + { + "type": "null" + } + ] + }, + "membersOnly": { + "description": "Only a buyer with an active membership in the organization can order it. Default false.", + "type": "boolean" + }, "sortOrder": { "type": "integer", "minimum": -9007199254740991, @@ -35462,6 +36172,21 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "maxPerCustomer": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "membersOnly": { + "type": "boolean" + }, "sortOrder": { "type": "integer", "minimum": -9007199254740991, @@ -35551,6 +36276,8 @@ "imageUrls", "options", "maxPerOrder", + "maxPerCustomer", + "membersOnly", "sortOrder", "publishedAt", "createdAt", @@ -35558,6 +36285,434 @@ "variants" ], "additionalProperties": false + }, + "SaleRefundRequest": { + "type": "object", + "properties": { + "acknowledge_manual": { + "type": "boolean" + }, + "items": { + "minItems": 1, + "maxItems": 200, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + "block_seats": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "SaleRefundResult": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "PENDING", + "CONFIRMED", + "ABANDONED", + "CANCELLED", + "REFUNDED" + ] + }, + "channel": { + "type": "string" + }, + "subtotal": { + "type": "number" + }, + "discountAmount": { + "type": "number" + }, + "serviceFee": { + "type": "number" + }, + "iva": { + "type": "number" + }, + "total": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "buyerName": { + "type": "string" + }, + "buyerEmail": { + "type": "string" + }, + "buyerPhone": { + "type": [ + "string", + "null" + ] + }, + "buyerDocumentType": { + "type": [ + "string", + "null" + ] + }, + "buyerDocumentNumber": { + "type": [ + "string", + "null" + ] + }, + "organizationId": { + "type": [ + "string", + "null" + ] + }, + "paymentProvider": { + "type": [ + "string", + "null" + ] + }, + "paymentRef": { + "type": [ + "string", + "null" + ] + }, + "confirmedAt": { + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "type": "string" + }, + "failureReason": { + "type": [ + "string", + "null" + ] + }, + "paymentStatus": { + "description": "Status of the latest payment event. Usually the payment gateway's RAW status in its own vocabulary. Values prefixed with `FT_` come from FreeTicket, not the gateway: currently `FT_SALE_APPROVED_POST_CONFIRM`, which marks that the gateway re-notified an already-confirmed charge — this is how Bold reports its refunds. A CONFIRMED sale with this status may have money refunded that is not yet recorded.", + "type": [ + "string", + "null" + ] + }, + "declineCode": { + "type": [ + "string", + "null" + ] + }, + "refund": { + "type": "object", + "properties": { + "amount": { + "type": [ + "number", + "null" + ] + }, + "refundedItemIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "saleRefunded": { + "type": "boolean" + }, + "gatewayRefunded": { + "type": "boolean" + }, + "seats": { + "type": "string", + "enum": [ + "blocked", + "block_failed", + "released", + "release_failed", + "none" + ] + } + }, + "required": [ + "amount", + "refundedItemIds", + "saleRefunded", + "gatewayRefunded", + "seats" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "reference", + "status", + "channel", + "subtotal", + "discountAmount", + "serviceFee", + "iva", + "total", + "currency", + "buyerName", + "buyerEmail", + "buyerPhone", + "buyerDocumentType", + "buyerDocumentNumber", + "organizationId", + "paymentProvider", + "paymentRef", + "confirmedAt", + "createdAt", + "failureReason", + "paymentStatus", + "declineCode" + ], + "additionalProperties": false + }, + "SaleItemTransferRequest": { + "type": "object", + "properties": { + "email": { + "type": "string", + "maxLength": 254, + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": [ + "email" + ], + "additionalProperties": false + }, + "SaleItemTransfer": { + "type": "object", + "properties": { + "saleId": { + "type": "string" + }, + "itemId": { + "type": "string" + }, + "ticketCode": { + "type": "string", + "description": "New ticket code (the previous QR is void)." + }, + "holderName": { + "type": "string" + }, + "holderEmail": { + "type": "string" + }, + "transferredAt": { + "type": "string" + } + }, + "required": [ + "saleId", + "itemId", + "ticketCode", + "holderName", + "holderEmail", + "transferredAt" + ], + "additionalProperties": false + }, + "CourtesyRecipientUpdate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 120 + }, + "email": { + "type": "string", + "maxLength": 254, + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": [ + "name", + "email" + ], + "additionalProperties": false + }, + "CourtesyRecipient": { + "type": "object", + "properties": { + "saleId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "resent": { + "type": "boolean" + }, + "ticketCodesRotated": { + "type": "boolean", + "description": "true when the email changed: the previous QR codes are void (transferred tickets keep theirs)." + } + }, + "required": [ + "saleId", + "name", + "email", + "resent", + "ticketCodesRotated" + ], + "additionalProperties": false + }, + "ResendTicket": { + "type": "object", + "properties": { + "ticketCode": { + "type": "string" + }, + "sentTo": { + "type": "string" + }, + "sentAt": { + "type": "string" + } + }, + "required": [ + "ticketCode", + "sentTo", + "sentAt" + ], + "additionalProperties": false + }, + "CustomerOrderItem": { + "type": "object", + "properties": { + "ticketTypeId": { + "type": "string", + "minLength": 1 + }, + "quantity": { + "type": "integer", + "minimum": 1, + "maximum": 30 + }, + "seats": { + "description": "seats.io labels. Only for seated events.", + "maxItems": 30, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 120 + } + } + }, + "required": [ + "ticketTypeId", + "quantity" + ], + "additionalProperties": false + }, + "CustomerOrderCreateRequest": { + "type": "object", + "properties": { + "eventDateId": { + "type": "string", + "minLength": 1 + }, + "items": { + "minItems": 1, + "maxItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomerOrderItem" + } + }, + "holdToken": { + "description": "Hold token of the seats.io map session. Required if seats are sent.", + "type": "string", + "maxLength": 120 + }, + "discountCode": { + "type": "string", + "maxLength": 40 + }, + "buyer": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 120 + }, + "phone": { + "type": "string", + "maxLength": 40 + }, + "idType": { + "type": "string", + "enum": [ + "CC", + "CE", + "NIT", + "PP", + "TI", + "PEP" + ] + }, + "idNumber": { + "type": "string", + "minLength": 5, + "maxLength": 20 + }, + "nitDigit": { + "description": "Check digit. Required if idType is NIT.", + "type": "string", + "maxLength": 1 + } + }, + "required": [ + "name", + "phone", + "idType", + "idNumber" + ], + "additionalProperties": false + }, + "returnUrl": { + "type": "string", + "maxLength": 2048, + "description": "Absolute URL of the landing page the buyer returns to. Validated against the enterprise domain allowlist and the workspace that owns the event; if it fails validation it is ignored and the purchase proceeds as usual." + } + }, + "required": [ + "eventDateId", + "items", + "buyer", + "returnUrl" + ], + "additionalProperties": false } }, "headers": { diff --git a/src/commands/merch.test.ts b/src/commands/merch.test.ts index 5639913..7ea986f 100644 --- a/src/commands/merch.test.ts +++ b/src/commands/merch.test.ts @@ -58,6 +58,8 @@ const product = (over: Partial = {}): MerchAdminProduct => ({ imageUrls: [], options: [], maxPerOrder: 10, + maxPerCustomer: null, + membersOnly: false, sortOrder: 0, publishedAt: null, createdAt: "2026-11-03T00:00:00.000Z",