put https://{host}/api_gateway/rewards/core/v1/brand/customfield/
This API allows you to update a custom field created for a reward.
NoteFor 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 .
Prerequisites
- Authentication: Basic or OAuth authentication details
- Access group resource: Default
Resource information
| URI | /api_gateway/rewards/core/v1/brand/customfield/{id} |
| HTTP method | PUT |
| Rate limit | NA |
| Batch support | NA |
API endpoint example
https://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/brand/customfield/106
Request path parameter
| Parameter | Data Type | Description |
|---|---|---|
| id* | String | Unique name identifier for the custom field. |
Request body parameter
| Parameter Name | Data Type | Description |
|---|---|---|
| name* | String | Unique name identifier for the custom field. |
| orgId | String | Unique identifier for the organisation. To retrieve the orgId, use the Get Org Details API. |
| description* | String | Description for the custom field. |
| isMandatory | Boolean | Indicates if the custom field is mandatory. Supported values:true: Field is mandatoryfalse: Field is optional (default value) |
| isActive | Boolean | Indicates the status of the custom field. Supported values:true: Status is active (default value)false: Status is inactive. |
| scope* | Enum | Indicates where the additional custom fields will apply. Supported values:REWARD: While creating or updating a reward.ISSUE_REWARD: While issuing a reward.CATALOGUE_PROMOTION: While creating or updating a promotion. |
| defaultValue | String | Default value for the custom field used when no value is specified. |
| dataType* | String | Type of data for the custom field. Supported values:BOOLEAN, ENUM, DATE, STRING, INTEGER.255 is the character limit for the datatype STRING.Use ENUM as the dataType to define a set of pre-defined values, ensuring error-free management of reward metadata. For example, as a reward manager, you can create a custom field called "Reward Category" and define possible values such as "Discount," "Free Gift," and "Cashback." When creating or updating a reward, you can select one of these predefined values for the "Reward Category" custom field. |
| enumValues | Object | Object containing the enum values. This parameter is required if dataType is ENUM.Note: - Define enum values using double quotes in a comma-separated list. - You can provide a maximum of 30 enum values per custom field. - When creating a reward, you can provide only one enum value per custom field in the customFields object.- Each enum value must not exceed 80 characters. - Allowed special characters: []()-_ .- Values must be unique within the custom field. - defaultValue must be provided if dataType is ENUM. |
{
"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"
}{
"orgId": 100458,
"name": "CustomField",
"description": "",
"isMandatory": false,
"isActive": false,
"defaultValue": "PRIMARY",
"dataType": "ENUM",
"scope": "ISSUE_REWARD",
"enumValues": [
"PRIMARY",
"SECONDARY"
]
}Response parameters
| Parameter Name | Data Type | Description |
|---|---|---|
| id | Integer | Unique identifier for the custom field. |
| orgId | Integer | Unique identifier of the organisation. |
| name | String | Unique name for the custom field. |
| description | String | Description of the custom field. |
| isMandatory | Boolean | Indicates if the custom field is mandatory. Possible values:true: Field is mandatoryfalse: Field is optional (default value) |
| isActive | Boolean | Specify the status of the custom field. Possible values:true: Status is active (default value)false: Status is inactive. |
| scope | String | Specify where the additional custom fields will apply. Possible values:REWARD: While creating or updating a reward.ISSUE_REWARD: While issuing a reward.CATALOGUE_PROMOTION: While creating or updating a promotion. |
| defaultValue | String | Default value for the custom field used when no value is specified. |
| dataType | String | Type of data for the custom field. Possible values:BOOLEAN, ENUM, DATE, STRING, INTEGER. |
| createdBy | Integer | Unique customer identifier of the user who created the custom field |
| createdOn | Date | Creation date and time of the field in Epoch time format. |
| createdOnDateTime | String | Creation date and time of the field in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) |
| lastUpdatedBy | Integer | Unique customer identifier of the user who last updated the custom field |
| lastUpdatedOn | Date | Last update date and time of the field in Epoch time format. |
| enumValues | Object | Object containing the enum values. |
| lastUpdatedOnDateTime | String | Last updated date and time of the field in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). |
{
"id": 18880,
"orgId": 100737,
"name": "age_update",
"description": "CF1A",
"isMandatory": false,
"isActive": true,
"scope": "REWARD",
"defaultValue": null,
"dataType": "STRING",
"createdBy": 75155282,
"createdOn": 1741934782959,
"createdOnDateTime": "2025-03-14T06:46:22Z",
"lastUpdatedBy": 75155282,
"lastUpdatedOn": 1741934782959,
"enumValues": null,
"lastUpdatedOnDateTime": "2025-03-14T06:46:22Z"
}
{
"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
}{
"id": 15006,
"orgId": 1231,
"name": "CustomField",
"description": "",
"isMandatory": false,
"isActive": true,
"scope": "ISSUE_REWARD",
"defaultValue": "PRIMARY",
"dataType": "ENUM",
"createdBy": 50716508,
"createdOn": null,
"lastUpdatedBy": 50716508,
"lastUpdatedOn": null,
"enumValues": [
"PRIMARY",
"SECONDARY"
]
}