curl --request POST \
--url https://api.erlcrussia.com/v2/moscowroleplay/civops/economy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromUserId": "1027118272879009886",
"toUserId": "1133665013794607114",
"amount": 100000
}
'{
"success": true,
"fromUserId": "1027118272879009886",
"toUserId": "1133665013794607114",
"amount": 100000,
"newBalance": {
"cash": 104000,
"bank": 10000
}
}Endpoints POST de la API de Economía
Operaciones de Economía
Perform operations with the economy system (transactions, transfers, etc.).
Available actions:
transfer- transfer between users (requires fromUserId, toUserId, amount).deposit- deposit money to bank (requires userId, amount).withdraw- withdraw money from bank (requires userId, amount).add- add money to user (requires userId, amount, type).remove- remove money from user (requires userId, amount, type).reset- reset user balance (requires userId).resetCooldown- reset user cooldowns (requires userId, command).
The type parameter for add/remove can be ‘cash’ or ‘bank’ (default ‘cash’).
POST
/
moscowroleplay
/
civops
/
economy
curl --request POST \
--url https://api.erlcrussia.com/v2/moscowroleplay/civops/economy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromUserId": "1027118272879009886",
"toUserId": "1133665013794607114",
"amount": 100000
}
'{
"success": true,
"fromUserId": "1027118272879009886",
"toUserId": "1133665013794607114",
"amount": 100000,
"newBalance": {
"cash": 104000,
"bank": 10000
}
}Autorizaciones
API key for accessing CivOps endpoints.
Passed in the Authorization: Bearer <key> header.
REQUIRED FOR ALL CIVOPS ENDPOINTS (except /health).
Parámetros de consulta
Operation type.
Opciones disponibles:
transfer, deposit, withdraw, add, remove, reset, resetCooldown Cuerpo
application/json
The body is of type object.
Respuesta
Operation successfully completed.
The response is of type object.
¿Esta página le ayudó?