Update a Customer

Update the information of a specific customer by phone number. Only the fields included in the request are modified.

PATCH https://api.platica.mx/v1/clients/{id}

URL parameters

ParameterTypeDescriptionRequired
idstringCustomer phone number in E.164 format without +, or the customer ID

Request body

All fields are optional. Only the fields included are updated.

FieldTypeDescription
namestringCustomer full name
firstnamestringCustomer first name
lastnamestringCustomer last name
emailstringCustomer email
birthdatestringDate of birth. Format: dd/mm/yyyy
genderenumGender: male or female
companystringCompany name
countryenumCountry of residence (ISO 3166-1 alpha-2 code)
statestringState of residence
citystringCity of residence
addressstringFull address
postalCodestringPostal code
tagsarrayArray of tags
customFieldsobjectCustom fields
ownersarrayList of responsible-user emails
statusenumCustomer status: active or blocked

Update behavior

  • owners must be sent as a list of email addresses
  • each email must exist as a workspace user
  • tags are combined with existing tags without duplicates
  • customFields are merged with existing ones
  • in customFields, for a select field send the option id or its label (the id is stored); a value that does not match any active option returns 400, and null or "" clears the value
  • the phoneNumber from the path is normalized and kept as the customer identifier

Example request

{
  "name": "José",
  "email": "jose@platica.mx",
  "tags": ["vip"],
  "customFields": {
    "placas": "ABC123",
    "id_recepcion": "REC001"
  }
}

Response

{
  "status": "success",
  "message": "Client updated successfully",
  "data": {
    "id": "274fc73cb7d84a17955914fdc1a1f9d0"
  }
}