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
Header | Description |
---|---|
Authorization required | The Bearer token created in Get authorization Token |
Content-Type required | application/json |
Body Parameters
Parameter | Type | Pattern | Description |
---|---|---|---|
name required | string | 5-30 characters | The name of the company to be created |
alias required | string | 3-10 characters | Alias for the company to be created |
email required | string | Main email for the company | |
available required | float | float number | Initial available for the company |
phone required | string | 10 digits | Main phone for the company |
mobile_phone required | string | 10 digits | Main mobile phone for the company |
rfc required | string | 10-13 characters | RFC of the company to be created |
street required | string | 1-20 characters | Street name where the company is located |
ext_street_number required | string | 1-5 characters | External street number where the company is located |
int_street_number optional | string | 1-5 characters | Internal street number where the company is located |
suburb required | string | 1-25 characters | Suburb where the company is located |
township required | string | 1-25 characters | Township where the company is located |
city required | string | 1-25 characters | City where the company is located |
state required | string | States | The company state address. See allowed values in Get States Catalog |
postal_code required | string | 5 digits | Postal code where the company is located |
contact_name required | string | 1-12 characters | The name of the main contact for the company |
contact_second_name optional | string | 1-12 characters | The second name of the main contact for the company |
contact_surname required | string | 1-12 characters | The surname of the main contact for the company |
contact_second_surname optional | string | 1-12 characters | The second surname of the main contact for the company |
contact_email required | string | The email of the main contact for the company | |
contact_telephone_country_code required | string | 2-3 digits | The telephone country code of the main contact for the company |
contact_telephone required | string | 10 digits | The telephone of the main contact for the company |
contact_mobile_phone_country_code required | string | 2-3 digits | The mobile phone country code of the main contact for the company |
contact_mobile_phone required | string | 10 digits | The mobile phone of the main contact for the company |
legal_representative_name optional | string | 1-12 characters | The name of the legal representative for the company |
legal_representative_second_name optional | string | 1-12 characters | The second name of the legal representative for the company |
legal_representative_surname optional | string | 1-12 characters | The surname of the legal representative for the company |
legal_representative_second_surname optional | string | 1-12 characters | The second surname of the legal representative for the company |
legal_representative_email optional | string | The email of the legal representative for the company | |
legal_representative_telephone_country_code optional | string | 2-3 digits | The telephone country code of the legal representative for the company |
legal_representative_telephone optional | string | 10 digits | The telephone of the legal representative for the company |
legal_representative_mobile_phone_country_code optional | string | 2-3 digits | TThe mobile phone country code of the legal representative for the company |
legal_representative_mobile_phone optional | string | 10 digits | The mobile phone of the legal representative for the company |
api_key_name required | string | 5-30 characters | Api Key name for the company to be created |
api_key_description optional | string | 1-30 characters | Description for the Api Key |
api_key_password required | string | 1-30 characters | The 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"
}
}
}
}