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

# Accept Legal Versions

> Records the session user's acceptance of the current legal versions
for the account (with IP and user agent as evidence) and completes
the consent step of every open onboarding of the user and account.
Requires `customer-onboarding:consent`.




## OpenAPI

````yaml POST /portal/customer/onboarding/consent
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/consent:
    post:
      tags:
        - Portal Customer Onboarding
      summary: Accept the legal versions
      description: |
        Records the session user's acceptance of the current legal versions
        for the account (with IP and user agent as evidence) and completes
        the consent step of every open onboarding of the user and account.
        Requires `customer-onboarding:consent`.
      operationId: customerOnboardingConsent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - version_ids
              additionalProperties: false
              properties:
                version_ids:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    format: uuid
      responses:
        '200':
          description: Accepted versions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      accepted:
                        type: array
                        items:
                          type: string
                  message:
                    type: string
                  meta:
                    $ref: '#/components/schemas/Meta'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  schemas:
    Meta:
      type: object
      properties:
        correlation:
          type: string
        status:
          type: integer
        timestamp:
          type: string
          format: date-time
        version:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            errors:
              type: array
              items: {}
            message:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    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'
    Conflict:
      description: >-
        `password-step-not-ready`, `password-already-set`,
        `payment-method-not-selectable`, `legal-version-not-current` or a RUT
        mismatch
      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.