> ## 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.

# Retrieve Onboarding

> The onboarding with its account, business unit, recipient, lifecycle
dates, confirmed payment method and steps under the customer's
current state. Requires `maihue-onboarding:find-one`.




## OpenAPI

````yaml GET /maihue/onboarding/{document_id}
openapi: 3.0.1
info:
  title: Maihue Onboarding API
  description: |
    Onboardings of Maihue customers (maihue/onboarding). An onboarding asks
    one recipient (the primary user of a person account, or the legal
    representative of a company) to finish the steps of its type for one
    account and business unit: consent, identity, payment method and
    password for `customer_activation`.

    - An account may have several onboardings, but only **one open per
      business unit**: a second operator create answers
      `409 onboarding-already-open` with the open one in
      `error.metadata.onboarding`, and a drip create answers the open one
      with `onboarding.already_open: true` (the customer stays
      provisioned). A terminal status (`completed`, `expired`, `cancelled`)
      frees the slot.
    - Creating never sends anything. Inviting sends the invitation email
      through the notification core (gateway `horizon-maihue-onboarding`,
      `external_id` `<onboarding>:invitation:<n>`) and links it to the
      onboarding.
    - Statuses: `created` → `invited` → `in_progress` (magic link consumed or
      first step done) → `completed`; any open status → `expired` (hourly
      cron, when the type sets an expiry) or `cancelled`.
    - Only `CHL_RUT` accounts onboard.

    Callers authenticate with a user JWT or an API key (`x-api-key`, ADR
    0105); the key that created an onboarding is recorded on it
    (`api_key`, `created_origin: api_key`).
  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: []
  - apiKeyAuth: []
tags:
  - name: Maihue Onboarding
    description: Create, list, invite and cancel onboardings.
paths:
  /maihue/onboarding/{document_id}:
    get:
      tags:
        - Maihue Onboarding
      summary: Retrieve an onboarding
      description: |
        The onboarding with its account, business unit, recipient, lifecycle
        dates, confirmed payment method and steps under the customer's
        current state. Requires `maihue-onboarding:find-one`.
      operationId: maihueOnboardingFindOne
      parameters:
        - $ref: '#/components/parameters/DocumentId'
      responses:
        '200':
          description: Onboarding
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/MaihueOnboardingDetail'
                  message:
                    type: string
                  meta:
                    $ref: '#/components/schemas/Meta'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    DocumentId:
      name: document_id
      in: path
      required: true
      description: Onboarding identifier.
      schema:
        type: string
        format: uuid
  schemas:
    MaihueOnboardingDetail:
      allOf:
        - $ref: '#/components/schemas/MaihueOnboarding'
        - type: object
          properties:
            required:
              type: boolean
              description: Some step is still missing.
            steps:
              type: array
              items:
                $ref: '#/components/schemas/MaihueOnboardingStep'
            payment_method_detail:
              type: object
              nullable: true
              properties:
                document_id:
                  type: string
                  format: uuid
                alias:
                  type: string
                  nullable: true
                status:
                  type: string
                  nullable: true
                type:
                  type: string
                  nullable: true
    Meta:
      type: object
      properties:
        correlation:
          type: string
          description: Request correlation id; quote it when reporting an issue.
        status:
          type: integer
        timestamp:
          type: string
          format: date-time
        version:
          type: string
          nullable: true
    MaihueOnboarding:
      type: object
      properties:
        document_id:
          type: string
          format: uuid
        account:
          type: object
          properties:
            document_id:
              type: string
              format: uuid
            dni:
              type: string
              nullable: true
            name:
              type: string
              nullable: true
            type:
              type: string
              nullable: true
        business_unit:
          $ref: '#/components/schemas/CatalogRef'
        type:
          $ref: '#/components/schemas/CatalogRef'
        status:
          allOf:
            - $ref: '#/components/schemas/CatalogRef'
            - type: object
              properties:
                is_terminal:
                  type: boolean
        recipient_user:
          type: object
          properties:
            document_id:
              type: string
              format: uuid
            email:
              type: string
              nullable: true
            name:
              type: string
              nullable: true
        payment_method:
          type: string
          format: uuid
          nullable: true
          description: Method the customer confirmed in this onboarding.
        payment_method_confirmed_at:
          type: string
          format: date-time
          nullable: true
        invited_at:
          type: string
          format: date-time
          nullable: true
        activated_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
        expires_at:
          type: string
          format: date-time
          nullable: true
        cancelled_at:
          type: string
          format: date-time
          nullable: true
        cancel_reason:
          type: string
          nullable: true
        closed_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
          nullable: true
        created_origin:
          type: string
          enum:
            - api_key
            - system
            - user
        api_key:
          type: string
          format: uuid
          nullable: true
    MaihueOnboardingStep:
      type: object
      properties:
        step:
          type: string
          enum:
            - consent
            - identity
            - payment_method
            - password
        scope:
          type: string
          enum:
            - user
            - account
            - onboarding
          description: >-
            `user` and `account` steps are shared by every open onboarding of
            that user or account; `onboarding` steps belong to one.
        status:
          type: string
          enum:
            - pending
            - completed
            - skipped
        position:
          type: integer
        required:
          type: boolean
        completed_at:
          type: string
          format: date-time
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code.
            errors:
              type: array
              items: {}
              description: |
                Details. The onboarding reasons (`account-not-found`,
                `onboarding-already-open`, `onboarding-closed`,
                `type-dni-not-supported`, `no-eligible-recipient`,
                `recipient-not-linked`, `invitation-not-enqueued`) and the
                validation messages are listed here.
            message:
              type: string
            metadata:
              type: object
              additionalProperties: true
        meta:
          $ref: '#/components/schemas/Meta'
    CatalogRef:
      type: object
      nullable: true
      properties:
        document_id:
          type: string
          format: uuid
        internal:
          type: string
        name:
          type: string
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing, invalid, revoked or expired credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The caller lacks the permission, or `portal-customer-onboarding` is off
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: '`onboarding-not-found`, `account-not-found` or a missing catalog value'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: |
        Rate limit of the API key exceeded: a sliding window of
        `rate_limit_per_minute` requests per key (600 when the key sets
        none). Wait `Retry-After` seconds; `X-RateLimit-*` carry the budget.
      headers:
        Retry-After:
          description: Seconds until the window frees a request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: A `secret` API key, `hzk_<env>_<prefix>_<secret>`.

````

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