Get Customer


The following endpoint can be used to retrieve the details of a customer within the Hyfin application.


Punto Final

The following endpoint can be used to retrieve a customer. You must replace the {base_url} , {site_id} and {external_id} variables with the appropriate values.

GET
{base_url}/api/v3.1/site/{site_id}/customer/{external_id}
Solicitud
Ningún cuerpo es necesario para esta llamada de API
Respuesta
Campo
Tipo
Descripción
external_id
String
El identificador único del cliente del sistema/base de datos fuente. Si detectamos un registro con el mismo external_id, se actualizará; de lo contrario, se añadirá.
_id
String
The auto generated id assigned to the customer by the system.
first_name
String
El primer nombre del cliente. Se requiere al menos uno de first_name, last_name, account_name, email o mobile_phone.
last_name
String
El apellido del cliente. Se requiere al menos uno de first_name, last_name, account_name, email o mobile_phone.
account_name
String
Si el cliente es una empresa, puedes usar este campo como un identificador adicional (Ej. 123 Main Street o ABC Company). Se requiere al menos uno de first_name, last_name, account_name, email o mobile_phone.
mobile_phone
String
El número de teléfono móvil de los clientes. Requerido si notification_options.notify_phone está habilitado. Se requiere al menos uno de first_name, last_name, account_name, email o mobile_phone.
email
String
La dirección de correo electrónico de los clientes. Requerido si notification_options.notify_email está habilitado. Se requiere al menos uno de first_name, last_name, account_name, email o mobile_phone.
notes
String
Notas internas del cliente. Visible solo para el comerciante.
display_name
String
The customer's name as it is shown to them, built by the system from the name fields above.
reference_number
String
A short human readable id the system assigns to the customer.
contacts
The contacts attached to the customer. A customer created through the API always has one, built from the name, email and phone above.
notification_options
Las preferencias del cliente para recibir notificaciones por mensaje de texto y correo electrónico.
created_at
Date
La fecha en que se creó el cliente.
updated_at
Date
La fecha en que se actualizó por última vez el cliente.
Sample Response
			
{
  "_id": "6839e415564d3cc2160d945e",
  "external_id": "39772634",
  "reference_number": "N7E6NCFYECH9",
  "first_name": "John",
  "last_name": "Doe",
  "account_name": null,
  "display_name": "John Doe",
  "mobile_phone": "12223334444",
  "email": "johndoe@abc.com",
  "notes": "World's best customer",
  "notification_options": {
    "notify_phone": true,
    "notify_email": false,
    "notify_whats_app": false
  },
  "contacts": [
    {
      "_id": "61f32dc2f62bdc6a48951255",
      "is_primary": true,
      "roles": []
    }
  ],
  "created_at": "2025-05-30T19:19:44.143Z",
  "updated_at": "2025-05-30T19:19:44.143Z"
}