curl --request POST \
--url https://api.erlcrussia.xyz/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
}
}Economy API POST Endpoints
Economy Operations
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.xyz/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
}
}Authorizations
API key for accessing CivOps endpoints.
Passed in the Authorization: Bearer <key> header.
REQUIRED FOR ALL CIVOPS ENDPOINTS (except /health).
Query Parameters
Operation type.
Available options:
transfer, deposit, withdraw, add, remove, reset, resetCooldown Body
application/json
The body is of type object.
Response
Operation successfully completed.
The response is of type object.
Was this page helpful?