Skip to main content
PATCH
/
api
/
customers
/
{id}
Update Customer
curl --request PATCH \
  --url https://app-api.my-virtual-office.com/api/customers/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "first_name": "<string>",
  "last_name": "<string>",
  "email": "<string>",
  "company_name": "<string>",
  "legal_entity": "<string>",
  "language": "<string>",
  "status": "<string>",
  "address_data": {
    "street": "<string>",
    "city": "<string>",
    "postal_code": "<string>",
    "country": "<string>"
  },
  "postal_redirect_address": {
    "street": "<string>",
    "city": "<string>",
    "postal_code": "<string>",
    "country": "<string>"
  }
}
'
{
  "error": "Bad Request",
  "message": "body must NOT have fewer than 1 properties"
}

Update Customer

Update one or more fields of an existing customer. Only fields provided in the request body will be modified.

Authentication

X-API-Key
string
required
Your API key. Can also be provided via Authorization: Bearer header.

Path Parameters

id
string
required
The UUID of the customer to update.

Request Body

At least one field must be provided.
first_name
string
Customer’s first name. Maximum 100 characters.
last_name
string
Customer’s last name. Maximum 100 characters.
email
string
Customer’s email address. Must be a valid email format and unique for your account.
company_name
string
Company name. Maximum 200 characters.
Legal entity type (e.g., “GmbH”, “LLC”). Maximum 100 characters.
language
string
Preferred language for communications. Must be either en or de.
status
string
Customer status. Must be one of active, inactive, or suspended. Inactive or suspended customers cannot log in to the portal.
address_data
object
Customer’s address information.
postal_redirect_address
object
Address to which postal mail should be forwarded for this customer.

Response

id
string
Unique identifier for the customer (UUID)
seller_id
string
Your seller account ID (UUID)
first_name
string
Customer’s first name
last_name
string
Customer’s last name
email
string
Customer’s email address
company_name
string | null
Company name if provided
Legal entity type if provided
language
string | null
Preferred language
address_data
object | null
Address information if provided
postal_redirect_address
object | null
Postal redirect address if set
status
string
Customer status (active, inactive, or suspended)
source
string
Source of customer creation (e.g., “api”)
created_at
string
ISO 8601 timestamp of when the customer was created
updated_at
string
ISO 8601 timestamp of when the customer was last updated

Example Request

curl -X PATCH https://app-api.my-virtual-office.com/api/customers/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Jane",
    "company_name": "Acme Corp",
    "language": "en"
  }'

Example Response

200 OK
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "seller_id": "660e8400-e29b-41d4-a716-446655440001",
  "first_name": "Jane",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "company_name": "Acme Corp",
  "legal_entity": "GmbH",
  "language": "en",
  "address_data": {
    "street": "Musterstraße 123",
    "city": "Berlin",
    "postal_code": "10115",
    "country": "Germany"
  },
  "postal_redirect_address": {
    "street": "Weiterleitungsstraße 5",
    "city": "München",
    "postal_code": "80331",
    "country": "Germany"
  },
  "status": "active",
  "source": "api",
  "created_at": "2024-01-15T10:30:00.000Z",
  "updated_at": "2024-02-20T14:15:00.000Z"
}

Error Responses

{
  "error": "Bad Request",
  "message": "body must NOT have fewer than 1 properties"
}
{
  "error": "Unauthorized",
  "message": "API key is required. Provide it via X-API-Key header or Authorization Bearer token."
}
{
  "error": "Not Found",
  "message": "Customer not found"
}
{
  "error": "Conflict",
  "message": "A customer with this email already exists"
}

Error Codes

HTTP CodeErrorDescription
400Bad RequestInvalid request body or no fields provided
401UnauthorizedMissing or invalid API key
404Not FoundCustomer not found or does not belong to your account
409ConflictEmail address already exists for another customer
500Internal Server ErrorUnexpected server error