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

# Mandaten zoeken

> Paginated, filterable list of mandates.

Finished mandates are excluded unless `includeFinished` is `true`.

Sorted by `createdOn`, newest first, by default.

Only mandates of customers the user can access are included.

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




## OpenAPI

````yaml POST /mandates
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:
    post:
      tags:
        - Mandates
      summary: Search mandates
      description: |
        Paginated, filterable list of mandates.

        Finished mandates are excluded unless `includeFinished` is `true`.

        Sorted by `createdOn`, newest first, by default.

        Only mandates of customers the user can access are included.

        **Required scope:** `mandates:read`
      operationId: searchMandates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MandateSearch'
            examples:
              all:
                summary: All mandates, finished included
                value:
                  includeFinished: true
              product:
                summary: CODA mandates only
                value:
                  product: CODA
                  includeFinished: true
                  limit: 2
              customer:
                summary: Mandates of one customer
                value:
                  customerId: 6ab7bba70d0379c741b7f74c
                  includeFinished: true
      responses:
        '200':
          description: Matching mandates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MandateList'
              examples:
                all:
                  summary: All mandates
                  value:
                    records:
                      - 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'
                      - id: 690b10c44fe2b68ba789d1a3
                        product: CODB
                        status: waitingForSigner
                        customerId: 675b41d6d350b74dad2f46ed
                        enterpriseNumber: 0755.556.457
                        customerName: Garage Peeters BV
                        payrollProviderCode: twinntax
                        payrollProviderName: TwinnTax
                        signerName: Jan Peeters
                        signerEmail: jan.peeters@example.com
                        signerLanguage: en
                        createdOn: '2025-11-05T08:54:25.891Z'
                        updatedOn: '2025-11-05T08:55:01.808Z'
                      - id: 690881038cb515752f8d7f64
                        product: CODA
                        status: waitingForSigner
                        customerId: 675b41d6d350b74dad2f46ed
                        enterpriseNumber: 0755.556.457
                        customerName: Garage Peeters BV
                        iban: BE59732578835326
                        bic: CREG BE BB
                        bankName: CBC Banque et Assurances
                        signerName: Jan Peeters
                        signerEmail: accounting@example.com
                        signerLanguage: en
                        createdOn: '2025-11-03T10:16:35.410Z'
                        updatedOn: '2025-11-03T10:17:00.208Z'
                      - id: 69087f138cb515752f8d7f61
                        product: CODA
                        status: waitingForSigner
                        customerId: 675b4183d350b74dad2f46ec
                        enterpriseNumber: 0764.042.472
                        customerName: Boulangerie Dupont SRL
                        iban: BE49001163522171
                        bic: GEBA BE BB
                        bankName: BNP Paribas Fortis
                        signerName: Marie Dupont
                        signerEmail: marie.dupont@example.com
                        signerLanguage: en
                        createdOn: '2025-11-03T10:08:18.810Z'
                        updatedOn: '2025-11-03T10:08:54.607Z'
                      - id: 68f39cb74f9e0ff0611fde75
                        product: CODB
                        status: finished
                        customerId: 675b4183d350b74dad2f46ec
                        enterpriseNumber: 0764.042.472
                        customerName: Boulangerie Dupont SRL
                        payrollProviderCode: sdworx
                        payrollProviderName: SD Worx
                        signerName: Marie Dupont
                        signerEmail: marie.dupont@example.com
                        signerLanguage: en
                        createdOn: '2025-10-18T13:57:11.305Z'
                        updatedOn: '2025-10-18T13:57:11.305Z'
                      - id: 68f39cb7b3431c9f9f8819c7
                        product: CODB
                        status: finished
                        customerId: 675b41d6d350b74dad2f46ed
                        enterpriseNumber: 0755.556.457
                        customerName: Garage Peeters BV
                        payrollProviderCode: partena_professional
                        payrollProviderName: Partena Professional
                        signerName: Jan Peeters
                        signerEmail: jan.peeters@example.com
                        signerLanguage: en
                        createdOn: '2025-10-18T13:57:11.016Z'
                        updatedOn: '2025-10-18T13:57:11.016Z'
                    recordsTotal: 6
                    recordsFiltered: 6
                justRequested:
                  summary: Just requested (status created)
                  value:
                    records:
                      - id: 6ab7bbae6d9c2811929cc682
                        product: CODB
                        status: created
                        customerId: 6ab7bba70d0379c741b7f74c
                        enterpriseNumber: 0159.145.821
                        customerName: Atelier Martin SRL
                        payrollProviderCode: partena_professional
                        payrollProviderName: Partena Professional
                        signerName: Sophie Martin
                        signerEmail: accounting@example.com
                        signerLanguage: fr
                        createdOn: '2026-09-26T12:33:49.783Z'
                      - id: 6ab7bbacf75e7d2df1c64ecc
                        product: CODA
                        status: created
                        customerId: 6ab7bba70d0379c741b7f74c
                        enterpriseNumber: 0159.145.821
                        customerName: Atelier Martin SRL
                        iban: BE08068722124813
                        bic: GKCC BE BB
                        bankName: Belfius
                        signerName: Sophie Martin
                        signerEmail: accounting@example.com
                        signerLanguage: fr
                        createdOn: '2026-09-26T12:33:47.903Z'
                    recordsTotal: 8
                    recordsFiltered: 2
        '400':
          description: >-
            Invalid request (`invalidPayload`, `unknownField`,
            `invalidIdentifier`…).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalidProduct:
                  summary: Invalid product
                  value:
                    message: product must be CODA or CODB
                    code: invalidPayload
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    MandateSearch:
      type: object
      additionalProperties: false
      properties:
        customerId:
          type: string
        enterpriseNumber:
          type: string
          description: Belgian enterprise number, formatted `0123.456.789`.
        iban:
          type: string
          description: Spaces are ignored.
        payrollProviderCode:
          type: string
        product:
          type: string
          enum:
            - CODA
            - CODB
        status:
          description: One status or a list of statuses.
          oneOf:
            - $ref: '#/components/schemas/MandateStatus'
            - type: array
              items:
                $ref: '#/components/schemas/MandateStatus'
        includeFinished:
          type: boolean
          default: false
          description: Mandates with status `finished` are excluded unless this is `true`.
        updatedSince:
          type: string
          format: date-time
          description: >-
            Only mandates created or updated at or after this ISO 8601
            timestamp. Use it to poll for changes.
        sort:
          type: string
          default: createdOn
          enum:
            - createdOn
            - updatedOn
            - customerName
            - customerEnterpriseNumber
            - ibanNumber
            - status
            - bankName
            - payrollProviderCode
        sortDirection:
          type: string
          enum:
            - asc
            - desc
          default: desc
          description: Any value other than `asc` sorts in descending order.
        limit:
          type: integer
          default: 50
          maximum: 200
        offset:
          type: integer
          default: 0
    MandateList:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: '#/components/schemas/Mandate'
        recordsTotal:
          type: integer
          description: Number of mandates visible to the user, before filters.
        recordsFiltered:
          type: integer
          description: Number of mandates matching the filters.
    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
    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`.
    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.

````