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

# Read Onboarding State

> The session's open invited onboardings oldest first (BR-08), each with
its steps and confirmed payment method, plus the shared fields the
wizard reads. Before answering, the onboardings are synced with the
customer's current state (a step met elsewhere is recorded; a
finished onboarding closes). Requires `customer-onboarding:read`.




## OpenAPI

````yaml GET /portal/customer/onboarding/state
openapi: 3.0.1
info:
  title: Portal Customer Onboarding API
  description: |
    The customer portal wizard over the session's open Maihue onboardings
    (maihue/onboarding D-01, D-04). The session must belong to the primary
    user of a person account or the legal representative of a company, of a
    `CHL_RUT` account, with at least one open onboarding that was invited.

    - Shared steps (consent and password per user, identity per account)
      complete in **every** open onboarding at once.
    - The payment step belongs to one onboarding: `payment/confirm` names it
      and stores the confirmed method on it.
    - The gate (`required`) is enforced only with the `maihue-onboarding`
      flag on; with it off the steps still work and nobody is redirected.
  version: '2026-10-21'
servers:
  - description: Production
    url: https://api.bbrands.io/api/v3
  - description: Certification
    url: https://certification.api.bbrands.io/api/v3
  - description: Development
    url: https://development.api.bbrands.io/api/v3
security:
  - bearerAuth: []
tags:
  - name: Portal Customer Onboarding
    description: Wizard state and steps of the session.
  - name: Onboarding Invitations (operator)
    description: Account-based invitation routes kept for Horizon Enterprise.
paths:
  /portal/customer/onboarding/state:
    get:
      tags:
        - Portal Customer Onboarding
      summary: Read the onboarding state
      description: |
        The session's open invited onboardings oldest first (BR-08), each with
        its steps and confirmed payment method, plus the shared fields the
        wizard reads. Before answering, the onboardings are synced with the
        customer's current state (a step met elsewhere is recorded; a
        finished onboarding closes). Requires `customer-onboarding:read`.
      operationId: customerOnboardingState
      responses:
        '200':
          description: Onboarding state
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CustomerOnboardingState'
                  message:
                    type: string
                  meta:
                    $ref: '#/components/schemas/Meta'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    CustomerOnboardingState:
      type: object
      properties:
        onboardings:
          type: array
          description: >-
            Open invited onboardings of the session user and account, oldest
            first.
          items:
            $ref: '#/components/schemas/CustomerOnboardingStateItem'
        required:
          type: boolean
          description: '`maihue-onboarding` on and some open onboarding still required.'
        invited:
          type: boolean
          description: At least one open invited onboarding exists.
        account_id:
          type: string
          format: uuid
        account_name:
          type: string
          nullable: true
        account_type:
          type: string
          nullable: true
        allowed_payment_methods:
          type: array
          items:
            type: string
            enum:
              - card
              - pac
        has_password:
          type: boolean
        has_payment_method:
          type: boolean
          description: >-
            A method counts under the onboarding payment policy (not the
            per-onboarding confirmation).
        identity_step:
          type: string
          enum:
            - done
            - required
        identity_validated:
          type: boolean
        is_primary_user:
          type: boolean
        legal_pending:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              url:
                type: string
              version:
                type: string
              version_id:
                type: string
                format: uuid
        payment_issue:
          type: string
          nullable: true
          enum:
            - none
            - toku
            - expired
            - revoked
            - kind_not_allowed
            - null
        redirect_success_url:
          type: string
        redirect_fail_url:
          type: string
    Meta:
      type: object
      properties:
        correlation:
          type: string
        status:
          type: integer
        timestamp:
          type: string
          format: date-time
        version:
          type: string
          nullable: true
    CustomerOnboardingStateItem:
      type: object
      properties:
        document_id:
          type: string
          format: uuid
        business_unit:
          type: object
          nullable: true
          properties:
            internal:
              type: string
              example: maihue_home
            name:
              type: string
        type:
          type: string
          nullable: true
          example: customer_activation
        status:
          type: string
          enum:
            - created
            - invited
            - in_progress
        required:
          type: boolean
          description: Some step of this onboarding is still missing.
        payment_method:
          type: string
          format: uuid
          nullable: true
        payment_method_confirmed_at:
          type: string
          format: date-time
          nullable: true
        steps:
          type: array
          items:
            type: object
            properties:
              step:
                type: string
                enum:
                  - consent
                  - identity
                  - payment_method
                  - password
              scope:
                type: string
                enum:
                  - user
                  - account
                  - onboarding
              status:
                type: string
                enum:
                  - pending
                  - completed
                  - skipped
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            errors:
              type: array
              items: {}
            message:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
  responses:
    Unauthorized:
      description: Missing or invalid session
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        `onboarding-not-invited`, `type-dni-not-supported`, not the recipient
        role, or `portal-customer-onboarding` off
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: '`onboarding-not-found` or the account does not exist'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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