> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bevits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Consultar contexto de la cuenta

> Resumen de la tienda en una llamada: plataforma, moneda, idioma, canales conectados, flows y qué automatizaciones estándar ya existen, campañas recientes, tamaño de los segmentos RFM, plan, identidad de la marca y despliegues recientes.



## OpenAPI

````yaml /openapi.es.json get /v1/account-context
openapi: 3.1.0
info:
  title: API de Bevits
  version: 1.0.0
  description: >-
    API pública para consultar datos de CRM, compras y automatización de una
    organización de Bevits, crear automatizaciones como borrador para revisarlas
    y activarlas, crear campañas de WhatsApp Oficial como borrador y armar
    segmentos y etiquetas de clientes.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.bevits.com
    description: Producción
security:
  - bearerAuth: []
tags:
  - name: Sistema
    description: Disponibilidad de la API.
  - name: Identidad
    description: Identidad de la organización y de la clave API.
  - name: Clientes
    description: Clientes y sus relaciones.
  - name: Segmentos
    description: Segmentos de clientes.
  - name: Compras
    description: Compras importadas desde las integraciones.
  - name: Datos del CRM
    description: Etiquetas y definiciones de atributos.
  - name: Automatizaciones
    description: Flows de automatización.
  - name: Campañas
    description: Campañas de email.
  - name: Cuenta y marca
    description: Contexto de la cuenta, identidad de la marca e imágenes.
  - name: Recetas
    description: Automatizaciones listas creadas a partir de recetas, con deshacer.
  - name: Plantillas de email
    description: Creación e importación de plantillas de correo.
  - name: Eventos
    description: Eventos personalizados enviados por la tienda y sus tipos.
paths:
  /v1/account-context:
    get:
      tags:
        - Cuenta y marca
      summary: Consultar contexto de la cuenta
      description: >-
        Resumen de la tienda en una llamada: plataforma, moneda, idioma, canales
        conectados, flows y qué automatizaciones estándar ya existen, campañas
        recientes, tamaño de los segmentos RFM, plan, identidad de la marca y
        despliegues recientes.
      operationId: getAccountContext
      responses:
        '200':
          $ref: '#/components/responses/AccountContext'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  responses:
    AccountContext:
      description: Contexto de la cuenta.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccountContext'
    Unauthorized:
      description: Clave API ausente, inválida, expirada o revocada.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: authentication_error
              message: Invalid API key.
              request_id: req_07f6cdc3c20249d6afcd90b4
    RateLimited:
      description: Límite de solicitudes superado.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
    InternalError:
      description: Error inesperado en el servidor.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    AccountContext:
      type: object
      properties:
        object:
          type: string
          const: account_context
        store:
          type: object
          properties:
            name:
              type: string
            store_url:
              type:
                - string
                - 'null'
            platform:
              anyOf:
                - type: string
                  enum:
                    - nuvemshop
                    - shopify
                    - woocommerce
                - type: 'null'
            country_code:
              type:
                - string
                - 'null'
            currency:
              type: string
            timezone:
              type:
                - string
                - 'null'
            locale:
              type: string
            product_mode:
              type:
                - string
                - 'null'
            is_blocked:
              type: boolean
          required:
            - name
            - store_url
            - platform
            - country_code
            - currency
            - timezone
            - locale
            - product_mode
            - is_blocked
          additionalProperties: false
        channels:
          type: object
          properties:
            email_domain_verified:
              type: boolean
            whatsapp_unofficial_connected:
              type: boolean
            whatsapp_official_accounts:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            instagram:
              anyOf:
                - type: object
                  properties:
                    username:
                      type:
                        - string
                        - 'null'
                    is_active:
                      type: boolean
                    token_expires_at:
                      anyOf:
                        - type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                        - type: 'null'
                  required:
                    - username
                    - is_active
                    - token_expires_at
                  additionalProperties: false
                - type: 'null'
          required:
            - email_domain_verified
            - whatsapp_unofficial_connected
            - whatsapp_official_accounts
            - instagram
          additionalProperties: false
        flows:
          type: object
          properties:
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            active:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            inactive:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            draft:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            coverage:
              type: object
              properties:
                abandoned_checkout:
                  type: boolean
                cashback:
                  type: boolean
                post_purchase:
                  type: boolean
                winback:
                  type: boolean
              required:
                - abandoned_checkout
                - cashback
                - post_purchase
                - winback
              additionalProperties: false
              description: Qué automatizaciones estándar ya cubren los flows de la tienda.
            items:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^flw_[A-Za-z0-9_-]+$
                  name:
                    type:
                      - string
                      - 'null'
                  status:
                    type:
                      - string
                      - 'null'
                  trigger_event_type:
                    type:
                      - string
                      - 'null'
                required:
                  - id
                  - name
                  - status
                  - trigger_event_type
                additionalProperties: false
          required:
            - total
            - active
            - inactive
            - draft
            - items
          additionalProperties: false
        email_campaigns:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^emc_[A-Za-z0-9_-]+$
              name:
                type:
                  - string
                  - 'null'
              status:
                type:
                  - string
                  - 'null'
              sent_at:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: 'null'
            required:
              - id
              - name
              - status
              - sent_at
            additionalProperties: false
        has_draft_email_campaign:
          type: boolean
        rfm_segments:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              customers:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - name
              - customers
            additionalProperties: false
        subscription:
          anyOf:
            - type: object
              properties:
                plan:
                  type:
                    - string
                    - 'null'
                status:
                  type:
                    - string
                    - 'null'
                trial_end:
                  anyOf:
                    - type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                    - type: 'null'
                period_end:
                  anyOf:
                    - type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                    - type: 'null'
              required:
                - plan
                - status
                - trial_end
                - period_end
              additionalProperties: false
            - type: 'null'
        brand_kit:
          type: object
          properties:
            locale:
              type: string
            voice_tone:
              type:
                - string
                - 'null'
            vocabulary:
              type: array
              items:
                type: string
            primary_color:
              type: string
            logo_url:
              type:
                - string
                - 'null'
            persisted:
              type: boolean
            reviewed_at:
              anyOf:
                - type: string
                  format: date-time
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                - type: 'null'
          required:
            - locale
            - voice_tone
            - vocabulary
            - primary_color
            - logo_url
            - persisted
            - reviewed_at
          additionalProperties: false
        recent_deployments:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^rdp_[A-Za-z0-9_-]+$
              source:
                type: string
              status:
                type: string
                enum:
                  - applied
                  - rolled_back
              summary:
                type:
                  - string
                  - 'null'
              created_at:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            required:
              - id
              - source
              - status
              - summary
              - created_at
            additionalProperties: false
      required:
        - object
        - store
        - channels
        - flows
        - email_campaigns
        - rfm_segments
        - subscription
        - brand_kit
        - recent_deployments
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    RateLimitErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          required:
            - retry_after
          properties:
            retry_after:
              type: integer
              minimum: 1
              description: Segundos antes de volver a intentarlo.
    Error:
      type: object
      required:
        - type
        - message
        - request_id
      properties:
        type:
          type: string
          enum:
            - authentication_error
            - conflict
            - internal_error
            - invalid_request
            - not_found
            - permission_denied
            - rate_limited
            - validation_error
        code:
          type: string
          description: >-
            Motivo estable y legible por máquina dentro de type, como
            invalid_event_name. Presente cuando el error tiene un motivo con
            nombre.
        message:
          type: string
        param:
          type: string
          description: >-
            Ruta completa del campo con problema, como customer.email o
            events[3].name.
        suggestion:
          type: string
          description: Un valor que sería aceptado, cuando existe uno obvio.
        request_id:
          type: string
          pattern: ^req_[a-f0-9]{24}$
  headers:
    RetryAfter:
      description: Segundos antes de volver a intentarlo.
      schema:
        type: integer
        minimum: 1
    RateLimitLimit:
      description: Límite total de la ventana actual.
      schema:
        type: integer
        example: 600
    RateLimitRemaining:
      description: Solicitudes restantes en la ventana actual.
      schema:
        type: integer
        example: 599
    RateLimitReset:
      description: Instante UTC en que termina la ventana actual.
      schema:
        type: string
        format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: bvt_live_...
      description: Clave API creada en la configuración de la organización.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.