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.
overrides object No Optional overrides for this enrollment. Only accepted by rewards that permit enrollment overrides. See Enrollment Overrides.

Enrollment Overrides

The overrides object is polymorphic: the rewardType discriminator determines the concrete shape, mirroring the reward model. When rewardType is FreeBets:

Field Type Required Description
rewardType string Yes Must be FreeBets.
betValue decimal Yes The bet value for this enrollment. Must be within the reward's minBetValue/maxBetValue range.
betCount integer Yes The number of free bets for this enrollment. Must be within the reward's minBetCount/maxBetCount range.
currencyIsoCode string Yes The ISO 4217 currency code. Must be a supported currency; matching is case-insensitive and normalized to uppercase.

Which Rewards Accept Overrides

Only rewards that allow enrollment overrides accept them — currently FreeBets rewards with Ranged free bet details. Enrolling into a Fixed reward with overrides fails. Enrolling into a Ranged reward without overrides creates the enrollment with the reward's minimum bet value and bet count.

Example Request

{
  "operatorPlayerId": "player-123",
  "overrides": {
    "rewardType": "FreeBets",
    "betValue": 2.50,
    "betCount": 8,
    "currencyIsoCode": "EUR"
  }
}

Example Response (FreeBets Enrollment)

{
  "message": "OK",
  "data": {
    "rewardType": "FreeBets",
    "id": "enr-001",
    "operatorId": 1,
    "rewardId": "rwd-001",
    "campaignId": "abc123",
    "campaignOperatorReference": "OP-SUMMER-2026",
    "rewardOperatorReference": "OP-REWARD-001",
    "operatorPlayerId": "player-123",
    "products": ["Plinko"],
    "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": 2.50,
    "currencyIsoCode": "EUR",
    "totalBetCount": 8,
    "remainingBetCount": 8,
    "creditWalletType": "FreeBet",
    "stakeNotReturned": true
  },
  "responseCode": "OK"
}

Validation Rules

  • operatorPlayerId is required and cannot be empty or whitespace. Player IDs are trimmed.
  • overrides, when provided, must be allowed by the reward, match the reward's type, and its values must fall within the reward's configured bounds.
  • currencyIsoCode in overrides must be a valid supported ISO currency code.

Bulk Enroll Players

Enqueues multiple players for enrollment 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
players object[] Yes Array of players to enroll. Must contain between 1 and 1,000 entries, with no duplicate player IDs.

Each entry in players:

Field Type Required Description
operatorPlayerId string Yes The player's unique identifier within the operator's platform.
overrides object No Optional overrides for this player's enrollment. Same structure and rules as Enrollment Overrides. Entries with and without overrides can be mixed in one request.

Example Request

{
  "players": [
    { "operatorPlayerId": "player-123" },
    {
      "operatorPlayerId": "player-456",
      "overrides": {
        "rewardType": "FreeBets",
        "betValue": 5.00,
        "betCount": 10,
        "currencyIsoCode": "EUR"
      }
    },
    { "operatorPlayerId": "player-789" }
  ]
}

Example Response

{
  "message": "",
  "data": {
    "jobId": "681f0d3d0c2f0b1c6e27e6cb"
  },
  "responseCode": "OK"
}

Response Behavior

  • This endpoint returns 202 Accepted.
  • The Location header points to the job status endpoint.
  • Use Get Bulk Enrollment Job Status to track processing progress and rejection details.

Validation Rules

  • players must contain between 1 and 1,000 entries.
  • Each entry must have a non-empty operatorPlayerId. Player IDs are trimmed.
  • Duplicate operatorPlayerId values are rejected.
  • Overrides are validated per entry with the same rules as single enrollment. Validation errors identify the offending entry by index (e.g. Players[1]: Bet value must be between 1 and 10.).

Get Bulk Enrollment Job Status

Retrieves the current status of a bulk enrollment job.

Endpoint: GET /v1/enrollments/bulk-jobs/{jobId}

Path Parameters

Parameter Type Description
jobId string The bulk enrollment job identifier returned by the bulk enrollment endpoint.

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 Response

{
  "message": "OK",
  "data": {
    "id": "681f0d3d0c2f0b1c6e27e6cb",
    "operatorId": 1,
    "rewardId": "rwd-001",
    "status": "Completed",
    "source": "OperatorApi",
    "sourceReference": null,
    "bulkId": "api:2c77d9fef2b84085b5f70c2c8b5f7b89",
    "createdAtUtc": "2026-03-20T12:00:00Z",
    "startedAtUtc": "2026-03-20T12:00:01Z",
    "completedAtUtc": "2026-03-20T12:00:05Z",
    "acceptedCount": 2,
    "rejectedCount": 1,
    "rejections": [
      {
        "operatorPlayerId": "player-789",
        "reasonCode": "AlreadyEnrolled",
        "reason": "The player is already enrolled in this reward."
      }
    ],
    "attempts": 1,
    "lastErrorCode": null,
    "lastErrorDescription": null,
    "scheduledTriggerContext": null
  },
  "responseCode": "OK"
}

Job Status Values

Value Description
AwaitingApproval The job was created by a scheduled trigger that requires manual approval. It will not be processed until the trigger execution is approved. On approval the job moves to Pending; on rejection it moves to Cancelled.
Pending The job has been accepted and is waiting to be processed.
Processing The job is currently being processed.
Completed The job finished processing. Review acceptedCount, rejectedCount, and rejections.
Failed The job failed. Review lastErrorCode and lastErrorDescription.
Cancelled The job was cancelled before processing (e.g. a trigger execution awaiting approval was rejected).

Job Source Values

The source field records how the job was created:

Value Description
OperatorApi Submitted through the Bulk Enroll Players endpoint of this API.
ScheduledTrigger Created automatically by a scheduled campaign trigger. See Reward Campaign Triggers.
BackofficeCsv Created from a CSV upload in the Gamnify backoffice.

scheduledTriggerContext Fields

Populated only when source is ScheduledTrigger; null otherwise. Scheduled triggers enroll players in batches, so a single trigger execution can produce multiple bulk jobs.

Field Type Description
triggerId string The identifier of the scheduled trigger that created the job.
executionId string The identifier of the specific trigger execution.
iteration integer The execution iteration number of the trigger.
pageNumber integer The batch (page) number within the execution.
chunkKey string Internal key identifying the batch of players processed by this job.

List Bulk Enrollment Jobs for a Reward

Retrieves bulk enrollment jobs for a specific reward with pagination support, ordered newest first.

Endpoint: GET /v1/rewards/{rewardId}/enrollments/bulk-jobs

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.
status string - Optional filter by job status. See Job Status Values.

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/bulk-jobs?page=1&pageSize=50&status=Completed

Example Response

{
  "message": "OK",
  "data": {
    "items": [
      {
        "id": "681f0d3d0c2f0b1c6e27e6cb",
        "operatorId": 1,
        "rewardId": "rwd-001",
        "status": "Completed",
        "source": "OperatorApi",
        "sourceReference": null,
        "bulkId": "api:2c77d9fef2b84085b5f70c2c8b5f7b89",
        "createdAtUtc": "2026-03-20T12:00:00Z",
        "startedAtUtc": "2026-03-20T12:00:01Z",
        "completedAtUtc": "2026-03-20T12:00:05Z",
        "acceptedCount": 2,
        "rejectedCount": 1,
        "attempts": 1,
        "lastErrorCode": null,
        "lastErrorDescription": null,
        "scheduledTriggerContext": null
      }
    ],
    "page": 1,
    "pageSize": 50,
    "totalCount": 1
  },
  "responseCode": "OK"
}

Response Fields

Field Type Description
items object[] Array of job summary objects. Same fields as Get Bulk Enrollment Job Status, except rejections is not included. Use the job status endpoint to retrieve rejection details for an individual job.
page integer The requested page number.
pageSize integer The requested page size.
totalCount integer The total number of jobs matching the query across all pages.

Validation Rules

  • page must be greater than or equal to 1.
  • pageSize must be between 1 and 500.
  • status, when provided, must be a valid job status value.

List Bulk Enrollment Jobs by Source

Retrieves bulk enrollment jobs by their source and source reference with pagination support, ordered newest first.

Endpoint: GET /v1/enrollments/bulk-jobs

Query Parameters

Parameter Type Default Description
source string - Required. The job source. See Job Source Values.
sourceReference string - Required. The source reference recorded when the job was created.
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/enrollments/bulk-jobs?source=BackofficeCsv&sourceReference=upload-2026-03-20&page=1&pageSize=50

Response

Returns the same paginated object as List Bulk Enrollment Jobs for a Reward.

Note

Jobs submitted through the operator API's bulk enrollment endpoint currently have no sourceReference, so this endpoint is primarily useful for locating jobs created by scheduled triggers or backoffice CSV uploads.

Validation Rules

  • source and sourceReference are required and cannot be empty or whitespace.
  • page must be greater than or equal to 1.
  • pageSize must be between 1 and 500.

List Bulk Enrollment Jobs for a Trigger Execution

Retrieves the bulk enrollment jobs created by a specific scheduled trigger execution, with pagination support, ordered newest first. A single execution can produce multiple jobs because players are enrolled in batches.

The triggerId and executionId values correspond to the scheduledTriggerContext fields on job responses. See Reward Campaign Triggers for how scheduled triggers work.

Endpoint: GET /v1/rewards/triggers/{triggerId}/executions/{executionId}/bulk-jobs

Path Parameters

Parameter Type Description
triggerId string The unique identifier of the scheduled trigger.
executionId string The unique identifier of the trigger execution.

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.
status string - Optional filter by job status. See Job Status Values.

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 Response

{
  "message": "OK",
  "data": {
    "items": [
      {
        "id": "681f0d3d0c2f0b1c6e27e6cc",
        "operatorId": 1,
        "rewardId": "rwd-001",
        "status": "Completed",
        "source": "ScheduledTrigger",
        "sourceReference": "trg-100:3:exec-7:1",
        "bulkId": "trigger:trg-100:exec:exec-7:iter:3:page:1:reward:rwd-001:shape:standard:chunk:0",
        "createdAtUtc": "2026-03-21T00:00:00Z",
        "startedAtUtc": "2026-03-21T00:00:01Z",
        "completedAtUtc": "2026-03-21T00:00:04Z",
        "acceptedCount": 500,
        "rejectedCount": 0,
        "attempts": 1,
        "lastErrorCode": null,
        "lastErrorDescription": null,
        "scheduledTriggerContext": {
          "triggerId": "trg-100",
          "executionId": "exec-7",
          "iteration": 3,
          "pageNumber": 1,
          "chunkKey": "reward:rwd-001:shape:standard:chunk:0"
        }
      }
    ],
    "page": 1,
    "pageSize": 50,
    "totalCount": 1
  },
  "responseCode": "OK"
}

Validation Rules

  • page must be greater than or equal to 1.
  • pageSize must be between 1 and 500.
  • status, when provided, must be a valid job status value.

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, ordered by startTimeUtc descending (most recent first). The paging information sits alongside data at the top level of the envelope:

{
  "message": "OK",
  "data": [
    {
      "rewardType": "FreeBets",
      "id": "enr-001",
      "operatorId": 1,
      "rewardId": "rwd-001",
      "campaignId": "abc123",
      "campaignOperatorReference": "OP-SUMMER-2026",
      "rewardOperatorReference": "OP-REWARD-001",
      "operatorPlayerId": "player-123",
      "products": ["Plinko"],
      "status": "Active",
      "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",
  "page": 1,
  "pageSize": 50,
  "totalCount": 137
}
Field Type Description
page integer The 1-based page number returned.
pageSize integer The maximum number of items a page holds.
totalCount integer The total number of enrollments matching the request across all pages.

Validation Rules

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

Search Enrollments

Searches a player's enrollments across all rewards, optionally narrowed to a campaign or a reward, with pagination support.

Endpoint: GET /v1/enrollments

Query Parameters

Parameter Type Default Description
operatorPlayerId string - Required. The player's unique identifier within the operator's platform.
campaignId string - Optional. Only return enrollments for rewards in this campaign.
rewardId string - Optional. Only return enrollments for this reward.
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/enrollments?operatorPlayerId=player-123&campaignId=abc123&page=1&pageSize=50

Response

Returns the same paged envelope as Get Enrollments for Reward: enrollment objects in data ordered by startTimeUtc descending, with page, pageSize, and totalCount alongside.

Validation Rules

  • operatorPlayerId is required and cannot be empty or whitespace.
  • campaignId and rewardId, when provided, must be valid Gamnify identifiers. Malformed values are rejected with a validation error.
  • 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.
campaignId string The campaign the parent reward belongs to.
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: 202 Accepted + jobId

    Operator->>+Gamnify: GET /v1/enrollments/bulk-jobs/{jobId}
    Gamnify-->>-Operator: Job status (Pending/Processing/Completed/Failed)

    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)