curl --request POST \
--url https://api.erlcrussia.xyz/v2/moscowroleplay/civops/businesses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "760966468715937814",
"username": "ttunku_pal",
"name": "Roma Aeterna",
"form": "ООО",
"channelId": "1432651696210841760"
}
'{
"success": true,
"requestId": "req_123",
"status": "pending",
"message": "Request created, awaiting approval"
}POST-Эндпоинты API Экономики
Операции с бизнесами
Управление бизнесами, сотрудниками, товарами и финансами.
Доступные действия:
request- создать заявку на бизнес (userId, username, name, form, channelId).approve- одобрить заявку (requestId, approverId, +поля бизнеса).cancelRequest- отменить/удалить пендинг заявку (requestId).create- прямое создание бизнеса (businessData).delete- удалить бизнес (businessId).addMoney- добавить деньги в бизнес (businessId, amount).removeMoney- забрать деньги из бизнеса (businessId, amount).withdraw- вывести деньги бизнеса пользователю (businessId, amount, targetUserId).transfer- перевод между бизнесами (fromBusinessId, toBusinessId, amount, reason, authorId).addEmployee- добавить сотрудника (businessId, userId, username, position).removeEmployee- уволить сотрудника (businessId, userId).addProduct- добавить товар (businessName, item).removeProduct- удалить товар (businessName, itemName).buyProduct- купить товар у бизнеса (userId, businessName, itemName, quantity).returnMoney- вернуть деньги по транзакции (businessId, transactionId).
POST
/
moscowroleplay
/
civops
/
businesses
curl --request POST \
--url https://api.erlcrussia.xyz/v2/moscowroleplay/civops/businesses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "760966468715937814",
"username": "ttunku_pal",
"name": "Roma Aeterna",
"form": "ООО",
"channelId": "1432651696210841760"
}
'{
"success": true,
"requestId": "req_123",
"status": "pending",
"message": "Request created, awaiting approval"
}Авторизации
API ключ для доступа к эндпоинтам Гражданских Операций.
Передается в заголовке Authorization: Bearer <ключ>.
ОБЯЗАТЕЛЕН ДЛЯ ВСЕХ ЭНДПОИНТОВ ГРАЖДАНСКИХ ОПЕРАЦИЙ (кроме /health).
Параметры запроса
Тип операции.
Доступные опции:
request, approve, cancelRequest, create, delete, addMoney, removeMoney, withdraw, transfer, addEmployee, removeEmployee, addProduct, removeProduct, buyProduct, returnMoney Тело
application/json
The body is of type object.
Ответ
Операция успешно выполнена.
The response is of type object.
Была ли эта страница полезной?