Update Customer
Update customer fields, parameters, and consent with the Admin API
Update Customer
Update an existing customer in the API key's organisation. Requires an Admin API
key with customers.write. Keep this secret key on your server; browser profile
forms should use the authenticated Customer API instead.
PATCH /customers/{customerId}customerId can be a document ID, customer number, email address, or phone number.
Use the same identifier formats as Get Customer.
Request Body
Only supplied fields are updated.
| Field | Type | Description |
|---|---|---|
firstName, lastName, displayName | string | Customer names |
customerNumber | string | Custom customer number |
status | string | active, inactive, or banned |
source | string | Acquisition source |
emails | array | Full email list with address and isPrimary |
phones | array | Full phone list with number and isPrimary |
profilePhoto | string | Remote URL, data URI, or empty string to remove |
profilePhotoBase64, profilePhotoMimeType | string | Alternative photo upload fields |
parameters | object | Customer parameter values keyed by schema ID, name, or normalized name |
Customer Parameter Values
The same parameters format is supported by Create Customer.
Keys can be a system ID (system_marketing_opt_in), custom customer parameter
schema ID, parameter name, or normalized name. Each schema must belong to this
organisation and allow staff editing. The API key must have customers.write.
curl -X PATCH "https://api.tiquo.app/api/v1/customers/CUSTOMER_ID" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"system_marketing_opt_in": true,
"system_sms_opt_in": false,
"CUSTOMER_PARAMETER_SCHEMA_ID": "Example Ltd"
}
}'Replace CUSTOMER_PARAMETER_SCHEMA_ID with an actual schema ID. Submitted values
replace existing values; omitted keys and null values leave existing data
unchanged. Use "" or [] to clear optional fields where their type permits it.
Required fields cannot be cleared.
| Parameter type | Value |
|---|---|
| Text | String |
| Number | Finite number or numeric string, within configured limits |
| Boolean | Boolean or supported boolean string |
| Date / datetime | Valid date/datetime string |
| Select | One configured, non-archived option |
| Multiselect | Array of configured, non-archived option strings |
| Compound | JSON string containing the configured subfields |
| Marketing / SMS Opt-In | Prefer explicit true or false |
Invalid parameter IDs, values, options, or permissions reject the entire customer
write with 400; other fields in that mutation are not partially updated.
Consent
Marketing and SMS Opt-In are independent. true records consent; false removes
it. The server creates the opt-in timestamp when consent changes from false to
true, preserves it while consent remains true, and clears it on opt-out. Do not
supply your own timestamp. Omitted consent defaults to false on a new customer.
The top-level marketingOptIn and smsOptIn fields are response-only summaries;
write consent through parameters.
Find Parameter IDs and Verify Values
GET /metadata/customer-parameters requires customers.read and returns schema
metadata under data.parameters, including id, label, type, and options.
It is read-only and describes customer parameters, not enquiry parameters.
After a write, use Get Customer to inspect saved parameters,
marketingOptIn, and smsOptIn. The parameters[].parameterId field identifies
the schema; parameters[].id identifies the saved value row and is not a schema
ID. Saved parameter values are strings. Consent uses compound JSON, for example
{"Opt-In":"true","Opt-In Date":"..."}.
Response and Errors
A successful update returns 200 OK with the customer summary in data.
The update response does not include the full parameter collection; read the
customer afterwards to verify saved parameters.
| Status | Meaning |
|---|---|
400 | Invalid fields or parameter input |
401 / 403 | Invalid key or insufficient access |
404 | Customer not found |
409 | Conflicting or duplicate customer data |
Related Flows
- Authenticated profile preferences: customer-editable values on the signed-in customer's own profile.
- Enquiry submission: only enquiry-type parameters; customer parameter writes are not accepted.