post https://{host}/api_gateway/rewards/core/v1/brand/customfield
These fields can be used to add additional information related to rewards. You can create a custom field specific to a reward, catalogue promotion, or issue-reward action. For example, you can create a custom field for the "issue-reward" action to include a personalized message when issuing the reward.
Note
- Create/Update reward: Add a custom field in the payload which will be mapped to that reward with the scope REWARD
- Create/Update promotion: Add a custom field in the payload which will be mapped to that reward with the scope CATALOGUE_PROMOTION
- Create/Update reward: Add a custom field in the payload which will be mapped to that reward with the scope ISSUE_REWARD
Note
- For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .
- Start time and end time are in UTC time zone
Prerequisites
- Authentication: Basic or OAuth authentication
- Default access group
Resource information
URI | /api_gateway/rewards/core/v1/brand/customfield |
HTTP Method | POST |
Pagination | No |
Batch support | No |
Rate limit information | None |
API endpoint example
https://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/brand/customfield
Request body parameters
Parameter Name | Data Type | Description |
---|---|---|
name* | String | Name of the custom field. |
orgId | String | Org identifier of the org. |
description* | String | Description of the field. |
isMandatory | Boolean | Indicates if the field is mandatory. |
isActive | Boolean | Status of the field. Ex: true. |
scope* | Enum | The scope defines where the additional custom fields will apply: - REWARD: While creating or updating a reward. - CATALOGUE_PROMOTION: While creating or updating a promotion. - ISSUE_REWARD: While issuing a reward. |
defaultValue | String | A user-defined default value associated with the custom field. |
dataType* | String | Type of data for the field. Ex: String. |
{
"orgId": 100458,
"name": "CF1A112",
"description": "CF1A112",
"isMandatory": false,
"isActive": true,
"scope": "REWARD",
"defaultValue": null,
"dataType": "STRING"
}
{
"orgId": 100458,
"name": "Order confirmed",
"description": "Reward is processing",
"isMandatory": false,
"isActive": true,
"scope": "CATALOGUE_PROMOTION",
"defaultValue": null,
"dataType": "STRING"
}
{
"orgId": 100458,
"name": "CF1A112",
"description": "CF1A112",
"isMandatory": false,
"isActive": true,
"scope": "ISSUE_REWARD",
"defaultValue": null,
"dataType": "STRING"
}
Response parameters
Parameter Name | Data Type | Description |
---|---|---|
id | Integer | Unique identifier for the custom field. |
orgId | Integer | Org identifier of the org. |
name | String | Name of the custom field. |
description | String | Description of the custom field. |
isMandatory | Boolean | Indicates if the field is mandatory. |
isActive | Boolean | Status of the field. |
scope | String | Scope of the field. |
defaultValue | String | Default value of the field. |
dataType | String | Type of data for the field. |
createdBy | Integer | User identifier who created the field. |
createdOn | Date | Creation date and time of the field. |
lastUpdatedBy | Integer | User identifier who last updated the field. |
lastUpdatedOn | Date | Last update date and time of the field. |
{
"id": 209,
"orgId": 100458,
"name": "CF1A112",
"description": "CF1A112",
"isMandatory": false,
"isActive": true,
"scope": "REWARD",
"defaultValue": null,
"dataType": "STRING",
"createdBy": 75086856,
"createdOn": null,
"lastUpdatedBy": 75086856,
"lastUpdatedOn": null
}
{
"id": 6913,
"orgId": 100458,
"name": "Order confirmed",
"description": "Reward is processing",
"isMandatory": false,
"isActive": true,
"scope": "CATALOGUE_PROMOTION",
"defaultValue": null,
"dataType": "STRING",
"createdBy": 75130850,
"createdOn": null,
"lastUpdatedBy": 75130850,
"lastUpdatedOn": null
}
{
"id": 210,
"orgId": 100458,
"name": "CF1A112",
"description": "CF1A112",
"isMandatory": false,
"isActive": true,
"scope": "ISSUE_REWARD",
"defaultValue": null,
"dataType": "STRING",
"createdBy": 75086856,
"createdOn": null,
"lastUpdatedBy": 75086856,
"lastUpdatedOn": null
}
API-specific error codes
Error code | Description |
---|---|
3022 | ISSUE REWARD scope limit reached, max is {max_limit}. Allowed limit is 10. |