Description:
Create a new Product in the CompetitionLabs database.
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 |
Post body parameters
Parameter | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Name of the product you want to create |
productType | String | Yes | Type of product, eg: Slots, Cards |
description | String | Optional | The description of the product for your reference |
adjustmentFactor | Double | Yes | Adjustment factor to be applied to incoming event value |
productRefId | String | Yes | Product id on customer system |
actionAdjustmentFactors | Array [Object] | Optional | A list of Action Adjustment Factor. It is a default adjustment factor of a pre created action |
productGroups | Array [String] | Optional | Used to tag products with taxonomy terms |
metadata | Array [Object] | Optional | A list of MetaData |
EXAMPLE
ERROR CODES
| Code | HTTP Status | Description | Example |
|---|---|---|---|
| 1001 | 400 |
| |
| 503 | Product ref Id parameter was excluded; | ||
| 1021 | 409 | Duplicate record found | |
| 1006 | 406 | Missing adjustmentFactor | |
| 1009 | 500 |