Skip to content

Reward Enrollments

Enrollments link specific players to rewards. Once a player is enrolled, they can consume the reward (e.g. use their free bets) within the configured time window and on the specified products.

For authentication details and general response format, see the Overview.

Enroll Player

Enrolls a single player in a reward.

Endpoint: POST /v1/rewards/{rewardId}/enrollments

Path Parameters

Parameter Type Description
rewardId string The unique identifier of the reward to enroll the player in.

Request Headers

Header Type Required Description
X-AUTH-OPERATOR-ID integer Yes The operator ID.
X-AUTH-REQUEST-HASH string Yes The computed SHA-256 authentication hash.
Content-Type string Yes Must be application/json.

Request Body

Field Type Required Description
operatorPlayerId string Yes The player's unique identifier within the operator's platform.

Example Request

{
  "operatorPlayerId": "player-123"
}

Example Response (FreeBets Enrollment)

{
  "message": "OK",
  "data": {
    "rewardType": "FreeBets",
    "id": "enr-001",
    "operatorId": 1,
    "rewardId": "rwd-001",
    "campaignOperatorReference": "OP-SUMMER-2026",
    "rewardOperatorReference": "OP-REWARD-001",
    "operatorPlayerId": "player-123",
    "products": ["plinko-8-lines"],
    "status": "New",
    "startTimeUtc": "2026-06-01T00:00:00Z",
    "endTimeUtc": "2026-06-30T23:59:59Z",
    "createdAtUtc": "2026-03-20T12:00:00Z",
    "updatedAtUtc": null,
    "cancelledAtUtc": null,
    "betValue": 0.50,
    "currencyIsoCode": "EUR",
    "totalBetCount": 10,
    "remainingBetCount": 10,
    "creditWalletType": "FreeBet",
    "stakeNotReturned": true
  },
  "responseCode": "OK"
}

Validation Rules

  • operatorPlayerId is required and cannot be empty or whitespace.

Bulk Enroll Players

Enrolls multiple players in a reward in a single request.

Endpoint: POST /v1/rewards/{rewardId}/enrollments/bulk

Path Parameters

Parameter Type Description
rewardId string The unique identifier of the reward to enroll players in.

Request Headers

Header Type Required Description
X-AUTH-OPERATOR-ID integer Yes The operator ID.
X-AUTH-REQUEST-HASH string Yes The computed SHA-256 authentication hash.
Content-Type string Yes Must be application/json.

Request Body

Field Type Required Description
operatorPlayerIds string[] Yes Array of player IDs within the operator's platform. Must contain less than 1,000 entries.

Example Request

{
  "operatorPlayerIds": [
    "player-123",
    "player-456",
    "player-789"
  ]
}

Example Response

{
  "message": "OK",
  "data": [
    {
      "rewardType": "FreeBets",
      "id": "enr-001",
      "operatorId": 1,
      "rewardId": "rwd-001",
      "campaignOperatorReference": "OP-SUMMER-2026",
      "rewardOperatorReference": "OP-REWARD-001",
      "operatorPlayerId": "player-123",
      "products": ["plinko-8-lines"],
      "status": "New",
      "startTimeUtc": "2026-06-01T00:00:00Z",
      "endTimeUtc": "2026-06-30T23:59:59Z",
      "createdAtUtc": "2026-03-20T12:00:00Z",
      "updatedAtUtc": null,
      "cancelledAtUtc": null,
      "betValue": 0.50,
      "currencyIsoCode": "EUR",
      "totalBetCount": 10,
      "remainingBetCount": 10,
      "creditWalletType": "FreeBet",
      "stakeNotReturned": true
    },
    {
      "rewardType": "FreeBets",
      "id": "enr-002",
      "operatorId": 1,
      "rewardId": "rwd-001",
      "campaignOperatorReference": "OP-SUMMER-2026",
      "rewardOperatorReference": "OP-REWARD-001",
      "operatorPlayerId": "player-456",
      "products": ["plinko-8-lines"],
      "status": "New",
      "startTimeUtc": "2026-06-01T00:00:00Z",
      "endTimeUtc": "2026-06-30T23:59:59Z",
      "createdAtUtc": "2026-03-20T12:00:00Z",
      "updatedAtUtc": null,
      "cancelledAtUtc": null,
      "betValue": 0.50,
      "currencyIsoCode": "EUR",
      "totalBetCount": 10,
      "remainingBetCount": 10,
      "creditWalletType": "FreeBet",
      "stakeNotReturned": true
    }
  ],
  "responseCode": "OK"
}

Validation Rules

  • operatorPlayerIds must contain less than 1,000 entries.
  • Empty or whitespace-only entries are filtered out. After filtering, at least one valid entry must remain.

Get Enrollments for Reward

Retrieves enrollments for a specific reward with pagination support.

Endpoint: GET /v1/rewards/{rewardId}/enrollments

Path Parameters

Parameter Type Description
rewardId string The unique identifier of the reward.

Query Parameters

Parameter Type Default Description
page integer 1 The page number. Must be greater than or equal to 1.
pageSize integer 50 The number of results per page. Must be between 1 and 500.

Request Headers

Header Type Required Description
X-AUTH-OPERATOR-ID integer Yes The operator ID.
X-AUTH-REQUEST-HASH string Yes The computed SHA-256 authentication hash.

Example Request

GET /v1/rewards/rwd-001/enrollments?page=1&pageSize=50

Response

Returns an array of enrollment objects in the data field.

Validation Rules

  • page must be greater than or equal to 1.
  • pageSize must be between 1 and 500.

Cancel Enrollment

Cancels a specific reward enrollment.

Endpoint: POST /v1/enrollments/{enrollmentId}/cancel

Path Parameters

Parameter Type Description
enrollmentId string The unique identifier of the enrollment to cancel.

Request Headers

Header Type Required Description
X-AUTH-OPERATOR-ID integer Yes The operator ID.
X-AUTH-REQUEST-HASH string Yes The computed SHA-256 authentication hash.

Note

Unlike campaign and reward cancellation, this endpoint does not require a request body.

Example Response

{
  "message": "OK",
  "data": {},
  "responseCode": "OK"
}

Enrollment Response Fields

Base Fields (All Enrollment Types)

Field Type Description
rewardType string The reward type discriminator (e.g. FreeBets).
id string Unique enrollment identifier assigned by Gamnify.
operatorId integer The operator this enrollment belongs to.
rewardId string The parent reward identifier.
campaignOperatorReference string (nullable) The operator reference from the parent campaign.
rewardOperatorReference string (nullable) The operator reference from the parent reward.
operatorPlayerId string The player's identifier within the operator's platform.
products string[] Product names this enrollment is valid for.
status string Current status: New, Active, Claimed, Cancelled, or Expired. See Status Lifecycles.
startTimeUtc string (date-time) Enrollment start time in UTC (inherited from the reward).
endTimeUtc string (date-time) Enrollment end time in UTC (inherited from the reward).
createdAtUtc string (date-time) Timestamp when the enrollment was created.
updatedAtUtc string (date-time, nullable) Timestamp of the last update, if any.
cancelledAtUtc string (date-time, nullable) Timestamp when the enrollment was cancelled, if applicable.

Additional Fields for FreeBets Enrollments

Field Type Description
betValue decimal The value of each free bet.
currencyIsoCode string The ISO 4217 currency code.
totalBetCount integer The total number of free bets originally awarded.
remainingBetCount integer The number of free bets remaining to be used.
creditWalletType string The wallet type being credited (Real, Bonus, or FreeBet).
stakeNotReturned boolean Whether the stake is withheld on winning free bets.

Typical Integration Flow

The following diagram illustrates a typical flow for setting up and managing reward enrollments:

sequenceDiagram
    participant Operator
    participant Gamnify as Gamnify API

    Operator->>+Gamnify: POST /v1/campaigns (Create Campaign)
    Gamnify-->>-Operator: Campaign created (status: Scheduled)

    Operator->>+Gamnify: POST /v1/campaigns/{id}/rewards (Create Reward)
    Gamnify-->>-Operator: Reward created (status: Scheduled)

    Operator->>+Gamnify: POST /v1/rewards/{id}/enrollments/bulk (Enroll Players)
    Gamnify-->>-Operator: Enrollments created (status: New)

    Note over Operator,Gamnify: Campaign start time reached

    Note over Gamnify: Enrollments transition to Active
    Note over Gamnify: Players can now use their free bets

    Operator->>+Gamnify: GET /v1/rewards/{id}/enrollments (Check Progress)
    Gamnify-->>-Operator: Enrollment statuses (Active/Claimed/Expired)