es
ClientesCrear un cliente

Crear un cliente

Crea un registro de cliente — el perfil de cliente/cuenta contra el que se reserva una solicitud de trabajo (orden de trabajo); úselo para importar o sincronizar clientes desde su propio CRM, formulario web de captación o flujo de admisión. La dirección (street, city, postal_code, ...) y las coordenadas (latitude/longitude) van dentro del objeto anidado `address`. service_area_id debe ser un UUID de un área de servicio válida perteneciente a este negocio.

Argumentos

Idempotency-Keystringheaderopcional
Unique key making retries safe: a repeat send with the same key replays the original response (header Idempotent-Replayed: true) instead of re-running the operation. Reusing a key with a different body returns 422 IDEMPOTENCY_KEY_REUSE.
addressobjectbodyopcional
Dirección postal y coordenadas.
citystringbodyopcional
City / locality. Max 100 chars.
countrystringbodyopcional
Country (free-form or ISO code). Max 100 chars.
formattedstringbodyopcional
Human-readable single-line address; when set it wins over the discrete parts for display. Max 500 chars.
latitudenumberbodyopcional
Geographic latitude in decimal degrees (-90..90). Omit if unknown.
linestringbodyopcional
Street address, line 1 (e.g. "123 Main St"). Max 255 chars.
line2stringbodyopcional
Street address, line 2 (apartment, suite, unit). Max 255 chars.
longitudenumberbodyopcional
Geographic longitude in decimal degrees (-180..180). Omit if unknown.
postal_codestringbodyopcional
Postal / ZIP code. Max 32 chars.
statestringbodyopcional
State / province / region. Max 100 chars.
emailstringbodyopcional
Dirección de correo electrónico. Opcional, pero se requiere al menos uno de phone/email.
full_namestringbodyobligatorio
Nombre completo del cliente. Obligatorio; máx. 255 caracteres.
phonestringbodyopcional
Número de teléfono. Opcional, pero se requiere al menos uno de phone/email; 10–20 caracteres.
preferred_technician_idstringbodyopcional
UUID del técnico que prefiere este cliente. Debe pertenecer a este negocio.
service_area_idstringbodyopcional
UUID del área de servicio de este cliente. Debe pertenecer a este negocio.
sms_opt_inbooleanbodyopcional
SMS consent: set true ONLY when the customer explicitly agreed to receive SMS (e.g. ticked a non-pre-checked consent box, or gave verbal/written consent you keep a record of). SMS notifications are suppressed while false.
tierenumbodyopcional
Nivel de fidelidad. Por defecto "regular" si se omite.
uidstringbodyopcional
Su referencia externa para este cliente (el ID de su propio sistema). Opcional; máx. 32 caracteres.
POST/v1/customers
curl -X POST "https://api.crisphive.com/v1/customers" \
  -H "Authorization: Bearer chsk_test_4eC8xQ9mZ2pL7Ka0rT" \
  -H "Content-Type: application/json" \
  -d '{
  "address": {
    "city": "San Francisco",
    "country": "US",
    "formatted": "123 Market Street, San Francisco, CA 94103",
    "latitude": 1,
    "line": "123 Market Street",
    "line2": "Suite 200",
    "longitude": 1,
    "postal_code": "94103",
    "state": "CA"
  },
  "email": "jane.doe@example.com",
  "full_name": "Jane Cooper",
  "phone": "+14155550142",
  "preferred_technician_id": "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01",
  "service_area_id": "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01",
  "sms_opt_in": true,
  "tier": "regular",
  "uid": "CRM-10293"
}'
Cuerpo de la solicitud
{
"address": {
"city": ,
"country": ,
"formatted": ,
"latitude": ,
"line": ,
"line2": ,
"longitude": ,
"postal_code": ,
"state":
},
"email": ,
"full_name": ,
"phone": ,
"preferred_technician_id": ,
"service_area_id": ,
"sms_opt_in": ,
"tier": ,
"uid":
}

Respuestas