Crear cliente
POST
/clients
const url = 'https://api.dev.lade.com.mx/clients';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"teamId":"550e8400-e29b-41d4-a716-446655440000","name":"Empresa ABC","rfc":"XAXX010101000","email":"contacto@empresaabc.com","phone":"+5212345678901","cfdiUse":"G03","taxRegime":"601"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.dev.lade.com.mx/clients \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "name": "Empresa ABC", "rfc": "XAXX010101000", "email": "contacto@empresaabc.com", "phone": "+5212345678901", "cfdiUse": "G03", "taxRegime": "601" }'Crea un nuevo cliente para el equipo
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
teamId
required
string format: uuid
name
required
string
nameRelated
string
description
string
rfc
string
email
string format: email
phone
string
cfdiUse
string
taxRegime
string
zipCode
string
address
object
street
string
extNumber
string
intNumber
string
neighborhood
string
city
string
state
string
country
string
zipCode
string
creditLimit
integer
paymentTerms
integer
notes
string
Example
{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "name": "Empresa ABC", "rfc": "XAXX010101000", "email": "contacto@empresaabc.com", "phone": "+5212345678901", "cfdiUse": "G03", "taxRegime": "601"}Responses
Sección titulada «Responses»Cliente creado
Media typeapplication/json
object
id
string format: uuid
teamId
string format: uuid
name
string
nameRelated
string
description
string
rfc
string
email
string format: email
phone
string
cfdiUse
string
taxRegime
string
zipCode
string
status
string
address
object
street
string
extNumber
string
intNumber
string
neighborhood
string
city
string
state
string
country
string
zipCode
string
creditLimit
integer
paymentTerms
integer
notes
string
createdAt
string format: date-time
Example
{ "cfdiUse": "G03", "taxRegime": "601", "status": "ACTIVE", "address": { "country": "Mexico" }}Solicitud inválida
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Validation failed", "field": "email", "message": "Invalid email format"}No autenticado
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Unauthorized", "message": "Invalid or expired token"}Sin permisos
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Forbidden", "message": "You don't have permission to access this resource"}