Creating an account
This API is used to create a new account, including account information and user data (such as the administrator’s login and password). After the request is executed, an account with a unique ID is created, and the first user (administrator) is added with the specified login and password.
How to get data
Request address
To get the data, use the address: https://<server_address>/ax/api.php?
Method
POST
Request parameters
Required parameters:
• cmd=accountadd — command to add a new contract
• bill_price — ID of the pricing list (must be retrieved via the pricelist command)
• inn — taxpayer identification number (TIN) of the organization
-
node — the number of the node where the command should be executed
Optional parameters:
• acc_deposit — deposit amount (default is 0)
• acc_type — billing type:
— 1 — postpaid (default)
— 2 — prepaid
— 3 — postpaid light (with disconnection threshold)
• org_type — organization type:
— 1 — legal entity (default)
— 2 — individual
— 3 — sole proprietor
• bill_phone — organization’s phone number
• comment — comment for the contract
• code — 1C code
• kpp — KPP (Tax Registration Reason Code)
• block_limit — disconnection threshold for postpaid light billing type
• modules — IDs of connected modules (comma-separated, retrieved from modlist)
• bill_email — email address for the contract
• org_name — organization name
Example request
https://<server_address>/ax/api.php?cmd=accountadd&bill_price=143&bill_email=demo1@skyelectronics.ru&org_name=PUP&comment=lalala&inn=123456789012&acc_type=1&org_type=1&node=1
|
Response
{
"code": 0,
"data": {
"id": "4018",
"login": "demo1@skyelectronics.ru",
"password": "blPs0S"
},
"msg": "OK"
}
|
The response to the API request will include:
• code — response status
— 0 — operation successful
• data — information about the new contract
• id — unique contract ID
• login — administrator login created for the contract
• password — administrator password
• msg — message indicating the result of the operation