Create Transaction
POST/v1/admin/clients/:clientID/transactions
Endpoint to manually insert a transaction. Generally Transactions will be generated automatically when an event is triggered. This endpoint is useful to manually asign rewards to an user (for example).
Request
Path Parameters
- application/json
Body
data object
data field can contain any JSON value. This field gives the request some flexibility.
leaderboards object
useful to group transactions.
indicates if this transaction should be used to calculate Leaderboards or not.
indicates if this transaction should increase or decrease the balance. Allowed values are CREDIT
and DEBIT
.
indicates that this transaction is child of the specified parentId (i.e. this transaction is a BOOSTER of another one).
Responses
- 200
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
data object
data field can contain any JSON value. This field gives the request some flexibility.
leaderboards object
useful to group transactions.
indicates if this transaction should be used to calculate Leaderboards or not.
indicates if this transaction should increase or decrease the balance. Allowed values are CREDIT
and DEBIT
.
indicates that this transaction is child of the specified parentId (i.e. this transaction is a BOOSTER of another one).
{
"id": "a5b703f7-089c-4b3f-ac55-36b688fada82",
"authId": 1234,
"clientId": "INCROWD",
"data": {
"amount": 100,
"flowId": "6700752b-23ab-41db-a5cc-cea29700dd58",
"leaderboards": {
"dimensions": [
"minileague_123",
"EUROPE"
],
"keys": [
"competition_1234",
"round_1"
]
},
"message": "Custom message"
},
"groupId": "6700752b-23ab-41db-a5cc-cea29700dd58",
"isComparable": true,
"operation": "CREDIT",
"parentId": "7712e32c-068f-48ce-957b-bfa47026b270",
"sourceSystem": "RULES_ENGINE",
"type": "POINTS",
"createdAt": "2023-09-21T18:35:26.234Z"
}