Skip to main content
PATCH
/
customers
/
{id}
Update a customer
curl --request PATCH \
  --url https://api.nomos.energy/customers/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "first_name": "John",
  "last_name": "Doe"
}
'
{
  "object": "customer",
  "id": "cus_mi4f0oda6x9m7gcsvjk0ole1",
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "created_at": "2024-03-14T12:00:00Z",
  "type": "person",
  "vat_id": "DE123456789"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required
Example:

"cus_mi4f0oda6x9m7gcsvjk0ole1"

Body

application/json

The customer fields to update

first_name
string

Customer's first name

Required string length: 1 - 100
Example:

"John"

last_name
string

Customer's last name

Required string length: 1 - 100
Example:

"Doe"

company_name
string

Company name. Only valid for company customers; must be non-empty when provided.

Required string length: 1 - 100
Example:

"Example GmbH"

Response

The updated customer

object
enum<string>
required

Type of the object, always 'customer'

Available options:
customer
id
string
required

Unique identifier for the customer

Example:

"cus_mi4f0oda6x9m7gcsvjk0ole1"

first_name
string
required

Customer's first name

Required string length: 1 - 100
Example:

"John"

last_name
string
required

Customer's last name

Required string length: 1 - 100
Example:

"Doe"

email
string<email>
required

Email address

Example:

"john.doe@example.com"

created_at
required

Timestamp when the customer was created

Example:

"2024-03-14T12:00:00Z"

type
enum<string>
default:person

Type of the customer, always 'person'

Available options:
person
vat_id
string | null

VAT identification number (USt-IdNr.) of the customer

Example:

"DE123456789"