Update catalog promotion

This API is used to update catalog promotion and link/de-link to a reward(s)

Expired: Do not allow any of the fields to be edited.

Running :

  1. Cannot change : start date, discount_type, discount_value.
  2. Can change (impacts rewards discounted points)

end date: end date >= now and end date >= start date.

isEnabled - Disable but cannot enable again. After disabling, the linked reward can be linked to another active promotion. Re-enabling will violate the constraint of only one reward linked to an active promotion.

Linking a reward - update the link table accordingly.

Unlinking a reward - Set isActive = false in the link table.

  1. Can change other details of the promotion (name, desc….etc

Scheduled : Similar to running but start_date, discount_type, discount_value fields also can be updated.

Cannot delete a promotion similar to a 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 .

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Default access group

Resource information

URI/api_gateway/rewards/core/v1/promotion/{reward Id}/brand/{brand Id}
HTTP MethodPUT
PaginationNo
Batch supportNo
Rate limit informationNone

API endpoint example

https://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/promotion/112295/brand/1

Request path parameters

ParameterData TypeDescription
brandId*StringYou can use the API and retrieve the brand ID of your brand.
Promotion Id*StringUnique identifier for the promotion. Ex: 112295

Request body parameters

ParameterData TypeDescription
endTimeStringThe end time of the promotion. Ex: 2024-10-25T11:16:00Z
discountType*EnumType of discount applied to the promotion. Supported values: ABSOLUTE, PERCENTAGE, FIXED
discountValue*NumberValue of the discount.
languageSpecificInfoArrayArray containing language-specific information.
languageCodeStringLanguage code for the specific entry. Ex: en
nameStringName of the item in the specified language
descriptionStringDescription of the item in the specified language
enabledBooleanIndicates if the language specific info is enabled
rewardIds*Array of IntegersArray of reward IDs associated with the promotion
{
       "endTime": "2024-10-25T11:16:00Z",
       "discountType": "ABSOLUTE",
       "discountValue": 1.00,
       "languageSpecificInfo": [
           {
               "languageCode": "en",
               "name": "P1- R-5165 P1- R-5165 upadted 2.1",
               "description": "description",
               "enabled": true
           }
       ],
   "rewardIds":
   [
       112295
   ]
}

Response parameters

ParameterData TypeDescription
statusObjectContainer for the status information
successBooleanIndicates the success of the operation
codeIntegerStatus code for the operation
messageStringDescription message of the operation status
catalogPromotionObjectContainer for catalog promotion information
idIntegerUnique identifier of the catalog promotion
failedRewardsArray (Empty in this case)Array containing any failed rewards information
{
   "status": {
       "success": true,
       "code": 11021,
       "message": "Catalog promotion updated successfully."
   },
   "catalogPromotion": {
       "id": 8
   },
   "failedRewards": []
}


API-specific error codes

Error codeDescription
500Internal server error.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!