Skip to main content
PATCH
/
v1
/
customers
/
{id}
Update Customer
curl --request PATCH \
  --url https://api.example.com/v1/customers/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "firstName": "<string>",
  "lastName": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "dateOfBirth": "<string>",
  "address": {},
  "tags": [
    {}
  ],
  "notes": "<string>",
  "preferredLocationId": "<string>",
  "marketingConsent": true,
  "companyId": "<string>"
}
'

Update Customer

Update an existing customer’s information.

Endpoint

PATCH /v1/customers/{id}

Authentication

Authorization
string
required
Bearer token with customers:write scope

Path Parameters

id
string
required
The customer ID (e.g., cust_abc123)

Request Body

All fields are optional. Only include fields you want to update.
firstName
string
Customer’s first name
lastName
string
Customer’s last name
email
string
Customer’s email address (must be unique)
phone
string
Customer’s phone number
dateOfBirth
string
Date of birth (YYYY-MM-DD format)
address
object
Customer’s address (updates merge with existing)
tags
array
Replaces all existing tags
notes
string
Internal notes about customer
preferredLocationId
string
Preferred location ID
Marketing email consent
companyId
string
Associated company ID

Request Example

curl -X PATCH "https://api.tiquo.co/v1/customers/cust_abc123" \
  -H "Authorization: Bearer sk_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+1987654321",
    "tags": ["VIP", "longtime"],
    "notes": "Prefers email communication"
  }'

Response

Returns the updated customer object.

Response Example

{
  "success": true,
  "data": {
    "id": "cust_abc123",
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "phone": "+1987654321",
    "dateOfBirth": "1990-05-15",
    "loyaltyPoints": 150,
    "tags": ["VIP", "longtime"],
    "notes": "Prefers email communication",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-20T16:00:00Z"
  }
}

Partial Updates

Only send fields you want to change:
{
  "phone": "+1987654321"
}
Fields not included in the request remain unchanged.

Address Updates

Address updates merge with existing:
{
  "address": {
    "line1": "456 Oak Avenue"
  }
}
This only updates line1, keeping other address fields.

Tag Replacement

Tags are replaced entirely:
{
  "tags": ["new-tag"]
}
This replaces all existing tags, not appends.
To add a tag, first fetch current tags, then send all:
const customer = await getCustomer(id);
const newTags = [...customer.tags, 'new-tag'];
await updateCustomer(id, { tags: newTags });

Errors

CodeDescription
400Validation error
401Invalid API key
403Missing customers:write scope
404Customer not found
409Email already exists

404 Example

{
  "success": false,
  "error": {
    "code": "not_found",
    "message": "Customer not found"
  }
}

Code Examples

const customerId = 'cust_abc123';

const response = await fetch(`https://api.tiquo.co/v1/customers/${customerId}`, {
  method: 'PATCH',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    phone: '+1987654321',
    notes: 'Updated contact number'
  })
});

const { data: customer } = await response.json();
console.log('Updated customer:', customer.id);