Description:
Update Products details in the CompetitionLabs database for a given id.
The Product that needs to be updated its Id has to exist in the Resource URL and Request body field.
Product Ref Id can not be changed after creation
Any Put body Parameters that are excluded in the Request body field will be considered as empty and updated with an empty field
Resource URL:
https://<apphost>.competitionlabs.com/api/<your-space-name>/products/<productId>
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 |
id | String | Yes | Product identifier retrieved from GET Products resource |
Put 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 | Optional | 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 |
id | String | Yes | A unique generated Id of a product |
EXAMPLE
ERROR CODES
Code | HTTP Status | Description | Example |
---|---|---|---|
1001 | 400 |
| |
1007 | 404 | A record with requested id for products was not found | |
1002 | 404 |
| |
503 |
| ||
1009 | 500 | Adjustment factor parameter was excluded; |