Skip to content

Disable Campaign

This endpoint allows you to disable campaign.

  • Status can not be changed after campaign has ended

When disabling a campaign (enabled = false), the force parameter controls how participants are affected:

  • force = false campaign will be disabled but participants that already accepted campaign will be able to play that campaign
  • force = true campaign will be disabled and also participant's status will be changed to expired so they will not be able to play campaign anymore

API Call Sample:

curl -i -X PUT \
  -u <username>:<password> \
  https://asia.stage.rubyplay.io/api/v1/campaign/123/enabled \
  -H 'Content-Type: application/json' \
  -d '{
    "enabled": false,
    "force": true
  }'
Response
application/json
{ "id": 7, "type": "FREE_ROUNDS", "disabledAt": "2027-01-03T10:00:00Z", "disabledForcibly": true, "name": "New Year Promo", "externalCampaignId": "New Year Promo", "gameId": "rp_140", "gameIds": [ "rp_140" ], "startDateTime": "2027-01-01T08:00:00Z", "endDateTime": "2027-01-02T08:00:00Z", "expiresInDays": 7, "bet": 50, "currencyCode": "EUR", "betNumber": 7, "strategy": "PLAYER_LIST", "strategyData": { "eligiblePlayersNumber": 777, "playerIds": [ "player one" ] }, "countries": [ "[\"BR\",\"US\",\"FR\"]" ], "status": "UPCOMING", "rulesUrl": "https://url-to-rules.com", "validForDays": 7, "startEvent": "ACCEPT", "allowPostExpirationCompletion": true }
Loading...

Request Schema:

enabledbooleanrequired

Use 'false' to disable the campaign. Campaigns can not be re-enabled.

Example: false
forceboolean

When this parameter is 'true', all participants will not be able to play any new free rounds or features in the campaign. Otherwise, players who already accepted the campaign will be able to finish it.

Default false
Example: true

Response Schema:

idinteger(int64)

ID of the campaign.

Example: 7
typestring

Possible values: FREE_ROUNDS, AWARDED_FEATURE

Enum"FREE_ROUNDS""AWARDED_FEATURE"
Example: "FREE_ROUNDS"
disabledAtstring(date-time)

Campaign deactivation time in UTC.

Example: "2027-01-03T10:00:00Z"
disabledForciblyboolean

Whether the campaign was disabled forcibly.

Example: true
namestring

Campaign name

Example: "New Year Promo"
externalCampaignIdstring

External campaign ID.

Example: "New Year Promo"
gameIdsArray of stringsunique
Example: ["rp_140"]
startDateTimestring(date-time)

Campaign start time in UTC.

Example: "2027-01-01T08:00:00Z"
endDateTimestring(date-time)

Campaign end time in UTC.

Example: "2027-01-02T08:00:00Z"
betnumber

Size of a single bet in major currency units, e.g. 1.00 for 1 EUR. For awarded features will be the actual cost of the feature e.g. 1 EUR x 50 Multiplier = 50 EUR

Example: 50
currencyCodestring

ISO 4217 3-letter currency code.

Example: "EUR"
betNumberinteger(int32)

Number of free bets/features for each participating player.

Example: 7
strategyDataobject(StrategyDataDto)

Strategy specific data.

This field will be removed in future versions of the API and the following operation should be used to add players instead : PUT /campaign/{campaignId}/participant

statusstring

Possible values: UPCOMING, ONGOING, ENDED, DISABLED.

Enum"UPCOMING""ONGOING""ENDED""DISABLED"
Example: "UPCOMING"
rulesUrlstring

Link for campaign rules.

Example: "https://url-to-rules.com"
validForDaysinteger(int32)

The number of days the offer remains valid, starting from the date of the startEvent

Example: 7
startEventstring

The event that marks the starting point for counting the validity period validForDays.

Enum"ASSIGN""ACCEPT"
Example: "ACCEPT"
allowPostExpirationCompletionboolean

Defines if accepted promotion can be completed after the campaign end date.

Example: true
gameIdstringDeprecated

Game ID.

Example: "rp_140"
expiresInDaysinteger(int32)Deprecated

Expires in x days from date of campaign start.

This field will be removed in future versions of the API and fields validForDays, startEvent and allowPostExpirationCompletion should be used instead

Example: 7
strategystringDeprecated

PLAYER_LIST or FIRST_N_PLAYERS.

This field will be removed in future versions of the API and default to PLAYER_LIST as FIRST_N_PLAYERS will not be supported in the future.

Default "PLAYER_LIST"
Enum"PLAYER_LIST""FIRST_N_PLAYERS"
Example: "PLAYER_LIST"
countriesArray of stringsDeprecated
Example: ["[\"BR\",\"US\",\"FR\"]"]