Create Rich Text Content Metadata for Rewards

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 MethodPOST

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

ParameterDescription
idUnique identifier for metadata.
nameMetadata name.
descriptionMetadata description.
isMandatoryWhether metadata is mandatory.
isActiveStatus of metadata.
scopeScope of the metadata.
defaultValueDefault assigned value.
createdByUser ID of the creator.
createdOnIndicates Creation timestamp. Timestamps are in UTC (milliseconds since epoch).
lastUpdatedByUser ID of the last updater.
lastUpdatedOnIndicates Last update timestamp. Timestamps are in UTC (milliseconds since epoch).

Note createdBy and lastUpdatedBy fields are automatically set based on the authenticated user.

Error code

CodeDescription
400 - Invalid request parameters.Ensure all required parameters are included in the request body.
400 - value is not one of declared EnumEnsure 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.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!