Bonuses

Create a new Bonus

POST
/api/v2/bonuses

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Header Parameters

accept-language?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/bonuses" \  -H "accept-language: ja" \  -H "Content-Type: application/json" \  -d '{    "accountId": 0,    "amount": 55.55,    "lifetime": 0,    "dynamicLots": 55.55,    "enableAutoCredit": true,    "scalpingThreshold": 0,    "enableTrade": true,    "disabledGroups": [      "EURJPY"    ]  }'
{  "id": 0,  "caption": "Bonus caption",  "clientId": 0,  "clientName": "Mary Smith",  "clientEmail": "example@gmail.com",  "account": "<a href=\"https://ap.vendor.com/accounts/edit/56\">2100237412</a>",  "email": "<a href=\"https://ap.vendor.com/accounts/edit/56\">jepy@mailinator.com</a>",  "amount": "0.000",  "initialAmount": "100.00000000",  "volumeComplete": "0.00",  "temporaryBonus": "Bonus",  "currencyExp": 0,  "fictiveVolumeComplete": "1.11",  "lifetime": 0,  "enableAutoCredit": true,  "scalpingThreshold": 1,  "enableTrade": true,  "disabledGroups": [    "EURJPY"  ],  "dynamicLots": "1.000",  "status": "Expired",  "activatedAt": "2022-01-01T00:00:00+00:00",  "createdAt": "2022-01-01T00:00:00+00:00",  "updatedAt": "2022-01-01T00:00:00+00:00",  "createdBy": 123}
{  "error": {    "message": "Bad Request",    "code": 0,    "details": [      {        "issue": "The selected value is invalid.",        "field": "parameter"      }    ]  }}
{  "error": {    "message": "Unauthorized"  }}
{  "error": {    "message": "Forbidden"  }}
{  "error": {    "message": "Too Many Requests"  }}
{  "error": {    "message": "Service Unavailable"  }}