post https://{host}/api_gateway/rewards/core/v1/brand/richContentMeta
The Rich Content Metadata feature allows brands to define and manage rich text content for rewards. Rich text includes content such as:
- Detailed reward descriptions.
- Custom terms and conditions.
- Any dynamic content to enhance the reward experience.
This metadata is stored separately and can be linked to a reward using the Create Reward API.
Note You can add a maximum of 20 Rich Content Metadata for an organization.
Prerequisites
- Authentication: Basic or OAuth authentication
Resource information
URI | /api_gateway/rewards/core/v1/brand/richContentMeta |
HTTP Method | POST |
API endpoint example
https://{host}/api_gateway/rewards/core/v1/brand/richContentMeta
Request Body Parameters
Parameter | Type | Description |
---|---|---|
name * | String | Unique identifier for the rich content metadata (Max: 256 characters). |
description | String | Description of the metadata (Max: 256 characters). |
isMandatory * | Boolean | Indicates whether metadata is mandatory (true or false ). |
scope * | Enum | Must be "REWARD" (case-sensitive). |
defaultValue | String | The default value is shown when rich text content is unavailable for a specific reward. - Required: Only if isMandatory is set to true .- Optional: If isMandatory is false.- Max Length: 50,000 characters. |
isActive | Boolean | Defaults to true during Rich Text Content Metadata creation, even if set to false. |
Note: defaultValue
is required only when isMandatory is true.
Example Request
{
"name": "terms&conditions",
"description": "RC2_desc",
"isMandatory": true,
"isActive": true,
"scope": "REWARD",
"defaultValue": "here is your rich content"
}
Example Response
{
"id": 9,
"name": "terms&conditions",
"description": "RC2_desc",
"isMandatory": true,
"isActive": true,
"scope": "REWARD",
"defaultValue": "here is your rich content",
"createdBy": 75161973,
"createdOn": 1743268460227,
"lastUpdatedBy": 75161973,
"lastUpdatedOn": 1743268460227
}
Response Parameters
Parameter Name | Data Type | Description |
---|---|---|
id | Long | Unique identifier for metadata. |
name | String | Metadata name. |
description | String | Metadata description. |
isMandatory | Boolean | Whether metadata is mandatory. |
isActive | Boolean | Status of metadata. |
scope | Enum | Scope of the metadata. |
defaultValue | String | Default assigned value. |
createdBy | Long | User ID of the creator. |
createdOn | Long | Indicates Creation timestamp. Timestamps are in UTC (milliseconds since epoch). |
lastUpdatedBy | Long | User ID of the last updater. |
lastUpdatedOn | Long | Indicates Last update timestamp. Timestamps are in UTC (milliseconds since epoch). |
Note createdBy
and lastUpdatedBy
fields are automatically set based on the authenticated user.
Error Handling
HTTP Status Code | Resolution |
---|---|
400 - Invalid request parameters. | Ensure all required parameters are included in the request body. |
400 - value is not one of declared Enum | Ensure provided Enum field matches one of the supported values. |
400 - defaultValue is required when isMandatory is true. | Ensure defaultValue is not set to null, when isMandatory is set to true. |
500 - Internal server error. | Retry the request after a short delay. The issue may be temporary. |