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

# Patch customer

## Field support per integration

<AccordionGroup>
  <Accordion title="Business Central" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/businesscentral.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=9cdc50aa9f467133e9e9372eab83f38b" width="24" height="24" data-path="logo/businesscentral.svg">
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameters `environmentName` and `companyId` are correctly populated.
      You can obtain these values by using the `GET Environments` and `GET Companies` endpoints available under the Authentication section.
    </Note>

    Supported Request Parameters:

    <ResponseField name="contactType" type="enum" required>
      Available options: `CONTACT_PERSON`, `COMPANY`
    </ResponseField>

    <ResponseField name="companyName" type="string" />

    <ResponseField name="contactPersons" type="ContactPerson[]">
      <Expandable title="properties">
        <ResponseField name="firstName" type="string" />

        <ResponseField name="lastName" type="string" />

        <ResponseField name="emailAddresses" type="string[]" />

        <ResponseField name="phoneNumbers" type="string[]" />
      </Expandable>
    </ResponseField>

    <ResponseField name="addresses" type="Address[]">
      <Expandable title="properties">
        <ResponseField name="addressLine1" type="string" />

        <ResponseField name="addressLine2" type="string" />

        <ResponseField name="postalCode" type="string" />

        <ResponseField name="city" type="string" />

        <ResponseField name="countryCode" type="enum">
          Available options (ISO 3166-1 alpha-2):

          `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, `AT`, `AU`, `AW`, `AX`, `AZ`, `BA`, `BB`, `BD`, `BE`, `BF`, `BG`, `BH`, `BI`, `BJ`, `BL`, `BM`, `BN`, `BO`, `BQ`, `BR`, `BS`, `BT`, `BV`, `BW`, `BY`, `BZ`, `CA`, `CC`, `CD`, `CF`, `CG`, `CH`, `CI`, `CK`, `CL`, `CM`, `CN`, `CO`, `CR`, `CU`, `CV`, `CW`, `CX`, `CY`, `CZ`, `DE`, `DJ`, `DK`, `DM`, `DO`, `DZ`, `EC`, `EE`, `EG`, `EH`, `ER`, `ES`, `ET`, `FI`, `FJ`, `FK`, `FM`, `FO`, `FR`, `GA`, `GB`, `GD`, `GE`, `GF`, `GG`, `GH`, `GI`, `GL`, `GM`, `GN`, `GP`, `GQ`, `GR`, `GS`, `GT`, `GU`, `GW`, `GY`, `HK`, `HM`, `HN`, `HR`, `HT`, `HU`, `ID`, `IE`, `IL`, `IM`, `IN`, `IO`, `IQ`, `IR`, `IS`, `IT`, `JE`, `JM`, `JO`, `JP`, `KE`, `KG`, `KH`, `KI`, `KM`, `KN`, `KP`, `KR`, `KW`, `KY`, `KZ`, `LA`, `LB`, `LC`, `LI`, `LK`, `LR`, `LS`, `LT`, `LU`, `LV`, `LY`, `MA`, `MC`, `MD`, `ME`, `MF`, `MG`, `MH`, `MK`, `ML`, `MM`, `MN`, `MO`, `MP`, `MQ`, `MR`, `MS`, `MT`, `MU`, `MV`, `MW`, `MX`, `MY`, `MZ`, `NA`, `NC`, `NE`, `NF`, `NG`, `NI`, `NL`, `NO`, `NP`, `NR`, `NU`, `NZ`, `OM`, `PA`, `PE`, `PF`, `PG`, `PH`, `PK`, `PL`, `PM`, `PN`, `PR`, `PT`, `PW`, `PY`, `QA`, `RE`, `RO`, `RS`, `RU`, `RW`, `SA`, `SB`, `SC`, `SD`, `SE`, `SG`, `SH`, `SI`, `SJ`, `SK`, `SL`, `SM`, `SN`, `SO`, `SR`, `SS`, `ST`, `SV`, `SX`, `SY`, `SZ`, `TC`, `TD`, `TF`, `TG`, `TH`, `TJ`, `TK`, `TL`, `TM`, `TN`, `TO`, `TR`, `TT`, `TV`, `TW`, `TZ`, `UA`, `UG`, `UM`, `US`, `UY`, `UZ`, `VA`, `VC`, `VE`, `VG`, `VI`, `VN`, `VU`, `WF`, `WS`, `YE`, `YT`, `ZA`, `ZM`, `ZW`
        </ResponseField>

        <ResponseField name="type" type="enum">
          Available options: `BILLING`
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="emailAddresses" type="EmailAddress[]">
      <Expandable title="properties">
        <ResponseField name="email" type="string" />

        <ResponseField name="type" type="enum">
          Available options: `BUSINESS`
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="phoneNumbers" type="PhoneNumber[]">
      <Expandable title="properties">
        <ResponseField name="number" type="string" />

        <ResponseField name="type" type="enum">
          Available options: `BUSINESS`
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml patch /accounting/customers/{contactId}
openapi: 3.0.0
info:
  title: Maesn unified API
  description: The Maesn unified API description
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maesn.dev
security: []
tags:
  - name: maesn
    description: ''
paths:
  /accounting/customers/{contactId}:
    patch:
      tags:
        - accounting
      operationId: patchCustomers
      parameters:
        - name: contactId
          required: true
          in: path
          schema:
            type: string
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContactRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/ContactResponseDto'
                        type: object
components:
  schemas:
    CreateContactRequestDto:
      type: object
      properties:
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/ContactAddress'
        bankAccount:
          $ref: '#/components/schemas/BankAccount'
        companyName:
          type: string
          example: maesn
        contactType:
          type: string
          enum:
            - CONTACT_PERSON
            - COMPANY
            - UNDEFINED
          example: CONTACT_PERSON
        contactPersons:
          type: array
          items:
            $ref: '#/components/schemas/ContactPersonRequest'
        documentId:
          type: string
          example: Z1248601M
        emailAddresses:
          type: array
          items:
            $ref: '#/components/schemas/ContactEmail'
        number:
          type: string
          example: '1042'
        phoneNumbers:
          type: array
          items:
            $ref: '#/components/schemas/ContactPhone'
        projectId:
          type: string
          example: '3'
        vatId:
          type: string
          example: DE123456789
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    ContactResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 92c4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/ContactAddress'
        companyName:
          type: string
          example: maesn
        contactType:
          type: string
          enum:
            - CONTACT_PERSON
            - COMPANY
          example: CONTACT_PERSON
        contactPersons:
          type: array
          items:
            $ref: '#/components/schemas/ContactPerson'
        documentId:
          type: string
          example: Z1248601M
        emailAddresses:
          type: array
          items:
            $ref: '#/components/schemas/ContactEmail'
        number:
          type: string
          example: '1042'
        phoneNumbers:
          type: array
          items:
            $ref: '#/components/schemas/ContactPhone'
        projectId:
          type: string
          example: '3'
        updatedDate:
          type: string
          example: '2018-01-01T13:00:00.000Z'
        vatId:
          type: string
          example: DE123456789
    ContactAddress:
      type: object
      properties:
        addressLine1:
          type: string
          example: Lucky street 1
        addressLine2:
          type: string
          example: 2nd floor
        city:
          type: string
          example: Berlin
        countryCode:
          type: string
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          example: DE
        postalCode:
          type: string
          example: '10243'
        type:
          type: string
          enum:
            - BILLING
            - DELIVERY
            - EMPTY
            - PRIVATE
            - WORK
            - PICKUP
          example: BILLING
    BankAccount:
      type: object
      properties:
        bic:
          type: string
          example: COBADEFFXXX
        holder:
          type: string
          example: John Doe
        iban:
          type: string
          example: DE89370400440532013000
        isMainAccount:
          type: boolean
          example: true
        name:
          type: string
          example: Sparkasse
        sepa:
          type: boolean
          example: true
      required:
        - iban
        - bic
        - holder
        - sepa
    ContactPersonRequest:
      type: object
      properties:
        emailAddresses:
          type: array
          items:
            $ref: '#/components/schemas/ContactEmail'
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
        phoneNumbers:
          type: array
          items:
            $ref: '#/components/schemas/ContactPhone'
        salutation:
          type: string
          example: Mr
    ContactEmail:
      type: object
      properties:
        email:
          type: string
          example: john.doe@company.com
        type:
          type: string
          enum:
            - BUSINESS
            - PRIVATE
            - OFFICE
            - INVOICE
            - PAYMENT
            - OTHER
          example: BUSINESS
    ContactPhone:
      type: object
      properties:
        number:
          type: string
          example: +49 7163307056
        type:
          type: string
          enum:
            - BUSINESS
            - MOBILE
            - FAX
            - LANDLINE
            - OFFICE
            - OTHER
            - PRIVATE
            - SKYPE
            - WHATSAPP
          example: MOBILE
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    ContactPerson:
      type: object
      properties:
        emailAddresses:
          type: array
          items:
            $ref: '#/components/schemas/ContactEmail'
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
        phoneNumbers:
          type: array
          items:
            $ref: '#/components/schemas/ContactPhone'
        salutation:
          type: string
          example: Mr
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````