Admin APICustomers

Update Customer

Update customer fields, parameters, and consent with the Admin API

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.

FieldTypeDescription
firstName, lastName, displayNamestringCustomer names
titlestring or nullTitle code or other title text. "" or null clears it. See Titles and nicknames
customTitlestring or nullCustom title text, used with title: "other"
nicknamestring or nullNickname. "" or null clears it
customerNumberstringCustom customer number
statusstringactive, inactive, or banned
sourcestringAcquisition source
emailsarrayFull email list with address and isPrimary
phonesarrayFull phone list with number and isPrimary
profilePhotostringRemote URL, data URI, or empty string to remove
profilePhotoBase64, profilePhotoMimeTypestringAlternative photo upload fields
parametersobjectCustomer parameter values keyed by schema ID, name, or normalized name

Titles and nicknames

title takes one of the codes mr, mrs, ms, miss, mx, dr, or prof. Case, spaces, and dots are ignored, so "Mr." is saved as mr. Any other text, such as "Sir", is saved as a custom title and returned as title: "other" with the text in customTitle. Sending a code clears the custom title text.

Custom titles are shortened to 40 characters and nicknames to 60. A title, customTitle, or nickname that isn't a string, or is longer than 200 characters, is rejected with 400. Tiquo stores the code and translates it wherever the title is shown, so send codes rather than translated words where you can.

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 '{ "title": "Sir", "nickname": "Ken" }'

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 typeValue
TextString
NumberFinite number or numeric string, within configured limits
BooleanBoolean or supported boolean string
Date / datetimeValid date/datetime string
SelectOne configured, non-archived option
MultiselectArray of configured, non-archived option strings
CompoundJSON string containing the configured subfields
Marketing / SMS Opt-InPrefer 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.

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.

StatusMeaning
400Invalid fields or parameter input
401 / 403Invalid key or insufficient access
404Customer not found
409Conflicting or duplicate customer data