Skip to main content
Skip table of contents

Создание пользователя. VMS Billing API

Создание пользователя

JSON
{
    "login": "test@mail.com",
    "password": "qweasdzxc",
    "type": "type_value",
    "billing_info": {
        "billing_id": "123123123",
        "billing_extra": []
    },
    "status": "active",
    "billing_properties": [
        {
            "type": "phone",
            "value": "+80283289362"
        }
    ]
}

POST /api/v1/billing/user/manage

Параметры метода

string login, Login пользователя


string password, Пароль


string type, Тип пользователя


array billing_info, Дополнительная информация о пользователе получаемая из биллинга


string properties, [value] Значение свойства


string status, Статус пользователя

200 OK

Возвращает объект пользователя

JSON
{
    "id": 1,
    "login": "test@mail.com",
    "name": null,
    "type": "type_value",
    "status": "active",
    "created_at": "2023-05-02T10:18:50.000000Z",
    "updated_at": "2023-05-02T10:18:50.000000Z",
    "deleted_at": null,
    "can_update_password": false,
    "billing_properties": [
        {
            "type": "phone",
            "value": "+80283289362"
        }
    ]
}

422 Unprocessable Entity

Возвращает JSON объект с ошибкой. VMS Billing/Общая информация/Валидация внешней системы

JSON
{
    "message": "Тут не будет информативного сообщения",
    "errors": {
        "any_key": [
            "Тут будет описана причина ошибки"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/user/manage' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "login": "string",
    "password": "string",
    "type": "string",
    "billing_info": [],
    "properties": "string",
    "status": "string"
}'
PHP
PHP
$data = array (
  'login' => 'string',
  'password' => 'string',
  'type' => 'string',
  'billing_info' => 
  array (
  ),
  'properties' => 'string',
  'status' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/user/manage', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.