Send Reward API

Send a digital reward to a recipient.

Endpoint: POST /v1/rewards/send

Headers

NameTypeRequiredDescription
x-api-keystringYesYour API key
Content-TypestringYesMust be application/json

Request Body

{
  "rewardCode": "AMAZON-US",
  "rewardName": "Amazon Gift Card",
  "amount": "50.00",
  "recipientEmail": "recipient@example.com",
  "quantity": 1,
  "currency": "USD"
}

Parameters

ParameterTypeRequiredDescription
rewardCodestringYesUnique identifier for the reward type
rewardNamestringYesDisplay name of the reward
amountstringYesAmount for each reward
recipientEmailstringYesEmail address of the recipient
quantitynumberNoNumber of rewards to send (default: 1)
currencystringYesCurrency code (e.g., USD, GBP)

Response

{
  "success": true,
  "orderId": "ord_123abc",
  "amount": 50.00,
  "currency": "USD"
}

Example Request

curl -X POST 'https://api.example.com/v1/rewards/send' -H 'x-api-key: rpl_your_api_key' -H 'Content-Type: application/json' -d '{
  "rewardCode": "AMAZON-US",
  "rewardName": "Amazon Gift Card",
  "amount": "50.00",
  "recipientEmail": "recipient@example.com",
  "quantity": 1,
  "currency": "USD"
}'

Error Codes

StatusCodeDescription
400invalid_requestInvalid request parameters
400insufficient_balanceOrganization has insufficient balance
401unauthorizedInvalid or missing API key
404not_foundReward code not found
500server_errorInternal server error

Order Status

After sending a reward, the order will go through the following statuses which you can check in your dashboard.

StatusDescription
processingInitial state when order is created
completedReward has been successfully delivered
failedOrder failed to process

When an order is completed, the recipient will receive an email with their reward details.