---
title: "Update a customer (company or individual)"
method: PUT
path: "/api/external/v2/customers/{id}"
tags: ["Customers"]
---

# Update a customer (company or individual)

`PUT /api/external/v2/customers/{id}`

## Request

- Base URL: `https://app.pennylane.com`
- URL: `https://app.pennylane.com/api/external/v2/customers/{id}`
- Auth: OAuth 2
  - Authorization code: `https://app.pennylane.com/oauth/authorize`
  - Token URL: `https://app.pennylane.com/oauth/oauth/token` scopes: `customers:all`

This endpoint updates a customer. Only the fields provided in the
request body are updated. The customer type can be changed by providing the
`customer_type` field.

Some fields are exclusive to one customer type. Sending a field that does
not belong to the current customer type returns a 422.
- Company-exclusive: `name`, `vat_number`, `reg_no`
- Individual-exclusive: `first_name`, `last_name`

When changing `customer_type`, some fields of the previous type are cleared automatically.
See each field's description for details.


> ℹ️
> This endpoint requires the following scope: `customers:all`

## Path parameters

- `id` integer, required

## Headers

- `X-Company-Id` string

## Request body

- object
  - `customer_type` 'company' | 'individual': The type of the customer. Changing this value clears the fields of the previous type automatically.
  - `name` string: Company customers only. Sending this field for an individual customer returns a 422.
  - `first_name` string: Individual customers only. Sending this field for a company customer returns a 422. Existing value cleared automatically when switching to `company`.
  - `last_name` string: Individual customers only. Sending this field for a company customer returns a 422. Existing value cleared automatically when switching to `company`.
  - `vat_number` string: Company customers only. Sending this field for an individual customer returns a 422. Existing value cleared automatically when switching to `individual`.
  - `reg_no` string: Company customers only. Sending this field for an individual customer returns a 422. Existing value cleared automatically when switching to `individual`.
  - `phone` string
  - `billing_address` object, nullable
    - `address` string
    - `postal_code` string
    - `city` string
    - `country_alpha2` string
  - `delivery_address` object, nullable
    - `address` string
    - `postal_code` string
    - `city` string
    - `country_alpha2` string
  - `payment_conditions` 'upon_receipt' | 'custom' | '7_days' | '15_days' | '30_days' | '30_days_end_of_month' | '45_days' | '45_days_end_of_month' | '60_days': Note that the `custom` option is only used on Pennylane's web app to avoid pre-filling the deadline when creating an invoice. On the API it has no effect and you will still have to provide a deadline when creating an invoice.
  - `billing_iban` string, nullable
  - `recipient` string: The name of the person to whom the invoice is addressed
  - `reference` string, nullable
  - `notes` string, nullable
  - `emails` string[]
  - `external_reference` string
  - `billing_language` 'fr_FR' | 'en_GB' | 'de_DE' | 'es_ES': The language in which the customer will receive invoices. Default is `fr_FR`
  - `electronic_billing_address` string, nullable: The electronic billing address of the company customer used for e-invoicing routing. Based on the customer's SIREN or SIRET. Use a value returned by the GET /api/external/v2/customers/{id}/electronic_billing_addresses endpoint. Sending null or an empty string leaves the current address unchanged.

## Response `200`

Returns the updated customer

- union
  - object
    - `id` integer, required
    - `name` string, required
    - `billing_iban` string, nullable, required
    - `payment_conditions` 'upon_receipt' | 'custom' | '7_days' | '15_days' | '30_days' | '30_days_end_of_month' | '45_days' | '45_days_end_of_month' | '60_days', required: Note that the `custom` option is only used on Pennylane's web app to avoid pre-filling the deadline when creating an invoice. On the API it has no effect and you will still have to provide a deadline when creating an invoice.
    - `recipient` string, required: The name of the person to whom the invoice is addressed
    - `phone` string, required
    - `reference` string, nullable, required
    - `notes` string, nullable, required
    - `vat_number` string, required
    - `reg_no` string, required
    - `electronic_billing_address` string, nullable, required: The electronic billing address of the company customer used for e-invoicing routing. Based on the customer's SIREN or SIRET.
    - `public_administration` boolean, required: Whether the company customer is a French public administration. Based on the public administration check when available, otherwise on the customer's SIREN.
    - `ledger_account` object, nullable, required
      - `id` integer, required
    - `emails` string[], required
    - `billing_address` object, required
      - `address` string, required
      - `postal_code` string, required
      - `city` string, required
      - `country_alpha2` string, required
    - `delivery_address` object, required
      - `address` string, required
      - `postal_code` string, required
      - `city` string, required
      - `country_alpha2` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `customer_type` 'company', required
    - `external_reference` string, required: The unique external reference assigned to this customer, assigned on creation either by you or Pennylane.
    - `billing_language` 'fr_FR' | 'en_GB' | 'de_DE' | 'es_ES', required: The language in which the customer will receive invoices. Default is `fr_FR`
    - `mandates` object, required: GoCardless mandates associated with this customer
      - `url` string, required: URL to list GoCardless mandates associated with this customer
    - `pro_account_mandates` object, required: Pro Account mandates associated with this customer
      - `url` string, required: URL to list Pro Account mandates associated with this customer
    - `contacts` object, required
      - `url` string, required: URL to get the contacts of the customer.
  - object
    - `id` integer, required
    - `name` string, required
    - `billing_iban` string, nullable, required
    - `payment_conditions` 'upon_receipt' | 'custom' | '7_days' | '15_days' | '30_days' | '30_days_end_of_month' | '45_days' | '45_days_end_of_month' | '60_days', required: Note that the `custom` option is only used on Pennylane's web app to avoid pre-filling the deadline when creating an invoice. On the API it has no effect and you will still have to provide a deadline when creating an invoice.
    - `recipient` string, required
    - `phone` string, required
    - `reference` string, nullable, required
    - `notes` string, nullable, required
    - `first_name` string, required
    - `last_name` string, required
    - `ledger_account` object, nullable, required
      - `id` integer, required
    - `emails` string[], required
    - `billing_address` object, required
      - `address` string, required
      - `postal_code` string, required
      - `city` string, required
      - `country_alpha2` string, required
    - `delivery_address` object, required
      - `address` string, required
      - `postal_code` string, required
      - `city` string, required
      - `country_alpha2` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `customer_type` 'individual', required
    - `external_reference` string, required: The unique external reference assigned to this customer, assigned on creation either by you or Pennylane. (Same attribute as `source_id` in the API v1)
    - `billing_language` 'fr_FR' | 'en_GB' | 'de_DE' | 'es_ES', required: The language in which the customer will receive invoices. Default is `fr_FR`
    - `mandates` object, required: GoCardless mandates associated with this customer
      - `url` string, required: URL to list GoCardless mandates associated with this customer
    - `pro_account_mandates` object, required: Pro Account mandates associated with this customer
      - `url` string, required: URL to list Pro Account mandates associated with this customer
    - `contacts` object, required
      - `url` string, required: URL to get the contacts of the customer.

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: Access to this resource forbidden
- `404`: The resource was not found
- `422`: Unprocessable content
- `503`: The service is temporarily unavailable

## Changes

- **2026-11-03** `871f863307e5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pennylane/apis/company-v2/changes/api/external/v2/customers/:id/put.md)

---

[API](https://skmtc.dev/pennylane/apis/company-v2.md) - [All operations](https://skmtc.dev/pennylane/apis/company-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/pennylane/apis/company-v2/revisions/871f863307e5?raw)
