PUT /api/:space/competitions/:competitionId/contests/:contestId

Description:

Update a contest for a given ID.


Resource URL:

https://<apphost>.competitionlabs.com/api/<your-space-name>/competitions/<competitionId>/contests/<contestId>

Request header

KeyValueRequired
X-API-KEY
Your unique API keyYes
Content-Type
application/jsonYes

Request URL parameter

Parameter
Type
Required
Description
space
StringYesThis is the space name which is linked to the account
competitionId
StringYesCompetition identifier retrieved from GET Competitions resource
contestId
StringYesContest identifier retrieved from GET contests request

Put body parameter

Parameter
Type
Required
Description
competitionId
StringYesCompetition identifier retrieved from GET Competitions resource
number
IntegerYesContests position e.g. if there are 2 Contests which one is first and which one is second. The default is 0
label
StringYesA name of the Contest
description
StringOptionalDescription of the Contest
termsConditions
StringOptionalTerms and conditions of a Contest
round
IntegerYesTo what round does the contest belong. The default is 1
roundType

String

YesType of rounds in a contest, eg. TimeBound
entrantsFromContest
Array [String]OptionalArray of Strings to identify which entrants will progress to next contest, for the first round the value should be 0 or can be left empty
options
ObjectYes



From Options domain model the only entries that are required:

TypeRequiredDescription
numberOfEntrants
From numberOfEntrants modelIntegerYesMaximum and Minimum number of entrants
minimumIntegerYesThe minimum number of entrants. The default is 1
maximumIntegerOptionalThe maximum number of entrants. Left empty means that no limitations are added
scheduledDates
From scheduleDates modelDateTimeYesStartEndDate model
startDateTimeYesTime and date of when the contest has to start. Example: 2019-09-24T14:25:00.000+00:00
endDateTimeYesTime and date of when the contest has to end. ISO8601 timestamp. Example: 2019-09-24T14:25:00.000+00:00
productsArray [Object]OptionalA list of Products
ruleSetsArray [Object]YesA list of RuleSets
autoStartBooleanOptionalTrue means that the contest will auto start depending on the scheduledDates
autoStopBooleanOptionalTrue means that the contest will auto stop depending on the scheduledDates
optinRequiredForEntrantsBooleanYesIf True, members must Opt in before they can acquire points in the contest
All the other entries
ObjectOptionalAll the other entries are optional to use
metadataArray [Object]OptionalA list of MetaData
statusStringNoA status of a contestCreating a contest in a competition that hasn't been started yet the contest is automatically set to NotStarted or creating a contest in a competition that has already been started then the contest is set to Active.
statusCodeIntegerNoA status of a contest defined as a number. Creating a contest in a competition that hasn't been started yet the contest is automatically set to 0 (NotStarted) or creating a contest in a competition that has already been started then the contest is set to 3 (Active).
rewardArray [Object]OptionalA model of a RewardTypeRequiredDescription
entityIdStringYesA contest Id. The string has to be left empty as it will populate automatically when the contest will be created
rewardRankStringYesIt associates with the rank of the leaderboard
rewardNameStringYesThe name of a reward
valueIntegerYesNumerical value of the reward that will be issued based on the reward type
rewardTypeStringYesReward type identifier retrieved from GET RewardTypes resource
descriptionStringOptionalThe description of a Reward 
delayIntegerOptionalDelay of issuing a reward in minutes
memberAcknowledgmentRequiredBooleanOptionalRequires member acknowledgment to claim a reward. If set to True reward will not be automatically issued
metadataArray [Object]OptionalA list of Metadata
pointInTimeDateTimeOptionalReward is available until a specific point in time

CodeHTTP StatusDescriptionExample
1007404Contest with CL-contestId not found.
1001400
  • number parameter was excluded;
  • label parameter was excluded;
  • competitionId parameter was excluded;
  • round parameter was excluded;
  • roundType parameter was excluded;


  • entityId parameter was excluded;
  • rewardRank parameter was excluded;
  • rewardName parameter was excluded;
  • value parameter was excluded;
  • rewardType parameter was excluded;
  • description parameter was excluded;
2023409Rules cannot be empty
3008412
  • Contest parameters are locked for a contest in Active status
  • Contest parameters are locked for a contest in Canceled status
  • Contest parameters are locked for a contest in Finished status

503scheduleDate parameter was excluded;