POST /api/:space/competitions

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

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

Post body parameters

Parameter
Type
Required
Description
competitionType
StringYesCompetition Type enums. Default is Leaderboard
entrantMemberType
StringYesMember type Default is Individual
numberOfRounds
IntegerOptionalNumber of rounds to be played in a competition. Default is 1
label
StringYesThe title of the competition
description
StringOptional

Description of the competition

termsConditions
StringOptionalTerms and conditions of a competition
options
ObjectYes

From Options domain model the only entries that are required:

TypeRequiredDescription
numberOfEntrants
IntegerYesThe maximum and minimum number of entrants
products
Array [Object]YesThe Product model
autoStart
BooleanYesTrue if you want the Competition to auto start
autoStopBooleanYesTrue if you want the Competition to auto end
scheduledDates
DateTimeYesThe date and time of when the competition should start and end
includeEntrantsWhere
ObjectYesThe ComplexFilters model
All the other entries
ObjectOptionalAll other entries from Options
metadata
Array [Object]Optional

A list of MetaData

status
StringNo

A status of a competition

CodeHTTP StatusDescriptionExample
3018406includeEntrantsWhere parameter was excluded;
1001400
  • competitionType parameter was empty or excluded;
  • entrantMemberType parameter was empty or excluded;