Skip to main content
PATCH
/
customers
/
{id}
Update a customer
curl --request PATCH \
  --url https://api.alguna.io/customers/{id} \
  --header 'Alguna-Version: <alguna-version>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "aliases": [
    "<string>"
  ],
  "contacts": [
    {
      "email": "john@example.com",
      "is_primary": true,
      "email_preferences": [
        "<string>"
      ],
      "first_name": "John",
      "id": "<string>",
      "last_name": "Doe"
    }
  ],
  "currency": "USD",
  "name": "Acme Corp"
}
'
{
  "created_at": "2026-04-01T10:00:00Z",
  "currency": "USD",
  "id": "cust_abc123",
  "name": "Acme Corp",
  "updated_at": "2026-04-01T12:30:00Z",
  "aliases": [
    "<string>"
  ],
  "billing_address": {
    "city": "San Francisco",
    "country": "USA",
    "line1": "123 Main St",
    "postal_code": "94105",
    "state": "CA",
    "line2": "Suite 100"
  },
  "contacts": [
    {
      "email": "john@example.com",
      "id": "cont_abc123",
      "is_primary": true,
      "email_preferences": [
        "<string>"
      ],
      "first_name": "John",
      "last_name": "Doe"
    }
  ],
  "tax_country": "DE",
  "tax_id": "DE123456789",
  "tax_rate": "0.20",
  "tax_reason": "standard_rated",
  "tax_status": "taxable",
  "tax_type": "vat"
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token.

Headers

Alguna-Version
enum<string>
required
Available options:
2026-04-01
Idempotency-Key
string

A unique string used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.

Maximum string length: 255
Example:

"ik_a1b2c3d4e5f6"

Path Parameters

id
string
required

Unique identifier for the customer

Body

application/json
aliases
string[] | null

Alternative identifiers for the customer

billing_address
object

Customer billing address

contacts
object[]

Customer contacts. Replaces all existing contacts when provided

currency
string | null

ISO 4217 currency code

Example:

"USD"

name
string | null

The name of the customer

Example:

"Acme Corp"

Response

Success

created_at
string<date-time>
required

Timestamp when the customer was created

Example:

"2026-04-01T10:00:00Z"

currency
string
required

ISO 4217 currency code

Example:

"USD"

id
string
required

Unique identifier for the customer

Example:

"cust_abc123"

name
string
required

Customer name

Example:

"Acme Corp"

updated_at
string<date-time>
required

Timestamp when the customer was last updated

Example:

"2026-04-01T12:30:00Z"

aliases
string[]

Alternative identifiers for the customer

billing_address
object

Customer billing address

contacts
object[]

Customer contacts

tax_country
string | null

ISO 3166-1 alpha-2 country code used for tax determination

Example:

"DE"

tax_id
string | null

Customer tax identification number

Example:

"DE123456789"

tax_rate
string | null

Tax rate applied to the customer, expressed as a decimal fraction (0.20 = 20%)

Example:

"0.20"

tax_reason
enum<string> | null

Reason determining how tax is applied to the customer

Available options:
standard_rated,
reverse_charge,
not_collecting,
customer_exempt,
zero_rated,
other
Example:

"standard_rated"

tax_status
string | null

Customer tax status

Example:

"taxable"

tax_type
enum<string> | null

Type of tax applied to the customer

Available options:
gst,
hst,
igst,
jct,
lease_tax,
pst,
qst,
sales_tax,
service_tax,
vat
Example:

"vat"