POST /api/v1/customers — Creates a customer. 'email', 'phone' and 'tax_id' are required. 'fiscal_category' is the tax classification: a plain value for AR ('responsable-inscripto'), or country-prefixed ('mx/sat-601', 'co/responsable-iva').

API
POST/api/v1/customers

Crear un cliente

Requiere token Bearer

Crea un cliente. 'email', 'phone' y 'tax_id' son obligatorios. 'fiscal_category' es la condición fiscal: un valor simple para AR ('responsable-inscripto'), o con prefijo de país ('mx/sat-601', 'co/responsable-iva').

Solicitud

tax_id format + fiscal_category enum are validated against the negocio's country (AR/MX/CO).

json
{
  "email": "compras@empresa.com",
  "name": "Ana",
  "last_name": "Pérez",
  "company": "Empresa S.A.",
  "phone": "+5491155556666",
  "tax_id": "30-12345678-9",
  "fiscal_category": "responsable-inscripto",
  "price_list_id": "42",
  "discount": 10,
  "fiscal_address": { "street_address": "Av. Corrientes 1234", "city": "CABA", "region": "Buenos Aires", "postal_code": "C1043", "country": "AR" }
}

Respuesta

json
// 201 — el cliente creado, con su id asignado

Código

bash
curl -X POST 'https://tu-tienda.com/api/v1/customers' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{ "email": "compras@empresa.com", "name": "Ana", "last_name": "Pérez", "company": "Empresa S.A.", "phone": "+5491155556666", "tax_id": "30-12345678-9", "fiscal_category": "responsable-inscripto", "price_list_id": "42", "discount": 10, "fiscal_address": { "street_address": "Av. Corrientes 1234", "city": "CABA", "region": "Buenos Aires", "postal_code": "C1043", "country": "AR" } }'

Probá el endpoint

https://tu-tienda.com/api/v1/customers
Necesitás un token para probar los endpoints. Generalo desde Configuración → ERP → API Token.