Description:
Create a new competition. Once a competition is registered it will be automatically moved to a Ready state.
Resource URL:
https://<apphost>.competitionlabs.com/api/<your-space-name>/competitions
Request header
Key | Value | Required |
---|---|---|
X-API-KEY | Your unique API key | Yes |
Content-Type | application/json | Yes |
Request URL parameter
Parameter | Type | Required | Description |
---|---|---|---|
space | String | Yes | This is the space name which is linked to the account |
Post body parameters
Parameter | Type | Required | Description | |||
---|---|---|---|---|---|---|
competitionType | String | Yes | Competition Type enums. Default is Leaderboard | |||
entrantMemberType | String | Yes | Member type Default is Individual | |||
numberOfRounds | Integer | Optional | Number of rounds to be played in a competition. Default is 1 | |||
label | String | Yes | The title of the competition | |||
description | String | Optional | Description of the competition | |||
termsConditions | String | Optional | Terms and conditions of a competition | |||
options | Object | Yes | From Options domain model the only entries that are required: | Type | Required | Description |
numberOfEntrants | Integer | Yes | The maximum and minimum number of entrants | |||
products | Array [Object] | Yes | The Product model | |||
autoStart | Boolean | Yes | True if you want the Competition to auto start | |||
autoStop | Boolean | Yes | True if you want the Competition to auto end | |||
scheduledDates | DateTime | Yes | The date and time of when the competition should start and end | |||
includeEntrantsWhere | Object | Yes | The ComplexFilters model | |||
All the other entries | Object | Optional | All other entries from Options | |||
metadata | Array [Object] | Optional | A list of MetaData | |||
status | String | No | A status of a competition |
EXAMPLE
ERROR CODES
Code | HTTP Status | Description | Example |
---|---|---|---|
3018 | 406 | includeEntrantsWhere parameter was excluded; | |
1001 | 400 |
|