> ## 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 Customer

> Partially update a customer

## 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 customer to update
</ParamField>

## Request Body

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

<ParamField body="name" type="string">
  Customer display name
</ParamField>

<ParamField body="type" type="string">
  Customer type. Allowed values: `"company"`, `"individual"`
</ParamField>

<ParamField body="segment_id" type="string | null">
  UUID of the customer segment. Set to `null` to unset.
</ParamField>

<ParamField body="logo" type="string | null">
  Logo URL. Set to `null` to unset.
</ParamField>

<ParamField body="tax_ids" type="array">
  Legal identifiers. **Replaces all existing tax IDs.** Send `[]` to remove all.

  Omitting this field leaves existing tax IDs unchanged.

  ```json theme={null}
  [{ "tax": "VAT", "tax_value": "FR98765432100" }]
  ```
</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>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://qwoty.app/api/customers/550e8400-e29b-41d4-a716-446655440000 \
    -H "Authorization: Bearer qwoty_your_token" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Acme Corp (Renamed)",
      "tax_ids": [
        { "tax": "VAT", "tax_value": "FR98765432100" }
      ]
    }'
  ```

  ```javascript JavaScript theme={null}
  const customerId = '550e8400-e29b-41d4-a716-446655440000'

  const response = await fetch(`https://qwoty.app/api/customers/${customerId}`, {
    method: 'PATCH',
    headers: {
      Authorization: 'Bearer qwoty_your_token',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      name: 'Acme Corp (Renamed)',
      tax_ids: [{ tax: 'VAT', tax_value: 'FR98765432100' }],
    }),
  })
  const data = await response.json()
  ```

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

  customer_id = '550e8400-e29b-41d4-a716-446655440000'

  response = requests.patch(
      f'https://qwoty.app/api/customers/{customer_id}',
      headers={
          'Authorization': 'Bearer qwoty_your_token',
          'Content-Type': 'application/json',
      },
      json={
          'name': 'Acme Corp (Renamed)',
          'tax_ids': [{'tax': 'VAT', 'tax_value': 'FR98765432100'}],
      },
  )
  data = response.json()
  ```
</CodeGroup>

## Response

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

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

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "data": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Acme Corp (Renamed)",
      "type": "company",
      "segment_id": null,
      "logo": null,
      "id_crm": "crm_001",
      "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": "Customer not found"
  }
  ```
</ResponseExample>
