Description:
Returns a list of Products.
This assumes that Products have first been uploaded via a POST request or via the web console otherwise no data will be returned and the value of the "totalRecordsFound" variable in metadata will be 0.
GET responses can be filtered out based on the products parameters to narrow down the results. CompetitionLabs provides a fully queryable API.
Resource URL:
https://<apphost>.competitionlabs.com/api/<your-space-name>/products
Request headers
Key | Value | Required |
---|---|---|
X-API-KEY | Your unique API key | Yes |
Content-Type | application/json | Yes |
Request URL parameters
Parameter | Type | Required | Description |
---|---|---|---|
space | String | Yes | This is the space name which is linked to the account |
Additional Query String Parameters
You can use the query parameters along with the generic parameters.
Query parameters
Parameter | Type | Constraint | Usage |
---|---|---|---|
name | String | The naming or label of a product/game. Case insensitive. For lookup you would use "name.raw=search_word" because the field "name" is indexed to support more complex searches | ?name.raw=search_word |
productType | String | A type of a product that the product can be categorised by, eg: Slots, Cards. Case sensitive. | ?productType=search_word |
description | String | A description of a product for your reference. Case insensitive. | ?_searchFields=description&_searchFor=search_word |
adjustmentFactor | Double | A default adjustment factor of a product. Supports any type of decimal number | ?adjustmentFactor=search_number |
productRefId | String | A unique reference Id of a product. Case sensitive | ?productRefId=search_word |
actionAdjustmentFactors | Array [Object] | A default adjustment factor of a pre created action. Complex search applies, allows full search on a complex object of ActionAdjustmentFactors | ?actionAdjustmentFactors.ruleActionHelper.key=search_word ?actionAdjustmentFactors.adjustmentFactor=search_number |
productGroups | Array [String] | Used to tag products with taxonomy terms. Case sensitive | ?productGroups=search_word |
metadata | Array [Object] | Complex search applies, allows full search on a complex object of Metadata | ?metadata.key=search_word ?metadata.value=search_number |
created | DateTime | Works with simple dates or date and time, eg: created=2016-02-07, created=2018-08-23T14:23:09 | ?created=search_DateTime |
id | String | A unique generated Id of a product. Case sensitive | ?id=search_string |
EXAMPLE
ERROR CODES
Code | HTTP Status | Description | Example |
---|---|---|---|
404 | Modifying the Resource URL parameters that are mandatory |