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

# Update Address

> Partially update an address

## Authorization

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer qwoty_your_token`
</ParamField>

## Path Parameters

<ParamField path="id" type="string" required>
  UUID of the address to update
</ParamField>

## Request Body

All fields are optional. Only the fields provided will be updated.

<ParamField body="type" type="string">
  Address type. Allowed values: `"billing"`, `"shipping"`
</ParamField>

<ParamField body="name" type="string | null">
  Address label. Set to `null` to unset.
</ParamField>

<ParamField body="address_line1" type="string">
  Street address
</ParamField>

<ParamField body="address_line2" type="string | null">
  Secondary address line. Set to `null` to unset.
</ParamField>

<ParamField body="city" type="string">
  City
</ParamField>

<ParamField body="state" type="string | null">
  State or region. Set to `null` to unset.
</ParamField>

<ParamField body="postal_code" type="string">
  Postal/ZIP code
</ParamField>

<ParamField body="country" type="string">
  Country code (ISO 3166-1 alpha-2)
</ParamField>

<ParamField body="contact_id" type="string | null">
  UUID of the associated contact. Set to `null` to unset.
</ParamField>

<ParamField body="comment" type="string | null">
  Internal comment. Set to `null` to unset.
</ParamField>

<ParamField body="id_crm" type="string | null">
  External CRM ID
</ParamField>

<ParamField body="id_erp" type="string | null">
  External ERP ID
</ParamField>

<ParamField body="id_accounting" type="string | null">
  External accounting ID
</ParamField>

<Note>`customer_id` cannot be changed after creation.</Note>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://qwoty.app/api/addresses/770e8400-e29b-41d4-a716-446655440002 \
    -H "Authorization: Bearer qwoty_your_token" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Nouveau siège",
      "address_line1": "42 Avenue des Champs-Élysées",
      "city": "Paris",
      "postal_code": "75008",
      "country": "FR"
    }'
  ```

  ```javascript JavaScript theme={null}
  const addressId = '770e8400-e29b-41d4-a716-446655440002'

  const response = await fetch(`https://qwoty.app/api/addresses/${addressId}`, {
    method: 'PATCH',
    headers: {
      Authorization: 'Bearer qwoty_your_token',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      name: 'Nouveau siège',
      address_line1: '42 Avenue des Champs-Élysées',
      city: 'Paris',
      postal_code: '75008',
      country: 'FR',
    }),
  })
  const data = await response.json()
  ```

  ```python Python theme={null}
  import requests

  address_id = '770e8400-e29b-41d4-a716-446655440002'

  response = requests.patch(
      f'https://qwoty.app/api/addresses/{address_id}',
      headers={
          'Authorization': 'Bearer qwoty_your_token',
          'Content-Type': 'application/json',
      },
      json={
          'name': 'Nouveau siège',
          'address_line1': '42 Avenue des Champs-Élysées',
          'city': 'Paris',
          'postal_code': '75008',
          'country': 'FR',
      },
  )
  data = response.json()
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean">
  `true` if the update succeeded
</ResponseField>

<ResponseField name="data" type="object">
  The updated address object (same shape as [Get
  Address](/api-reference/addresses/get))
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "data": {
      "id": "770e8400-e29b-41d4-a716-446655440002",
      "customer_id": "550e8400-e29b-41d4-a716-446655440000",
      "type": "billing",
      "name": "Nouveau siège",
      "address_line1": "42 Avenue des Champs-Élysées",
      "address_line2": null,
      "city": "Paris",
      "state": null,
      "postal_code": "75008",
      "country": "FR",
      "contact_id": null,
      "comment": null,
      "id_crm": null,
      "id_erp": null,
      "id_accounting": null,
      "created_at": "2026-01-15T10:30:00Z",
      "updated_at": "2026-03-24T14:00:00Z"
    }
  }
  ```

  ```json Not Found theme={null}
  {
    "success": false,
    "error": "Address not found"
  }
  ```
</ResponseExample>
