Skip to main content

Create a client

This operation allow you to create a subclient for your account. You need to have available balance to create a subclient.

note

You need to check with commercial the minimun balance required configured to create a subclient account.

HTTP Request:

POST /clients

Header Parameters

HeaderDescription
Authorization 
required
The Bearer token created in
Get authorization Token
Content-Type
required
application/json

Body Parameters

ParameterTypePatternDescription
name 
required
string5-30 charactersThe name of the company to be created
alias 
required
string3-10 charactersAlias for the company to be created
email 
required
stringemailMain email for the company
available 
required
floatfloat numberInitial available for the company
phone 
required
string10 digitsMain phone for the company
mobile_phone 
required
string10 digitsMain mobile phone for the company
rfc 
required
string10-13 charactersRFC of the company to be created
street 
required
string1-20 charactersStreet name where the company is located
ext_street_number 
required
string1-5 charactersExternal street number where the company is located
int_street_number 
optional
string1-5 charactersInternal street number where the company is located
suburb 
required
string1-25 charactersSuburb where the company is located
township 
required
string1-25 charactersTownship where the company is located
city 
required
string1-25 charactersCity where the company is located
state 
required
stringStatesThe company state address. See allowed values in
Get States Catalog
postal_code 
required
string5 digitsPostal code where the company is located
contact_name 
required
string1-12 charactersThe name of the main contact for the company
contact_second_name 
optional
string1-12 charactersThe second name of the main contact for the company
contact_surname 
required
string1-12 charactersThe surname of the main contact for the company
contact_second_surname 
optional
string1-12 charactersThe second surname of the main contact for the company
contact_email 
required
stringemailThe email of the main contact for the company
contact_telephone_country_code 
required
string2-3 digitsThe telephone country code of the main contact for the company
contact_telephone 
required
string10 digitsThe telephone of the main contact for the company
contact_mobile_phone_country_code 
required
string2-3 digitsThe mobile phone country code of the main contact for the company
contact_mobile_phone 
required
string10 digitsThe mobile phone of the main contact for the company
legal_representative_name 
optional
string1-12 charactersThe name of the legal representative for the company
legal_representative_second_name 
optional
string1-12 charactersThe second name of the legal representative for the company
legal_representative_surname 
optional
string1-12 charactersThe surname of the legal representative for the company
legal_representative_second_surname 
optional
string1-12 charactersThe second surname of the legal representative for the company
legal_representative_email 
optional
stringemailThe email of the legal representative for the company
legal_representative_telephone_country_code 
optional
string2-3 digitsThe telephone country code of the legal representative for the company
legal_representative_telephone 
optional
string10 digitsThe telephone of the legal representative for the company
legal_representative_mobile_phone_country_code 
optional
string2-3 digitsTThe mobile phone country code of the legal representative for the company
legal_representative_mobile_phone 
optional
string10 digitsThe mobile phone of the legal representative for the company
api_key_name 
required
string5-30 charactersApi Key name for the company to be created
api_key_description 
optional
string1-30 charactersDescription for the Api Key
api_key_password 
required
string1-30 charactersThe Api Key password web service access

Example JSON Request:

{
"name": "Noentiendo",
"alias": "NOENT",
"email": "[email protected]",
"available": 1000,
"phone": "5555555555",
"mobile_phone": "6666666666",
"rfc": "AAMM9001010A1",
"street": "Av. Siempre",
"ext_street_number": "1234",
"int_street_number": "Apt.4",
"suburb": "Nápoles",
"township": "Benito Juarez",
"city": "CDMX",
"state": "CDMX",
"postal_code": "55555",
"contact_name": "Juan",
"contact_second_name": "Alberto",
"contact_surname": "Perea",
"contact_second_surname": "Perez",
"contact_email": "[email protected]",
"contact_telephone_country_code": 52,
"contact_telephone": "5555555555",
"contact_mobile_phone_country_code": 52,
"contact_mobile_phone": "6666666666",
"legal_representative_name": "Iman",
"legal_representative_second_name": "Hora",
"legal_representative_surname": "Martinez",
"legal_representative_second_surname": "Martinez",
"legal_representative_email": "[email protected]",
"legal_representative_telephone_country_code": 52,
"legal_representative_telephone": "5555555555",
"legal_representative_mobile_phone_country_code": 52,
"legal_representative_mobile_phone": "6666666666",
"api_key_name": "SUB_CLIENT_ACCESS",
"api_key_description": "Subclient Api Key",
"api_key_password": "12345"
}

Example JSON Response:

{
"success": true,
"code": 0,
"message": "OK",
"data": {
"subclient": {
"id": "12345abc-ebb5-56d8-3256-9875672a3455",
"code": "NOENT",
"name": "Noentiendo",
"available": 1000,
"rfc": "AAMM9001010A1",
"api_client": {
"id": "",
"name": "54321abc-abc5-56d8-6987-9875672a6587",
"alias": "NOENT",
"description": "Subclient Api Key"
}
}
}
}