openapi: 3.1.0
info:
  title: Tiendup Public API
  version: 1.0.0
  description: >
    API pública para integrar Tiendup 

    🔑 Para obtener una API Key, sigue los pasos de la documentación:  

    [¿Cómo obtener tu API Key de
    Tiendup?](https://intercom.help/tiendup/es/articles/13832665-api-de-tiendup)
  contact:
    name: Tiendup
    email: soporte@tiendup.com
servers:
  - url: https://{business_slug}.public-api.tiendup.com
    variables:
      business_slug:
        default: demo
        description: Slug del negocio (subdominio)
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >
        Autenticación mediante API Key.


        🔑 Para obtener una API Key, sigue los pasos de la documentación:  

        [¿Cómo obtener tu API Key de
        Tiendup?](https://intercom.help/tiendup/es/articles/13832665-api-de-tiendup)

         ⚠️ **Manejo de errores**
        - Todos los errores funcionales o de negocio retornan **HTTP 400**

        - Los errores de autenticación retornan **HTTP 401 o 403**

        - El cuerpo de error siempre tiene `status: "ERROR"`
  parameters:
    OrderId:
      in: path
      name: order_id
      required: true
      schema:
        type: integer
      description: ID de la compra (order)
    PageParam:
      in: query
      name: page
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
      description: Número de página (empieza en 1).
    LimitParam:
      in: query
      name: limit
      required: false
      schema:
        type: integer
        minimum: 1
        default: 25
      description: Cantidad de resultados por página (default 25).
  schemas:
    Pagination:
      type: object
      required:
        - countFiltered
        - count
        - previous
        - current
        - pages
        - next
      properties:
        countFiltered:
          type: integer
          description: Cantidad filtrada
        count:
          description: Puede venir como string o integer.
          oneOf:
            - type: integer
            - type: string
        previous:
          oneOf:
            - type: integer
            - type: 'null'
        current:
          type: integer
        pages:
          type: integer
        next:
          oneOf:
            - type: integer
            - type: 'null'
      additionalProperties: true
    ApiErrorResponse:
      type: object
      required:
        - status
        - message
        - errors
      properties:
        status:
          type: string
          example: ERROR
        message:
          type: string
          example: Descripción del error
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorItem'
      additionalProperties: true
    ApiErrorItem:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          example: 4000
        message:
          type: string
          example: Descripción del error
        extra_data:
          type: array
          description: Datos extra para debug/validación (puede venir vacío).
          items: {}
      additionalProperties: true
    OrdersListResponse:
      allOf:
        - type: object
          required:
            - status
            - data
            - countFiltered
            - count
            - previous
            - current
            - pages
            - next
          properties:
            status:
              type: string
              example: OK
            data:
              type: array
              description: Lista de compras (si no hay compras, viene vacío).
              items:
                $ref: '#/components/schemas/Order'
        - $ref: '#/components/schemas/Pagination'
      additionalProperties: true
    Order:
      type: object
      description: >-
        Compra/orden. Este schema es parcial: Tiendup puede incluir campos
        adicionales.
      required:
        - id
        - hash
        - number
        - type
        - status
        - creation_date
        - items
        - customer
      properties:
        id:
          type: integer
          example: 18508
        hash:
          type: string
          example: ZKp7q4VgRP
        number:
          type: string
          example: '16'
        type:
          type: string
          description: >-
            Tipo de compra (common, downloadable, elearning, event, bundle,
            session, etc.)
          example: common
        status:
          type: string
          example: open
        language_iso:
          type: string
          example: es
        creation_date:
          type: string
          description: 'Formato: YYYY-MM-DD HH:mm:ss'
          example: '2026-01-19 21:01:26'
        update_date:
          type: string
          description: 'Formato: YYYY-MM-DD HH:mm:ss'
          example: '2026-01-19 21:01:28'
        currency:
          type: string
          example: ARS
        currency_symbol:
          type: string
          example: $
        total_amount:
          type: string
          example: '2650'
        pay_url:
          type: string
          example: https://pay.example.com/pay/265/ZKp7q4VgRP
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
        customer:
          $ref: '#/components/schemas/CustomerSummaryOrder'
      additionalProperties: true
    OrderItem:
      type: object
      required:
        - id
        - product_id
        - ecommerce_type
        - name
        - quantity
        - price
      properties:
        id:
          type: integer
          example: 24148
        product_id:
          type: integer
          example: 12181
        ecommerce_type:
          type: string
          example: retail
        name:
          type: string
          example: Producto de ejemplo
        sku:
          type: string
          example: abc123
        quantity:
          type: integer
          example: 1
        price:
          type: string
          example: '2500'
        unit_price:
          type: string
          example: '2500'
      additionalProperties: true
    CustomerSummary:
      type: object
      required:
        - id
        - email
      properties:
        id:
          type: integer
          example: 41974
        name:
          type: string
          example: Roberta
        last_name:
          type: string
          example: Fernandez
        email:
          type: string
          format: email
          example: customer2@example.com
        phone:
          type: string
          example: +1 202 555 1001
      additionalProperties: true
    OrderGetResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/OrderDetail'
      additionalProperties: true
    OrderDetail:
      type: object
      description: >
        Detalle de una compra/orden. Schema parcial: Tiendup puede incluir
        campos adicionales.
      required:
        - id
        - hash
        - number
        - type
        - status
        - creation_date
        - items
        - customer
      properties:
        id:
          type: integer
          example: 18508
        hash:
          type: string
          example: ZKp7q4VgRP
        number:
          type: string
          example: '16'
        type:
          type: string
          example: common
        status:
          type: string
          example: open
        creation_date:
          type: string
          description: 'Formato: YYYY-MM-DD HH:mm:ss'
          example: '2026-01-19 21:01:26'
        update_date:
          type: string
          description: 'Formato: YYYY-MM-DD HH:mm:ss'
          example: '2026-01-19 21:01:28'
        currency:
          type: string
          example: ARS
        currency_symbol:
          type: string
          example: $
        total_amount:
          type: string
          example: '2650'
        pay_url:
          oneOf:
            - type: string
            - type: 'null'
          example: https://pay.example.com/pay/265/ZKp7q4VgRP
        source:
          $ref: '#/components/schemas/OrderSourceSummary'
        items:
          type: array
          description: >
            En el detalle, `items` puede venir enriquecido (con datos del
            producto).
          items:
            $ref: '#/components/schemas/OrderItemDetail'
        customer:
          $ref: '#/components/schemas/CustomerDetail'
        gateway:
          $ref: '#/components/schemas/GatewayDetail'
        shipping:
          $ref: '#/components/schemas/ShippingDetail'
      additionalProperties: true
    OrderSourceSummary:
      type: object
      properties:
        id:
          type: integer
        business_id:
          type: integer
        name:
          type: string
        type:
          type: string
        slug:
          type: string
        domain:
          type: string
      additionalProperties: true
    OrderItemDetail:
      type: object
      required:
        - id
        - name
        - quantity
        - price
        - ecommerce_type
      properties:
        id:
          type: integer
        product_id:
          type: integer
        name:
          type: string
        ecommerce_type:
          type: string
        quantity:
          type: integer
        price:
          type: string
        unit_price:
          type: string
        sku:
          oneOf:
            - type: string
            - type: 'null'
        image:
          oneOf:
            - type: object
            - type: boolean
            - type: 'null'
      additionalProperties: true
    CustomerDetail:
      type: object
      required:
        - id
        - email
      properties:
        id:
          type: integer
        email:
          type: string
          format: email
        name:
          type: string
        last_name:
          type: string
        phone:
          oneOf:
            - type: string
            - type: 'null'
        creation_date:
          oneOf:
            - type: string
            - type: 'null'
        update_date:
          oneOf:
            - type: string
            - type: 'null'
        billing_address:
          oneOf:
            - type: object
            - type: 'null'
      additionalProperties: true
    GatewayDetail:
      type: object
      properties:
        id:
          oneOf:
            - type: string
            - type: integer
        type:
          type: string
        name:
          type: string
        instructions:
          oneOf:
            - type: string
            - type: 'null'
        configuration:
          oneOf:
            - type: object
            - type: 'null'
      additionalProperties: true
    ShippingDetail:
      type: object
      properties:
        status:
          type: string
        type:
          type: string
        recipient_name:
          oneOf:
            - type: string
            - type: 'null'
        recipient_phone:
          oneOf:
            - type: string
            - type: 'null'
        address:
          oneOf:
            - type: object
            - type: 'null'
        name:
          oneOf:
            - type: string
            - type: 'null'
        shipping_provider_key:
          oneOf:
            - type: string
        is_branch_pickup:
          oneOf:
            - type: boolean
      additionalProperties: true
    CustomerSummaryOrder:
      type: object
      description: Cliente (schema parcial).
      required:
        - id
        - name
        - email
        - creation_date
        - update_date
        - active
        - is_guest
        - has_password
        - stage
      properties:
        id:
          type: integer
          example: 40737
        name:
          type: string
          example: Michael
        last_name:
          oneOf:
            - type: string
          example: Smith
        email:
          type: string
          format: email
          example: customer3@example.com
        creation_date:
          type: string
          description: 'Formato: YYYY-MM-DD HH:mm:ss'
          example: '2020-04-03 11:10:54'
        update_date:
          type: string
          description: 'Formato: YYYY-MM-DD HH:mm:ss'
          example: '2025-12-26 12:25:57'
        comment:
          type: string
          example: ''
        active:
          type: boolean
          example: true
        is_guest:
          type: boolean
          example: false
        birthdate:
          oneOf:
            - type: string
        has_password:
          type: boolean
          example: true
        stage:
          type: string
          example: evangelist
        avatar_filename:
          oneOf:
            - type: string
            - type: 'null'
          example: https://api.example.com/api/portraits/lego/5.jpg
        member_id:
          oneOf:
            - type: integer
          example: 5783
        main_phone:
          oneOf:
            - type: string
          example: +1 202 555 1002
        categories:
          type: array
          items: {}
          example: []
        metafields:
          oneOf:
            - type: array
            - type: object
          example: []
      additionalProperties: true
    CustomersListResponse:
      allOf:
        - type: object
          required:
            - status
            - data
          properties:
            status:
              type: string
              example: OK
            data:
              type: array
              items:
                $ref: '#/components/schemas/CustomerSummary'
          additionalProperties: true
        - $ref: '#/components/schemas/Pagination'
    Customer:
      allOf:
        - $ref: '#/components/schemas/CustomerSummary'
        - type: object
          properties:
            identification:
              oneOf:
                - type: string
                - type: 'null'
            identification_type:
              oneOf:
                - type: string
                - type: 'null'
            company:
              oneOf:
                - type: string
                - type: 'null'
            tax_treatment:
              oneOf:
                - type: string
                - type: 'null'
            tax_id_type:
              oneOf:
                - type: string
                - type: 'null'
            tax_id_number:
              oneOf:
                - type: string
                - type: 'null'
            language:
              type: string
              example: ''
            member_id:
              oneOf:
                - type: integer
                - type: string
                - type: 'null'
              example: 5783
            autologin_hash:
              oneOf:
                - type: string
                - type: 'null'
            is_seller:
              type: boolean
              example: false
            contacts:
              type: array
              items:
                $ref: '#/components/schemas/CustomerContact'
            addresses:
              type: array
              items:
                $ref: '#/components/schemas/CustomerAddress'
            orders:
              type: array
              description: Órdenes asociadas al cliente (puede venir vacío).
              items:
                $ref: '#/components/schemas/Order'
            categories:
              type: array
              items: {}
              example: []
            metafields:
              oneOf:
                - type: array
                - type: object
              example: []
            seller:
              oneOf:
                - type: object
                - type: 'null'
              description: Información de vendedor si aplica.
            subscriptions:
              type: array
              description: Suscripciones asociadas (si aplica).
              items: {}
              example: []
          additionalProperties: true
    CustomerContact:
      type: object
      required:
        - id
        - type
        - value
      properties:
        id:
          type: integer
          example: 24234
        type:
          $ref: '#/components/schemas/CustomerContactType'
        value:
          type: string
          example: +1 202 555 1002
      additionalProperties: true
    CustomerContactType:
      type: object
      required:
        - id
        - key
        - name
      properties:
        id:
          oneOf:
            - type: integer
            - type: string
          example: '1'
        key:
          type: string
          example: phone
        name:
          type: string
          example: Teléfono
      additionalProperties: true
    CustomerAddress:
      type: object
      required:
        - id
        - city
        - zip_code
        - street
        - number
        - label
        - is_billing_address
        - is_shipping_address
      properties:
        id:
          type: integer
          example: 5852
        city:
          type: string
          example: La Plata
        city_id:
          oneOf:
            - type: integer
            - type: 'null'
          example: 1492012
        state:
          $ref: '#/components/schemas/GeoState'
        country:
          $ref: '#/components/schemas/GeoCountry'
        latitude:
          type: number
          example: 0
        longitude:
          type: number
          example: 0
        zip_code:
          type: string
          example: '1900'
        street:
          type: string
          example: '44'
        number:
          type: string
          example: '2344'
        floor:
          oneOf:
            - type: string
            - type: 'null'
        intersections:
          oneOf:
            - type: string
            - type: 'null'
        observations:
          oneOf:
            - type: string
            - type: 'null'
        label:
          type: string
          example: 44, 2344, La Plata, Buenos Aires, AR
        first_name:
          oneOf:
            - type: string
            - type: 'null'
          example: Michael
        last_name:
          oneOf:
            - type: string
            - type: 'null'
          example: Smith
        email:
          oneOf:
            - type: string
            - type: 'null'
        identification_type:
          oneOf:
            - type: string
            - type: 'null'
          example: DNI
        identification:
          oneOf:
            - type: string
            - type: 'null'
          example: '33452312'
        company:
          oneOf:
            - type: string
            - type: 'null'
        phone:
          oneOf:
            - type: string
            - type: 'null'
        is_billing_address:
          type: boolean
          example: true
        is_shipping_address:
          type: boolean
          example: false
        metafields:
          oneOf:
            - type: array
            - type: object
          example: []
      additionalProperties: true
    GeoState:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          example: 103
        name:
          type: string
          example: Buenos Aires
        additionalProperties: true
    GeoCountry:
      type: object
      required:
        - id
        - name
        - code
      properties:
        id:
          type: integer
          example: 11
        name:
          type: string
          example: Argentina
        code:
          type: string
          example: AR
        additionalProperties: true
    CustomerGetResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/Customer'
      additionalProperties: true
    ProductsListResponse:
      allOf:
        - type: object
          required:
            - status
            - data
          properties:
            status:
              type: string
              example: OK
            data:
              type: array
              description: Lista de productos (si no hay, viene vacío).
              items:
                $ref: '#/components/schemas/Product'
          additionalProperties: true
        - $ref: '#/components/schemas/Pagination'
    Product:
      type: object
      required:
        - id
        - business_id
        - name
        - price
        - currency
        - ecommerce_type
        - active
      properties:
        id:
          type: integer
          example: 12181
        business_id:
          type: integer
          example: 265
        hash:
          type: string
          example: WGwJyW
        name:
          type: string
          example: Producto de ejemplo
        short_description:
          oneOf:
            - type: string
            - type: 'null'
        price:
          type: string
          example: '2500'
        price_min:
          oneOf:
            - type: string
            - type: 'null'
        price_max:
          oneOf:
            - type: string
            - type: 'null'
        prices_list_key:
          oneOf:
            - type: string
            - type: 'null'
        base_price:
          type: string
          example: '2500'
        price_varies:
          type: boolean
          example: false
        compare_at_price:
          oneOf:
            - type: string
            - type: 'null'
          example: '3000'
        price_visible:
          type: boolean
          example: true
        currency:
          type: string
          example: ARS
        sku:
          oneOf:
            - type: string
            - type: 'null'
          example: abc123
        slug:
          type: string
          example: producto-de-ejemplo
        active:
          type: boolean
          example: true
        rating:
          type: integer
          example: 0
        reviews:
          type: integer
          example: 0
        sales:
          type: integer
          example: 0
        tags:
          type: string
          example: ''
        weight:
          type: number
          example: 1
        length:
          type: number
          example: 40
        width:
          type: number
          example: 40
        height:
          type: number
          example: 40
        image:
          oneOf:
            - $ref: '#/components/schemas/ProductImage'
            - type: boolean
              enum:
                - false
        is_variant:
          type: boolean
          example: false
        has_variants:
          type: boolean
          example: false
        subscription_only:
          type: boolean
          example: false
        requires_shipping:
          type: boolean
          example: true
        volume_pricing_enabled:
          type: boolean
          example: false
        ecommerce_type:
          type: string
          example: retail
        free_shipping:
          type: boolean
          example: false
        require_login:
          type: boolean
          example: false
        double_opt_in:
          type: boolean
          example: true
        weight_unit:
          type: string
          example: kg
        vendor:
          oneOf:
            - type: string
            - type: 'null'
        stock_management:
          type: boolean
          example: false
        sales_channel:
          type: object
          description: Mapa de canales de venta donde la clave es el ID del canal.
          additionalProperties:
            $ref: '#/components/schemas/ProductSalesChannelItem'
        is_buyable:
          type: boolean
          example: true
        published:
          type: boolean
          example: true
        categories:
          type: array
          items: {}
          example: []
      additionalProperties: true
    ProductImage:
      type: object
      required:
        - id
        - file_name
        - source
        - order
      properties:
        id:
          type: integer
          example: 10254
        file_name:
          type: string
          example: WGwJyW_615605ac1da50.jpg
        source:
          type: string
          example: >-
            http://cdn.example.com/develop/business/265/products/WGwJyW_615605ac1da50.jpg
        order:
          type: integer
          example: 1
      additionalProperties: true
    ProductSalesChannelItem:
      type: object
      required:
        - id
        - name
        - is_buyable
      properties:
        id:
          type: integer
          example: 257
        name:
          type: string
          example: Garden Dreams 3
        is_buyable:
          type: boolean
          example: true
      additionalProperties: true
    ProductGetResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/ProductDetail'
      additionalProperties: true
    ProductDetail:
      allOf:
        - $ref: '#/components/schemas/Product'
        - type: object
          properties:
            description:
              oneOf:
                - type: string
                - type: 'null'
              description: Descripción HTML del producto.
              example: <p>Una descripcion impresionante</p>
            images:
              type: array
              items:
                $ref: '#/components/schemas/ProductImage'
            category:
              oneOf:
                - type: object
                - type: 'null'
              description: Puede venir null.
            seller:
              oneOf:
                - type: object
                - type: 'null'
            variants:
              oneOf:
                - type: boolean
                  enum:
                    - false
                - type: array
                  items: {}
              description: En este ejemplo viene false, pero puede variar.
            related_products:
              type: array
              items: {}
              example: []
            stock_warehouses:
              type: array
              items: {}
              example: []
            default_variant:
              oneOf:
                - type: boolean
                - type: object
            metafields:
              oneOf:
                - type: object
                - type: 'null'
            by_business_gateways:
              oneOf:
                - type: boolean
                - type: object
            promotional_video:
              oneOf:
                - type: boolean
                - type: object
            customers_permissions:
              type: array
              items: {}
              example: []
            welcome_email_message:
              oneOf:
                - type: string
                - type: 'null'
          additionalProperties: true
    CoursesListResponse:
      allOf:
        - type: object
          required:
            - status
            - data
          properties:
            status:
              type: string
              example: OK
            data:
              type: array
              items:
                $ref: '#/components/schemas/Course'
        - $ref: '#/components/schemas/Pagination'
      additionalProperties: true
    CourseCategory:
      type: object
      required:
        - id
        - name
        - slug
      properties:
        id:
          type: integer
          example: 1206
        name:
          type: string
          example: Cursos online
        slug:
          type: string
          example: cursos-online
      additionalProperties: true
    Course:
      type: object
      required:
        - id
        - business_id
        - type
        - product_id
        - status
        - language
        - name
        - creation_date
        - slug
        - images
        - total_rating
        - total_reviews
        - access_type
        - completion_certificate
        - forum_enabled
        - total_enrollments
      properties:
        id:
          type: integer
          example: 11939
        business_id:
          type: integer
          example: 265
        type:
          type: string
          example: online
          description: Tipo de curso.
        product_id:
          type: integer
          example: 11939
        code:
          oneOf:
            - type: string
            - type: 'null'
          example: null
        status:
          type: string
          example: published
          description: Estado del curso (por ejemplo published, draft).
        language:
          type: string
          example: es
        name:
          type: string
          example: Curso desde Mobile
        creation_date:
          type: string
          example: '2020-09-23 18:35:16'
        description:
          oneOf:
            - type: string
            - type: 'null'
          example: null
        slug:
          type: string
          example: curso-desde-mobile
        release_date:
          oneOf:
            - type: string
            - type: 'null'
          example: null
        categories:
          oneOf:
            - type: array
              items:
                $ref: '#/components/schemas/CourseCategory'
            - type: 'null'
          example: null
        image:
          oneOf:
            - $ref: '#/components/schemas/ProductImage'
            - type: 'null'
          example: null
        images:
          type: array
          items:
            $ref: '#/components/schemas/ProductImage'
          example: []
        total_rating:
          type: integer
          example: 0
        total_reviews:
          type: integer
          example: 0
        access_type:
          type: string
          example: free
          description: Tipo de acceso (free / paid).
        completion_certificate:
          type: boolean
          example: false
        forum_enabled:
          type: boolean
          example: false
        total_enrollments:
          type: integer
          example: 5
      additionalProperties: true
    CourseGetResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/CourseDetail'
      additionalProperties: true
    CourseDetail:
      allOf:
        - $ref: '#/components/schemas/Course'
        - type: object
          required:
            - forum_category_id
            - access_type
            - sequential_progress
            - completion_certificate
            - forum_enabled
            - instructors
            - modules
            - discussions
            - subscriptions_billing_plans
          properties:
            requeriments:
              type: array
              example: null
              description: Requisitos del curso.
            target_students:
              type: array
              example: null
            learning_goals:
              type: array
              example: null
            forum_category_id:
              type: integer
              example: 0
            promotional_video:
              type: array
            sequential_progress:
              type: boolean
              example: false
            instructors:
              type: array
              items:
                type: object
              example: []
              description: En el ejemplo viene vacío; se deja genérico.
            modules:
              type: array
              items:
                $ref: '#/components/schemas/CourseModule'
            discussions:
              type: array
              items:
                $ref: '#/components/schemas/CourseDiscussion'
            subscriptions_billing_plans:
              type: array
              items:
                type: object
              example: []
              description: En el ejemplo viene vacío; se deja genérico.
            certificate:
              oneOf:
                - $ref: '#/components/schemas/CourseCertificate'
                - type: 'null'
      additionalProperties: true
    CourseModule:
      type: object
      required:
        - id
        - name
        - order
        - completion_certificate
        - lessons
      properties:
        id:
          type: integer
          example: 106
        name:
          type: string
          example: Modulo 1
        order:
          type: integer
          example: 1
        completion_certificate:
          type: boolean
          example: false
        lessons:
          type: array
          items:
            $ref: '#/components/schemas/CourseLesson'
      additionalProperties: true
    CourseLesson:
      type: object
      required:
        - id
        - name
        - url
        - content_type
        - content_duration
        - free_access
        - downloadable
        - order
      properties:
        id:
          type: integer
          example: 258
        name:
          type: string
          example: Clase
        url:
          type: string
          example: /curso/introduccion-a-huerta-organica/lesson/258
        content_type:
          type: string
          example: video
          description: Tipo de contenido (video, pdf, audio, multimedia, etc.)
        content_duration:
          type: string
          example: '124'
          description: Duración (en segundos) como string según API.
        free_access:
          type: boolean
          example: false
        downloadable:
          type: boolean
          example: false
        order:
          type: integer
          example: 1
        promotional_description:
          oneOf:
            - type: string
            - type: 'null'
          example: null
        promotional_video:
          oneOf:
            - type: string
            - type: 'null'
          example: null
      additionalProperties: true
    CourseDiscussion:
      type: object
      required:
        - id
        - title
        - slug
        - content
        - creation_date
        - modification_date
        - total_replies
        - public
        - answers_public
        - member
      properties:
        id:
          type: integer
          example: 143
        title:
          type: string
          example: Muy buen tema
        slug:
          type: string
          example: muy-buen-tema
        content:
          type: string
          example: ''
        creation_date:
          type: string
          example: '2022-10-07 18:37:56'
        modification_date:
          type: string
          example: '2022-10-07 18:37:56'
        total_replies:
          type: integer
          example: 0
        public:
          type: boolean
          example: true
        answers_public:
          type: boolean
          example: true
        member:
          $ref: '#/components/schemas/CourseDiscussionMember'
      additionalProperties: true
    CourseDiscussionMember:
      type: object
      required:
        - id
        - name
        - last_name
        - avatar_filename
      properties:
        id:
          type: integer
          example: 5783
        name:
          type: string
          example: Michael
        last_name:
          type: string
          example: Smith
        avatar_filename:
          oneOf:
            - type: string
            - type: 'null'
          example: >-
            https://cdn.example.com/develop/business/265/customers/265_avatar_615478fbbd029.png
      additionalProperties: true
    CourseCertificate:
      type: object
      required:
        - id
        - name
        - creation_date
        - config_data
        - template
      properties:
        id:
          type: integer
          example: 31
        name:
          type: string
          example: Primer certificado
        creation_date:
          type: string
          example: '2026-01-22 13:00:40'
        config_data:
          type: string
          example: >-
            {"current":"Dinamico","presets":{"Dinamico":{"general":{"show_logo":true,"background_color":"#46cc87"},"texts":{"title":"CERTIFICADO
            DE FINALIZACI\ÓN","pre_course_name":"Por completar
            satisfactoriamente el curso","final_text":""}}}}
          description: JSON serializado como string.
        template:
          $ref: '#/components/schemas/CourseCertificateTemplate'
      additionalProperties: true
    CourseCertificateTemplate:
      type: object
      required:
        - id
        - business_id
        - name
        - preview_image
        - folder
      properties:
        id:
          type: integer
          example: 15
        business_id:
          type: integer
          example: 0
        name:
          type: string
          example: Dinamico
        preview_image:
          type: string
          example: >-
            http://cdn.example.com/develop/learning/certificates/dinamico/preview.png
        folder:
          type: string
          example: http://cdn.example.com/develop/learning/certificates/dinamico/
      additionalProperties: true
    CourseEnrolledListResponse:
      allOf:
        - $ref: '#/components/schemas/Pagination'
        - type: object
          required:
            - status
            - data
          properties:
            status:
              type: string
              example: OK
            data:
              type: array
              items:
                $ref: '#/components/schemas/CourseEnrollment'
          additionalProperties: true
    CourseEnrollment:
      type: object
      required:
        - id
        - customer_id
        - name
        - last_name
        - email
        - creation_date
        - completed_date
        - is_completed
        - progress
        - rating
        - status
        - activation_date
        - expiration_date
        - data_source_type
      properties:
        id:
          type: integer
          example: 648
        customer_id:
          type: integer
          example: 40737
        name:
          type: string
          example: Michael
        last_name:
          oneOf:
            - type: string
            - type: 'null'
          example: Smith
        email:
          type: string
          example: customer3@example.com
        creation_date:
          type: string
          example: '2020-04-03 11:38:31'
        completed_date:
          oneOf:
            - type: string
            - type: 'null'
          example: '2020-08-28 11:44:10'
        is_completed:
          type: boolean
          example: false
        progress:
          type: integer
          example: 60
          description: Porcentaje de progreso (0-100).
        rating:
          type: string
          example: '5'
          description: Rating viene como string en la API.
        status:
          type: string
          example: paid
          description: Estado de la inscripción ej paid, free
        activation_date:
          type: string
          example: '2020-04-03 11:38:31'
        expiration_date:
          oneOf:
            - type: string
            - type: 'null'
          example: null
        data_source_type:
          type: string
          example: api
          description: Origen de la inscripción ej api, public_api, manual
        certificate_course_completion:
          oneOf:
            - type: string
            - type: 'null'
          example: >-
            http://cdn.example.com/develop/business/265/elearning_certificates/11779T31C40737H1598625850.pdf
      additionalProperties: true
    CustomerCoursesListResponse:
      allOf:
        - $ref: '#/components/schemas/Pagination'
        - type: object
          required:
            - status
            - data
          properties:
            status:
              type: string
              example: OK
            data:
              type: array
              items:
                $ref: '#/components/schemas/CourseWithEnrollment'
          additionalProperties: true
    CourseWithEnrollment:
      type: object
      required:
        - id
        - business_id
        - type
        - product_id
        - code
        - status
        - language
        - name
        - creation_date
        - description
        - slug
        - release_date
        - categories
        - image
        - images
        - total_rating
        - total_reviews
        - access_type
        - completion_certificate
        - forum_enabled
        - total_enrollments
        - days_until_expiry
        - enrollment
      properties:
        id:
          type: integer
          example: 21139
        business_id:
          type: integer
          example: 535
        type:
          type: string
          example: online
        product_id:
          type: integer
          example: 21139
        code:
          oneOf:
            - type: string
            - type: 'null'
          example: null
        status:
          type: string
          example: published
        language:
          type: string
          example: es
        name:
          type: string
          example: Curso huerta urbana y nuevas tecnologías en nutrición
        creation_date:
          type: string
          example: '2020-02-11 20:36:19'
        description:
          oneOf:
            - type: string
            - type: 'null'
          example: null
        slug:
          type: string
          example: huerta-urbana-y-nuevas-tecnologias-en-nutricion
        release_date:
          oneOf:
            - type: string
            - type: 'null'
          example: null
        categories:
          oneOf:
            - type: array
              items:
                $ref: '#/components/schemas/CourseCategory'
            - type: 'null'
          example:
            - id: 1000
              name: Huertas
              slug: huertas
        image:
          oneOf:
            - $ref: '#/components/schemas/CourseImage'
            - type: 'null'
        images:
          type: array
          items:
            $ref: '#/components/schemas/CourseImage'
        total_rating:
          type: number
          example: 4.66667
        total_reviews:
          type: integer
          example: 3
        access_type:
          type: string
          example: paid
        completion_certificate:
          type: boolean
          example: false
        forum_enabled:
          type: boolean
          example: true
        total_enrollments:
          type: integer
          example: 38
        days_until_expiry:
          oneOf:
            - type: boolean
            - type: 'null'
          example: false
        enrollment:
          $ref: '#/components/schemas/CourseEnrollmentMini'
      additionalProperties: true
    CourseImage:
      type: object
      required:
        - id
        - file_name
        - source
        - order
      properties:
        id:
          type: integer
          example: 26239
        file_name:
          type: string
          example: gNkY0D_5e85f2cd3948f.jpg
        source:
          type: string
          example: >-
            https://cdn.example.com/business/535/products/gNkY0D_5e85f2cd3948f.jpg
        order:
          type: integer
          example: 1
      additionalProperties: true
    CourseEnrollmentMini:
      type: object
      required:
        - id
        - progress
        - creation_date
        - is_completed
        - completed_date
        - status
      properties:
        id:
          type: integer
          example: 234471
        progress:
          type: integer
          example: 0
        creation_date:
          type: string
          example: '2020-12-30 16:13:23'
        is_completed:
          type: boolean
          example: false
        completed_date:
          oneOf:
            - type: string
            - type: 'null'
          example: null
        status:
          type: string
          example: free
      additionalProperties: true
    StatusResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          example: OK
    EnrollmentResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/Enrollment'
    Enrollment:
      type: object
      required:
        - id
        - creation_date
        - is_completed
        - progress
        - status
        - expired
        - customer
        - course
      properties:
        id:
          type: integer
          example: 1155
        creation_date:
          type: string
          example: '2026-02-22 09:14:28'
        completed_date:
          type:
            - string
            - 'null'
          example: null
        is_completed:
          type: boolean
        progress:
          type: integer
          example: 0
        rating:
          type: string
          example: '0'
        status:
          type: string
          enum:
            - free
            - paid
          example: free
        review_status:
          type: string
          example: pending
        expired:
          type: boolean
        activation_date:
          type:
            - string
            - 'null'
          example: '2026-02-22 15:52:54'
        expiration_date:
          type:
            - string
            - 'null'
          example: null
        current_lesson_id:
          type: integer
          example: 0
        customer:
          type: object
          required:
            - id
            - email
          properties:
            id:
              type: integer
            name:
              type: string
            last_name:
              type: string
            email:
              type: string
              format: email
        course:
          type: object
          required:
            - id
            - name
            - slug
          properties:
            id:
              type: integer
            name:
              type: string
            slug:
              type: string
            url:
              type: string
            image:
              anyOf:
                - $ref: '#/components/schemas/CourseImage'
                - type: 'null'
        certificates:
          anyOf:
            - type: array
              items:
                type: object
                additionalProperties: true
            - type: 'null'
    DownloadablesListResponse:
      allOf:
        - $ref: '#/components/schemas/Pagination'
        - type: object
          required:
            - status
            - data
          properties:
            status:
              type: string
              example: OK
            data:
              type: array
              description: Lista de descargables (si no hay, viene vacío).
              items:
                $ref: '#/components/schemas/Downloadable'
      additionalProperties: true
    Downloadable:
      type: object
      required:
        - id
        - hash
        - name
        - price
        - base_price
        - price_varies
        - price_visible
        - subscription_only
        - currency
        - ecommerce_type
        - slug
        - active
        - rating
        - reviews
        - sales
        - tags
        - egift
        - is_variant
        - has_variants
        - downloadable_free_access
        - downloadable_access
        - stock_management
        - sales_channel
        - is_buyable
        - published
        - categories
      properties:
        id:
          type: integer
          example: 11971
        hash:
          type: string
          example: gjjRbg
        name:
          type: string
          example: Test
        short_description:
          type:
            - string
            - 'null'
          example: null
        price:
          type: string
          example: '334.43'
        price_min:
          type:
            - string
            - 'null'
          example: null
        price_max:
          type:
            - string
            - 'null'
          example: null
        prices_list_key:
          type:
            - string
            - 'null'
          example: null
        base_price:
          type: string
          example: '334.43'
        price_varies:
          type: boolean
          example: false
        compare_at_price:
          type:
            - string
            - 'null'
          example: '335'
        price_visible:
          type: boolean
          example: false
        subscription_only:
          type: boolean
          example: false
        currency:
          type: string
          example: ARS
        ecommerce_type:
          type: string
          example: downloadable
        sku:
          type:
            - string
            - 'null'
          example: null
        slug:
          type: string
          example: test
        active:
          type: boolean
          example: true
        rating:
          type: number
          example: 0
        reviews:
          type: integer
          example: 0
        sales:
          type: integer
          example: 0
        tags:
          type: string
          example: ''
        image:
          description: Puede ser objeto o false cuando no hay imagen.
          oneOf:
            - $ref: '#/components/schemas/Image'
            - type: boolean
              enum:
                - false
        egift:
          type: boolean
          example: false
        is_variant:
          type: boolean
          example: false
        has_variants:
          type: boolean
          example: false
        downloadable_free_access:
          type: boolean
          example: false
        downloadable_access:
          type: boolean
          example: false
        vendor:
          type:
            - string
            - 'null'
          example: null
        stock_management:
          type: boolean
          example: false
        sales_channel:
          description: Puede venir como objeto con keys dinámicas o como array vacío.
          oneOf:
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/SalesChannelItem'
            - type: array
              items: {}
              example: []
        is_buyable:
          type: boolean
          example: false
        published:
          type: boolean
          example: true
        categories:
          type: array
          items: {}
          example: []
      additionalProperties: true
    SalesChannelItem:
      type: object
      required:
        - id
        - name
        - is_buyable
      properties:
        id:
          type: integer
          example: 257
        name:
          type: string
          example: Garden Dreams 3
        is_buyable:
          type: boolean
          example: false
      additionalProperties: true
    Image:
      type: object
      required:
        - id
        - file_name
        - source
        - order
      properties:
        id:
          type: integer
          example: 10158
        file_name:
          type: string
          example: gjjRbg_6062287e6309c.png
        source:
          type: string
          example: >-
            http://cdn.example.com/develop/business/265/products/gjjRbg_6062287e6309c.png
        order:
          type: integer
          example: 1
      additionalProperties: true
    DownloadableAccessByEmailRequest:
      type: object
      required:
        - customer
        - access_type
      properties:
        customer:
          type: object
          required:
            - email
          properties:
            email:
              type: string
              format: email
              example: customer4@example.com
            name:
              type: string
              example: John
            last_name:
              type: string
              example: Doe
          additionalProperties: true
        access_type:
          type: string
          enum:
            - free
            - paid
          example: free
      additionalProperties: true
    DownloadableAcquisitionsListResponse:
      allOf:
        - $ref: '#/components/schemas/Pagination'
        - type: object
          required:
            - status
            - data
          properties:
            status:
              type: string
              example: OK
            data:
              type: array
              items:
                $ref: '#/components/schemas/DownloadableAcquisition'
      additionalProperties: true
    DownloadableAcquisition:
      type: object
      required:
        - id
        - acquisition_type
        - status_id
        - creation_date
        - activation_date
        - customer
      properties:
        id:
          type: integer
          example: 138
        acquisition_type:
          type: string
          enum:
            - free
            - paid
          example: free
        status_id:
          type: string
          example: active
        data_source_type:
          type: string
          example: public_api
        creation_date:
          type: string
          example: '2026-02-18 19:51:14'
        activation_date:
          type: string
          example: '2026-02-18 19:51:14'
        customer:
          type: object
          required:
            - id
            - email
          properties:
            id:
              type: integer
              example: 41989
            name:
              type: string
              example: John
            last_name:
              type:
                - string
                - 'null'
              example: null
            email:
              type: string
              format: email
              example: customer5@example.com
            phone:
              type:
                - string
                - 'null'
              example: null
          additionalProperties: true
      additionalProperties: true
    DownloadableAcquisitionResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/DownloadableAcquisitionDetail'
      additionalProperties: true
    DownloadableAcquisitionDetail:
      type: object
      required:
        - id
        - acquisition_type
        - status_id
        - creation_date
        - activation_date
        - customer
        - product
      properties:
        id:
          type: integer
          example: 138
        acquisition_type:
          type: string
          enum:
            - free
            - paid
          example: free
        status_id:
          type: string
          example: active
        data_source_type:
          type: string
          example: public_api
        creation_date:
          type: string
          example: '2026-02-18 19:51:14'
        activation_date:
          type: string
          example: '2026-02-18 19:51:14'
        customer:
          $ref: '#/components/schemas/AcquisitionCustomerDetail'
        product:
          $ref: '#/components/schemas/AcquisitionProductDetail'
      additionalProperties: true
    AcquisitionCustomerDetail:
      type: object
      required:
        - id
        - email
      properties:
        id:
          type: integer
        name:
          type: string
        last_name:
          type:
            - string
            - 'null'
        email:
          type: string
          format: email
        creation_date:
          type: string
        update_date:
          type: string
        comment:
          type: string
        active:
          type: boolean
        is_guest:
          type: boolean
        birthdate:
          type:
            - string
            - 'null'
        has_password:
          type: boolean
        stage:
          type: string
        avatar_filename:
          type:
            - string
            - 'null'
        identification:
          type:
            - string
            - 'null'
        identification_type:
          type:
            - string
            - 'null'
        company:
          type:
            - string
            - 'null'
        tax_treatment:
          type:
            - string
            - 'null'
        tax_id_type:
          type:
            - string
            - 'null'
        tax_id_number:
          type:
            - string
            - 'null'
        language:
          type: string
        member_id:
          type: integer
        autologin_hash:
          type: string
        is_seller:
          type: boolean
      additionalProperties: true
    AcquisitionProductDetail:
      type: object
      required:
        - id
        - ecommerce_type
        - slug
        - name
        - active
      properties:
        id:
          type: integer
        ecommerce_type:
          type: string
          example: downloadable
        slug:
          type: string
        sku:
          type:
            - string
            - 'null'
        name:
          type: string
        active:
          type: boolean
        short_description:
          type:
            - string
            - 'null'
        image:
          oneOf:
            - $ref: '#/components/schemas/Image'
            - type: boolean
              enum:
                - false
      additionalProperties: true
    SessionsListResponse:
      type: object
      required:
        - status
        - data
        - countFiltered
        - count
        - previous
        - current
        - pages
        - next
      properties:
        status:
          type: string
          example: OK
        data:
          type: array
          description: Lista de sesiones (si no hay, viene vacío).
          items:
            $ref: '#/components/schemas/Session'
        countFiltered:
          oneOf:
            - type: integer
            - type: string
          example: '1'
        count:
          oneOf:
            - type: integer
            - type: string
          example: '1'
        previous:
          type: integer
          example: 1
        current:
          type: integer
          example: 1
        pages:
          type: integer
          example: 1
        next:
          type: integer
          example: 1
      additionalProperties: true
    Session:
      type: object
      required:
        - id
        - hash
        - name
        - price
        - base_price
        - price_varies
        - price_visible
        - currency
        - ecommerce_type
        - slug
        - active
      properties:
        id:
          type: integer
          example: 13468
        hash:
          type: string
          example: WLAjZg
        name:
          type: string
          example: Sesión impresionante
        short_description:
          type:
            - string
            - 'null'
        price:
          type: string
          example: '2000'
        price_min:
          type:
            - string
            - 'null'
        price_max:
          type:
            - string
            - 'null'
        prices_list_key:
          type:
            - string
            - 'null'
        base_price:
          type: string
          example: '2000'
        price_varies:
          type: boolean
          example: false
        compare_at_price:
          type:
            - string
            - 'null'
        price_visible:
          type: boolean
          example: true
        currency:
          type: string
          example: ARS
        ecommerce_type:
          type: string
          enum:
            - session
          example: session
        sku:
          type:
            - string
            - 'null'
        slug:
          type: string
          example: sesin-impresionante
        active:
          type: boolean
          example: true
        rating:
          type: number
          example: 0
        reviews:
          type: integer
          example: 0
        sales:
          type: integer
          example: 0
        tags:
          type: string
          example: ''
        image:
          oneOf:
            - $ref: '#/components/schemas/Image'
            - type: boolean
              enum:
                - false
        egift:
          type: boolean
          example: false
        is_variant:
          type: boolean
          example: false
        has_variants:
          type: boolean
          example: false
        session_free_access:
          type: boolean
          example: false
        session_calendar_link:
          type: string
          example: https://calendly.com/johndoe/test
        session_welcome_message:
          type:
            - string
            - 'null'
        vendor:
          type:
            - string
            - 'null'
        stock_management:
          type: boolean
          example: false
        sales_channel:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SalesChannelItem'
        is_buyable:
          type: boolean
          example: true
        published:
          type: boolean
          example: true
        categories:
          type: array
          items: {}
          example: []
      additionalProperties: true
    SubscriptionsListResponse:
      type: object
      required:
        - status
        - data
        - countFiltered
        - count
        - previous
        - current
        - pages
        - next
      properties:
        status:
          type: string
          example: OK
        data:
          type: array
          description: Lista de suscripciones (si no hay, viene vacío).
          items:
            $ref: '#/components/schemas/SubscriptionProduct'
        countFiltered:
          oneOf:
            - type: integer
            - type: string
          example: '1'
        count:
          oneOf:
            - type: integer
            - type: string
          example: '1'
        previous:
          type: integer
          example: 1
        current:
          type: integer
          example: 1
        pages:
          type: integer
          example: 1
        next:
          type: integer
          example: 1
      additionalProperties: true
    SubscriptionProduct:
      type: object
      required:
        - id
        - hash
        - name
        - price
        - base_price
        - price_varies
        - price_visible
        - currency
        - ecommerce_type
        - slug
        - active
      properties:
        id:
          type: integer
          example: 13890
        hash:
          type: string
          example: p1EEBp
        name:
          type: string
          example: suscripcion
        short_description:
          type:
            - string
            - 'null'
        price:
          type: string
          example: '0'
        price_min:
          type:
            - string
            - 'null'
        price_max:
          type:
            - string
            - 'null'
        prices_list_key:
          type:
            - string
            - 'null'
        base_price:
          type: string
          example: '0'
        price_varies:
          type: boolean
          example: false
        compare_at_price:
          type:
            - string
            - 'null'
        price_visible:
          type: boolean
          example: true
        currency:
          type: string
          example: ARS
        ecommerce_type:
          type: string
          enum:
            - subscription
          example: subscription
        sku:
          type:
            - string
            - 'null'
        slug:
          type: string
          example: suscripcion
        active:
          type: boolean
          example: true
        rating:
          type: number
          example: 0
        reviews:
          type: integer
          example: 0
        sales:
          type: integer
          example: 0
        tags:
          type: string
          example: ''
        image:
          oneOf:
            - $ref: '#/components/schemas/Image'
            - type: boolean
              enum:
                - false
        egift:
          type: boolean
          example: false
        is_variant:
          type: boolean
          example: false
        has_variants:
          type: boolean
          example: true
        vendor:
          type:
            - string
            - 'null'
        stock_management:
          type: boolean
          example: false
        subscription_kpis:
          $ref: '#/components/schemas/SubscriptionKpis'
        sales_channel:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SalesChannelItem'
        is_buyable:
          type: boolean
          example: true
        published:
          type: boolean
          example: true
        categories:
          type: array
          items: {}
          example: []
      additionalProperties: true
    SubscriptionKpis:
      type: object
      required:
        - currencies
        - active
        - paid
        - trial
        - past_due
        - new_paid
      properties:
        currencies:
          type: array
          items:
            type: string
          example: []
        active:
          type: integer
          example: 0
        paid:
          type: integer
          example: 0
        trial:
          type: integer
          example: 0
        past_due:
          type: integer
          example: 0
        new_paid:
          type: integer
          example: 0
      additionalProperties: true
    SubscriptionSubscribersListResponse:
      type: object
      required:
        - status
        - data
        - countFiltered
        - count
        - previous
        - current
        - pages
        - next
      properties:
        status:
          type: string
          example: OK
        data:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionSubscriber'
        countFiltered:
          oneOf:
            - type: integer
            - type: string
          example: 32
        count:
          oneOf:
            - type: integer
            - type: string
          example: '32'
        previous:
          type: integer
          example: 1
        current:
          type: integer
          example: 1
        pages:
          type: integer
          example: 2
        next:
          type: integer
          example: 2
      additionalProperties: true
    SubscriptionSubscriber:
      type: object
      required:
        - id
        - status
        - active
        - stats
        - product
        - subscription
        - customer
      properties:
        id:
          type: integer
          example: 2903
        status:
          type: string
          example: inactive
        active:
          type: boolean
          example: false
        stats:
          $ref: '#/components/schemas/SubscriptionSubscriberStats'
        product:
          $ref: '#/components/schemas/SubscriptionVariantProduct'
        status_change_date:
          type:
            - string
            - 'null'
          example: '2026-02-22 23:40:27'
        current_period_start:
          type:
            - string
            - 'null'
          example: '2025-09-11 15:16:01'
        current_period_end:
          type:
            - string
            - 'null'
          example: '2025-10-11 15:16:01'
        start_date:
          type:
            - string
            - 'null'
          example: '2026-02-22 23:40:27'
        payment_status:
          type:
            - string
            - 'null'
          example: pending
        is_trial:
          type: boolean
          example: false
        trial_period_end_date:
          type:
            - string
            - 'null'
          example: '2026-02-22 23:40:27'
        billing_type:
          type:
            - string
            - 'null'
          example: charge_automatically
        schedule_type:
          type:
            - string
            - 'null'
          example: monthly
        currency:
          type:
            - string
            - 'null'
          example: ARS
        currency_symbol:
          type:
            - string
            - 'null'
          example: $
        total_amount:
          type:
            - string
            - 'null'
          example: '22000'
        has_payment_source:
          type:
            - boolean
            - 'null'
          example: false
        payment_attempts:
          type: integer
          example: 0
        next_payment_attempt:
          type:
            - string
            - 'null'
        has_payment_attempts_left:
          type:
            - boolean
            - 'null'
        subscription:
          $ref: '#/components/schemas/SubscriptionPaymentSnapshot'
        customer:
          $ref: '#/components/schemas/CustomerMini'
      additionalProperties: true
    SubscriptionSubscriberStats:
      type: object
      required:
        - trials
        - trials_limit
      properties:
        trials:
          type: integer
          example: 0
        trials_limit:
          type: integer
          example: 1
      additionalProperties: true
    SubscriptionVariantProduct:
      type: object
      required:
        - id
        - ecommerce_type
        - slug
        - name
        - active
        - variant_id
        - product_id
        - product_name
        - variant_name
      properties:
        id:
          type: integer
          example: 13644
        ecommerce_type:
          type: string
          enum:
            - subscription
          example: subscription
        slug:
          type: string
          example: plan-integral
        sku:
          type:
            - string
            - 'null'
        name:
          type: string
          example: Membresia Holistica Yoga Studio (Plan integral)
        active:
          type: boolean
          example: true
        short_description:
          type:
            - string
            - 'null'
        variant_id:
          type: integer
          example: 13644
        product_id:
          type: integer
          example: 13643
        product_name:
          type: string
          example: Membresia Holistica Yoga Studio
        variant_name:
          type: string
          example: Plan integral
        image:
          oneOf:
            - $ref: '#/components/schemas/Image'
            - type: boolean
              enum:
                - false
      additionalProperties: true
    SubscriptionPaymentSnapshot:
      type: object
      required:
        - id
      properties:
        id:
          type: integer
          example: 2903
        status_change_date:
          type:
            - string
            - 'null'
        current_period_start:
          type:
            - string
            - 'null'
        current_period_end:
          type:
            - string
            - 'null'
        start_date:
          type:
            - string
            - 'null'
        payment_status:
          type:
            - string
            - 'null'
        is_trial:
          type:
            - boolean
            - 'null'
        trial_period_end_date:
          type:
            - string
            - 'null'
        billing_type:
          type:
            - string
            - 'null'
        schedule_type:
          type:
            - string
            - 'null'
        currency:
          type:
            - string
            - 'null'
        currency_symbol:
          type:
            - string
            - 'null'
        total_amount:
          type:
            - string
            - 'null'
        has_payment_source:
          type:
            - boolean
            - 'null'
        payment_attempts:
          type:
            - integer
            - 'null'
        next_payment_attempt:
          type:
            - string
            - 'null'
        has_payment_attempts_left:
          type:
            - boolean
            - 'null'
      additionalProperties: true
    CustomerMini:
      type: object
      required:
        - id
        - name
        - email
      properties:
        id:
          type: integer
          example: 41927
        name:
          type: string
          example: Anna
        last_name:
          type:
            - string
            - 'null'
          example: Laura
        email:
          type: string
          example: customer6@example.com
        phone:
          type:
            - string
            - 'null'
          example: +1 202 555 1003
      additionalProperties: true
    SubscriptionDetailResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/SubscriptionDetail'
      additionalProperties: false
    SubscriptionDetail:
      type: object
      required:
        - id
        - status
        - active
        - payment_status
      properties:
        id:
          type: integer
          example: 2903
        hash:
          type: string
          example: dgwndCoN8W
        number:
          type: string
          example: '38'
        status:
          type: string
          example: inactive
        active:
          type: boolean
          example: false
        payment_status:
          type: string
          example: pending
        next_payment_attempt:
          type:
            - string
            - 'null'
        payment_attempts:
          oneOf:
            - type: integer
            - type: string
          example: '0'
        next_invoice_date:
          type:
            - string
            - 'null'
        end_date:
          type:
            - string
            - 'null'
        automatic_renewal:
          type: boolean
          example: true
        creation_date:
          type: string
        trial_period_start_date:
          type:
            - string
            - 'null'
        trial_period_end_date:
          type:
            - string
            - 'null'
        billing_type:
          type: string
          example: charge_automatically
        current_period_start:
          type:
            - string
            - 'null'
        current_period_end:
          type:
            - string
            - 'null'
        installments:
          type: integer
          example: 1
        total_periods:
          type: integer
        total_paid_periods:
          type: integer
        activation_date:
          type:
            - string
            - 'null'
        days_until_due:
          type: integer
        authorization_required:
          type: boolean
        language_iso:
          type: string
          example: es
        cancellation_date:
          type:
            - string
            - 'null'
        cancellation_policy:
          type:
            - string
            - 'null'
        cancel_at:
          type:
            - string
            - 'null'
        pay_url:
          type:
            - string
            - 'null'
        is_trial:
          type: boolean
        is_free:
          type: boolean
        current_invoice:
          $ref: '#/components/schemas/SubscriptionInvoice'
        gateway:
          $ref: '#/components/schemas/PaymentGateway'
        billing_agreement:
          type:
            - object
            - 'null'
        external_plan_registered:
          type: boolean
        billing_plan:
          $ref: '#/components/schemas/BillingPlan'
        items:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionItem'
        total_items:
          type: integer
        currency:
          type: string
        currency_symbol:
          type: string
        pricing_period:
          $ref: '#/components/schemas/PricingPeriod'
        customer:
          $ref: '#/components/schemas/CustomerFull'
        sales_channel:
          $ref: '#/components/schemas/SalesChannel'
        history:
          type: array
          items:
            type: object
      additionalProperties: true
    SubscriptionInvoice:
      type: object
      required:
        - id
        - status
        - total_amount
      properties:
        id:
          type: integer
        hash:
          type: string
        number:
          type: string
        type:
          type: string
        status:
          type: string
        payment_status:
          type: string
        total_amount:
          type: string
        currency:
          type: string
        currency_symbol:
          type: string
        pay_url:
          type: string
        billing_type:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceItem'
      additionalProperties: true
    InvoiceItem:
      type: object
      required:
        - id
        - name
        - price
        - quantity
      properties:
        id:
          type: integer
        name:
          type: string
        price:
          type: string
        quantity:
          type: integer
        ecommerce_type:
          type: string
      additionalProperties: true
    BillingPlan:
      type: object
      required:
        - id
        - name
        - schedule_type
      properties:
        id:
          type: integer
        name:
          type: string
        code:
          type: string
        schedule_type:
          type: string
        billing_type:
          type: string
        authorization_required:
          type: boolean
        active:
          type: boolean
      additionalProperties: true
    SubscriptionItem:
      type: object
      required:
        - id
        - name
        - unit_price
        - quantity
      properties:
        id:
          type: integer
        name:
          type: string
        ecommerce_type:
          type: string
        slug:
          type: string
        variant_id:
          type: integer
        product_id:
          type: integer
        product_name:
          type: string
        variant_name:
          type: string
        quantity:
          type: integer
        unit_price:
          type: string
        price:
          type: string
      additionalProperties: true
    PaymentGateway:
      type: object
      required:
        - id
        - type
        - name
        - active
      properties:
        id:
          type: string
        type:
          type: string
        name:
          type: string
        active:
          type: boolean
        connected:
          type: boolean
      additionalProperties: true
    PricingPeriod:
      type: object
      properties:
        number:
          type: integer
        start_date:
          type: string
      additionalProperties: true
    CustomerFull:
      type: object
      required:
        - id
        - name
        - email
      properties:
        id:
          type: integer
        name:
          type: string
        last_name:
          type:
            - string
            - 'null'
        email:
          type: string
        phone:
          type:
            - string
            - 'null'
        active:
          type: boolean
        is_guest:
          type: boolean
        stage:
          type: string
      additionalProperties: true
    SalesChannel:
      type: object
      required:
        - id
        - name
        - type
      properties:
        id:
          type: integer
        business_id:
          type: integer
        name:
          type: string
        type:
          type: string
        slug:
          type: string
        domain:
          type: string
      additionalProperties: true
    EventListResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          type: array
          items:
            $ref: '#/components/schemas/EventListItem'
        countFiltered:
          oneOf:
            - type: integer
            - type: string
          example: '5'
        count:
          oneOf:
            - type: integer
            - type: string
          example: '5'
        previous:
          type: integer
          example: 1
        current:
          type: integer
          example: 1
        pages:
          type: integer
          example: 1
        next:
          type: integer
          example: 1
      additionalProperties: false
    EventListItem:
      type: object
      required:
        - id
        - name
        - ecommerce_type
        - slug
        - active
        - published
      properties:
        id:
          type: integer
          example: 101115
        hash:
          type: string
          example: W9LalX
        name:
          type: string
        short_description:
          type:
            - string
            - 'null'
        price:
          type: string
          example: '10000'
        price_min:
          type:
            - string
            - 'null'
        price_max:
          type:
            - string
            - 'null'
        prices_list_key:
          type:
            - string
            - 'null'
        base_price:
          type: string
        price_varies:
          type: boolean
        compare_at_price:
          type:
            - string
            - 'null'
        price_visible:
          type: boolean
        subscription_only:
          type: boolean
        currency:
          type: string
          example: ARS
        ecommerce_type:
          type: string
          example: event
        sku:
          type:
            - string
            - 'null'
        slug:
          type: string
        active:
          type: boolean
        rating:
          type: number
          example: 0
        reviews:
          type: integer
          example: 0
        sales:
          type: integer
          example: 0
        tags:
          type: string
          example: ''
        image:
          oneOf:
            - $ref: '#/components/schemas/ProductImage'
            - type: boolean
              example: false
        egift:
          type: boolean
        is_variant:
          type: boolean
        has_variants:
          type: boolean
        min_purchase_quantity:
          type: integer
          example: 1
        max_purchase_quantity:
          type:
            - integer
            - 'null'
        double_opt_in:
          type: boolean
        is_online:
          type: boolean
        location_type:
          type:
            - string
            - 'null'
          example: physical
        schedule_type:
          type: string
          example: daily
        timezone:
          type: string
          example: America/Argentina/Buenos_Aires
        start_date:
          type: string
          example: '2022-10-13'
        end_date:
          type: string
          example: '2022-10-20'
        from_time:
          type: string
          example: '10:00'
        to_time:
          type: string
          example: '12:00'
        start_datetime:
          type: string
          example: '2022-10-13 10:00:00'
        end_datetime:
          type: string
          example: '2022-10-20 12:00:00'
        sales_start:
          oneOf:
            - type: boolean
            - type: string
            - type: 'null'
          example: false
        sales_end:
          oneOf:
            - type: boolean
            - type: string
            - type: 'null'
          example: false
        total_days:
          type: integer
          example: 1
        schedule_visible:
          type: boolean
        instructions:
          type:
            - string
            - 'null'
        weekdays:
          type: array
          items: {}
        internal_version:
          type: string
          example: '2'
        capacity:
          oneOf:
            - type: integer
            - type: boolean
            - type: 'null'
          example: false
        days:
          type: array
          items: {}
        has_different_schedules:
          type: boolean
        location:
          oneOf:
            - $ref: '#/components/schemas/EventLocationOnline'
            - $ref: '#/components/schemas/EventLocationPhysical'
            - type: 'null'
        speakers:
          type: array
          items:
            $ref: '#/components/schemas/EventSpeaker'
        attendee_emails:
          type:
            - string
            - 'null'
        total_tickets:
          type: integer
        tickets_confirmed:
          type: integer
        tickets_open:
          type: integer
        tickets_cancelled:
          type: integer
        tickets_pending:
          type: integer
        vendor:
          type:
            - string
            - 'null'
        stock_management:
          type: boolean
        stock_overselling:
          type:
            - boolean
            - 'null'
        stock_available:
          type:
            - integer
            - 'null'
        stock_quantity_warning:
          type:
            - integer
            - 'null'
        stock_onhand:
          type:
            - integer
            - 'null'
        stock_committed:
          type:
            - integer
            - 'null'
        stock_incoming:
          type:
            - integer
            - 'null'
        sales_channel:
          oneOf:
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/SalesChannelMini'
            - type: array
              items: {}
            - type: 'null'
        is_buyable:
          type: boolean
        published:
          type: boolean
        categories:
          oneOf:
            - type: array
              items:
                $ref: '#/components/schemas/Category'
            - type: 'null'
      additionalProperties: true
    Category:
      type: object
      required:
        - id
        - name
        - slug
      properties:
        id:
          type: integer
        name:
          type: string
        slug:
          type: string
      additionalProperties: false
    SalesChannelMini:
      type: object
      required:
        - id
        - name
        - is_buyable
      properties:
        id:
          type: integer
        name:
          type: string
        is_buyable:
          type: boolean
      additionalProperties: false
    EventSpeaker:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        last_name:
          type:
            - string
            - 'null'
        nickname:
          type:
            - string
            - 'null'
        avatar_url:
          type:
            - string
            - 'null'
        total_courses:
          oneOf:
            - type: integer
            - type: string
        avatar_filename:
          type:
            - string
            - 'null'
        user_id:
          oneOf:
            - type: integer
            - type: string
      additionalProperties: true
    EventLocationOnline:
      type: object
      properties:
        join_url:
          type:
            - string
            - 'null'
        instructions:
          type:
            - string
            - 'null'
        visibility:
          type: string
          example: upon_event_start
      additionalProperties: true
    EventLocationPhysical:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        street:
          type:
            - string
            - 'null'
        number:
          type:
            - string
            - 'null'
        floor:
          type:
            - string
            - 'null'
        zip_code:
          type:
            - string
            - 'null'
        latitude:
          type:
            - number
            - 'null'
        longitude:
          type:
            - number
            - 'null'
        city:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
          additionalProperties: true
        state:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
          additionalProperties: true
        country:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            iso_code:
              type: string
          additionalProperties: true
        label:
          type:
            - string
            - 'null'
        map:
          type: object
          properties:
            url:
              type:
                - string
                - 'null'
            image:
              type: object
              properties:
                file_name:
                  type:
                    - string
                    - 'null'
                source:
                  type:
                    - string
                    - 'null'
              additionalProperties: true
          additionalProperties: true
        instructions:
          type:
            - string
            - 'null'
        visibility:
          type: string
          example: upon_event_start
      additionalProperties: true
    EventGetResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/EventListItem'
      additionalProperties: false
    EventVariantsResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          type: array
          items:
            $ref: '#/components/schemas/EventVariant'
      additionalProperties: false
    EventVariant:
      type: object
      required:
        - id
        - name
        - start_datetime
        - end_datetime
        - timezone
        - active
      properties:
        id:
          type: integer
          example: 109202
        name:
          type: string
          example: Viernes 10 de Junio 2022 14:30 hs.
        start_date:
          type: string
          example: '2022-06-10'
        end_date:
          type: string
          example: '2022-06-11'
        from_time:
          type: string
          example: '14:30'
        to_time:
          type: string
          example: '17:00'
        start_datetime:
          type: string
          example: '2022-06-10 14:30:00'
        end_datetime:
          type: string
          example: '2022-06-11 17:00:00'
        timezone:
          type: string
          example: America/Argentina/Buenos_Aires
        sales_start:
          oneOf:
            - type: boolean
            - type: string
            - type: 'null'
          example: false
        sales_end:
          oneOf:
            - type: boolean
            - type: string
            - type: 'null'
          example: false
        total_days:
          type: integer
          example: 2
        active:
          type: boolean
          example: true
        past_days:
          type: integer
          example: 2
        upcoming_days:
          type: integer
          example: 0
        last_day_datetime:
          type:
            - string
            - 'null'
        next_day_datetime:
          type:
            - string
            - 'null'
        stock_management:
          type: boolean
        stock_available:
          type: integer
        event_status:
          type: string
          example: ended
        total_tickets:
          type: integer
        tickets_confirmed:
          type: integer
        tickets_open:
          type: integer
        tickets_cancelled:
          type: integer
        tickets_pending:
          type: integer
        location:
          $ref: '#/components/schemas/EventLocationOnline'
      additionalProperties: true
    EventEnrollmentRequest:
      type: object
      required:
        - enrollment_type
      properties:
        enrollment_type:
          type: string
          enum:
            - paid
            - free
          example: paid
      additionalProperties: false
    EventEnrollByEmailRequest:
      type: object
      required:
        - customer
        - enrollment_type
      properties:
        customer:
          type: object
          required:
            - email
          properties:
            email:
              type: string
              format: email
              example: customer7@example.com
            name:
              type: string
              example: DARRIO
            last_name:
              type:
                - string
                - 'null'
              example: Perez
          additionalProperties: false
        enrollment_type:
          type: string
          enum:
            - paid
            - free
          example: paid
      additionalProperties: false
    EventTicketListResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          type: array
          items:
            $ref: '#/components/schemas/EventTicket'
        countFiltered:
          oneOf:
            - type: integer
            - type: string
          example: 11
        count:
          oneOf:
            - type: integer
            - type: string
          example: 1
        previous:
          type: integer
          example: 1
        current:
          type: integer
          example: 1
        pages:
          type: integer
          example: 1
        next:
          type: integer
          example: 1
      additionalProperties: false
    EventTicket:
      type: object
      required:
        - id
        - number
        - enrollment_type
        - attendee
        - creation_date
        - status
        - event
      properties:
        id:
          type: integer
          example: 2933925
        number:
          type: string
          example: '1'
        enrollment_type:
          type: string
          description: Tipo de inscripción en el evento.
          enum:
            - free
            - paid
            - unenrolled
          example: free
        attendee:
          $ref: '#/components/schemas/EventTicketAttendee'
        creation_date:
          type: string
          example: '2024-02-06 14:47:26'
        status:
          type: string
          description: Estado del ticket.
          example: confirmed
        data_source_type:
          type:
            - string
            - 'null'
          example: api
        order_hash:
          type:
            - string
            - 'null'
          example: JKpb92dwDo
        order:
          oneOf:
            - $ref: '#/components/schemas/EventTicketOrder'
            - type: 'null'
        price:
          type:
            - string
            - 'null'
          example: '10000'
        base_price:
          type:
            - string
            - 'null'
          example: '10000'
        event:
          $ref: '#/components/schemas/EventTicketEvent'
      additionalProperties: false
    EventTicketAttendee:
      type: object
      required:
        - role
        - name
        - email
      properties:
        role:
          type: string
          example: guest
        customer_id:
          type:
            - integer
            - 'null'
          example: 280154
        name:
          type: string
          example: Euge
        last_name:
          type:
            - string
            - 'null'
          example: Chielli
        email:
          type: string
          format: email
          example: customer8@example.com
        phone:
          type:
            - string
            - 'null'
          example: +1 202 555 1004
      additionalProperties: false
    EventTicketEvent:
      type: object
      required:
        - id
        - name
        - product_id
        - product_name
        - variant_name
        - is_variant
      properties:
        id:
          type: integer
          example: 223606
        name:
          type: string
          example: Workshop ... (Sábado 2 de Marzo 2024 09:30 hs.)
        product_id:
          type: integer
          example: 101115
        product_name:
          type: string
          example: Workshop de Marmolados...
        variant_name:
          type: string
          example: Sábado 2 de Marzo 2024 09:30 hs.
        is_variant:
          type: boolean
          example: true
      additionalProperties: false
    EventTicketOrder:
      type: object
      required:
        - hash
        - number
        - payment_status
        - status
        - currency
        - currency_symbol
        - gateway
        - total_tickets
      properties:
        hash:
          type: string
          example: JKpb92dwDo
        number:
          type: string
          example: '131'
        payment_status:
          type: string
          example: pending
        status:
          type: string
          example: open
        currency:
          type: string
          example: ARS
        currency_symbol:
          type: string
          example: $
        gateway:
          type: object
          required:
            - id
            - type
            - name
          properties:
            id:
              oneOf:
                - type: integer
                - type: string
              example: 16238
            type:
              type: string
              example: negotiable
            name:
              type: string
              example: Prueba
          additionalProperties: false
        total_tickets:
          type: integer
          example: 1
      additionalProperties: false
    EventTicketGetResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/EventTicketDetail'
      additionalProperties: false
    EventTicketDetail:
      type: object
      required:
        - id
        - number
        - enrollment_type
        - attendee
        - creation_date
        - status
        - event
      properties:
        id:
          type: integer
          example: 4071000
        number:
          type: string
          example: '2'
        enrollment_type:
          type: string
          enum:
            - free
            - paid
            - unenrolled
          example: paid
        attendee:
          $ref: '#/components/schemas/EventTicketAttendeeDetail'
        creation_date:
          type: string
          example: '2024-11-09 08:34:27'
        status:
          type: string
          example: confirmed
        data_source_type:
          type:
            - string
            - 'null'
          example: api
        event:
          $ref: '#/components/schemas/EventListItem'
        source:
          oneOf:
            - $ref: '#/components/schemas/SalesChannelSource'
            - type: 'null'
        order:
          oneOf:
            - $ref: '#/components/schemas/EventTicketOrderDetail'
            - type: 'null'
        price:
          type:
            - string
            - 'null'
          example: '10000'
        base_price:
          type:
            - string
            - 'null'
          example: '10000'
        total_tickets:
          oneOf:
            - type: integer
            - type: string
          example: '2'
      additionalProperties: false
    EventTicketAttendeeDetail:
      type: object
      required:
        - role
        - name
        - email
      properties:
        role:
          type: string
          example: guest
        customer_id:
          type:
            - integer
            - 'null'
          example: null
        name:
          type: string
          example: Sophia
        last_name:
          type:
            - string
            - 'null'
          example: Fay
        invited_by:
          oneOf:
            - $ref: '#/components/schemas/TicketInvitedBy'
            - type: 'null'
        email:
          type: string
          format: email
          example: customer9@example.com
      additionalProperties: false
    TicketInvitedBy:
      type: object
      required:
        - id
        - name
        - email
      properties:
        id:
          type: integer
          example: 380830
        name:
          type: string
          example: Anna
        last_name:
          type:
            - string
            - 'null'
          example: Rodriguez
        email:
          type: string
          format: email
          example: customer9@example.com
      additionalProperties: false
    EventScheduleDay:
      type: object
      required:
        - id
        - date
        - from_time
        - to_time
        - start_datetime
        - end_datetime
      properties:
        id:
          type: integer
          example: 153186
        date:
          type: string
          example: '2024-11-21'
        from_time:
          type: string
          example: '08:00'
        to_time:
          type: string
          example: '09:30'
        start_datetime:
          type: string
          example: '2024-11-21 08:00:00'
        end_datetime:
          type: string
          example: '2024-11-21 09:30:00'
        instructions:
          type:
            - string
            - 'null'
          example: null
        digital_content:
          type:
            - string
            - 'null'
          example: null
      additionalProperties: false
    EventLocation:
      type: object
      properties:
        join_url:
          type:
            - string
            - 'null'
          example: https://meet.example.com/mae-zrod-vuq
        instructions:
          type:
            - string
            - 'null'
          example: null
        visibility:
          type: string
          example: upon_event_start
      additionalProperties: false
    EventAttendeeEmailRule:
      type: object
      required:
        - id
        - type
        - schedule_type
        - interval
      properties:
        id:
          type: integer
          example: 7977
        type:
          type: string
          example: tickets.location_access
        schedule_type:
          type: string
          example: xminutes
        interval:
          type: string
          example: '2'
      additionalProperties: false
    SalesChannelSource:
      type: object
      required:
        - id
        - business_id
        - name
        - type
        - type_id
        - slug
        - public
        - checkout_id
        - domain
      properties:
        id:
          type: integer
          example: 525
        business_id:
          type: integer
          example: 535
        name:
          type: string
          example: Garden Dreams
        type:
          type: string
          example: '1'
        type_id:
          type: string
          example: '1'
        slug:
          type: string
          example: gardendreams
        public:
          type: boolean
          example: false
        checkout_id:
          type: integer
          example: 5
        domain:
          type: string
          example: https://store.example.com/
      additionalProperties: false
    EventTicketOrderDetail:
      type: object
      required:
        - hash
        - number
        - payment_status
        - status
        - currency
        - currency_symbol
        - gateway
      properties:
        hash:
          type: string
          example: KzpKEbQPgV
        number:
          type: string
          example: '191'
        payment_status:
          type: string
          example: paid
        status:
          type: string
          example: closed
        currency:
          type: string
          example: ARS
        currency_symbol:
          type: string
          example: $
        gateway:
          $ref: '#/components/schemas/PaymentGatewayDetail'
      additionalProperties: false
    PaymentGatewayDetail:
      type: object
      required:
        - id
        - type
        - name
        - active
        - connected
      properties:
        id:
          oneOf:
            - type: integer
            - type: string
          example: '26475'
        type:
          type: string
          example: bank_transfer
        creation_date:
          type: string
          example: '2024-05-10 08:51:15'
        update_date:
          type: string
          example: '2025-11-27 15:34:36'
        name:
          type: string
          example: Transferencia bancaria
        internal_name:
          type:
            - string
            - 'null'
          example: null
        description:
          type:
            - string
            - 'null'
          example: null
        instructions:
          type:
            - string
            - 'null'
          example: <p>Datos para hacer la transferencia.</p>...
        order:
          oneOf:
            - type: integer
            - type: string
          example: '26'
        active:
          type: boolean
          example: true
        connected:
          type: boolean
          example: true
      additionalProperties: false
security:
  - ApiKeyAuth: []
tags:
  - name: Orders
  - name: Customers
  - name: Physical Products
  - name: Courses
  - name: Downloadables
  - name: Sessions
  - name: Subscriptions
  - name: Events
paths:
  /orders:
    get:
      tags:
        - Orders
      summary: Listado de compras
      description: >
        Retorna el listado de compras realizadas en el negocio.

        Por defecto se retornan ordenadas por fecha de creación de forma
        descendente.

        Si no hay compras, `data` viene como `[]`.
      parameters:
        - $ref: '#/components/parameters/PageParam'
        - $ref: '#/components/parameters/LimitParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrdersListResponse'
  /orders/{order_id}:
    get:
      tags:
        - Orders
      summary: Detalles de una compra
      parameters:
        - $ref: '#/components/parameters/OrderId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderGetResponse'
        '400':
          description: Orden no encontrada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /customers:
    get:
      tags:
        - Customers
      summary: Listado de clientes
      description: |
        Retorna el listado de clientes del negocio.
        Paginación por query string (`page` y `limit`).
      parameters:
        - $ref: '#/components/parameters/PageParam'
        - $ref: '#/components/parameters/LimitParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomersListResponse'
  /customers/{customer_id}:
    get:
      tags:
        - Customers
      summary: Obtener cliente
      description: >-
        Devuelve la información de un cliente y datos relacionados (contacts,
        addresses, orders, etc.).
      parameters:
        - name: customer_id
          in: path
          required: true
          schema:
            type: integer
          example: 40737
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerGetResponse'
        '400':
          description: Error funcional
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Error de autenticación
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /products:
    get:
      tags:
        - Physical Products
      summary: Listar productos físicos
      description: >
        Lista productos físicos (ecommerce_type=retail).

        Para usar este endpoint, el negocio debe tener habilitada la solución de
        Productos Físicos.
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
            minimum: 1
          description: Cantidad de resultados por página.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
          description: Número de página.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductsListResponse'
        '400':
          description: Error funcional
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /products/{product_id}:
    get:
      tags:
        - Physical Products
      summary: Traer un producto físico por ID
      description: >
        Devuelve el detalle de un producto físico (ecommerce_type=retail).

        Requiere que el negocio tenga habilitada la solución de Productos
        Físicos.
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: integer
          example: 12181
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductGetResponse'
        '400':
          description: >-
            Error funcional (por ejemplo, producto no encontrado o solución no
            habilitada)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /learning/courses:
    get:
      tags:
        - Courses
      summary: Listar cursos online
      description: |
        Devuelve el listado de cursos online del negocio.
        Paginado por query string: limit (default 25) y page.
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
          example: 25
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          example: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoursesListResponse'
        '400':
          description: >-
            Error funcional (por ejemplo, producto no encontrado o solución no
            habilitada)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Error de autenticación
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /learning/courses/{course_id}:
    get:
      tags:
        - Courses
      summary: Traer un curso online
      parameters:
        - name: course_id
          in: path
          required: true
          schema:
            type: integer
          example: 11779
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CourseGetResponse'
        '400':
          description: Error funcional (salvo auth)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Error de autenticación
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /learning/courses/{course_id}/enrolled:
    get:
      tags:
        - Courses
      summary: Listado de inscriptos a un curso
      parameters:
        - name: course_id
          in: path
          required: true
          schema:
            type: integer
          example: 11779
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
          example: 25
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          example: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CourseEnrolledListResponse'
        '400':
          description: Error funcional (salvo auth)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Error de autenticación
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /learning/customers/{customer_id}/courses:
    get:
      tags:
        - Courses
      summary: Cursos en los que está inscripto un cliente
      parameters:
        - name: customer_id
          in: path
          required: true
          schema:
            type: integer
          example: 40737
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
          example: 25
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          example: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerCoursesListResponse'
        '400':
          description: Error funcional (salvo auth)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Error de autenticación
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /learning/courses/{course_id}/enrolled/{customer_id}:
    put:
      tags:
        - Courses
      summary: Enroll customer in course by id
      description: >
        Inscribe a un cliente en un curso online. El curso y el cliente deben
        existir.
      parameters:
        - name: course_id
          in: path
          required: true
          schema:
            type: integer
          description: ID del curso
        - name: customer_id
          in: path
          required: true
          schema:
            type: integer
          description: ID del cliente
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - enrollment_type
              properties:
                enrollment_type:
                  type: string
                  description: Tipo de inscripción
                  enum:
                    - free
                    - paid
      responses:
        '200':
          description: Cliente inscripto correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /learning/courses/{course_id}/enroll:
    post:
      tags:
        - Courses
      summary: Enroll customer in course by email
      description: >
        Inscribe a un cliente en un curso usando su email. Si el cliente no
        existe, se crea con los datos provistos.
      parameters:
        - name: course_id
          in: path
          required: true
          schema:
            type: integer
          description: ID del curso
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - customer
                - enrollment_type
              properties:
                customer:
                  type: object
                  required:
                    - email
                  properties:
                    email:
                      type: string
                      format: email
                      example: customer7@example.com
                    name:
                      type: string
                      example: DARRIO
                    last_name:
                      type: string
                      example: Perez
                enrollment_type:
                  type: string
                  description: Tipo de inscripción
                  enum:
                    - free
                    - paid
      responses:
        '200':
          description: Cliente inscripto correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /learning/customers/{customer_id}/courses/{course_id}/enrollment:
    get:
      tags:
        - Courses
      summary: Get customer enrollment in course
      description: |
        Obtiene la inscripción de un cliente en un curso específico.
      parameters:
        - name: customer_id
          in: path
          required: true
          schema:
            type: integer
          description: ID del cliente
        - name: course_id
          in: path
          required: true
          schema:
            type: integer
          description: ID del curso
      responses:
        '200':
          description: Inscripción encontrada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrollmentResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    /learning/customers/{customer_id}/courses/{course_id}/enrollment: null
    delete:
      tags:
        - Courses
      summary: Revoke customer enrollment in course
      description: |
        Revoca el acceso de un cliente a un curso específico.
      parameters:
        - name: customer_id
          in: path
          required: true
          schema:
            type: integer
          description: ID del cliente
        - name: course_id
          in: path
          required: true
          schema:
            type: integer
          description: ID del curso
      responses:
        '200':
          description: Acceso revocado correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /downloadables:
    get:
      tags:
        - Downloadables
      summary: List downloadables
      description: |
        Retorna el listado paginado de descargables del negocio.
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Listado de descargables
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadablesListResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /downloadables/{product_id}/customers/{customer_id}/access/{access_type}:
    put:
      tags:
        - Downloadables
      summary: Grant downloadable access to customer
      description: >
        Otorga acceso a un descargable a un cliente existente, indicando si el
        acceso es free o paid.
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: ID del descargable (product_id).
        - name: customer_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: ID del cliente.
        - name: access_type
          in: path
          required: true
          schema:
            type: string
            enum:
              - free
              - paid
          description: Tipo de acceso a otorgar.
      responses:
        '200':
          description: Acceso otorgado correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
              examples:
                ok:
                  value:
                    status: OK
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /downloadables/{product_id}/access:
    post:
      tags:
        - Downloadables
      summary: Grant downloadable access by email
      description: >
        Otorga acceso a un descargable creando/vinculando el cliente por email.
        El tipo de acceso se define en el body (free|paid).
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: ID del descargable (product_id).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DownloadableAccessByEmailRequest'
            examples:
              free:
                value:
                  customer:
                    email: customer4@example.com
                    name: John
                    last_name: Doe
                  access_type: free
      responses:
        '200':
          description: Acceso otorgado correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
              examples:
                ok:
                  value:
                    status: OK
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /downloadables/{product_id}/customers/{customer_id}/access/revoke:
    put:
      tags:
        - Downloadables
      summary: Revoke downloadable access by customer id
      description: Revoca el acceso de un cliente a un descargable.
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: ID del descargable (product_id).
        - name: customer_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: ID del cliente (customer_id).
      responses:
        '200':
          description: Acceso revocado correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
              examples:
                ok:
                  value:
                    status: OK
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /downloadables/{product_id}/acquisitions:
    get:
      tags:
        - Downloadables
      summary: List downloadable acquisitions
      description: |
        Retorna el listado paginado de clientes que adquirieron el descargable.
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: ID del descargable (product_id).
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Listado de adquisiciones
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadableAcquisitionsListResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /downloadables/acquisitions/{access_id}:
    get:
      tags:
        - Downloadables
      summary: Get downloadable acquisition
      description: Obtiene el detalle de una adquisición individual.
      parameters:
        - name: access_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: ID de la adquisición.
      responses:
        '200':
          description: Adquisición encontrada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadableAcquisitionResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /sessions:
    get:
      tags:
        - Sessions
      summary: List sessions
      description: >-
        Lista de productos del tipo sesión (requires solución de sesiones
        habilitada en el negocio).
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
      responses:
        '200':
          description: Listado de sesiones
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionsListResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /subscriptions:
    get:
      tags:
        - Subscriptions
      summary: List subscriptions
      description: Lista productos del tipo suscripción.
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
      responses:
        '200':
          description: Listado de suscripciones
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionsListResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /subscriptions/{product_id}/subscribers:
    get:
      tags:
        - Subscriptions
      summary: List subscription subscribers
      description: Lista los suscriptores de un producto de suscripción (paginado).
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: integer
            example: 13890
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
      responses:
        '200':
          description: Listado de suscriptores
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSubscribersListResponse'
        '400':
          description: Error de validación o negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /subscriptions/{subscription_id}:
    get:
      tags:
        - Subscriptions
      summary: Get subscription status
      description: Obtiene el estado completo de una suscripción específica.
      parameters:
        - name: subscription_id
          in: path
          required: true
          schema:
            type: integer
            example: 2903
      responses:
        '200':
          description: Subscription detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionDetailResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Subscription not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /events:
    get:
      tags:
        - Events
      summary: List events
      description: Retorna el listado paginado de eventos del negocio.
      responses:
        '200':
          description: Events list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventListResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /events/{event_id}:
    get:
      tags:
        - Events
      summary: Get event
      description: Obtiene un evento por id o hash.
      parameters:
        - name: event_id
          in: path
          required: true
          description: ID numérico o hash del evento.
          schema:
            type: string
          example: '101115'
      responses:
        '200':
          description: Event
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventGetResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Event not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /events/{event_id}/variants:
    get:
      tags:
        - Events
      summary: List event editions
      description: Retorna las ediciones (variants) de un evento.
      parameters:
        - name: event_id
          in: path
          required: true
          description: ID numérico o hash del evento.
          schema:
            type: string
          example: '101115'
      responses:
        '200':
          description: Event editions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventVariantsResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Event not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /events/{event_id}/enrolled/{customer_id}:
    put:
      tags:
        - Events
      summary: Enroll customer in event
      description: >
        Inscribe un cliente a un evento.


        - Si `event_id` corresponde al ID del evento principal, se inscribirá en
        la primera edición disponible.

        - Si `event_id` corresponde al ID de una edición (variant), se
        inscribirá en esa edición específica.
      parameters:
        - name: event_id
          in: path
          required: true
          description: ID del evento o ID de una edición.
          schema:
            type: integer
          example: 101115
        - name: customer_id
          in: path
          required: true
          schema:
            type: integer
          example: 42020
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventEnrollmentRequest'
      responses:
        '200':
          description: Enrollment successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
        '400':
          description: Validation or business error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Event or customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /events/{event_id}/enroll:
    post:
      tags:
        - Events
      summary: Enroll customer in event by email
      description: >
        Inscribe una persona a un evento utilizando su email.


        - Si `event_id` corresponde al ID del evento principal, se inscribirá en
        la primera edición disponible.

        - Si `event_id` corresponde al ID de una edición (variant), se
        inscribirá en esa edición específica.
      parameters:
        - name: event_id
          in: path
          required: true
          description: ID del evento o ID de una edición.
          schema:
            type: integer
          example: 101115
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventEnrollByEmailRequest'
      responses:
        '200':
          description: Enrollment successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
        '400':
          description: Validation or business error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Event not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /events/{event_id}/tickets:
    get:
      tags:
        - Events
      summary: List event tickets
      description: >
        Retorna el listado de personas inscriptas (tickets) a un evento.


        - Si `event_id` corresponde al ID del evento principal, devuelve tickets
        de la primera edición disponible (según lógica interna).

        - Si `event_id` corresponde al ID de una edición (variant), devuelve
        tickets de esa edición.
      parameters:
        - name: event_id
          in: path
          required: true
          description: ID del evento o de una edición.
          schema:
            type: integer
          example: 101115
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
          example: 1
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
          example: 50
      responses:
        '200':
          description: Tickets list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventTicketListResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Event not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /events/tickets/{ticket_id}:
    get:
      tags:
        - Events
      summary: Get event ticket
      description: Retorna un ticket (inscripción) individual por `ticket_id`.
      parameters:
        - name: ticket_id
          in: path
          required: true
          schema:
            type: integer
          example: 4071000
      responses:
        '200':
          description: Ticket detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventTicketGetResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Ticket not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /events/enrollments/{enrollment_id}/revoke:
    put:
      tags:
        - Events
      summary: Revoke event enrollment
      description: >
        Revoca (cancela) la inscripción a un evento a partir del
        `enrollment_id`.


        El ticket pasará a estado unenrolled según la lógica interna.
      parameters:
        - name: enrollment_id
          in: path
          required: true
          description: ID de la inscripción (ticket).
          schema:
            type: integer
          example: 4071000
      responses:
        '200':
          description: Enrollment revoked successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
        '400':
          description: Invalid request or business rule error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: API Key inválida o faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Enrollment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
