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

# Update a customer address

> Update a customer address

<sup>Required permissions: `customer:write`</sup>



## OpenAPI

````yaml put /customer-addresses/{id}
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /customer-addresses/{id}:
    parameters: []
    put:
      tags:
        - CustomerAddress
      summary: Update a customer address
      description: |-
        Update a customer address

        <sup>Required permissions: `customer:write`</sup>
      operationId: updateCustomerAddress
      parameters:
        - name: id
          in: path
          description: CustomerAddress identifier
          required: true
          deprecated: false
          schema:
            type: string
          style: simple
          explode: false
      requestBody:
        description: The updated CustomerAddress resource
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/CustomerAddress.CreateCustomerAddressRequest-CustomerAddressWrite
          text/html:
            schema:
              $ref: >-
                #/components/schemas/CustomerAddress.CreateCustomerAddressRequest-CustomerAddressWrite
        required: true
      responses:
        '200':
          description: CustomerAddress resource updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerAddress-CustomerAddressDetail'
            text/html:
              schema:
                $ref: '#/components/schemas/CustomerAddress-CustomerAddressDetail'
          links: {}
        '400':
          description: Invalid input
        '404':
          description: Resource not found
        '422':
          description: Unprocessable entity
      deprecated: false
      security:
        - JWT:
            - customer:write
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X PUT \
             /customer-addresses/{id} \
             --header "Content-Type: application/json" \
             --header "Authorization: Bearer <token>" \
             --data '{
                "countryCode": "DE",
                "vatId": "DE123456789",
                "companyName": "Acme Inc.",
                "street": "Musterstra\u00dfe 1",
                "houseNumber": "1a",
                "zip": "12345",
                "city": "Berlin",
                "addition": "c\/o John Doe",
                "costCentre": "12345"
            }'
components:
  schemas:
    CustomerAddress.CreateCustomerAddressRequest-CustomerAddressWrite:
      type: object
      description: ''
      deprecated: false
      properties:
        countryCode:
          description: If not provided, we will use the customer country code.
          example: DE
          type:
            - string
            - 'null'
        firstName:
          maxLength: 255
          description: Can be empty if the customer is a company.
          example: John
          nullable: true
        lastName:
          maxLength: 255
          description: Can be empty if the customer is a company.
          example: Doe
          nullable: true
        vatId:
          minLength: 2
          maxLength: 255
          description: If not provided, we will use the customer vat id.
          example: DE123456789
          type:
            - string
            - 'null'
        companyName:
          maxLength: 255
          example: Acme Inc.
          type:
            - string
            - 'null'
        street:
          minLength: 2
          maxLength: 255
          description: >-
            The street of the customer. If not provided, we will use empty
            string.
          example: Musterstraße 1
          type:
            - string
            - 'null'
        houseNumber:
          minLength: 0
          maxLength: 255
          description: >-
            The house number of the customer. If not provided, we will use empty
            string.
          example: 1a
          type:
            - string
            - 'null'
        zip:
          description: >-
            The zip code of the customer. If not provided, we will use empty
            string.
          example: '12345'
          type:
            - string
            - 'null'
        city:
          minLength: 2
          maxLength: 255
          description: The city of the customer. If not provided, we will use empty string.
          example: Berlin
          type:
            - string
            - 'null'
        addition:
          maxLength: 255
          description: >-
            Additional address line of the customer. If not provided, we will
            use empty string.
          example: c/o John Doe
          type:
            - string
            - 'null'
        salutation:
          example: Herr
          enum:
            - Firma
            - Herr
            - Frau
        costCentre:
          minLength: 2
          maxLength: 255
          description: >-
            The cost centre of the customer. If not provided, we will use empty
            string.
          example: '12345'
          type:
            - string
            - 'null'
        type:
          minLength: 2
          maxLength: 255
          enum:
            - TYPE_DEFAULT
            - TYPE_INVOICE
          example: TYPE_DEFAULT
    CustomerAddress-CustomerAddressDetail:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        vatId:
          description: >-
            VAT ID, which will be used to bill to. If not provided, we will use
            the customer vat id.
          example: DE123456789
          type:
            - string
            - 'null'
        type:
          example: TYPE_DEFAULT
          enum:
            - TYPE_DEFAULT
            - TYPE_INVOICE
        default:
          example: 'true'
          type: boolean
        status:
          readOnly: true
          example: active
          enum:
            - active
            - archived
        city:
          example: Berlin
          type: string
        zip:
          example: '12345'
          type: string
        street:
          example: Musterstraße
          type: string
        houseNumber:
          example: 1a
          type: string
        countryCode:
          example: DE
          type: string
        companyName:
          description: Company name, which will be used to bill to.
          example: ACME Inc.
          type:
            - string
            - 'null'
        salutation:
          example: Herr
          enum:
            - Firma
            - Herr
            - Frau
        addition:
          description: >-
            Additional address information, which will be shown on generated
            documents like invoices, reminders, etc.
          example: c/o John Doe
          type:
            - string
            - 'null'
        costCentre:
          description: >-
            Cost centre, which will be shown on generated documents like
            invoices, reminders, etc.
          example: '123456789'
          type:
            - string
            - 'null'
        firstName:
          description: >-
            First name, which will be shown on generated documents like
            invoices, reminders, etc.
          example: John
          type:
            - string
            - 'null'
        lastName:
          description: >-
            Last name, which will be shown on generated documents like invoices,
            reminders, etc.
          example: Doe
          type:
            - string
            - 'null'
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````