Crea un nuevo cliente
Security
api-key
- Production serverhttps://app.mercately.com/retailers/api/v1/customers
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers
curl -i -X POST \
https://app.mercately.com/retailers/api/v1/customers \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"customer": {
"first_name": "Juan",
"last_name": "Pérez",
"email": "juan@example.com",
"phone": "+593999999999",
"id_type": "cedula",
"id_number": "1234567890",
"address": "Av. Principal 123",
"city": "Quito",
"state": "Pichincha",
"zip_code": "170101",
"customer_addresses_attributes": [
{
"address": "Calle Secundaria 456",
"city": "Guayaquil",
"state": "Guayas",
"zip_code": "090101",
"country_id": 1,
"latitude": "-2.1894",
"longitude": "-79.8891",
"description": "Oficina principal",
"main": true
}
],
"notes": "Cliente VIP"
},
"agent_id": 1,
"tags": [
{
"name": "VIP",
"value": true
}
],
"custom_fields": [
{
"field_name": "preferencia_contacto",
"field_content": "WhatsApp"
}
]
}'Response
{ "message": "Customer created successfully", "customer": { "id": 12345, "first_name": "Juan", "last_name": "Pérez", "email": "juan@example.com", "phone": "+593999999999", "id_type": "cedula", "id_number": "1234567890", "address": "Av. Principal 123", "city": "Quito", "state": "Pichincha", "zip_code": "170101", "notes": "Cliente VIP", "created_at": "2024-01-15T10:30:00.000Z" } }