Skip to main content
POST
/
users
/
{id}
/
points-transaction
Manage points transaction
curl --request POST \
  --url https://{subdomain}.nudj.cx/api/v2/admin/users/{id}/points-transaction \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "amount": 500000.5,
  "direction": "credit",
  "communityId": "<string>",
  "externalTransactionReference": "<string>"
}'
{
  "success": true,
  "message": "<string>",
  "transaction": {
    "id": "<string>",
    "organisationId": "<string>",
    "communityId": "<string>",
    "userId": "<string>",
    "accountingDirection": "credit",
    "amount": 123,
    "status": "pending",
    "createdAt": "<string>",
    "externalTransactionReference": "<string>",
    "createdBy": "<string>",
    "updatedBy": "<string>"
  }
}

Authorizations

x-api-token
string
header
required

Path Parameters

id
string
required

ID of the user for the points transaction, this can be the Nudj user ID or the external user ID

Body

application/json

Input for managing points transactions (credit or debit)

amount
number
required

Number of points for the transaction

Required range: 1 <= x <= 1000000
direction
enum<string>
required

Direction of the transaction: Credit to add points, Debit to deduct points

Available options:
credit,
debit
externalTransactionReference
string
required

Unique reference provided by the admin to track this transaction

Required string length: 1 - 200
communityId
string

ID of the community for the transaction. Required if organization has multiple communities

Response

Successful response

Output of the points transaction operation

success
boolean
required
message
string
required
transaction
object
required

A points transaction

I