Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

Parameter
Type
Constraint
Usage
competitionType
StringCase sensitive
?competitionType=search_word (you can find the Enum list in the Competitions model)
entrantMemberType
String

Case sensitive

?entrantMemberType=search_word (you can find the Enum list in the Competitions model)
numberOfRounds
IntegerNumbers only
?numberOfRounds=search_number
numberOfGroupStages
Integer

Numbers only

?numberOfGroupStages=search_number
label
String

Case insensitive. 

For lookup you would use "label.raw=search_word" because the field "label" is indexed to support more complex searches

?label.raw=search_word
description
StringCase sensitive
?description=search_word
termsConditions
StringCase sensitive
?termsConditions=search_word
options
ObjectComplex search applies, allows full search on a complex object of Option
?options.numberOfEntrants.minimum=search_number
?options.numberOfEntrants.maximum=search_number
?options.products.name.raw=search_word
?options.products.productType=search_word
?options.products._searchFields=description&_searchFor=search_word
?options.products.adjustmentFactor=search_number
?options.products.productRefId=search_word
?options.products.actionAdjustmentFactors.ruleActionHelper.key=search_word
?options.products.actionAdjustmentFactors.adjustmentFactor=search_number
?options.products.metadata.key=search_word
?options.products.metadata.value=search_number
?options.products.created=search_DateTime
?options.products.id=search_string
?options.ruleSets.priority=search_number
?options.ruleSets.scope=search_word
?options.ruleSets.action=search_word
?options.ruleSets.conditions.matchCondition=search_word (you can find the Enum list in the MainConditionSet model)
?options.ruleSets.conditions.mustEvaluateTo=search_word
?options.ruleSets.conditions.rules.fact=search_word
?options.ruleSets.conditions.rules.operator=search_word
?options.ruleSets.conditions.rules.constant=search_word
?options.ruleSets.conditions.rules.id=search_string
?options.ruleSets.conditions.rules.subConditions.matchCondition=search_word (you can find the Enum list in the SubConditionSet model)
?options.ruleSets.conditions.rules.subConditions.musteEvaluateTo=search_word
?options.ruleSets.conditions.rules.subConditions.subRules.fact=search_word
?options.ruleSets.conditions.rules.subConditions.subRules.operator=search_word
?options.ruleSets.conditions.rules.subConditions.subRules.constant=search_word
?options.scheduledDates.start=search_DateTime
?options.scheduledDates.end=search_DateTime
?options.actualDates.start=search_DateTime
?options.actualDates.end=search_DateTime
?options.limitEntrantsTo=search_word
?options.optinRequiredForEntrans=search_word
?option.notification.messageid=search_string
?options.notification.competitionStatus=seach_word (you can find the Enum list in the Notification model)
?options.notification.contestStatus=search_word (you can find the Enum list in the Notification model)
metadata
Array [Object]Complex search applies, allows full search on a complex object of Metadata
?metadata.key=search_word
?metadata.value=search_number
status
StringCase sensitive
?status=search_word (you can find the Enum list in the Competitions model)
statusCode
IntegerNumbers only
?statusCode=search_number (you can find the Enum list in the Competitions model)
created
DateTimeWorks with simple dates or date and time, eg: created=2016-02-07, created=2018-08-23T14:23:09
?created=search_DateTime
id
StringCase sensitive
?id=search_string

...

Code Block
languagejs
titleResponse
collapsetrue
{
  "meta": {
        "totalRecordsFound": 1,
        "skip": 0,
        "limit": 20
    },
    "data": [
        {
            "jsonClass": "Competition",
            "accountId": "AVQZ2zwdabc6FovVuxMQFuyNjGYBZ-qHKtWicfwh",
            "competitionType": "Leaderboard",
            "roundTypeentrantMemberType": "TimeBoundIndividual",
            "entrantMemberTypeallowMultipleEntriesPerRound": "Individual"true,
            "productsnumberOfRounds": [ 1,
            "label": "test by 2 rounds",
     {       "description": "",
            "jsonClasstermsConditions": "Product",
            "options": {
       "name": "product-Name-0",        "numberOfEntrants": {
           "productType         "jsonClass": "product-Type-SlotsMaxMin",
                    "accountIdminimum": "AVQZ2zwdabc6FovVuxMQ",0
                    "adjustmentFactor": 1},
                "products": [
  "productRefId": "my-custom-product-ref-0",                  {
  "created": "2016-07-11T10:24:54.768+00:00",                     "idjsonClass": "AVXZfPvwHz@hNiERp3yCProduct",
                }             ]"name": "test",
            "numberOfEntrants": {
                "jsonClassproductType": "MaxMintest",
                "minimum": 2       "accountId": "FuyNjGYBZ-qHKtWicfwh",
    },             "numberOfEntrantsPerContest": {         "description": "test",
      "jsonClass": "MaxMin",                 "minimumadjustmentFactor": 21.0,
            },             "numberOfRoundsproductRefId": 1"test",
            "scheduledDates": {           "actionAdjustmentFactors": [
       "jsonClass": "StartEndDate",                 "start": "2016-07-11T10:55:00.000+00:00",  {
              "end": "2016-07-11T11:55:00.000+00:00"             },    "ruleActionHelper": {
       "label": "Points Race",             "description": "",             "optionsjsonClass": {"RuleActionHelper",
                "rules": [                    "name": "one",
   {                                 "jsonClasskey": "RuleSet3",
                        "priority": 1,           "description": "1",
            "scope": "contest",                         "actionaccountId": "open.contestFuyNjGYBZ-qHKtWicfwh",
                        "rules            "system": [false,
                             {       "metadata": [
                        "jsonClass": "Rule",               {
                 "fact": "contest.competition.status",                           "jsonClass": "Metadata",
        "operator": "==",                                    "constantkey": "$competition.active.status"img",
                              }              "value": "https://game-images.isoftbet-aldn.com/symbols/4192/7.gif"
         ]                     },          }
          {                         "jsonClass": "RuleSet" ],
                        "priority": 1,           "created": "2019-05-06T20:23:46.871+00:00",
            "scope": "contest",                         "actionid": "winner.determined.by",GH3RjmoBhII7yAb5D6u3"
                          "rules": [     },
                       {         "adjustmentFactor": 3.0
                      "jsonClass": "Rule",     },
                           "fact": "entrants.leaderboard.positions", {
                                "operatorruleActionHelper": ">=",{
                                    "constantjsonClass": "3RuleActionHelper",
                            }        "name": "one",
               ]                     }"key": "3",
                    {                "description": "1",
          "jsonClass": "RuleSet",                         "priorityaccountId": 1"FuyNjGYBZ-qHKtWicfwh",
                        "scope": "contest",             "system": false,
           "action": "finalise.contest",                         "rulesmetadata": [
                            {            {
                    "jsonClass": "Rule",                        "jsonClass": "Metadata",
          "fact": "contest.finish.elapsed",                                 "operatorkey": ">=img",
                                "constant": "15"           "value": "https://game-images.isoftbet-aldn.com/symbols/4192/7.gif"
                }                        }
]                     }               ],
 ],                 "autoStart": true,                 "isPubliccreated": true,
 "2019-05-06T20:23:46.871+00:00",
                "autoStartRetryInterval": 300000,                    "autoStopid": true,"GH3RjmoBhII7yAb5D6u3"
                "autoStopRetryInterval": 300000,               },
 "enableRegistration": true,                 "limitEntrantsTo": [            "adjustmentFactor": 2.0
       "$ALL"                 ],    },
            "optinRequiredForEntrants": false,               {
 "scoringStrategy": true,                 "prizes": []             },"ruleActionHelper": {
            "status                        "jsonClass": "FinishedRuleActionHelper",
                  "actualDates": {                 "jsonClassname": "StartEndDateone",
                  "start": "2016-07-11T10:26:12.262+00:00",                 "endkey": "2016-07-11T12:10:38.002+00:00"3",
            },              "created": "2016-07-11T10:26:11.958+00:00",             "iddescription": "AVXZfTj_Ab_hNiERp3yH1",
                "statusCode": 7         }     ]   }
Code Block
languagejs
titleRequest with Query string parameters
collapsetrue
curl --header "X-API-KEYaccountId": <your-api-key>"
--request GET https://app.competitionlabs.com/api/<your-space-name>/competitions?status=Finished&products.productType=product-Type-Slot
Code Block
languagejs
titleResponse for query string request
collapsetrue
{"FuyNjGYBZ-qHKtWicfwh",
          "meta": {         "totalRecordsFound": 1,         "skip": 0,     "system": false,
  "limit": 20     },     "data": [         {             "jsonClassmetadata": "Competition", [
              "accountId": "AVQZ2zwdabc6FovVuxMQ",             "competitionType": "Leaderboard",           {
 "roundType": "TimeBound",             "entrantMemberType": "Individual",             "products": [              "jsonClass": "Metadata",
 {                     "jsonClass": "Product",                     "namekey": "product-Name-0img",
                     "productType": "product-Type-Slots",                       "accountIdvalue": "AVQZ2zwdabc6FovVuxMQ",https://game-images.isoftbet-aldn.com/symbols/4192/7.gif"
                    "adjustmentFactor": 1,                     "productRefId": "my-custom-product-ref-0",}
                    "created": "2016-07-11T10:24:54.768+00:00",               ],
     "id": "AVXZfPvwHz@hNiERp3yC"                 }             ],
"created": "2019-05-06T20:23:46.871+00:00",
           "numberOfEntrants": {                         "jsonClassid": "MaxMinGH3RjmoBhII7yAb5D6u3",
                  "minimum": 2             },
              "numberOfEntrantsPerContest": {                 "jsonClassadjustmentFactor": "MaxMin", 4.0
                   "minimum": 2        }
    },             "numberOfRounds": 1,      ],
      "scheduledDates": {                 "jsonClassproductGroups": "StartEndDate", [
                  "start": "2016-07-11T10:55:00.000+00:00",         "test"
       "end": "2016-07-11T11:55:00.000+00:00"             },   ],
         "label": "Points Race",             "descriptionmetadata": ""[],
            "options": {           "created": "2019-05-06T20:31:31.855+00:00",
     "rules":  [                 "id": "0ArYjmoBEMYIEIZyKDsP"
  {                  }
      "jsonClass": "RuleSet",         ],
                "priorityruleSets": 1[],
                "isPublic": true,
        "scope": "contest",       "autoStart": true,
                "actionautoStartRetryInterval": "open.contest"1000,
                "autoStop": true,
      "rules": [         "autoStopRetryInterval": 1000,
                "scheduledDates":  {
                    "jsonClass": "StartEndDate",
          "jsonClass": "Rule",          "start": "2019-05-09T10:08:00.000+00:00",
                       "factend": "contest.competition.status",2019-05-09T11:08:00.000+00:00"
                },
                "operatoractualDates": "==",{
                                "constant"jsonClass": "$competition.active.statusStartEndDate",
                    "start": "2019-05-09T10:08:02.869+00:00",
      }              "end": "2019-05-09T11:09:12.905+00:00"
         ]       },
             },   "limitEntrantsTo": [
                {    "$ALL"
                ],
   "jsonClass": "RuleSet",            "includeEntrantsWhere": {
           "priority": 1,        "filters": [],
               "scope": "contest",    "shouldMatchAtLeast": 0
                },
  "action": "winner.determined.by",             "optinRequiredForEntrants": false,
          "rules": [     "useGlobalEvents": false
            },
         {   "metadata": [],
            "created": "2019-05-09T09:39:01.203+00:00",
              "jsonClassid": "Rule6U71m2oBN4riPfvG12jT",
            "translations": {},
            "status": "Finished",
     "fact": "entrants.leaderboard.positions",      "statusCode": 7,
                         "operator"translatableFields": ">=",[
                "label",
               "constant": "3description",
                "termsConditions"
           } ]
        }
}


Code Block
languagejs
titleRequest with Query string parameters
collapsetrue
curl
--header        "X-API-KEY: <your-api-key>"
--request GET https://app.competitionlabs.com/api/<your-space-name>/competitions?status=Finished&products.productType=product-Type-Slot


Code Block
languagejs
titleResponse for query string request
collapsetrue
{
    ]"meta": {
        "totalRecordsFound": 1,
        "skip": }0,
        "limit": 20
    },
    "data": {[
           {
            "jsonClass": "RuleSetCompetition",
            "accountId": "AVQZ2zwdabc6FovVuxMQ",
            "prioritycompetitionType": 1"Leaderboard",
            "roundType": "TimeBound",
            "scopeentrantMemberType": "contestIndividual",
            "products": [
           "action": "finalise.contest",    {
                    "rulesjsonClass": ["Product",
                    "name": "product-Name-0",
      {              "productType": "product-Type-Slots",
                    "jsonClassaccountId": "RuleAVQZ2zwdabc6FovVuxMQ",
                    "adjustmentFactor": 1,
          "fact": "contest.finish.elapsed",         "productRefId": "my-custom-product-ref-0",
                      "operatorcreated": ">=2016-07-11T10:24:54.768+00:00",
                                "constant"id": "15AVXZfPvwHz@hNiERp3yC"
                }
           } ],
            "numberOfEntrants": {
         ]         "jsonClass": "MaxMin",
           }     "minimum": 2
          ],   },
             "autoStartnumberOfEntrantsPerContest": true,{
                "isPublicjsonClass": true"MaxMin",
                "autoStartRetryIntervalminimum": 300000, 2
            },
            "autoStopnumberOfRounds": true1,
   
            "autoStopRetryIntervalscheduledDates": 300000,{
                "enableRegistrationjsonClass": true"StartEndDate",
                "limitEntrantsTostart": ["2016-07-11T10:55:00.000+00:00",
                    "$ALL"end": "2016-07-11T11:55:00.000+00:00"
                ],
 },
              "optinRequiredForEntrantslabel": "Points falseRace",

               "scoringStrategydescription": true"",
            "options": {
    "prizes": []           "rules": [
},             "status": "Finished",      {
      "actualDates": {                 "jsonClass": "StartEndDateRuleSet",
                 "start": "2016-07-11T10:26:12.262+00:00",       "priority": 1,
                        "endscope": "2016-07-11T12:10:38.002+00:00"
contest",
           },             "createdaction": "2016-07-11T10:26:11.958+00:00open.contest",
            "id": "AVXZfTj_Ab_hNiERp3yH",             "statusCoderules": 7[
        }            ] }

Status
colourBlue
titleERROR CODES

...

languagejs
titleError Response 404
collapsetrue

...

     

...

 

...

 

...

languagejs
titleError Response 503
collapsetrue

...

{
         

...

 

...

Code Block
languagejs
titleError Response 400
collapsetrue
{
    "status": 400
}

...

languagejs
titleError Response 500
collapsetrue

...

                      "jsonClass": "Rule",
                                "fact": "contest.competition.status",
                                "operator": "==",
                                "constant": "$competition.active.status"
                            }
                        ]
                    },
                    {
                        "jsonClass": "RuleSet",
                        "priority": 1,
                        "scope": "contest",
                        "action": "winner.determined.by",
                        "rules": [
                            {
                                "jsonClass": "Rule",
                                "fact": "entrants.leaderboard.positions",
                                "operator": ">=",
                                "constant": "3"
                            }
                        ]
                    },
                    {
                        "jsonClass": "RuleSet",
                        "priority": 1,
                        "scope": "contest",
                        "action": "finalise.contest",
                        "rules": [
                            {
                                "jsonClass": "Rule",
                                "fact": "contest.finish.elapsed",
                                "operator": ">=",
                                "constant": "15"
                            }
                        ]
                    }
                ],
                "autoStart": true,
                "isPublic": true,
                "autoStartRetryInterval": 300000,
                "autoStop": true,
                "autoStopRetryInterval": 300000,
                "enableRegistration": true,
                "limitEntrantsTo": [
                    "$ALL"
                ],
                "optinRequiredForEntrants": false,
                "scoringStrategy": true,
                "prizes": []
            },
            "status": "Finished",
            "actualDates": {
                "jsonClass": "StartEndDate",
                "start": "2016-07-11T10:26:12.262+00:00",
                "end": "2016-07-11T12:10:38.002+00:00"
            },
  

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

"created": "2016-07-11T10:26:11.958+00:00",
            "

...

id": 

...

"AVXZfTj_Ab_hNiERp3yH",
            "

...

statusCode": 

...

7
        }
    ]
}

Status
colourBlue
titleERROR CODES

CodeHTTP StatusDescriptionExample

404The Request URL is incorrect


Code Block
languagejs
titleError Response 404
collapsetrue
{
    "status": 404
}