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

# Obtenir un mandat

> **Required scope:** `mandates:read`




## OpenAPI

````yaml GET /mandates/{mandateId}
openapi: 3.1.0
info:
  title: Codaclean API
  version: '1.0'
  description: >
    The Codaclean external API lets partner software (accounting tools, practice
    management software, sync agents) integrate with Codaclean on behalf of an
    accounting firm: manage its customers, request CODA and CODB mandates, and
    retrieve the CODA and CODB files Codaclean receives for them.
servers:
  - url: https://api.codaclean.io/v1
    description: Production
  - url: https://api.test.codaclean.io/v1
    description: Staging
security:
  - apiKeyAuth: []
    bearerAuth: []
tags:
  - name: Authentication
    description: Obtain and refresh the ID token sent with every other call.
  - name: Utilities
    description: Connectivity check.
  - name: Customers
    description: The customers (client companies) managed by the accounting firm.
  - name: Bank accounts
    description: Bank accounts (IBANs) linked to a customer.
  - name: Customer payroll providers
    description: Payroll providers (social secretariats) linked to a customer.
  - name: Mandates
    description: CODA mandates (per bank account) and CODB mandates (per payroll provider).
  - name: Reference data
    description: Banks and payroll providers known to Codaclean.
  - name: CODA files
    description: Bank statement files in CODA format.
  - name: CODB files
    description: Payroll files in CODB format, delivered by payroll providers.
paths:
  /mandates/{mandateId}:
    parameters:
      - name: mandateId
        in: path
        required: true
        description: Mandate identifier, as returned in `id`.
        schema:
          type: string
    get:
      tags:
        - Mandates
      summary: Get a mandate
      description: |
        **Required scope:** `mandates:read`
      operationId: getMandate
      responses:
        '200':
          description: The mandate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mandate'
              examples:
                mandate:
                  summary: Mandate
                  value:
                    id: 693a84bf3cb53bcdedaa2874
                    product: CODB
                    status: finished
                    customerId: 675b4183d350b74dad2f46ec
                    enterpriseNumber: 0764.042.472
                    customerName: Boulangerie Dupont SRL
                    payrollProviderCode: twinntax
                    payrollProviderName: TwinnTax
                    signerName: Marie Dupont
                    signerEmail: marie.dupont@example.com
                    signerLanguage: nl
                    createdOn: '2025-12-11T08:45:50.751Z'
                    updatedOn: '2025-12-11T08:51:05.745Z'
        '400':
          description: >-
            Invalid request (`invalidPayload`, `unknownField`,
            `invalidIdentifier`…).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalidIdentifier:
                  summary: Malformed identifier
                  value:
                    message: Invalid mandate identifier
                    code: invalidIdentifier
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: '`mandateNotFound`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                mandateNotFound:
                  summary: Unknown mandate
                  value:
                    message: Mandate 000000000000000000000000 not found
                    code: mandateNotFound
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Mandate:
      type: object
      description: >-
        Fields without a value are omitted. A CODA mandate carries no
        payroll-provider fields, and vice versa.
      properties:
        id:
          type: string
        product:
          type: string
          enum:
            - CODA
            - CODB
          description: >-
            CODAlight consents are reported as `CODA`; they carry a `validUntil`
            date.
        status:
          $ref: '#/components/schemas/MandateStatus'
        customerId:
          type: string
        enterpriseNumber:
          type: string
          description: Belgian enterprise number, formatted `0123.456.789`.
        customerName:
          type: string
        iban:
          type: string
        bic:
          type: string
        bankName:
          type: string
        payrollProviderCode:
          type: string
        payrollProviderName:
          type: string
        signerName:
          type: string
        signerEmail:
          type: string
        signerLanguage:
          type: string
        validUntil:
          type: string
          description: >-
            End of a CODAlight consent. After this date, the mandate moves to
            `renewalRequired`.
        createdOn:
          type: string
          format: date-time
        updatedOn:
          type: string
          format: date-time
        error:
          description: Error details when `status` is `error`.
    Error:
      type: object
      description: >
        Error body. `code` is a stable, machine-readable token; it is present on
        errors returned by the customers, mandates and reference-data endpoints.
        Some errors carry extra keys, such as `fields` or `candidates`.
      required:
        - message
      properties:
        message:
          type: string
          description: Human-readable description. Do not parse it.
        code:
          type: string
          description: |
            Machine-readable error code.

            **See also:** [Errors](/api/errors#error-codes)
        fields:
          type: array
          items:
            type: string
          description: >-
            Offending fields. Present with `unknownField` and
            `fieldNotUpdatable`.
        candidates:
          type: array
          description: Present with `connectorSelectionRequired`.
          items:
            $ref: '#/components/schemas/ConnectorCandidate'
    MandateStatus:
      type: string
      description: >
        CODA: `created`, `waitingForSigner`, `expired`, `rejectedBySigner`,
        `waitingForBank`, `confirmedByBank`, `rejectedByBank`,
        `unsupportedBank`, `finished`, `renewalRequired` (CODAlight), `error`.


        CODB: `created`, `waitingForSigner`, `expired`, `rejectedBySigner`,
        `waitingForPayrollProvider`, `rejectedByPayrollProvider`,
        `unsupportedPayrollProvider`, `finished`, `error`.


        `finished` means the mandate is active: signed, and files are being
        received (shown as "Active" in MyCodaclean).


        `confirmedByBank` means confirmed, but no file received yet.


        **See also:** [Onboard a
        customer](/api/guides/onboard-customer#mandate-statuses)
      enum:
        - created
        - waitingForSigner
        - expired
        - rejectedBySigner
        - waitingForBank
        - confirmedByBank
        - rejectedByBank
        - unsupportedBank
        - waitingForPayrollProvider
        - rejectedByPayrollProvider
        - unsupportedPayrollProvider
        - finished
        - renewalRequired
        - error
    ConnectorCandidate:
      type: object
      properties:
        connectorId:
          type: integer
        name:
          type: string
        bicCode:
          type: string
        available:
          type: boolean
    Message:
      type: object
      description: Confirmation returned by actions that do not return a resource.
      required:
        - message
      properties:
        message:
          type: string
  responses:
    Unauthorized:
      description: >-
        Missing, invalid or expired ID token, or user not allowed to use the
        API.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
          examples:
            noToken:
              summary: No ID token
              value:
                message: Unauthorized
            invalidToken:
              summary: Invalid or expired ID token
              value:
                message: Unauthorized
    Forbidden:
      description: >-
        Missing or invalid API key, missing scope (`forbiddenScope`), or access
        denied.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            noApiKey:
              summary: No API key
              value:
                message: Forbidden
            invalidApiKey:
              summary: Invalid API key
              value:
                message: Forbidden
    TooManyRequests:
      description: Rate limit or quota exceeded for this API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
          examples:
            tooManyRequests:
              summary: Rate limit exceeded
              value:
                message: Too Many Requests
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            internalError:
              summary: Unexpected server error
              value:
                message: Internal server error
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Identifies the partner software. Issued by Codaclean. Required on every
        call, including `POST /token`.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT (Cognito ID token)
      description: >-
        Identifies the user and their accounting firm. Send the `idToken`
        returned by `POST /token` as `Authorization: Bearer <idToken>`. Valid
        for 1 hour.

````