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

# Replace a buyer

> Fully replace a buyer stored record using PUT semantics. All fields must be provided – omitted fields are cleared. Retrieve first for partial updates.

This endpoint fully replaces the data stored for a buyer using standard HTTP PUT semantics. Every field that can be set on a buyer must be included in the request body – any field omitted from the payload will be cleared from the stored record. If you only need to update a subset of fields, retrieve the current buyer first with `GET /v1/buyers/{external_id}`, merge your changes into the retrieved object, and submit the complete merged payload. Objects like `business_identifiers` and `custom_data` are replaced entirely, not merged.

<Warning>
  This is a full replacement operation. Any fields present in the existing buyer record but absent from your PUT request body
  will be erased. Always retrieve the current buyer record first and merge your changes before submitting.
</Warning>


## OpenAPI

````yaml PUT /v1/buyers/{external_id}
openapi: 3.0.0
info:
  version: 0.0.1
  title: Tilta API
  description: Tilta API documentation
servers:
  - url: https://api.tilta.io
    description: Tilta Production API
  - url: https://api.tilta-sandbox.io
    description: Tilta Sandbox API
security: []
paths:
  /v1/buyers/{external_id}:
    put:
      tags:
        - Buyers
      summary: Replace a buyer
      description: >-
        Replaces a buyer. This is a full-replacement update: every field in the
        request body must be provided.

        Nullable fields may be cleared by sending `null` explicitly.
        `business_identifiers` and `custom_data` are replaced entirely – send
        `[]` to clear all identifiers, or `null` to clear custom_data.

        To change only a subset of fields, fetch the current buyer first and
        submit the merged payload.
      parameters:
        - schema:
            type: string
            maxLength: 100
            pattern: ^[a-zA-Z0-9-_]+$
            description: Unique identifier of a buyer.
          required: true
          description: Unique identifier of a buyer.
          name: external_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                trading_name:
                  type: string
                  nullable: true
                  description: >-
                    Buyer's trading name. Send `null` to clear and fall back to
                    the legal_name.
                  example: ACME
                legal_name:
                  type: string
                  description: Buyer's full legal name incl. the legal form if applicable.
                  example: ACME GmbH
                legal_form:
                  type: string
                  enum:
                    - LIMITED_COMPANY
                    - SOLE_TRADER
                    - PARTNERSHIP
                    - PUBLIC_COMPANY
                    - COOPERATIVE
                    - GOVERNMENT
                    - OTHER
                  description: >-
                    Buyer's legal form which depends on the buyer's registered
                    country. [Available legal
                    forms](https://docs.tilta.io/docs/legal-forms) cover Tilta's
                    operating countries.
                registered_at:
                  type: number
                  nullable: true
                  description: >-
                    Buyer's registration date (unix time in seconds). Send
                    `null` to clear.
                  example: 1582896122
                incorporated_at:
                  type: number
                  nullable: true
                  description: >-
                    Buyer's date of incorporation (unix time in seconds). Send
                    `null` to clear.
                  example: 1582896122
                business_identifiers:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - VAT_ID
                          - TAX_ID
                          - REGISTER_ID
                          - CREFO_ID
                          - ALLIANZ_TRADE_ID
                          - SCHUFA_ID
                          - CREDITSAFE_ID
                          - CRIF_ID
                          - ELLISPHERE_ID
                        description: The type of business identifier
                      value:
                        type: string
                        maxLength: 48
                        description: The value of the business identifier
                      country:
                        type: string
                        enum:
                          - AF
                          - AL
                          - DZ
                          - AS
                          - AD
                          - AO
                          - AI
                          - AQ
                          - AG
                          - AR
                          - AM
                          - AW
                          - AU
                          - AT
                          - AZ
                          - BS
                          - BH
                          - BD
                          - BB
                          - BY
                          - BE
                          - BZ
                          - BJ
                          - BM
                          - BT
                          - BO
                          - BQ
                          - BA
                          - BW
                          - BV
                          - BR
                          - IO
                          - BN
                          - BG
                          - BF
                          - BI
                          - CV
                          - KH
                          - CM
                          - CA
                          - KY
                          - CF
                          - TD
                          - CL
                          - CN
                          - CX
                          - CC
                          - CO
                          - KM
                          - CD
                          - CG
                          - CK
                          - CR
                          - HR
                          - CU
                          - CW
                          - CY
                          - CZ
                          - CI
                          - DK
                          - DJ
                          - DM
                          - DO
                          - EC
                          - EG
                          - SV
                          - GQ
                          - ER
                          - EE
                          - SZ
                          - ET
                          - FK
                          - FO
                          - FJ
                          - FI
                          - FR
                          - GF
                          - PF
                          - TF
                          - GA
                          - GM
                          - GE
                          - DE
                          - GH
                          - GI
                          - GR
                          - GL
                          - GD
                          - GP
                          - GU
                          - GT
                          - GG
                          - GN
                          - GW
                          - GY
                          - HT
                          - HM
                          - VA
                          - HN
                          - HK
                          - HU
                          - IS
                          - IN
                          - ID
                          - IR
                          - IQ
                          - IE
                          - IM
                          - IL
                          - IT
                          - JM
                          - JP
                          - JE
                          - JO
                          - KZ
                          - KE
                          - KI
                          - KP
                          - KR
                          - KW
                          - KG
                          - LA
                          - LV
                          - LB
                          - LS
                          - LR
                          - LY
                          - LI
                          - LT
                          - LU
                          - MO
                          - MG
                          - MW
                          - MY
                          - MV
                          - ML
                          - MT
                          - MH
                          - MQ
                          - MR
                          - MU
                          - YT
                          - MX
                          - FM
                          - MD
                          - MC
                          - MN
                          - ME
                          - MS
                          - MA
                          - MZ
                          - MM
                          - NA
                          - NR
                          - NP
                          - NL
                          - NC
                          - NZ
                          - NI
                          - NE
                          - NG
                          - NU
                          - NF
                          - MK
                          - MP
                          - 'NO'
                          - OM
                          - PK
                          - PW
                          - PS
                          - PA
                          - PG
                          - PY
                          - PE
                          - PH
                          - PN
                          - PL
                          - PT
                          - PR
                          - QA
                          - RO
                          - RU
                          - RW
                          - RE
                          - BL
                          - SH
                          - KN
                          - LC
                          - MF
                          - PM
                          - VC
                          - WS
                          - SM
                          - ST
                          - SA
                          - SN
                          - RS
                          - SC
                          - SL
                          - SG
                          - SX
                          - SK
                          - SI
                          - SB
                          - SO
                          - ZA
                          - GS
                          - SS
                          - ES
                          - LK
                          - SD
                          - SR
                          - SJ
                          - SE
                          - CH
                          - SY
                          - TW
                          - TJ
                          - TZ
                          - TH
                          - TL
                          - TG
                          - TK
                          - TO
                          - TT
                          - TN
                          - TM
                          - TC
                          - TV
                          - TR
                          - UG
                          - UA
                          - AE
                          - GB
                          - UM
                          - US
                          - UY
                          - UZ
                          - VU
                          - VE
                          - VN
                          - VG
                          - VI
                          - WF
                          - EH
                          - YE
                          - ZM
                          - ZW
                          - AX
                        description: Two-letter country code (ISO 3166-1 alpha-2).
                    required:
                      - type
                      - value
                      - country
                    additionalProperties: false
                  description: >-
                    List of business identifiers. Replaces the existing set
                    entirely. Send `[]` to clear all identifiers.
                business_address:
                  type: object
                  properties:
                    street:
                      type: string
                      description: Address line (e.g. street, road, place).
                      example: Example Street
                    house:
                      type: string
                      description: House number or denominator.
                      example: 42b
                    postcode:
                      type: string
                      description: ZIP or postal code.
                      example: '12345'
                    city:
                      type: string
                      description: City, district, town, or village.
                      example: Berlin
                    country:
                      type: string
                      enum:
                        - AF
                        - AL
                        - DZ
                        - AS
                        - AD
                        - AO
                        - AI
                        - AQ
                        - AG
                        - AR
                        - AM
                        - AW
                        - AU
                        - AT
                        - AZ
                        - BS
                        - BH
                        - BD
                        - BB
                        - BY
                        - BE
                        - BZ
                        - BJ
                        - BM
                        - BT
                        - BO
                        - BQ
                        - BA
                        - BW
                        - BV
                        - BR
                        - IO
                        - BN
                        - BG
                        - BF
                        - BI
                        - CV
                        - KH
                        - CM
                        - CA
                        - KY
                        - CF
                        - TD
                        - CL
                        - CN
                        - CX
                        - CC
                        - CO
                        - KM
                        - CD
                        - CG
                        - CK
                        - CR
                        - HR
                        - CU
                        - CW
                        - CY
                        - CZ
                        - CI
                        - DK
                        - DJ
                        - DM
                        - DO
                        - EC
                        - EG
                        - SV
                        - GQ
                        - ER
                        - EE
                        - SZ
                        - ET
                        - FK
                        - FO
                        - FJ
                        - FI
                        - FR
                        - GF
                        - PF
                        - TF
                        - GA
                        - GM
                        - GE
                        - DE
                        - GH
                        - GI
                        - GR
                        - GL
                        - GD
                        - GP
                        - GU
                        - GT
                        - GG
                        - GN
                        - GW
                        - GY
                        - HT
                        - HM
                        - VA
                        - HN
                        - HK
                        - HU
                        - IS
                        - IN
                        - ID
                        - IR
                        - IQ
                        - IE
                        - IM
                        - IL
                        - IT
                        - JM
                        - JP
                        - JE
                        - JO
                        - KZ
                        - KE
                        - KI
                        - KP
                        - KR
                        - KW
                        - KG
                        - LA
                        - LV
                        - LB
                        - LS
                        - LR
                        - LY
                        - LI
                        - LT
                        - LU
                        - MO
                        - MG
                        - MW
                        - MY
                        - MV
                        - ML
                        - MT
                        - MH
                        - MQ
                        - MR
                        - MU
                        - YT
                        - MX
                        - FM
                        - MD
                        - MC
                        - MN
                        - ME
                        - MS
                        - MA
                        - MZ
                        - MM
                        - NA
                        - NR
                        - NP
                        - NL
                        - NC
                        - NZ
                        - NI
                        - NE
                        - NG
                        - NU
                        - NF
                        - MK
                        - MP
                        - 'NO'
                        - OM
                        - PK
                        - PW
                        - PS
                        - PA
                        - PG
                        - PY
                        - PE
                        - PH
                        - PN
                        - PL
                        - PT
                        - PR
                        - QA
                        - RO
                        - RU
                        - RW
                        - RE
                        - BL
                        - SH
                        - KN
                        - LC
                        - MF
                        - PM
                        - VC
                        - WS
                        - SM
                        - ST
                        - SA
                        - SN
                        - RS
                        - SC
                        - SL
                        - SG
                        - SX
                        - SK
                        - SI
                        - SB
                        - SO
                        - ZA
                        - GS
                        - SS
                        - ES
                        - LK
                        - SD
                        - SR
                        - SJ
                        - SE
                        - CH
                        - SY
                        - TW
                        - TJ
                        - TZ
                        - TH
                        - TL
                        - TG
                        - TK
                        - TO
                        - TT
                        - TN
                        - TM
                        - TC
                        - TV
                        - TR
                        - UG
                        - UA
                        - AE
                        - GB
                        - UM
                        - US
                        - UY
                        - UZ
                        - VU
                        - VE
                        - VN
                        - VG
                        - VI
                        - WF
                        - EH
                        - YE
                        - ZM
                        - ZW
                        - AX
                      description: Two-letter country code (ISO 3166-1 alpha-2).
                    additional:
                      type: string
                      nullable: true
                      description: >-
                        Additional address information (e.g. PO Box, c/o name
                        etc.).
                      example: c/o Testimonial
                  required:
                    - postcode
                    - city
                    - country
                  description: Buyer's billing address.
                delivery_address:
                  type: object
                  nullable: true
                  properties:
                    street:
                      type: string
                      description: Address line (e.g. street, road, place).
                      example: Example Street
                    house:
                      type: string
                      description: House number or denominator.
                      example: 42b
                    postcode:
                      type: string
                      description: ZIP or postal code.
                      example: '12345'
                    city:
                      type: string
                      description: City, district, town, or village.
                      example: Berlin
                    country:
                      type: string
                      enum:
                        - AF
                        - AL
                        - DZ
                        - AS
                        - AD
                        - AO
                        - AI
                        - AQ
                        - AG
                        - AR
                        - AM
                        - AW
                        - AU
                        - AT
                        - AZ
                        - BS
                        - BH
                        - BD
                        - BB
                        - BY
                        - BE
                        - BZ
                        - BJ
                        - BM
                        - BT
                        - BO
                        - BQ
                        - BA
                        - BW
                        - BV
                        - BR
                        - IO
                        - BN
                        - BG
                        - BF
                        - BI
                        - CV
                        - KH
                        - CM
                        - CA
                        - KY
                        - CF
                        - TD
                        - CL
                        - CN
                        - CX
                        - CC
                        - CO
                        - KM
                        - CD
                        - CG
                        - CK
                        - CR
                        - HR
                        - CU
                        - CW
                        - CY
                        - CZ
                        - CI
                        - DK
                        - DJ
                        - DM
                        - DO
                        - EC
                        - EG
                        - SV
                        - GQ
                        - ER
                        - EE
                        - SZ
                        - ET
                        - FK
                        - FO
                        - FJ
                        - FI
                        - FR
                        - GF
                        - PF
                        - TF
                        - GA
                        - GM
                        - GE
                        - DE
                        - GH
                        - GI
                        - GR
                        - GL
                        - GD
                        - GP
                        - GU
                        - GT
                        - GG
                        - GN
                        - GW
                        - GY
                        - HT
                        - HM
                        - VA
                        - HN
                        - HK
                        - HU
                        - IS
                        - IN
                        - ID
                        - IR
                        - IQ
                        - IE
                        - IM
                        - IL
                        - IT
                        - JM
                        - JP
                        - JE
                        - JO
                        - KZ
                        - KE
                        - KI
                        - KP
                        - KR
                        - KW
                        - KG
                        - LA
                        - LV
                        - LB
                        - LS
                        - LR
                        - LY
                        - LI
                        - LT
                        - LU
                        - MO
                        - MG
                        - MW
                        - MY
                        - MV
                        - ML
                        - MT
                        - MH
                        - MQ
                        - MR
                        - MU
                        - YT
                        - MX
                        - FM
                        - MD
                        - MC
                        - MN
                        - ME
                        - MS
                        - MA
                        - MZ
                        - MM
                        - NA
                        - NR
                        - NP
                        - NL
                        - NC
                        - NZ
                        - NI
                        - NE
                        - NG
                        - NU
                        - NF
                        - MK
                        - MP
                        - 'NO'
                        - OM
                        - PK
                        - PW
                        - PS
                        - PA
                        - PG
                        - PY
                        - PE
                        - PH
                        - PN
                        - PL
                        - PT
                        - PR
                        - QA
                        - RO
                        - RU
                        - RW
                        - RE
                        - BL
                        - SH
                        - KN
                        - LC
                        - MF
                        - PM
                        - VC
                        - WS
                        - SM
                        - ST
                        - SA
                        - SN
                        - RS
                        - SC
                        - SL
                        - SG
                        - SX
                        - SK
                        - SI
                        - SB
                        - SO
                        - ZA
                        - GS
                        - SS
                        - ES
                        - LK
                        - SD
                        - SR
                        - SJ
                        - SE
                        - CH
                        - SY
                        - TW
                        - TJ
                        - TZ
                        - TH
                        - TL
                        - TG
                        - TK
                        - TO
                        - TT
                        - TN
                        - TM
                        - TC
                        - TV
                        - TR
                        - UG
                        - UA
                        - AE
                        - GB
                        - UM
                        - US
                        - UY
                        - UZ
                        - VU
                        - VE
                        - VN
                        - VG
                        - VI
                        - WF
                        - EH
                        - YE
                        - ZM
                        - ZW
                        - AX
                      description: Two-letter country code (ISO 3166-1 alpha-2).
                    additional:
                      type: string
                      nullable: true
                      description: >-
                        Additional address information (e.g. PO Box, c/o name
                        etc.).
                      example: c/o Testimonial
                  required:
                    - postcode
                    - city
                    - country
                  description: Buyer's default delivery address. Send `null` to clear.
                custom_data:
                  type: object
                  nullable: true
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: array
                        items:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                      - nullable: true
                      - nullable: true
                  description: >-
                    Free-form metadata for storing integration-specific data
                    alongside this buyer. Replaces the existing object entirely.
                    Send `null` to clear.
              required:
                - trading_name
                - legal_name
                - legal_form
                - registered_at
                - incorporated_at
                - business_identifiers
                - business_address
                - custom_data
              additionalProperties: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  external_id:
                    type: string
                    maxLength: 100
                    pattern: ^[a-zA-Z0-9-_]+$
                    description: Unique identifier of a buyer.
                  created_at:
                    type: number
                    description: >-
                      Timestamp indicating when the buyer was created (unix time
                      in seconds).
                    example: 1582896122
                  updated_at:
                    type: number
                    description: >-
                      Timestamp indicating the last time the buyer was updated
                      (unix time in seconds).
                    example: 1582896122
                  max_days_past_due:
                    type: integer
                    nullable: true
                    description: Maximum days past due among DUE invoices.
                  trading_name:
                    type: string
                    nullable: true
                    description: >-
                      Buyer's trading name. If it's not provided, Tilta will use
                      the legal_name.
                    example: ACME
                  legal_name:
                    type: string
                    description: >-
                      Buyer's full legal name incl. the legal form if
                      applicable.
                    example: ACME GmbH
                  legal_form:
                    type: string
                    enum:
                      - LIMITED_COMPANY
                      - SOLE_TRADER
                      - PARTNERSHIP
                      - PUBLIC_COMPANY
                      - COOPERATIVE
                      - GOVERNMENT
                      - OTHER
                    description: >-
                      Buyer's legal form which depends on the buyer's registered
                      country. [Available legal
                      forms](https://docs.tilta.io/docs/legal-forms) cover
                      Tilta's operating countries.
                  registered_at:
                    type: number
                    nullable: true
                    description: >-
                      Buyer' registration date (unix time in seconds), when they
                      signed up on your platform.
                    example: 1582896122
                  incorporated_at:
                    type: number
                    nullable: true
                    description: >-
                      Buyer's date of incorporation (unix time in seconds),
                      meaning the date when the business of registered or
                      started.
                    example: 1582896122
                  business_identifiers:
                    type: array
                    nullable: true
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - VAT_ID
                            - TAX_ID
                            - REGISTER_ID
                            - CREFO_ID
                            - ALLIANZ_TRADE_ID
                            - SCHUFA_ID
                            - CREDITSAFE_ID
                            - CRIF_ID
                            - ELLISPHERE_ID
                          description: The type of business identifier
                        value:
                          type: string
                          maxLength: 48
                          description: The value of the business identifier
                        country:
                          type: string
                          enum:
                            - AF
                            - AL
                            - DZ
                            - AS
                            - AD
                            - AO
                            - AI
                            - AQ
                            - AG
                            - AR
                            - AM
                            - AW
                            - AU
                            - AT
                            - AZ
                            - BS
                            - BH
                            - BD
                            - BB
                            - BY
                            - BE
                            - BZ
                            - BJ
                            - BM
                            - BT
                            - BO
                            - BQ
                            - BA
                            - BW
                            - BV
                            - BR
                            - IO
                            - BN
                            - BG
                            - BF
                            - BI
                            - CV
                            - KH
                            - CM
                            - CA
                            - KY
                            - CF
                            - TD
                            - CL
                            - CN
                            - CX
                            - CC
                            - CO
                            - KM
                            - CD
                            - CG
                            - CK
                            - CR
                            - HR
                            - CU
                            - CW
                            - CY
                            - CZ
                            - CI
                            - DK
                            - DJ
                            - DM
                            - DO
                            - EC
                            - EG
                            - SV
                            - GQ
                            - ER
                            - EE
                            - SZ
                            - ET
                            - FK
                            - FO
                            - FJ
                            - FI
                            - FR
                            - GF
                            - PF
                            - TF
                            - GA
                            - GM
                            - GE
                            - DE
                            - GH
                            - GI
                            - GR
                            - GL
                            - GD
                            - GP
                            - GU
                            - GT
                            - GG
                            - GN
                            - GW
                            - GY
                            - HT
                            - HM
                            - VA
                            - HN
                            - HK
                            - HU
                            - IS
                            - IN
                            - ID
                            - IR
                            - IQ
                            - IE
                            - IM
                            - IL
                            - IT
                            - JM
                            - JP
                            - JE
                            - JO
                            - KZ
                            - KE
                            - KI
                            - KP
                            - KR
                            - KW
                            - KG
                            - LA
                            - LV
                            - LB
                            - LS
                            - LR
                            - LY
                            - LI
                            - LT
                            - LU
                            - MO
                            - MG
                            - MW
                            - MY
                            - MV
                            - ML
                            - MT
                            - MH
                            - MQ
                            - MR
                            - MU
                            - YT
                            - MX
                            - FM
                            - MD
                            - MC
                            - MN
                            - ME
                            - MS
                            - MA
                            - MZ
                            - MM
                            - NA
                            - NR
                            - NP
                            - NL
                            - NC
                            - NZ
                            - NI
                            - NE
                            - NG
                            - NU
                            - NF
                            - MK
                            - MP
                            - 'NO'
                            - OM
                            - PK
                            - PW
                            - PS
                            - PA
                            - PG
                            - PY
                            - PE
                            - PH
                            - PN
                            - PL
                            - PT
                            - PR
                            - QA
                            - RO
                            - RU
                            - RW
                            - RE
                            - BL
                            - SH
                            - KN
                            - LC
                            - MF
                            - PM
                            - VC
                            - WS
                            - SM
                            - ST
                            - SA
                            - SN
                            - RS
                            - SC
                            - SL
                            - SG
                            - SX
                            - SK
                            - SI
                            - SB
                            - SO
                            - ZA
                            - GS
                            - SS
                            - ES
                            - LK
                            - SD
                            - SR
                            - SJ
                            - SE
                            - CH
                            - SY
                            - TW
                            - TJ
                            - TZ
                            - TH
                            - TL
                            - TG
                            - TK
                            - TO
                            - TT
                            - TN
                            - TM
                            - TC
                            - TV
                            - TR
                            - UG
                            - UA
                            - AE
                            - GB
                            - UM
                            - US
                            - UY
                            - UZ
                            - VU
                            - VE
                            - VN
                            - VG
                            - VI
                            - WF
                            - EH
                            - YE
                            - ZM
                            - ZW
                            - AX
                          description: Two-letter country code (ISO 3166-1 alpha-2).
                      required:
                        - type
                        - value
                        - country
                      additionalProperties: false
                    description: A list of business identifiers
                  business_address:
                    type: object
                    properties:
                      street:
                        type: string
                        description: Address line (e.g. street, road, place).
                        example: Example Street
                      house:
                        type: string
                        description: House number or denominator.
                        example: 42b
                      postcode:
                        type: string
                        description: ZIP or postal code.
                        example: '12345'
                      city:
                        type: string
                        description: City, district, town, or village.
                        example: Berlin
                      country:
                        type: string
                        enum:
                          - AF
                          - AL
                          - DZ
                          - AS
                          - AD
                          - AO
                          - AI
                          - AQ
                          - AG
                          - AR
                          - AM
                          - AW
                          - AU
                          - AT
                          - AZ
                          - BS
                          - BH
                          - BD
                          - BB
                          - BY
                          - BE
                          - BZ
                          - BJ
                          - BM
                          - BT
                          - BO
                          - BQ
                          - BA
                          - BW
                          - BV
                          - BR
                          - IO
                          - BN
                          - BG
                          - BF
                          - BI
                          - CV
                          - KH
                          - CM
                          - CA
                          - KY
                          - CF
                          - TD
                          - CL
                          - CN
                          - CX
                          - CC
                          - CO
                          - KM
                          - CD
                          - CG
                          - CK
                          - CR
                          - HR
                          - CU
                          - CW
                          - CY
                          - CZ
                          - CI
                          - DK
                          - DJ
                          - DM
                          - DO
                          - EC
                          - EG
                          - SV
                          - GQ
                          - ER
                          - EE
                          - SZ
                          - ET
                          - FK
                          - FO
                          - FJ
                          - FI
                          - FR
                          - GF
                          - PF
                          - TF
                          - GA
                          - GM
                          - GE
                          - DE
                          - GH
                          - GI
                          - GR
                          - GL
                          - GD
                          - GP
                          - GU
                          - GT
                          - GG
                          - GN
                          - GW
                          - GY
                          - HT
                          - HM
                          - VA
                          - HN
                          - HK
                          - HU
                          - IS
                          - IN
                          - ID
                          - IR
                          - IQ
                          - IE
                          - IM
                          - IL
                          - IT
                          - JM
                          - JP
                          - JE
                          - JO
                          - KZ
                          - KE
                          - KI
                          - KP
                          - KR
                          - KW
                          - KG
                          - LA
                          - LV
                          - LB
                          - LS
                          - LR
                          - LY
                          - LI
                          - LT
                          - LU
                          - MO
                          - MG
                          - MW
                          - MY
                          - MV
                          - ML
                          - MT
                          - MH
                          - MQ
                          - MR
                          - MU
                          - YT
                          - MX
                          - FM
                          - MD
                          - MC
                          - MN
                          - ME
                          - MS
                          - MA
                          - MZ
                          - MM
                          - NA
                          - NR
                          - NP
                          - NL
                          - NC
                          - NZ
                          - NI
                          - NE
                          - NG
                          - NU
                          - NF
                          - MK
                          - MP
                          - 'NO'
                          - OM
                          - PK
                          - PW
                          - PS
                          - PA
                          - PG
                          - PY
                          - PE
                          - PH
                          - PN
                          - PL
                          - PT
                          - PR
                          - QA
                          - RO
                          - RU
                          - RW
                          - RE
                          - BL
                          - SH
                          - KN
                          - LC
                          - MF
                          - PM
                          - VC
                          - WS
                          - SM
                          - ST
                          - SA
                          - SN
                          - RS
                          - SC
                          - SL
                          - SG
                          - SX
                          - SK
                          - SI
                          - SB
                          - SO
                          - ZA
                          - GS
                          - SS
                          - ES
                          - LK
                          - SD
                          - SR
                          - SJ
                          - SE
                          - CH
                          - SY
                          - TW
                          - TJ
                          - TZ
                          - TH
                          - TL
                          - TG
                          - TK
                          - TO
                          - TT
                          - TN
                          - TM
                          - TC
                          - TV
                          - TR
                          - UG
                          - UA
                          - AE
                          - GB
                          - UM
                          - US
                          - UY
                          - UZ
                          - VU
                          - VE
                          - VN
                          - VG
                          - VI
                          - WF
                          - EH
                          - YE
                          - ZM
                          - ZW
                          - AX
                        description: Two-letter country code (ISO 3166-1 alpha-2).
                      additional:
                        type: string
                        nullable: true
                        description: >-
                          Additional address information (e.g. PO Box, c/o name
                          etc.).
                        example: c/o Testimonial
                    required:
                      - postcode
                      - city
                      - country
                    description: Buyer's billing address.
                  delivery_address:
                    type: object
                    nullable: true
                    properties:
                      street:
                        type: string
                        description: Address line (e.g. street, road, place).
                        example: Example Street
                      house:
                        type: string
                        description: House number or denominator.
                        example: 42b
                      postcode:
                        type: string
                        description: ZIP or postal code.
                        example: '12345'
                      city:
                        type: string
                        description: City, district, town, or village.
                        example: Berlin
                      country:
                        type: string
                        enum:
                          - AF
                          - AL
                          - DZ
                          - AS
                          - AD
                          - AO
                          - AI
                          - AQ
                          - AG
                          - AR
                          - AM
                          - AW
                          - AU
                          - AT
                          - AZ
                          - BS
                          - BH
                          - BD
                          - BB
                          - BY
                          - BE
                          - BZ
                          - BJ
                          - BM
                          - BT
                          - BO
                          - BQ
                          - BA
                          - BW
                          - BV
                          - BR
                          - IO
                          - BN
                          - BG
                          - BF
                          - BI
                          - CV
                          - KH
                          - CM
                          - CA
                          - KY
                          - CF
                          - TD
                          - CL
                          - CN
                          - CX
                          - CC
                          - CO
                          - KM
                          - CD
                          - CG
                          - CK
                          - CR
                          - HR
                          - CU
                          - CW
                          - CY
                          - CZ
                          - CI
                          - DK
                          - DJ
                          - DM
                          - DO
                          - EC
                          - EG
                          - SV
                          - GQ
                          - ER
                          - EE
                          - SZ
                          - ET
                          - FK
                          - FO
                          - FJ
                          - FI
                          - FR
                          - GF
                          - PF
                          - TF
                          - GA
                          - GM
                          - GE
                          - DE
                          - GH
                          - GI
                          - GR
                          - GL
                          - GD
                          - GP
                          - GU
                          - GT
                          - GG
                          - GN
                          - GW
                          - GY
                          - HT
                          - HM
                          - VA
                          - HN
                          - HK
                          - HU
                          - IS
                          - IN
                          - ID
                          - IR
                          - IQ
                          - IE
                          - IM
                          - IL
                          - IT
                          - JM
                          - JP
                          - JE
                          - JO
                          - KZ
                          - KE
                          - KI
                          - KP
                          - KR
                          - KW
                          - KG
                          - LA
                          - LV
                          - LB
                          - LS
                          - LR
                          - LY
                          - LI
                          - LT
                          - LU
                          - MO
                          - MG
                          - MW
                          - MY
                          - MV
                          - ML
                          - MT
                          - MH
                          - MQ
                          - MR
                          - MU
                          - YT
                          - MX
                          - FM
                          - MD
                          - MC
                          - MN
                          - ME
                          - MS
                          - MA
                          - MZ
                          - MM
                          - NA
                          - NR
                          - NP
                          - NL
                          - NC
                          - NZ
                          - NI
                          - NE
                          - NG
                          - NU
                          - NF
                          - MK
                          - MP
                          - 'NO'
                          - OM
                          - PK
                          - PW
                          - PS
                          - PA
                          - PG
                          - PY
                          - PE
                          - PH
                          - PN
                          - PL
                          - PT
                          - PR
                          - QA
                          - RO
                          - RU
                          - RW
                          - RE
                          - BL
                          - SH
                          - KN
                          - LC
                          - MF
                          - PM
                          - VC
                          - WS
                          - SM
                          - ST
                          - SA
                          - SN
                          - RS
                          - SC
                          - SL
                          - SG
                          - SX
                          - SK
                          - SI
                          - SB
                          - SO
                          - ZA
                          - GS
                          - SS
                          - ES
                          - LK
                          - SD
                          - SR
                          - SJ
                          - SE
                          - CH
                          - SY
                          - TW
                          - TJ
                          - TZ
                          - TH
                          - TL
                          - TG
                          - TK
                          - TO
                          - TT
                          - TN
                          - TM
                          - TC
                          - TV
                          - TR
                          - UG
                          - UA
                          - AE
                          - GB
                          - UM
                          - US
                          - UY
                          - UZ
                          - VU
                          - VE
                          - VN
                          - VG
                          - VI
                          - WF
                          - EH
                          - YE
                          - ZM
                          - ZW
                          - AX
                        description: Two-letter country code (ISO 3166-1 alpha-2).
                      additional:
                        type: string
                        nullable: true
                        description: >-
                          Additional address information (e.g. PO Box, c/o name
                          etc.).
                        example: c/o Testimonial
                    required:
                      - postcode
                      - city
                      - country
                    description: Buyer's default delivery address.
                  custom_data:
                    type: object
                    nullable: true
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                        - type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                        - nullable: true
                        - nullable: true
                    description: >-
                      Free-form metadata for storing integration-specific data
                      alongside this buyer. Replaces the existing object
                      entirely on update.
                  contacts:
                    type: array
                    items:
                      type: object
                      properties:
                        external_id:
                          type: string
                          maxLength: 100
                          pattern: ^[a-zA-Z0-9-_]+$
                          description: Unique identifier of a contact.
                        buyer_external_id:
                          type: string
                          maxLength: 100
                          pattern: ^[a-zA-Z0-9-_]+$
                          description: >-
                            External identifier of the buyer this contact
                            belongs to.
                        salutation:
                          type: string
                          nullable: true
                          enum:
                            - MR
                            - MS
                            - OTHER
                          description: Contact salutation.
                        first_name:
                          type: string
                          nullable: true
                          description: Contact first name.
                        last_name:
                          type: string
                          nullable: true
                          description: Contact last name.
                        email:
                          type: string
                          nullable: true
                          format: email
                          description: Contact email.
                        phone:
                          type: string
                          nullable: true
                          description: >-
                            Contact phone number in E.164 format (e.g.
                            +491711010101).
                          example: '+491711010101'
                        assign_to_all_invoices:
                          type: boolean
                          description: >-
                            Whether this contact should automatically be
                            assigned to all invoices created for the buyer.
                        address:
                          type: object
                          nullable: true
                          properties:
                            street:
                              type: string
                              description: Address line (e.g. street, road, place).
                              example: Example Street
                            house:
                              type: string
                              description: House number or denominator.
                              example: 42b
                            postcode:
                              type: string
                              description: ZIP or postal code.
                              example: '12345'
                            city:
                              type: string
                              description: City, district, town, or village.
                              example: Berlin
                            country:
                              type: string
                              enum:
                                - AF
                                - AL
                                - DZ
                                - AS
                                - AD
                                - AO
                                - AI
                                - AQ
                                - AG
                                - AR
                                - AM
                                - AW
                                - AU
                                - AT
                                - AZ
                                - BS
                                - BH
                                - BD
                                - BB
                                - BY
                                - BE
                                - BZ
                                - BJ
                                - BM
                                - BT
                                - BO
                                - BQ
                                - BA
                                - BW
                                - BV
                                - BR
                                - IO
                                - BN
                                - BG
                                - BF
                                - BI
                                - CV
                                - KH
                                - CM
                                - CA
                                - KY
                                - CF
                                - TD
                                - CL
                                - CN
                                - CX
                                - CC
                                - CO
                                - KM
                                - CD
                                - CG
                                - CK
                                - CR
                                - HR
                                - CU
                                - CW
                                - CY
                                - CZ
                                - CI
                                - DK
                                - DJ
                                - DM
                                - DO
                                - EC
                                - EG
                                - SV
                                - GQ
                                - ER
                                - EE
                                - SZ
                                - ET
                                - FK
                                - FO
                                - FJ
                                - FI
                                - FR
                                - GF
                                - PF
                                - TF
                                - GA
                                - GM
                                - GE
                                - DE
                                - GH
                                - GI
                                - GR
                                - GL
                                - GD
                                - GP
                                - GU
                                - GT
                                - GG
                                - GN
                                - GW
                                - GY
                                - HT
                                - HM
                                - VA
                                - HN
                                - HK
                                - HU
                                - IS
                                - IN
                                - ID
                                - IR
                                - IQ
                                - IE
                                - IM
                                - IL
                                - IT
                                - JM
                                - JP
                                - JE
                                - JO
                                - KZ
                                - KE
                                - KI
                                - KP
                                - KR
                                - KW
                                - KG
                                - LA
                                - LV
                                - LB
                                - LS
                                - LR
                                - LY
                                - LI
                                - LT
                                - LU
                                - MO
                                - MG
                                - MW
                                - MY
                                - MV
                                - ML
                                - MT
                                - MH
                                - MQ
                                - MR
                                - MU
                                - YT
                                - MX
                                - FM
                                - MD
                                - MC
                                - MN
                                - ME
                                - MS
                                - MA
                                - MZ
                                - MM
                                - NA
                                - NR
                                - NP
                                - NL
                                - NC
                                - NZ
                                - NI
                                - NE
                                - NG
                                - NU
                                - NF
                                - MK
                                - MP
                                - 'NO'
                                - OM
                                - PK
                                - PW
                                - PS
                                - PA
                                - PG
                                - PY
                                - PE
                                - PH
                                - PN
                                - PL
                                - PT
                                - PR
                                - QA
                                - RO
                                - RU
                                - RW
                                - RE
                                - BL
                                - SH
                                - KN
                                - LC
                                - MF
                                - PM
                                - VC
                                - WS
                                - SM
                                - ST
                                - SA
                                - SN
                                - RS
                                - SC
                                - SL
                                - SG
                                - SX
                                - SK
                                - SI
                                - SB
                                - SO
                                - ZA
                                - GS
                                - SS
                                - ES
                                - LK
                                - SD
                                - SR
                                - SJ
                                - SE
                                - CH
                                - SY
                                - TW
                                - TJ
                                - TZ
                                - TH
                                - TL
                                - TG
                                - TK
                                - TO
                                - TT
                                - TN
                                - TM
                                - TC
                                - TV
                                - TR
                                - UG
                                - UA
                                - AE
                                - GB
                                - UM
                                - US
                                - UY
                                - UZ
                                - VU
                                - VE
                                - VN
                                - VG
                                - VI
                                - WF
                                - EH
                                - YE
                                - ZM
                                - ZW
                                - AX
                              description: Two-letter country code (ISO 3166-1 alpha-2).
                            additional:
                              type: string
                              nullable: true
                              description: >-
                                Additional address information (e.g. PO Box, c/o
                                name etc.).
                              example: c/o Testimonial
                          required:
                            - postcode
                            - city
                            - country
                          description: Contact's address.
                        created_at:
                          type: number
                          description: >-
                            Timestamp indicating when the contact was created
                            (unix time in seconds).
                          example: 1582896122
                        updated_at:
                          type: number
                          description: >-
                            Timestamp indicating the last time the contact was
                            updated (unix time in seconds).
                          example: 1582896122
                      required:
                        - external_id
                        - buyer_external_id
                        - assign_to_all_invoices
                        - created_at
                        - updated_at
                      additionalProperties: false
                      description: Contact response payload.
                    description: Buyer contacts. Returned when expand includes contacts.
                required:
                  - external_id
                  - created_at
                  - updated_at
                  - max_days_past_due
                  - legal_name
                  - legal_form
                  - business_address
                additionalProperties: false
                description: The buyer has been successfully updated.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequestSchema'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedRequestSchema'
      security:
        - bearerAuth: []
components:
  schemas:
    badRequestSchema:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: BAD_REQUEST
        error:
          type: string
          description: Error message for debugging purposes
          example: Request validation failed. 1 issue found.
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Issue code
                example: INVALID_TYPE
              path:
                type: string
                description: Issue path starting with body, params, querystring, or headers
                example: body.registered_at
              message:
                type: string
                description: Issue message for debugging purposes
                example: Invalid type
            required:
              - code
              - path
              - message
          description: List of issues
          example:
            - code: INVALID_TYPE
              path: body.registered_at
              message: Invalid type
      required:
        - code
        - error
        - issues
      description: Bad Request, see error message for details.
      example:
        code: BAD_REQUEST
        error: Request validation failed. 1 issue found.
        issues:
          - code: INVALID_TYPE
            path: body.registered_at
            message: Invalid type
    unauthorizedRequestSchema:
      type: object
      properties:
        error:
          type: string
          description: Error details.
          example: Unauthorized
        code:
          type: string
          description: Error code.
          example: UNAUTHORIZED
      required:
        - error
        - code
      description: Unauthorized Request.
      example:
        error: Unauthorized
        code: UNAUTHORIZED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your Tilta API key, sent as `Bearer <key>`.

````