Create custom field

This is used to create a custom field for a particular org. For example:- This API is being used to create transaction custom field in Update fulfilment status and txn custom field API.

📘

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 MethodPOST
PaginationNo
Batch supportNo
Rate limit informationNone

API endpoint example

https://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/brand/customfield

Request body parameters

Parameter NameData TypeDescription
name*StringName of the custom field.
orgIdStringOrg identifier of the org.
description*StringDescription of the field.
isMandatoryBooleanIndicates if the field is mandatory.
isActiveBooleanStatus of the field. Ex: true.
scope*EnumThe 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.
defaultValueStringA user-defined default value associated with the custom field.
dataType*StringType 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 NameData TypeDescription
idIntegerUnique identifier for the custom field.
orgIdIntegerOrg identifier of the org.
nameStringName of the custom field.
descriptionStringDescription of the custom field.
isMandatoryBooleanIndicates if the field is mandatory.
isActiveBooleanStatus of the field.
scopeStringScope of the field.
defaultValueStringDefault value of the field.
dataTypeStringType of data for the field.
createdByIntegerUser identifier who created the field.
createdOnDateCreation date and time of the field.
lastUpdatedByIntegerUser identifier who last updated the field.
lastUpdatedOnDateLast 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 codeDescription
3022ISSUE REWARD scope limit reached, max is {max_limit}. Allowed limit is 10.
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!