Update the fields of a promotion by specifying its ID and the fields to update in the request body.
PUT /v2/epc/promotions
Remote Method
updatePromotion
REST Handler
APIPromotionRestHandler
Package
Communication (vlocity_cmt)
API Parameters and Response Format
For API parameter names and descriptions, see the Swagger (OpenAPI) reference documentation for Industries EPC REST APIs.
Resource Information
| Response Format | JSON |
|---|---|
| Resource URL | /services/apexrest/{namespace}/v2/epc/promotions |
Example Request
PUT v2/epc/promotions
{
"epcRequest": {
"entity": {
"Id":"a3K3h0000001T5iEAE",
"Name": "Promotion-Example-2",
"vlocity_cmt__Code__c": "Promotion-Example-2",
"vlocity_cmt__Description__c": "Promotion-Example-2"
}
}
}
Example Result
{
"epcResponse": {
"entities": [
{
"numberOfProduct": 0,
"entity": {
"attributes": {
"type": "vlocity_cmt__Promotion__c",
"url": "/services/data/v52.0/sobjects/vlocity_cmt__Promotion__c/a3K3h0000001T5iEAE"
},
"Id": "a3K3h0000001T5iEAE",
"OwnerId": "0053h000002UGCUAA4",
"IsDeleted": false,
"Name": "Promotion-Example-2",
"CurrencyIsoCode": "USD",
"RecordTypeId": "0123h000000slErAAI",
"CreatedDate": "2021-06-14T06:21:52.000+0000",
"CreatedById": "0053h000002UGCUAA4",
"LastModifiedDate": "2021-09-07T05:57:26.000+0000",
"LastModifiedById": "0053h000002UGCUAA4",
"SystemModstamp": "2021-09-07T05:57:26.000+0000",
"LastViewedDate": "2021-09-07T05:57:25.000+0000",
"LastReferencedDate": "2021-09-07T05:57:25.000+0000",
"vlocity_cmt__AppliesToAllItems__c": false,
"vlocity_cmt__CannotBeCombined__c": false,
"vlocity_cmt__Code__c": "Promotion-Example-2",
"vlocity_cmt__Description__c": "Promotion-Example-2",
"vlocity_cmt__DurationUnitOfMeasure__c": "Month",
"vlocity_cmt__EnableAutoAddProducts__c": false,
"vlocity_cmt__EnableAutoApplyPromotion__c": true,
"vlocity_cmt__GlobalKey__c": "6faa37d2-254b-94af-6d27-e20d1331b3fd",
"vlocity_cmt__IsActive__c": true,
"vlocity_cmt__IsLimitedQuantity__c": true,
"vlocity_cmt__IsOrderable__c": true,
"vlocity_cmt__PriceListId__c": "a343h000001ACXFAA4",
"vlocity_cmt__ServiceContinuation__c": "Not Applicable",
"vlocity_cmt__PriceListId__r": {
"attributes": {
"type": "vlocity_cmt__PriceList__c",
"url": "/services/data/v52.0/sobjects/vlocity_cmt__PriceList__c/a343h000001ACXFAA4"
},
"Id": "a343h000001ACXFAA4",
"Name": "TestPriceList"
}
}
}
],
"overallResult": "success"
}
}