Updates a customer

Updates a single customer record in the catalog.
IMPORTANT: This is a full-replace operation (PUT semantics). All fields must be
included in the request body — omitting any field will set it to null, wiping
existing data. Always call retrieve-a-customer first to fetch the current record,
then include ALL existing fields in your update request along with your changes.
Exceptions that keep stored data when the field is omitted:

  • metadata: omit it to keep all existing metadata, or send only the keys you want to set or clear.
  • addresses: omit address and billing_addresses to keep the stored billing addresses, and likewise
    shipping_address and shipping_addresses. This is for backward compatibility: integrations built
    before customers could have several addresses won't wipe the ones they don't send.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

UUID of the customer to be used in this operation.

Body Params
string
required
string
address
object
deprecated

Deprecated: use billing_addresses. In responses, the first address in billing_addresses. In requests without billing_addresses, it creates or edits that first billing address in place; the customer's other billing addresses are left untouched.

shipping_address
object
deprecated

Deprecated: use shipping_addresses. In responses, the first address in shipping_addresses. In requests without shipping_addresses, it creates or edits that first shipping address in place; the customer's other shipping addresses are left untouched.

billing_addresses
array of objects | null

All of the customer's billing addresses, returned in a stable order; the first is the default for new contracts and invoices. On update the list is authoritative: addresses sent with an id are updated, addresses without an id are added, and stored addresses left out are removed. Removing an address that is used by a contract or an invoice that can still be edited is rejected with a 400 naming those documents. Omit to leave billing addresses unchanged; send an empty list to remove them all. Cannot be combined with address.

billing_addresses
shipping_addresses
array of objects | null

All of the customer's shipping addresses. Same rules as billing_addresses. Cannot be combined with shipping_address.

shipping_addresses
emails
array of objects

All of the customer's emails. On update, send the full list: emails with an id are kept or edited, emails without an id are added, and emails left out are removed (omitting emails, or sending an empty list, removes them all). A removed email is also removed from every contract email_selection; to change an email and keep it selected, send its id. Rejected: an id on create, an id that doesn't belong to this customer, the same id twice, or the same address and type twice (addresses are compared ignoring case and surrounding spaces).

emails
external_references
array of objects, unique
external_references
int32
≥ 0
boolean
Defaults to false

When set to true, invoices for this customer will be automatically sent via email on the invoice date.

boolean
Defaults to false

When set to true, an email will be sent to customers periodically if they have not paid an invoice.

boolean

Allows this customer to pay invoices online via Stripe, and must be true before auto-payment can be set up for them. Omit on create to leave online payments off; omit on update to keep the customer's current setting. Enabling it requires Stripe to be configured for at least one subsidiary.

fields
array of objects | null
fields
tax_ids
array of objects | null

The customer's tax IDs. Omit on create for no tax IDs. On update, omit to keep the current tax IDs, send an empty list to clear them, or send a list to replace them all. Adding or changing tax IDs requires the customer to have an address, and they are validated with the organization's tax provider when one is connected.

tax_ids
metadata
object | null

Partial metadata update keyed by definition key. Omitting this property preserves all existing metadata. When supplied, omitted keys remain unchanged; null, empty, or whitespace-only values clear only the named key.

Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json