Create Reward Category

Create a new reward category.

This API lets you create a new reward category. A Reward Category is a metadata attribute used to classify rewards into predefined groups based on their nature or purpose. For example, categories can include fashion, electronics, or groceries.

👍

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 .

Prerequisites

  • Authentication - Basic or OAuth authentication details
  • Default access group
  • Brand ID

Resource information

URL/api_gateway/rewards/core/v1/metadata/category/create
HTTP methodPOST
PaginationNA
Rate limitNA
Batch supportNA

API endpoint example

https://eu.api.capillarytech.com/api_gateway/rewards/core/v1/metadata/category/create

Request body parameters

Parameter
(Parameters marked with * are mandatory)
Data TypeDescription
brandId*IntegerUnique identifier for the brand. To retrieve brandId, refer to the Retrieve Brand ID API.
name*StringName of the reward category to be created. The name supports special characters, is not case-sensitive, and can be up to 255 characters in length.
{
  "brandId": 55,
  "name": "General"
}

Response parameters

ParameterData TypeDescription
statusObjectContains the status details for reward category creation.
-successBooleanIndicates whether the operation was successful. Values: true or false.
-codeIntegerResponse code for the operation. Example: 2002
-messageStringMessage describing the result of the operation.
categoryObjectContains the reward category details.
-idIntegerUnique identifier for the created reward category.
-nameStringName of the created reward category.
-enabledBooleanCurrent active status of the reward category. If true, the reward category is currently active, else it is inactive.Values: true or false. When creating a reward category, the value is true.
{
    "status": {
        "success": true,
        "code": 2002,
        "message": "Category save successfully"
    },
    "category": {
        "id": 129,
        "name": "general",
        "enabled": true
    }
}
{
    "status": {
        "success": false,
        "code": 3004,
        "message": "Brand not found"
    },
    "category": null
}
{
    "status": {
        "success": false,
        "code": 400,
        "message": "name can't be null or empty."
    }
}

API Error Codes

Error codeMessageDescription
3004brand not foundInvalid brandId in the request.
400name can't be null or empty.Name of the category has to be provided.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!