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

# Get affiliations for all merchants

> Requires the merchant.affiliation.list permission.

Returns a paginated list of affiliations for all merchants that belong to the authenticated organization,
with how many affiliations each status holds under the other filters (`counts`).




## OpenAPI

````yaml /api-spec.yaml get /v1/merchants/affiliations
openapi: 3.1.0
info:
  title: Rinne API
  version: 1.0.0
  description: >
    **Rinne API** is a robust payment platform that offers integration with
    multiple payment providers.


    ## Authentication


    The API uses API Key authentication via the `x-api-key` header. Each company
    has a unique key to access resources.


    ## Response Format


    All responses follow a consistent format:

    - **Success**: Returns the requested data directly

    - **Error**: Returns an `error` object with detailed information


    ## Pagination


    Endpoints that return lists support pagination through parameters:

    - `page`: Page number (default: 1)

    - `limit`: Items per page (default: 20, maximum: 100)


    ## Supported Providers


    The API supports multiple payment providers:

    - **Rinne**: Internal provider

    - **Celcoin**: PIX integration and other financial services


    ## Raw Card Data (PCI Endpoints)


    Card credential fields (`card_data.number`, `card_data.cvv`,
    `card_data.network_token`,

    `card_data.cryptogram`, and the 3DS `card.number`) must always be sent
    encrypted —

    values start with the `ev:` prefix. Plaintext values are rejected with

    `400 VALIDATION_ERROR` on every host.


    There are two ways to send encrypted values:

    - **rinne-js**: card forms and wallet buttons (Apple Pay / Google Pay)
    encrypt
      credentials client-side before they leave the browser.
    - **PCI API host**: server-to-server integrations that handle raw card data
    must call
      `https://pci.api.rinne.com.br/core` (sandbox: `https://pci.api-sandbox.rinne.com.br/core`)
      instead of the regular host. This endpoint encrypts `number` and `cvv` in transit
      before the request reaches the API; all other fields pass through unchanged.

    The PCI host serves only transaction creation and 3DS session creation (both
    the

    self and merchant variants); use the regular host for everything else.
  contact:
    name: Rinne API Support
    email: suporte@rinne.com.br
servers:
  - url: https://api-sandbox.rinne.com.br/core
    description: Sandbox
  - url: https://api.rinne.com.br/core
    description: Production
security: []
tags:
  - name: System
    description: System and API health endpoints
  - name: Tap-on-Phone
    description: Access-token minting for the Tap-on-Phone SDK (called from your backend)
  - name: Management
    description: >-
      Merchant management endpoints - create, list, get specific, overview,
      update
  - name: Transactions
    description: Transaction operations for merchants - create, list, overview, refunds
  - name: Affiliations
    description: Affiliation management for merchants
  - name: Biometric Verifications
    description: Biometric verifications of your merchants' contacts
  - name: Onboarding Requirements
    description: What your merchants must prove to a provider, and how far along they are
  - name: Onboarding Documents
    description: Documents uploaded for your merchants
  - name: KYC
    description: KYC check history of your merchants
  - name: Banking
    description: Banking operations for merchants - balance, cashout, statements
  - name: Bank Accounts
    description: Bank account management for merchants
  - name: Pix Keys
    description: PIX key management for merchants
  - name: Company Transactions
    description: Direct transaction management and query endpoints for companies
  - name: Companies
    description: Company management
  - name: Company Affiliations
    description: Payment provider affiliation management
  - name: Company Biometric Verifications
    description: Biometric verifications of the company contact
  - name: Company Onboarding Requirements
    description: What the company must prove to a provider, and how far along it is
  - name: Company Onboarding Documents
    description: Documents the company uploads for its onboarding
  - name: Company Banking
    description: Company banking endpoints (balance, etc.)
  - name: Company Pix
    description: Company PIX key management
  - name: Company Ledger
    description: Company ledger entry query endpoints
  - name: Company Disputes
    description: Company dispute query endpoints
  - name: Company Receivables
    description: Contract effects on the company's own receivables
  - name: Ledger
    description: Ledger entry query endpoints (company and merchants)
  - name: Disputes
    description: Dispute query endpoints for an organization's merchants
  - name: Receivables
    description: Contract effects on an organization's merchants' receivables
  - name: Cards
    description: Stored card management (self and merchant)
  - name: Webhooks
    description: Endpoints for receiving webhooks from external providers
  - name: Pricing
    description: Fee and cost policy management for transaction pricing
  - name: Users
    description: User management endpoints
  - name: Roles
    description: Role management endpoints
  - name: Permissions
    description: Permission management endpoints
paths:
  /v1/merchants/affiliations:
    get:
      tags:
        - Affiliations
      summary: Get affiliations for all merchants
      description: >
        Requires the merchant.affiliation.list permission.


        Returns a paginated list of affiliations for all merchants that belong
        to the authenticated organization,

        with how many affiliations each status holds under the other filters
        (`counts`).
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number for pagination
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Number of affiliations per page
        - in: query
          name: company_id
          schema:
            type: string
          description: Filter by company ID
        - in: query
          name: document_number
          schema:
            type: string
          description: |
            Filter by the merchant's CPF or CNPJ, formatted or not. Returns the
            affiliations of every merchant with that document number.
          example: 12.345.678/0001-95
        - in: query
          name: status
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - PENDING
                - FAILED
                - ACTIVE
                - PROCESSING
                - BLOCKED
                - PENDING_APPROVAL
                - WAITING_DOCUMENTS
                - PROCESSING_DOCUMENTS
                - REJECTED
                - INVALID_SETTLEMENT_BANK_ACCOUNT
                - CLOSED
                - CANCELLED
          description: >-
            Comma-separated list of statuses to filter by (e.g.,
            ACTIVE,PROCESSING)
        - in: query
          name: provider
          schema:
            type: string
            enum:
              - CELCOIN
              - RINNE
              - CAPPTA
          description: >-
            Filter by provider (accepts lowercase and uppercase, returns
            uppercase)
        - in: query
          name: enabled
          schema:
            type: boolean
          description: Filter by enabled status
        - in: query
          name: bank_account_operational_status
          schema:
            type: string
            enum:
              - REGULAR
              - JUDICIAL_BLOCK
          description: >
            Filter by the operational status of the affiliation's bank account.
            Use

            `JUDICIAL_BLOCK` to list only the merchants under an ongoing
            judicial

            blockage. Accepts lowercase and uppercase. Omit to return all
            merchants.
          example: JUDICIAL_BLOCK
        - in: query
          name: sort
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - created_at
                - updated_at
                - '-created_at'
                - '-updated_at'
          description: >-
            Multi-field sort string (e.g., -created_at). Allowed fields:
            created_at, updated_at
          example: '-created_at'
      responses:
        '200':
          description: Paginated list of affiliations for all merchants
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AffiliationResponse'
                  pagination:
                    $ref: '#/components/schemas/PaginationResponse'
                  counts:
                    type: object
                    description: >
                      How many affiliations each status holds, across pages. The
                      counts apply every filter of

                      the request except `status`: with
                      `status=WAITING_DOCUMENTS&provider=CELCOIN`,

                      `counts.status.REJECTED` is how many affiliations
                      `status=REJECTED&provider=CELCOIN`

                      would list. A status no affiliation holds counts `0`.
                    properties:
                      status:
                        type: object
                        properties:
                          PENDING:
                            type: integer
                            minimum: 0
                            example: 0
                          FAILED:
                            type: integer
                            minimum: 0
                            example: 0
                          ACTIVE:
                            type: integer
                            minimum: 0
                            example: 184
                          PROCESSING:
                            type: integer
                            minimum: 0
                            example: 3
                          BLOCKED:
                            type: integer
                            minimum: 0
                            example: 0
                          PENDING_APPROVAL:
                            type: integer
                            minimum: 0
                            example: 1
                          WAITING_DOCUMENTS:
                            type: integer
                            minimum: 0
                            example: 12
                          PROCESSING_DOCUMENTS:
                            type: integer
                            minimum: 0
                            example: 0
                          REJECTED:
                            type: integer
                            minimum: 0
                            example: 2
                          INVALID_SETTLEMENT_BANK_ACCOUNT:
                            type: integer
                            minimum: 0
                            example: 0
                          CLOSED:
                            type: integer
                            minimum: 0
                            example: 0
                          CANCELLED:
                            type: integer
                            minimum: 0
                            example: 5
                        required:
                          - PENDING
                          - FAILED
                          - ACTIVE
                          - PROCESSING
                          - BLOCKED
                          - PENDING_APPROVAL
                          - WAITING_DOCUMENTS
                          - PROCESSING_DOCUMENTS
                          - REJECTED
                          - INVALID_SETTLEMENT_BANK_ACCOUNT
                          - CLOSED
                          - CANCELLED
                    required:
                      - status
                required:
                  - data
                  - pagination
                  - counts
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorResponse'
        '403':
          description: Insufficient permissions to access this resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AffiliationResponse:
      description: Transformed affiliation data returned by the API
      allOf:
        - $ref: '#/components/schemas/AffiliationResponseFields'
        - type: object
          properties:
            onboarding_documents:
              type: array
              description: List of onboarding documents associated with this affiliation
              items:
                $ref: '#/components/schemas/AffiliationOnboardingDocumentResponse'
            requirements:
              type: array
              description: >
                What the company has to present to this affiliation's provider,
                each with its status, as

                `GET /v1/onboarding-requirements` lists them. The affiliation's
                creation fills in the provider's

                base set, so an affiliation created before Rinne ran that
                provider's onboarding lists them once

                the company's requirements are first read. Empty for a provider
                whose onboarding Rinne does not

                run.
              items:
                $ref: '#/components/schemas/OnboardingRequirementResponse'
          required:
            - onboarding_documents
            - requirements
    PaginationResponse:
      type: object
      required:
        - page
        - limit
        - total
        - totalPages
        - hasNext
        - hasPrev
      properties:
        page:
          type: integer
          example: 1
        limit:
          type: integer
          example: 20
        total:
          type: integer
          example: 50
        totalPages:
          type: integer
          example: 3
        hasNext:
          type: boolean
          example: true
        hasPrev:
          type: boolean
          example: false
    AuthenticationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: AUTHENTICATION_ERROR
            message:
              type: string
              example: Authentication required to access this resource
            status:
              type: integer
              example: 401
            details:
              type: object
              properties:
                reason:
                  type: string
                  example: Invalid API key
            path:
              type: string
              example: /companies/me
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    AuthorizationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: AUTHORIZATION_ERROR
            message:
              type: string
              example: You need 'admin' permissions to access this resource
            status:
              type: integer
              example: 403
            path:
              type: string
              example: /companies
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    InternalServerErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: INTERNAL_SERVER_ERROR
            message:
              type: string
              example: An unexpected error occurred
            status:
              type: integer
              example: 500
            path:
              type: string
              example: /companies
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    AffiliationResponseFields:
      type: object
      description: >
        The affiliation fields every shape of it shares (`AffiliationResponse`,
        the webhook

        `AffiliationEntitySnapshot`), all but `onboarding_documents` and
        `requirements`, whose items differ between them
      properties:
        id:
          type: string
          example: 123e4567-e89b-12d3-a456-426614174002
        provider:
          type: string
          enum:
            - CELCOIN
            - RINNE
            - CAPPTA
          description: Payment provider name
          example: CELCOIN
        provider_id:
          type:
            - string
            - 'null'
          description: ID in provider system
          example: prov_123456
        soft_descriptor:
          type:
            - string
            - 'null'
          description: Soft descriptor for transactions
          example: MYSTORE
        merchant_id:
          type: string
          description: Merchant ID in provider
          example: '12345678'
        mcc:
          type: string
          description: Merchant Category Code
          example: '5411'
        cost_policy_id:
          type:
            - string
            - 'null'
          description: Associated cost policy ID
          example: 123e4567-e89b-12d3-a456-426614174003
        status:
          type: string
          enum:
            - PENDING
            - ACTIVE
            - PROCESSING
            - BLOCKED
            - PENDING_APPROVAL
            - WAITING_DOCUMENTS
            - PROCESSING_DOCUMENTS
            - REJECTED
            - FAILED
            - INVALID_SETTLEMENT_BANK_ACCOUNT
            - CLOSED
            - CANCELLED
          description: >
            Current affiliation status. `WAITING_DOCUMENTS` means the company
            has something to complete

            before the provider can decide; `CANCELLED` means the attempt was
            cancelled while waiting

            (`cancellation_reason` says why) and is over, so a new affiliation
            can be created. At a provider

            whose onboarding Rinne runs, an affiliation with nothing left to
            complete stays `PENDING`, not yet

            sent, while another attempt for the same document number is in
            progress at that provider, or one

            cancelled for it may still be open there (at Celcoin, up to 33 days
            after it was submitted); it is

            sent once that attempt is settled.
          example: ACTIVE
        provider_status_code:
          type:
            - string
            - 'null'
          description: Provider-specific status code
          example: '200'
        provider_status_message:
          type:
            - string
            - 'null'
          description: >
            Provider-specific status message. An onboarding status change that
            carries no reason

            keeps the previous text, so it may predate `status`, except a move
            into `ACTIVE`, which

            clears it; a block, closure or reactivation of the account behind
            the affiliation

            replaces it, with an empty string when it carries none.
          example: Merchant activated successfully
        provider_metadata:
          type:
            - object
            - 'null'
          nullable: true
          description: Provider-specific metadata
          example: {}
        enabled:
          type: boolean
          description: Whether the affiliation is enabled
          example: true
        company_id:
          type: string
          description: Associated company ID
          example: a3dbd0c2-9f79-4f86-8caa-47779b3f2793
        onboarding_url:
          type:
            - string
            - 'null'
          description: >
            Link where the company completes what the provider asked for.
            Returned only while `status`

            is `WAITING_DOCUMENTS`; null in every other status, including after
            a cancellation. For a

            provider whose onboarding Rinne runs, it is the Rinne onboarding
            link, which

            `POST /v1/affiliations/{id}/onboarding-link` replaces.
          example: https://provider.com/onboard/12345
        onboarding_url_expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >
            When `onboarding_url` stops working. Null while no expiry applies to
            the link, and in every

            status other than `WAITING_DOCUMENTS`.
          example: '2026-11-06T12:00:00.000Z'
        cancellation_reason:
          type:
            - string
            - 'null'
          enum:
            - REQUESTED
            - EXPIRED
            - null
          description: >
            Why the affiliation is `CANCELLED`, null in every other status.
            `REQUESTED` when the company

            cancelled it; `EXPIRED` when the deadline to complete the
            requirements passed.
          example: null
        rejection_reviewed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >
            When the provider's rejection of this attempt was reviewed and
            translated into the actions

            the company has to take. Null until then, and on an attempt that was
            never rejected. Set

            with an empty `rejection_reasons` when Rinne's review found nothing
            for the company to do.
          example: null
        rejection_reasons:
          type: array
          description: >
            What Rinne's review of the provider's rejection found, in the order
            the reviewer wrote

            them: what was wrong, what the company does about it, and the
            document or requirement each

            reason concerns. Empty until the rejection is reviewed
            (`rejection_reviewed_at`), when the

            review found nothing for the company to do, and on an attempt that
            was never rejected.

            `affiliation.requirements-changed` announces it.
          items:
            $ref: '#/components/schemas/AffiliationRejectionReason'
        bank_account:
          anyOf:
            - allOf:
                - $ref: '#/components/schemas/AffiliationBankAccount'
            - type: 'null'
          description: Associated bank account information (created by provider)
        settlement_bank_accounts:
          type: array
          items:
            $ref: '#/components/schemas/SettlementBankAccountResponse'
          description: Settlement bank accounts for this affiliation.
        allowed_capture_methods:
          type: array
          items:
            type: string
            enum:
              - EMV
              - MAGSTRIPE
              - ECOMMERCE
              - CONTACTLESS_ICC
          description: Allowed capture methods
          example:
            - ECOMMERCE
        allowed_payment_methods:
          type: array
          items:
            type: string
            enum:
              - CREDIT_CARD
              - DEBIT_CARD
              - PIX
              - BOLEPIX
          description: Allowed payment methods
          example:
            - PIX
        organization_id:
          type: string
          description: Associated organization ID
          example: a3dbd0c2-9f79-4f86-8caa-47779b3f2793
        anticipation_type:
          type: string
          enum:
            - AUTOMATIC
            - SPOT
          description: Anticipation type for the affiliation
          example: AUTOMATIC
        anticipation_days:
          type: integer
          minimum: 1
          description: Number of days for anticipation
          example: 1
        gateway_mode:
          type: boolean
          description: >-
            Whether this is a gateway-mode affiliation (Rinne acts as a pure
            capture gateway; no settlement, splits, or ledger entries)
          example: false
        company_snapshot:
          type:
            - object
            - 'null'
          description: >-
            Snapshot of the company data (with contact) sent to the provider:
            taken at affiliation creation, refreshed from the company within
            minutes of a change while an affiliation that was never submitted
            waits for documents, and refreshed when the affiliation is
            submitted, so a submitted affiliation carries the company as it was
            at submission. Only included when include_company_snapshot=true
            query parameter is set.
        created_at:
          type: string
          format: date-time
          description: Creation timestamp in ISO 8601 format
          example: '2023-01-01T12:00:00.000Z'
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp in ISO 8601 format
          example: '2023-01-01T12:00:00.000Z'
      required:
        - id
        - provider
        - merchant_id
        - status
        - enabled
        - company_id
        - allowed_capture_methods
        - allowed_payment_methods
        - organization_id
        - gateway_mode
        - onboarding_url
        - onboarding_url_expires_at
        - cancellation_reason
        - rejection_reviewed_at
        - rejection_reasons
        - created_at
        - updated_at
    AffiliationOnboardingDocumentResponse:
      description: >-
        A document an affiliation sent to its provider (metadata, without
        download URL)
      allOf:
        - $ref: '#/components/schemas/AffiliationOnboardingDocumentSnapshot'
        - type: object
          required:
            - onboarding_document_id
            - type
    OnboardingRequirementResponse:
      description: >-
        One thing a company must prove to a provider, with its status derived
        from the evidence Rinne holds
      allOf:
        - $ref: '#/components/schemas/OnboardingRequirementSnapshot'
        - type: object
          required:
            - rejection_reasons
            - accepted_content_types
    AffiliationRejectionReason:
      type: object
      description: >
        One reason of the provider's rejection, as Rinne staff translated it
        (ADR-0040 § 8): what was

        wrong (`code`), in words for the company (`message`), and what the
        company does about it

        (`action`), pointing at the document or requirement it concerns.
      properties:
        code:
          type: string
          enum:
            - DOCUMENT_UNREADABLE
            - DOCUMENT_DATA_MISMATCH
            - DOCUMENT_EXPIRED
            - DOCUMENT_MISSING
            - FACEMATCH_FAILED
            - COMPANY_DATA_MISMATCH
            - COMPLIANCE_REFUSAL
            - OTHER
          description: What was wrong, in Rinne's vocabulary
          example: DOCUMENT_UNREADABLE
        message:
          type: string
          description: The reason in words, written by the reviewer for the company
          example: >-
            The back of the CNH is cut off; send a photo showing the whole
            document.
        action:
          type: string
          enum:
            - RESUBMIT_DOCUMENT
            - NEW_REQUIREMENT
            - FIX_COMPANY_DATA
            - NONE
          description: >
            What the company does: `RESUBMIT_DOCUMENT` sends the evidence again
            (the refused evidence no

            longer counts at this provider, so its requirement reads `REJECTED`
            until new evidence meets it,

            or stays `SATISFIED` when other evidence still does);
            `NEW_REQUIREMENT` meets the requirement in

            `requirement_id`, added by the review; `FIX_COMPANY_DATA` corrects
            the company's data and

            creates a new attempt; `NONE` nothing, the reason is informational.
          example: RESUBMIT_DOCUMENT
        requirement_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            The requirement the reason concerns (the one refused, or the one
            added); null when it names a document or nothing
          example: null
        onboarding_document_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >
            The id of the document refused (`GET
            /v1/onboarding-documents/{id}`); null when the reason names a

            requirement or nothing. A front or back of a CNH, an RG or an RNE
            (not a request's attachment)

            also refuses the other side the affiliation sent for the same
            person, the newest one sent before

            this side was replaced (the newest one overall if it was never
            replaced), under this reason's code

            unless another reason names that side: that side's `rejections[]`
            lists the refusal, and its `status`

            moves as for any refusal: `NOT_VALIDATED` becomes `REJECTED`, and so
            does a `SHARED` reference even

            when `VALIDATED`; any other `VALIDATED` or a `SUPERSEDED` document
            keeps its status.
          example: 4f6c1e8a-9b2d-4e7f-8a3c-1d5e6f7a8b9c
      required:
        - code
        - message
        - action
        - requirement_id
        - onboarding_document_id
    AffiliationBankAccount:
      type: object
      description: Bank account information for affiliation
      required:
        - id
        - bank_code
        - branch_number
        - account_number
        - account_holder_name
        - account_holder_document_number
        - ispb
        - operational_status
        - operational_status_occurred_at
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: Bank account ID
          example: a2da4238-bdc2-47f9-b866-246cc87212d5
        bank_code:
          type: string
          description: Bank code
          example: '001'
        branch_number:
          type: string
          description: Branch number
          example: '1234'
        account_number:
          type: string
          description: Account number
          example: '567890'
        account_holder_name:
          type: string
          description: Account holder name
          example: John Doe
        account_holder_document_number:
          type: string
          description: CPF (11 digits) or CNPJ (14 characters; alphanumeric CNPJ supported)
          example: '81146431023'
        ispb:
          type: string
          description: ISPB code
          example: '00000000'
        operational_status:
          type: string
          enum:
            - REGULAR
            - JUDICIAL_BLOCK
          description: >
            Operational status of the account. `JUDICIAL_BLOCK` means the
            balance is

            restricted by a court order; `REGULAR` means it operates normally.
          example: REGULAR
        operational_status_occurred_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >
            Provider event time of the last operational status change, or null
            if the

            status has never changed.
          example: '2025-06-26T17:07:31.495Z'
        created_at:
          type: string
          format: date-time
          description: When the bank account was created
          example: '2025-06-26T17:07:31.495Z'
        updated_at:
          type: string
          format: date-time
          description: When the bank account was last updated
          example: '2025-06-26T17:07:31.495Z'
    SettlementBankAccountResponse:
      type: object
      description: Settlement bank account information in affiliation response
      required:
        - id
        - branch_number
        - account_number
        - account_type
        - account_holder_name
        - account_holder_document_number
        - ispb
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Settlement bank account ID
          example: b3eb5349-cec3-48fa-c977-357dd98323e6
        branch_number:
          type: string
          description: Branch number
          example: '1234'
        account_number:
          type: string
          description: Account number
          example: '567890'
        account_type:
          type: string
          enum:
            - CHECKING
            - SAVINGS
            - SALARY
            - PAYMENT
          description: Type of bank account
          example: CHECKING
        account_holder_name:
          type: string
          description: Account holder name
          example: John Doe
        account_holder_document_number:
          type: string
          description: CPF (11 digits) or CNPJ (14 characters; alphanumeric CNPJ supported)
          example: '81146431023'
        ispb:
          type: string
          description: ISPB code
          example: '00000000'
        status:
          type: string
          enum:
            - ACTIVE
            - PENDING_VALIDATION
            - VALIDATION_FAILED
            - FAILED
            - DISABLED
          description: >
            Settlement bank account validation status.

            ACTIVE: currently in use for settlements.

            PENDING_VALIDATION: sent to provider, awaiting async validation.

            VALIDATION_FAILED: provider rejected the bank account during async
            validation.

            FAILED: unrecoverable error (provider 4xx or timeout).

            DISABLED: superseded by a newly validated account.
          example: ACTIVE
        created_at:
          type: string
          format: date-time
          example: '2023-01-01T00:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2023-01-01T00:00:00Z'
    AffiliationOnboardingDocumentSnapshot:
      type: object
      description: >
        A document an affiliation sent, as the webhook
        `AffiliationEntitySnapshot` carries it: the

        shape of `AffiliationOnboardingDocumentResponse`, except that
        `onboarding_document_id` and

        `type` are absent on an event written before they were added
      properties:
        id:
          type: string
          description: >
            This send of the document to the affiliation's provider, not the
            document's own id

            (`onboarding_document_id`). `GET
            /v1/affiliations/{affiliationId}/onboarding-documents/{documentId}`
            (and its

            `/v1/merchants/{merchantId}` twin) accepts either this `id` or the
            `onboarding_document_id`.
          example: c5fdf2e4-1b9b-6108-aece-69991d5h4905
        onboarding_document_id:
          type: string
          description: >
            The document sent, as the company's onboarding documents list it
            (`GET /v1/onboarding-documents`,

            or its `/v1/merchants/{merchantId}` twin); several affiliations that
            sent one document share it
          example: 7d3b9a1e-2f4c-4e8a-9b1d-5c6e7f8a9b0c
        type:
          type: string
          enum:
            - CNH_FRONT
            - CNH_BACK
            - CNH_DIGITAL
            - RG_FRONT
            - RG_BACK
            - RNE_FRONT
            - RNE_BACK
            - RNM_FRONT
            - RNM_BACK
            - ID_DOCUMENT_FRONT
            - ID_DOCUMENT_BACK
            - SELFIE
            - ARTICLES_OF_INCORPORATION
            - POWER_OF_ATTORNEY
            - PROOF_OF_ADDRESS
            - PROOF_OF_INCOME
            - FINANCIAL_STATEMENT
            - OTHER
          description: >-
            The document's type in Rinne's vocabulary; `file_type` is the name
            the provider received
          example: CNH_DIGITAL
        file_type:
          type: string
          description: >-
            The document's type as the provider received it (e.g., CNH_FRONT,
            SELFIE, CONTRATO_SOCIAL)
          example: CNH_FRONT
        file_name:
          type: string
          description: >-
            Generated filename in storage; empty for another organization's file
            shared with this one, which exposes nothing of it
          example: CNH_FRONT_a1b2c3d4.pdf
        content_type:
          type:
            - string
            - 'null'
          description: >-
            MIME type of the document; null for another organization's shared
            file
          example: application/pdf
        file_size_bytes:
          type:
            - integer
            - 'null'
          description: File size in bytes; null for another organization's shared file
          example: 125430
        created_at:
          type: string
          format: date-time
          description: When the document was stored
          example: '2023-06-15T14:30:00.000Z'
      required:
        - id
        - file_type
        - file_name
        - content_type
        - file_size_bytes
        - created_at
    OnboardingRequirementSnapshot:
      type: object
      description: >
        A requirement as the webhook `AffiliationEntitySnapshot` carries it: the
        shape of

        `OnboardingRequirementResponse`, except that `rejection_reasons` and
        `accepted_content_types` are absent on an event written before they were
        added
      properties:
        id:
          type: string
          format: uuid
          example: 7f3d9c2a-5b1e-4c8d-9a6f-0e2b4d6c8a10
        company_id:
          type: string
          description: >-
            The company the requirement applies to (the organization itself or
            one of its merchants)
          example: c0a8012e-4d3b-4a6e-8f1b-1a2b3c4d5e6f
        provider:
          type: string
          enum:
            - CELCOIN
            - CAPPTA
          example: CELCOIN
        type:
          type: string
          enum:
            - IDENTITY_DOCUMENT
            - BIOMETRIC_VERIFICATION
            - ARTICLES_OF_INCORPORATION
            - POWER_OF_ATTORNEY
            - PROOF_OF_ADDRESS
            - PROOF_OF_INCOME
            - FINANCIAL_STATEMENT
            - INFORMATION
            - EVIDENCE_PACKAGE
            - OTHER
          description: >
            What meets it: `IDENTITY_DOCUMENT` a `CNH_DIGITAL` or the front and
            back of one identity document;

            `BIOMETRIC_VERIFICATION` an approved biometric verification of the
            subject; `ARTICLES_OF_INCORPORATION`,

            `POWER_OF_ATTORNEY`, `PROOF_OF_ADDRESS`, `PROOF_OF_INCOME`,
            `FINANCIAL_STATEMENT` and `OTHER` a document

            of the same type; `INFORMATION` a text answer; `EVIDENCE_PACKAGE`
            files attached to it and closed by an answer.
          example: IDENTITY_DOCUMENT
        subject_document_number:
          type: string
          description: Whom the requirement is about, digits only (a CPF or a CNPJ)
          example: '81146431023'
        subject_role:
          type: string
          enum:
            - COMPANY
            - CONTACT
            - PARTNER_COMPANY
          description: The subject's role for the company
          example: CONTACT
        origin:
          type: string
          enum:
            - BASE
            - PROVIDER_REQUEST
            - STAFF
          description: >-
            `BASE` from the provider's base set for the company's shape;
            `PROVIDER_REQUEST` from a provider's rejection review; `STAFF` added
            by Rinne staff
          example: BASE
        description:
          type:
            - string
            - 'null'
          description: >-
            What is being asked, for `PROVIDER_REQUEST` and `STAFF` rows; `null`
            on `BASE` rows
          example: null
        status:
          type: string
          enum:
            - PENDING
            - SATISFIED
            - REJECTED
            - WAIVED
          description: >
            Derived at read time: `PENDING` with no usable evidence; `SATISFIED`
            with `satisfied_by`; `REJECTED` when the

            only evidence is one the provider refused or a file in a format it
            does not read for the type and the row's subject role; `WAIVED` when
            staff waived it, the company's shape no longer

            calls for it, or it is a `PROVIDER_REQUEST` or `STAFF` row about a
            person who is no longer the company's contact, at a provider that
            sends the next attempt from scratch (`waived_at` set).
          example: PENDING
        accepted_document_types:
          type:
            - array
            - 'null'
          description: >-
            The document types that meet the requirement at this provider (the
            identity family for `IDENTITY_DOCUMENT`, the type of the same name
            otherwise, each only when the provider accepts it); `null` for a
            requirement no document meets
          items:
            type: string
            enum:
              - CNH_FRONT
              - CNH_BACK
              - CNH_DIGITAL
              - RG_FRONT
              - RG_BACK
              - RNE_FRONT
              - RNE_BACK
              - ARTICLES_OF_INCORPORATION
              - POWER_OF_ATTORNEY
              - PROOF_OF_ADDRESS
              - PROOF_OF_INCOME
              - FINANCIAL_STATEMENT
              - OTHER
          example:
            - CNH_DIGITAL
            - CNH_FRONT
            - CNH_BACK
            - RG_FRONT
            - RG_BACK
            - RNE_FRONT
            - RNE_BACK
        accepted_content_types:
          type:
            - array
            - 'null'
          description: >-
            The file formats an upload for the requirement may declare, those of
            any of its `accepted_document_types`; a provider that reads a type
            only in some formats narrows them (CELCOIN reads
            `ARTICLES_OF_INCORPORATION` of every `subject_role` but
            `PARTNER_COMPANY` only as `application/pdf`), for this requirement
            and for every other one not waived of the company or of another
            company of its organization with the same type and subject, whatever
            its provider, since an upload replaces the organization's file for
            all of them; `POST /v1/onboarding-documents` answers `400` on
            `content_type` for another format. A change in those other
            requirements sends no `affiliation.requirements-changed`, so a
            webhook snapshot may hold an older list. `null` when
            `accepted_document_types` is `null`
          items:
            type: string
            enum:
              - application/pdf
              - image/png
              - image/jpeg
          example:
            - application/pdf
        satisfied_by:
          oneOf:
            - $ref: '#/components/schemas/OnboardingRequirementSatisfiedBy'
            - type: 'null'
          description: The evidence that meets it; `null` unless `SATISFIED`
        rejection_reasons:
          type: array
          description: >
            The reasons of the newest approved review that names the
            requirement, by its id or by a document sent for it,

            from whichever of the company's attempts at the provider that review
            answered, or from another company of the

            organization whose attempt refused a document or a selfie this
            requirement uses too: what the next attempt must fix.

            While Rinne's screening gates the requirements, followed by one
            reason (`OTHER`, `RESUBMIT_DOCUMENT`, its

            screening note when it has one) per file of the requirement the
            screening failed, which the company replaces.

            Then, whatever the screening, one reason (`DOCUMENT_UNREADABLE`,
            `RESUBMIT_DOCUMENT`, a message naming the formats

            the provider reads) per file of an accepted type stored in a format
            the provider does not read for the type and the

            requirement's `subject_role`. Empty unless `PENDING` or `REJECTED`.
          items:
            $ref: '#/components/schemas/AffiliationRejectionReason'
        waived_at:
          type:
            - string
            - 'null'
          format: date-time
          example: null
        created_at:
          type: string
          format: date-time
          example: '2026-10-09T12:00:00.000Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-10-09T12:00:00.000Z'
      required:
        - id
        - company_id
        - provider
        - type
        - subject_document_number
        - subject_role
        - origin
        - description
        - status
        - accepted_document_types
        - satisfied_by
        - waived_at
        - created_at
        - updated_at
    OnboardingRequirementSatisfiedBy:
      type: object
      description: The evidence a `SATISFIED` requirement reads from
      properties:
        onboarding_document_ids:
          type: array
          description: >-
            The documents that meet it; both of an identity pair, or, for an
            `EVIDENCE_PACKAGE`, the attachments its answer recorded that the
            provider has not refused
          items:
            type: string
            format: uuid
          example:
            - 9c1e7b3a-2d4f-4a6b-8c0d-5e7f9a1b3c2d
        biometric_verification_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            The approved verification that meets a `BIOMETRIC_VERIFICATION`
            requirement
          example: null
        answer:
          type:
            - string
            - 'null'
          description: >-
            The text of the answer that meets an `INFORMATION` or
            `EVIDENCE_PACKAGE` requirement
          example: null
      required:
        - onboarding_document_ids
        - biometric_verification_id
        - answer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Company API key for authentication

````

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