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

# Create client

> Creates a new client (customer/debtor partner) in the accounting system and returns the created record.

**Learn more:**

* What are partners (clients, suppliers, employees)? [↗](/unified-apis/accounting/glossary/partners)


## OpenAPI

````yaml post /consumers/{consumer_id}/accounting/clients
openapi: 3.1.0
info:
  title: Chift API
  description: >-
    The Chift API is a universal API giving you access to financial data from
    the software of your clients. It helps software companies to offer native
    integrations to their clients without the effort needed to maintain those
    native integrations. By using the APIs (Accounting, POS, eCommerce) of
    Chift, you connect once and allow your clients to use their software
    packages.
  version: 1.0.0
servers:
  - url: https://api.chift.eu
    description: Chift
security:
  - bearerAuth: []
paths:
  /consumers/{consumer_id}/accounting/clients:
    post:
      tags:
        - Accounting
        - Clients
      summary: Create client
      description: >-
        Creates a new client (customer/debtor partner) in the accounting system
        and returns the created record.
      operationId: accounting_create_client
      parameters:
        - name: consumer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Consumer Id
        - name: folder_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Folder Id
          description: >-
            Id of the accounting folder instance. A folder represents a legal
            entity within the system. Required when the multiple folders feature
            is enabled.
        - name: force_merge
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Force Merge
          description: >-
            Indicate the ID of the corresponding supplier in the accounting
            system. Accounting systems using 1 entity to handle
            clients/customers and suppliers will merge the existing supplier
            with the new client/customer (if the parameter is filled in with the
            ID of an existing supplier).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientItemIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientItemOut'
        '400':
          content:
            application/json:
              examples:
                ERROR_PARTNER_ALREADY_EXISTS:
                  value:
                    message: >-
                      The client/supplier already exists in the accounting
                      system.
                    status: error
                    error_code: ERROR_PARTNER_ALREADY_EXISTS
                ERROR_PARTNER_ALREADY_EXISTS_2:
                  value:
                    message: >-
                      The ${partner_type} already exists in the accounting
                      system.
                    status: error
                    error_code: ERROR_PARTNER_ALREADY_EXISTS
                ERROR_PARTNER_ALREADY_EXISTS_3:
                  value:
                    message: >-
                      The client/supplier '${partner_id}' already exists in the
                      accounting system.
                    status: error
                    error_code: ERROR_PARTNER_ALREADY_EXISTS
                ERROR_PARTNER_ALREADY_EXISTS_4:
                  value:
                    message: >-
                      The ${partner_type} '${partner_id}' already exists in the
                      accounting system.
                    status: error
                    error_code: ERROR_PARTNER_ALREADY_EXISTS
                ERROR_PARTNER_ALREADY_EXISTS_5:
                  value:
                    message: >-
                      A client/supplier already exists with the same code/id
                      (${existing_code}) in the accounting system.
                    status: error
                    error_code: ERROR_PARTNER_ALREADY_EXISTS
                ERROR_PARTNER_ALREADY_EXISTS_6:
                  value:
                    message: >-
                      A ${partner_type} already exists with the same code/id
                      (${existing_code}) in the accounting system.
                    status: error
                    error_code: ERROR_PARTNER_ALREADY_EXISTS
                ERROR_PARTNER_ALREADY_EXISTS_7:
                  value:
                    message: >-
                      A client/supplier already exists with the same third-party
                      account (${account_number}) in the accounting system.
                    status: error
                    error_code: ERROR_PARTNER_ALREADY_EXISTS
                ERROR_PARTNER_ALREADY_EXISTS_8:
                  value:
                    message: >-
                      A ${partner_type} already exists with the same third-party
                      account (${account_number}) in the accounting system.
                    status: error
                    error_code: ERROR_PARTNER_ALREADY_EXISTS
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Bad Request
        '422':
          content:
            application/json:
              examples:
                ERROR_INVALID_FIELD_FORMAT_COMPANY_ID:
                  value:
                    message: >-
                      The format of the field 'company_id' doesn't seem to be
                      correct for the corresponding accounting system.
                    status: error
                    error_code: ERROR_INVALID_FIELD_FORMAT_COMPANY_ID
                ERROR_INVALID_VAT_FORMAT:
                  value:
                    message: >-
                      The VAT number doesn't seem to be correct. Please remove
                      dots and whitespaces. The expected format is the
                      following: BE0784930037.
                    status: error
                    error_code: ERROR_INVALID_VAT_FORMAT
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Unprocessable Entity
      security:
        - mcp_auth:
            - accounting
            - accounting.clients
            - '200'
            - 200.clients
components:
  schemas:
    ClientItemIn:
      properties:
        external_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: External Reference
          description: >-
            External identifier used to link the client in the accounting system
            with the corresponding client reference in your own system.
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the first name of the client.
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the last name of the client.
        name:
          type: string
          minLength: 1
          title: Name
          description: >-
            Full name or legal name of the client (individual or company). This
            is the name that will be displayed in the accounting software.
        function:
          anyOf:
            - type: string
            - type: 'null'
          title: Function
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the function of the client.
        is_company:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Company
          description: Indicates if the client is an individual or a company.
          default: true
        company_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Id
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the id of the company linked to the client.
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
          description: Phone number of the client.
        mobile:
          anyOf:
            - type: string
            - type: 'null'
          title: Mobile
          description: Mobile phone number of the client.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Email address of the client.
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: 'Language of the client. Format: ISO 639-1 codes.'
        internal_notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Internal Notes
          description: Internal notes about the client.
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
          description: Website of the client.
        vat:
          anyOf:
            - type: string
            - type: 'null'
          title: Vat
          description: >-
            VAT number of the client, used for tax compliance and invoicing.
            This value is unique per company and can be used as a reliable
            identifier to match clients between systems.
        company_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Number
          description: National identification number of the company.
        iban:
          anyOf:
            - type: string
            - type: 'null'
          title: Iban
          description: IBAN account number of the client.
        bank_account:
          anyOf:
            - type: string
            - type: 'null'
          title: Bank Account
          description: Bank account number of the client.
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
          description: Indicates the currency of the client (e.g., EUR).
        active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Active
          description: Indicates if the client is active.
          default: true
        addresses:
          items:
            $ref: '#/components/schemas/AddressItemIn'
          type: array
          title: Addresses
          description: List of addresses associated with the client.
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Number
          description: >-
            Number of ledger account assigned to the client in the accounting
            system as it will appear in the official accounting export file
            (FEC, SIE, iXBRL, etc.). This is typically the ledger account used
            for posting receivables. In some systems, each customer has a
            dedicated account; in others, a shared control account is used and
            customer balances are tracked in a subledger.
      type: object
      required:
        - name
        - addresses
      title: ClientItemIn
    ClientItemOut:
      properties:
        external_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: External Reference
          description: >-
            External identifier used to link the client in the accounting system
            with the corresponding client reference in your own system.
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the first name of the client.
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the last name of the client.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            Full name or legal name of the client (individual or company). This
            is the name displayed in the accounting software.
        function:
          anyOf:
            - type: string
            - type: 'null'
          title: Function
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the function of the client.
        is_company:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Company
          description: Indicates if the client is an individual or a company.
          default: true
        company_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Id
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the id of the company linked to the client.
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
          description: Phone number of the client.
        mobile:
          anyOf:
            - type: string
            - type: 'null'
          title: Mobile
          description: Mobile phone number of the client.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Email address of the client.
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: 'Language of the client. Format: ISO 639-1 codes.'
        internal_notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Internal Notes
          description: Internal notes about the client.
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
          description: Website of the client.
        vat:
          anyOf:
            - type: string
            - type: 'null'
          title: Vat
          description: VAT number of the client.
        company_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Number
          description: National identification number of the company.
        iban:
          anyOf:
            - type: string
            - type: 'null'
          title: Iban
          description: IBAN account number of the client. DEPRECATED see bank_accounts
        bank_account:
          anyOf:
            - type: string
            - type: 'null'
          title: Bank Account
          description: Bank account number of the client. DEPRECATED see bank_accounts
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
          description: Indicates the currency of the client (e.g., EUR).
        active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Active
          description: Indicates if the client is active.
          default: true
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Number
          description: >-
            Ledger account number assigned to the customer in the accounting
            system as it will appear in the official accounting export file
            (FEC, SIE, iXBRL, etc.).
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Id of the client in the accounting software. This is the unique
            identifier used to reference the client in the system.
        last_updated_on:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated On
          description: The last time the client has been updated.
        addresses:
          anyOf:
            - items:
                $ref: '#/components/schemas/AddressItemOut'
              type: array
            - type: 'null'
          title: Addresses
          description: List of addresses associated with the client.
          default: []
        third_party_account:
          anyOf:
            - type: string
            - type: 'null'
          title: Third Party Account
          description: >-
            Third party account number/code representing the client in the
            accounting software.
        bank_accounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/BankAccountsItem'
              type: array
            - type: 'null'
          title: Bank Accounts
          description: List of bank accounts information associated with the client.
      type: object
      title: ClientItemOut
    ChiftError:
      properties:
        message:
          type: string
          title: Message
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          default: error
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          default: ''
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      required:
        - message
      title: ChiftError
    AddressItemIn:
      properties:
        address_type:
          $ref: '#/components/schemas/AddressType'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        number:
          anyOf:
            - type: string
            - type: 'null'
          title: Number
        box:
          anyOf:
            - type: string
            - type: 'null'
          title: Box
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        mobile:
          anyOf:
            - type: string
            - type: 'null'
          title: Mobile
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        street:
          type: string
          title: Street
        city:
          type: string
          title: City
        postal_code:
          type: string
          title: Postal Code
        country:
          type: string
          title: Country
          description: 'Format: ISO 3166-1 codes.'
      type: object
      required:
        - address_type
        - street
        - city
        - postal_code
        - country
      title: AddressItemIn
    AddressItemOut:
      properties:
        address_type:
          $ref: '#/components/schemas/AddressType'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        number:
          anyOf:
            - type: string
            - type: 'null'
          title: Number
        box:
          anyOf:
            - type: string
            - type: 'null'
          title: Box
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        mobile:
          anyOf:
            - type: string
            - type: 'null'
          title: Mobile
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: 'Format: ISO 3166-1 codes.'
      type: object
      required:
        - address_type
      title: AddressItemOut
    BankAccountsItem:
      properties:
        is_primary:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Primary
          description: >-
            Indicates whether this is the default bank account for this
            third-party. Only one bank account per third-party can have
            is_primary set to true. Defaults to true.
          default: true
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
          description: Indicates the currency of the bank account (e.g., EUR).
        iban:
          anyOf:
            - type: string
            - type: 'null'
          title: Iban
          description: >-
            International Bank Account Number (ISO 13616). Present for countries
            in the IBAN scheme (e.g., France, Germany, United Kingdom). null for
            countries that do not participate in the IBAN scheme (e.g., US,
            Canada, Australia).
        bic_swift:
          anyOf:
            - type: string
            - type: 'null'
          title: Bic Swift
          description: >-
            Bank Identifier Code (ISO 9362), also known as SWIFT code. 8 or 11
            characters. Optional for domestic payments, but required for
            international wire transfers.
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Number
          description: >-
            Local bank account number. Used when the country does not
            participate in the IBAN scheme (e.g., US, CA, AU). Always paired
            with a routing_code.
        routing_code:
          anyOf:
            - $ref: '#/components/schemas/RoutingCodeItem'
            - type: 'null'
          description: >-
            Domestic routing identifier for the bank. Required when no iban is
            present. Contains two subfields: type and value
      type: object
      title: BankAccountsItem
    AddressType:
      type: string
      enum:
        - main
        - delivery
        - invoice
      title: AddressType
    RoutingCodeItem:
      properties:
        type:
          $ref: '#/components/schemas/BankAccountRoutingType'
          description: >-
            The routing format. Possible values: ach (US), sort_code (UK), bsb
            (AU), transit (CA), ifsc (IN), clabe (MX).
          default: unknown
        value:
          anyOf:
            - type: string
            - type: 'null'
          title: Value
          description: The raw routing code value, without spaces or dashes.
      type: object
      title: RoutingCodeItem
    BankAccountRoutingType:
      type: string
      enum:
        - unknown
        - ach
        - sort_code
        - bsb
        - transit
        - ifsc
        - clabe
      title: BankAccountRoutingType
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        This access token needs to be included in each of your request to the
        Chift API.

````