Create Reward Expiry Reminder

This API is designed to create a reward expiry reminder, notifying users when their rewards are nearing expiration.

Use Cases:

  1. Reward Expiration Notification : When a reward expires, notify the user via push notification, email, or SMS.
  2. Sweepstakes Expiration Notification and Winner Finalization : When a sweepstake expires, notify who entered, and trigger a Databricks notebook to finalize the winner.

👍

Note

  • For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .
  • This an org Level config and this feature this feature is disabled by default

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Default access group
  • This is an organization-level configuration, and the feature is disabled by default. To enable it, use this API with the key CONF_SEND_REWARD_EXPIRY_NOTIFICATION_ENABLED set to true or false. You can also configure the notification timing using the key CONF_SEND_EXPIRY_NOTIFICATION_FOR_REWARD_TIME with the value in HH:MM format.

Resource information

URI/api_gateway/rewards/core/v1/reward/expiryReminder
HTTP MethodPOST
PaginationNo
Batch supportNo
Rate limit informationNone

API endpoint example

https://eu.api.capillarytech.com/api_gateway/rewards/core/v1/reward/expiryReminder

Request body parameters

Parameter NameData TypeDescription
duration*IntegerThe duration specifies how many days in advance the reward expiry reminder will be sent before the reward expires. This does not have any default value set and is mandatory.
timingtimestampThis defines the specific time when the reminder will be sent. The time should be provided in 24-hour format (HH:MM) and represents the the org's cluster (server) time. If no time is specified, the reminder will automatically be set for 16:00 server time for the org's cluster.
{
    "duration": 32,
    "timing": "18:00"
}

Response parameters

Parameter NameDescription
successIndicates if the request was successful.
codeResponse status code.
messageMessage describing the status of the response.
idUnique identifier for the reward expiry reminder.
orgIdIdentifier for the organization associated with the reminder.
durationDuration before the expiry to send a reminder.
durationTypeType of duration.
cronTaskIdThis is the unique database ID for each cron setup, which includes specific timing, modules, and other relevant settings. This is a backend term.
timingTime at which the reminder will be triggered (in HH:MM format).
isActiveIndicates whether the reminder is currently active.
createdOnTimestamp of when the reminder was created in epoch timestamp
lastUpdatedOnTimestamp of the last update in epoch timestamp.
createdByIdentifier of the user who created the reminder.
lastUpdatedByIdentifier of the user who last updated the reminder.
{
    "status": {
        "success": true,
        "code": 12038,
        "message": "Reward expiry reminder created"
    },
    "rewardExpiryReminder": {
        "id": 3,
        "orgId": 100458,
        "duration": 32,
        "durationType": "DAYS",
        "cronTaskId": 590565,
        "timing": "18:00",
        "isActive": true,
        "createdOn": 1727680457131,
        "lastUpdatedOn": 1727680457131,
        "createdBy": 75130850,
        "lastUpdatedBy": 75130850
    }
}
{
    "status": {
        "success": false,
        "code": 400,
        "message": "Duration is mandatory"
    }
}

API-specific error codes

Error codeDescription
400Duration is mandatory
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!