Update Promotion
curl --request PUT \
--url 'https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}' \
--header 'Content-Type: application/json' \
--data '
{
"promotion_name": "<string>",
"description": "<string>",
"discount_rules": {
"discount_value": 123,
"max_discount_amount": 123,
"min_purchase_amount": 123,
"applicable_categories": [
{}
],
"excluded_items": [
{}
]
},
"eligibility_criteria": {
"customer_segments": [
{}
],
"first_time_customers_only": true,
"loyalty_tier_requirements": [
{}
],
"geographic_restrictions": [
{}
]
},
"usage_limits": {
"total_usage_limit": 123,
"per_customer_limit": 123,
"daily_usage_limit": 123
},
"schedule": {
"start_date": "<string>",
"end_date": "<string>",
"time_restrictions": {}
},
"display_settings": {
"promotional_message": "<string>",
"banner_text": "<string>",
"badge_style": "<string>",
"priority_level": 123
},
"status_action": "<string>",
"auto_apply": true,
"stackable": true,
"update_reason": "<string>"
}
'import requests
url = "https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}"
payload = {
"promotion_name": "<string>",
"description": "<string>",
"discount_rules": {
"discount_value": 123,
"max_discount_amount": 123,
"min_purchase_amount": 123,
"applicable_categories": [{}],
"excluded_items": [{}]
},
"eligibility_criteria": {
"customer_segments": [{}],
"first_time_customers_only": True,
"loyalty_tier_requirements": [{}],
"geographic_restrictions": [{}]
},
"usage_limits": {
"total_usage_limit": 123,
"per_customer_limit": 123,
"daily_usage_limit": 123
},
"schedule": {
"start_date": "<string>",
"end_date": "<string>",
"time_restrictions": {}
},
"display_settings": {
"promotional_message": "<string>",
"banner_text": "<string>",
"badge_style": "<string>",
"priority_level": 123
},
"status_action": "<string>",
"auto_apply": True,
"stackable": True,
"update_reason": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
promotion_name: '<string>',
description: '<string>',
discount_rules: {
discount_value: 123,
max_discount_amount: 123,
min_purchase_amount: 123,
applicable_categories: [{}],
excluded_items: [{}]
},
eligibility_criteria: {
customer_segments: [{}],
first_time_customers_only: true,
loyalty_tier_requirements: [{}],
geographic_restrictions: [{}]
},
usage_limits: {total_usage_limit: 123, per_customer_limit: 123, daily_usage_limit: 123},
schedule: {start_date: '<string>', end_date: '<string>', time_restrictions: {}},
display_settings: {
promotional_message: '<string>',
banner_text: '<string>',
badge_style: '<string>',
priority_level: 123
},
status_action: '<string>',
auto_apply: true,
stackable: true,
update_reason: '<string>'
})
};
fetch('https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'promotion_name' => '<string>',
'description' => '<string>',
'discount_rules' => [
'discount_value' => 123,
'max_discount_amount' => 123,
'min_purchase_amount' => 123,
'applicable_categories' => [
[
]
],
'excluded_items' => [
[
]
]
],
'eligibility_criteria' => [
'customer_segments' => [
[
]
],
'first_time_customers_only' => true,
'loyalty_tier_requirements' => [
[
]
],
'geographic_restrictions' => [
[
]
]
],
'usage_limits' => [
'total_usage_limit' => 123,
'per_customer_limit' => 123,
'daily_usage_limit' => 123
],
'schedule' => [
'start_date' => '<string>',
'end_date' => '<string>',
'time_restrictions' => [
]
],
'display_settings' => [
'promotional_message' => '<string>',
'banner_text' => '<string>',
'badge_style' => '<string>',
'priority_level' => 123
],
'status_action' => '<string>',
'auto_apply' => true,
'stackable' => true,
'update_reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}"
payload := strings.NewReader("{\n \"promotion_name\": \"<string>\",\n \"description\": \"<string>\",\n \"discount_rules\": {\n \"discount_value\": 123,\n \"max_discount_amount\": 123,\n \"min_purchase_amount\": 123,\n \"applicable_categories\": [\n {}\n ],\n \"excluded_items\": [\n {}\n ]\n },\n \"eligibility_criteria\": {\n \"customer_segments\": [\n {}\n ],\n \"first_time_customers_only\": true,\n \"loyalty_tier_requirements\": [\n {}\n ],\n \"geographic_restrictions\": [\n {}\n ]\n },\n \"usage_limits\": {\n \"total_usage_limit\": 123,\n \"per_customer_limit\": 123,\n \"daily_usage_limit\": 123\n },\n \"schedule\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"time_restrictions\": {}\n },\n \"display_settings\": {\n \"promotional_message\": \"<string>\",\n \"banner_text\": \"<string>\",\n \"badge_style\": \"<string>\",\n \"priority_level\": 123\n },\n \"status_action\": \"<string>\",\n \"auto_apply\": true,\n \"stackable\": true,\n \"update_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}")
.header("Content-Type", "application/json")
.body("{\n \"promotion_name\": \"<string>\",\n \"description\": \"<string>\",\n \"discount_rules\": {\n \"discount_value\": 123,\n \"max_discount_amount\": 123,\n \"min_purchase_amount\": 123,\n \"applicable_categories\": [\n {}\n ],\n \"excluded_items\": [\n {}\n ]\n },\n \"eligibility_criteria\": {\n \"customer_segments\": [\n {}\n ],\n \"first_time_customers_only\": true,\n \"loyalty_tier_requirements\": [\n {}\n ],\n \"geographic_restrictions\": [\n {}\n ]\n },\n \"usage_limits\": {\n \"total_usage_limit\": 123,\n \"per_customer_limit\": 123,\n \"daily_usage_limit\": 123\n },\n \"schedule\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"time_restrictions\": {}\n },\n \"display_settings\": {\n \"promotional_message\": \"<string>\",\n \"banner_text\": \"<string>\",\n \"badge_style\": \"<string>\",\n \"priority_level\": 123\n },\n \"status_action\": \"<string>\",\n \"auto_apply\": true,\n \"stackable\": true,\n \"update_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"promotion_name\": \"<string>\",\n \"description\": \"<string>\",\n \"discount_rules\": {\n \"discount_value\": 123,\n \"max_discount_amount\": 123,\n \"min_purchase_amount\": 123,\n \"applicable_categories\": [\n {}\n ],\n \"excluded_items\": [\n {}\n ]\n },\n \"eligibility_criteria\": {\n \"customer_segments\": [\n {}\n ],\n \"first_time_customers_only\": true,\n \"loyalty_tier_requirements\": [\n {}\n ],\n \"geographic_restrictions\": [\n {}\n ]\n },\n \"usage_limits\": {\n \"total_usage_limit\": 123,\n \"per_customer_limit\": 123,\n \"daily_usage_limit\": 123\n },\n \"schedule\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"time_restrictions\": {}\n },\n \"display_settings\": {\n \"promotional_message\": \"<string>\",\n \"banner_text\": \"<string>\",\n \"badge_style\": \"<string>\",\n \"priority_level\": 123\n },\n \"status_action\": \"<string>\",\n \"auto_apply\": true,\n \"stackable\": true,\n \"update_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"promotion_id": "<string>",
"campaign_id": "<string>",
"promotion_name": "<string>",
"status": "<string>",
"updates_applied": [
{}
],
"updates_rejected": [
{
"field": "<string>",
"reason": "<string>",
"current_value": "<string>"
}
],
"discount_rules": {},
"eligibility_criteria": {},
"usage_limits": {},
"schedule": {},
"display_settings": {},
"performance_impact": {
"estimated_usage_change": "<string>",
"revenue_impact_estimate": "<string>",
"customer_impact_notes": [
{}
]
},
"validation_warnings": [
{}
],
"last_updated": "<string>",
"updated_by": "<string>",
"update_history": [
{
"timestamp": "<string>",
"updated_by": "<string>",
"fields_changed": [
{}
],
"reason": "<string>"
}
]
}Promotions
Update Promotion
Update an existing promotion’s configuration, including discount rules, eligibility criteria, scheduling, and display settings.
PUT
{promotions_service_api_base_url}
/
promotions
/
company
/
{company_id}
/
campaigns
/
{campaign_id}
/
promotions
/
{promotion_id}
Update Promotion
curl --request PUT \
--url 'https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}' \
--header 'Content-Type: application/json' \
--data '
{
"promotion_name": "<string>",
"description": "<string>",
"discount_rules": {
"discount_value": 123,
"max_discount_amount": 123,
"min_purchase_amount": 123,
"applicable_categories": [
{}
],
"excluded_items": [
{}
]
},
"eligibility_criteria": {
"customer_segments": [
{}
],
"first_time_customers_only": true,
"loyalty_tier_requirements": [
{}
],
"geographic_restrictions": [
{}
]
},
"usage_limits": {
"total_usage_limit": 123,
"per_customer_limit": 123,
"daily_usage_limit": 123
},
"schedule": {
"start_date": "<string>",
"end_date": "<string>",
"time_restrictions": {}
},
"display_settings": {
"promotional_message": "<string>",
"banner_text": "<string>",
"badge_style": "<string>",
"priority_level": 123
},
"status_action": "<string>",
"auto_apply": true,
"stackable": true,
"update_reason": "<string>"
}
'import requests
url = "https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}"
payload = {
"promotion_name": "<string>",
"description": "<string>",
"discount_rules": {
"discount_value": 123,
"max_discount_amount": 123,
"min_purchase_amount": 123,
"applicable_categories": [{}],
"excluded_items": [{}]
},
"eligibility_criteria": {
"customer_segments": [{}],
"first_time_customers_only": True,
"loyalty_tier_requirements": [{}],
"geographic_restrictions": [{}]
},
"usage_limits": {
"total_usage_limit": 123,
"per_customer_limit": 123,
"daily_usage_limit": 123
},
"schedule": {
"start_date": "<string>",
"end_date": "<string>",
"time_restrictions": {}
},
"display_settings": {
"promotional_message": "<string>",
"banner_text": "<string>",
"badge_style": "<string>",
"priority_level": 123
},
"status_action": "<string>",
"auto_apply": True,
"stackable": True,
"update_reason": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
promotion_name: '<string>',
description: '<string>',
discount_rules: {
discount_value: 123,
max_discount_amount: 123,
min_purchase_amount: 123,
applicable_categories: [{}],
excluded_items: [{}]
},
eligibility_criteria: {
customer_segments: [{}],
first_time_customers_only: true,
loyalty_tier_requirements: [{}],
geographic_restrictions: [{}]
},
usage_limits: {total_usage_limit: 123, per_customer_limit: 123, daily_usage_limit: 123},
schedule: {start_date: '<string>', end_date: '<string>', time_restrictions: {}},
display_settings: {
promotional_message: '<string>',
banner_text: '<string>',
badge_style: '<string>',
priority_level: 123
},
status_action: '<string>',
auto_apply: true,
stackable: true,
update_reason: '<string>'
})
};
fetch('https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'promotion_name' => '<string>',
'description' => '<string>',
'discount_rules' => [
'discount_value' => 123,
'max_discount_amount' => 123,
'min_purchase_amount' => 123,
'applicable_categories' => [
[
]
],
'excluded_items' => [
[
]
]
],
'eligibility_criteria' => [
'customer_segments' => [
[
]
],
'first_time_customers_only' => true,
'loyalty_tier_requirements' => [
[
]
],
'geographic_restrictions' => [
[
]
]
],
'usage_limits' => [
'total_usage_limit' => 123,
'per_customer_limit' => 123,
'daily_usage_limit' => 123
],
'schedule' => [
'start_date' => '<string>',
'end_date' => '<string>',
'time_restrictions' => [
]
],
'display_settings' => [
'promotional_message' => '<string>',
'banner_text' => '<string>',
'badge_style' => '<string>',
'priority_level' => 123
],
'status_action' => '<string>',
'auto_apply' => true,
'stackable' => true,
'update_reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}"
payload := strings.NewReader("{\n \"promotion_name\": \"<string>\",\n \"description\": \"<string>\",\n \"discount_rules\": {\n \"discount_value\": 123,\n \"max_discount_amount\": 123,\n \"min_purchase_amount\": 123,\n \"applicable_categories\": [\n {}\n ],\n \"excluded_items\": [\n {}\n ]\n },\n \"eligibility_criteria\": {\n \"customer_segments\": [\n {}\n ],\n \"first_time_customers_only\": true,\n \"loyalty_tier_requirements\": [\n {}\n ],\n \"geographic_restrictions\": [\n {}\n ]\n },\n \"usage_limits\": {\n \"total_usage_limit\": 123,\n \"per_customer_limit\": 123,\n \"daily_usage_limit\": 123\n },\n \"schedule\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"time_restrictions\": {}\n },\n \"display_settings\": {\n \"promotional_message\": \"<string>\",\n \"banner_text\": \"<string>\",\n \"badge_style\": \"<string>\",\n \"priority_level\": 123\n },\n \"status_action\": \"<string>\",\n \"auto_apply\": true,\n \"stackable\": true,\n \"update_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}")
.header("Content-Type", "application/json")
.body("{\n \"promotion_name\": \"<string>\",\n \"description\": \"<string>\",\n \"discount_rules\": {\n \"discount_value\": 123,\n \"max_discount_amount\": 123,\n \"min_purchase_amount\": 123,\n \"applicable_categories\": [\n {}\n ],\n \"excluded_items\": [\n {}\n ]\n },\n \"eligibility_criteria\": {\n \"customer_segments\": [\n {}\n ],\n \"first_time_customers_only\": true,\n \"loyalty_tier_requirements\": [\n {}\n ],\n \"geographic_restrictions\": [\n {}\n ]\n },\n \"usage_limits\": {\n \"total_usage_limit\": 123,\n \"per_customer_limit\": 123,\n \"daily_usage_limit\": 123\n },\n \"schedule\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"time_restrictions\": {}\n },\n \"display_settings\": {\n \"promotional_message\": \"<string>\",\n \"banner_text\": \"<string>\",\n \"badge_style\": \"<string>\",\n \"priority_level\": 123\n },\n \"status_action\": \"<string>\",\n \"auto_apply\": true,\n \"stackable\": true,\n \"update_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"promotion_name\": \"<string>\",\n \"description\": \"<string>\",\n \"discount_rules\": {\n \"discount_value\": 123,\n \"max_discount_amount\": 123,\n \"min_purchase_amount\": 123,\n \"applicable_categories\": [\n {}\n ],\n \"excluded_items\": [\n {}\n ]\n },\n \"eligibility_criteria\": {\n \"customer_segments\": [\n {}\n ],\n \"first_time_customers_only\": true,\n \"loyalty_tier_requirements\": [\n {}\n ],\n \"geographic_restrictions\": [\n {}\n ]\n },\n \"usage_limits\": {\n \"total_usage_limit\": 123,\n \"per_customer_limit\": 123,\n \"daily_usage_limit\": 123\n },\n \"schedule\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"time_restrictions\": {}\n },\n \"display_settings\": {\n \"promotional_message\": \"<string>\",\n \"banner_text\": \"<string>\",\n \"badge_style\": \"<string>\",\n \"priority_level\": 123\n },\n \"status_action\": \"<string>\",\n \"auto_apply\": true,\n \"stackable\": true,\n \"update_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"promotion_id": "<string>",
"campaign_id": "<string>",
"promotion_name": "<string>",
"status": "<string>",
"updates_applied": [
{}
],
"updates_rejected": [
{
"field": "<string>",
"reason": "<string>",
"current_value": "<string>"
}
],
"discount_rules": {},
"eligibility_criteria": {},
"usage_limits": {},
"schedule": {},
"display_settings": {},
"performance_impact": {
"estimated_usage_change": "<string>",
"revenue_impact_estimate": "<string>",
"customer_impact_notes": [
{}
]
},
"validation_warnings": [
{}
],
"last_updated": "<string>",
"updated_by": "<string>",
"update_history": [
{
"timestamp": "<string>",
"updated_by": "<string>",
"fields_changed": [
{}
],
"reason": "<string>"
}
]
}This endpoint allows modification of existing promotions while maintaining data integrity and ensuring business rules are followed. Different fields have varying update restrictions based on promotion status.
Promotion updates are subject to status-based restrictions. Active promotions have limited modifiable fields to prevent disruption to ongoing customer experiences, while draft promotions can be freely modified.
Path Parameters
string
required
The unique identifier of the company that owns the promotion
string
required
The unique identifier of the campaign containing the promotion
string
required
The unique identifier of the promotion to update
Request Body
string
Updated display name for the promotion
string
Updated detailed description of the promotion offer
object
Updated discount calculation rules and parameters
Show Discount Rules Updates
Show Discount Rules Updates
number
Updated discount amount (restrictions apply for active promotions)
number
Updated maximum discount amount for percentage-based discounts
number
Updated minimum purchase amount required
array
Updated product categories eligible for the discount
array
Updated specific items excluded from the promotion
object
object
object
object
string
Action to perform on promotion status: “activate”, “pause”, “resume”, “deactivate”
boolean
Updated setting for automatic application without requiring a code
boolean
Updated setting for combination with other promotions
string
Reason for the update (for audit trail)
Request Example
{
"promotion_name": "Spring Fresh 25% Off - Extended",
"description": "Get 25% off all fresh produce items during our extended Spring Fresh campaign",
"discount_rules": {
"discount_value": 25,
"max_discount_amount": 75.00,
"min_purchase_amount": 20.00,
"applicable_categories": ["fresh_produce", "organic_items", "seasonal_items"],
"excluded_items": ["premium_organics"]
},
"usage_limits": {
"total_usage_limit": 1500,
"per_customer_limit": 5,
"daily_usage_limit": 150
},
"schedule": {
"end_date": "2025-05-31T23:59:59.000Z",
"time_restrictions": {
"days_of_week": ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday"],
"hours_of_day": {
"start": "06:00",
"end": "22:00"
}
}
},
"display_settings": {
"promotional_message": "Save 25% on Fresh Spring Produce - Extended Through May!",
"banner_text": "SPRING20 - Even More Fresh Savings!",
"priority_level": 9
},
"stackable": true,
"update_reason": "Extending promotion due to high customer engagement and positive ROI"
}
Response
string
Unique identifier for the updated promotion
string
Parent campaign identifier
string
Updated display name of the promotion
string
Current promotion status after update
array
List of fields that were successfully updated
array
object
Complete updated discount configuration
object
Updated customer eligibility requirements
object
Updated usage restrictions with current statistics
object
Updated promotion timing and availability
object
Updated visual presentation configuration
object
array
Non-blocking warnings about the updated configuration
string
Timestamp of this update
string
User who performed the update
array
Response Example
{
"promotion_id": "promo_spring_001",
"campaign_id": "1000010",
"promotion_name": "Spring Fresh 25% Off - Extended",
"status": "active",
"updates_applied": [
"promotion_name",
"description",
"discount_rules.discount_value",
"discount_rules.max_discount_amount",
"discount_rules.applicable_categories",
"usage_limits.total_usage_limit",
"usage_limits.per_customer_limit",
"schedule.end_date",
"schedule.time_restrictions",
"display_settings.promotional_message",
"display_settings.banner_text",
"display_settings.priority_level"
],
"updates_rejected": [
{
"field": "discount_rules.min_purchase_amount",
"reason": "Cannot decrease minimum purchase amount for active promotion with existing usage",
"current_value": "25.00"
}
],
"discount_rules": {
"discount_value": 25,
"max_discount_amount": 75.00,
"min_purchase_amount": 25.00,
"applicable_categories": ["fresh_produce", "organic_items", "seasonal_items"],
"excluded_items": ["premium_organics"]
},
"eligibility_criteria": {
"customer_segments": ["regular_customers", "premium_members"],
"first_time_customers_only": false,
"loyalty_tier_requirements": ["bronze", "silver", "gold"],
"geographic_restrictions": ["northeast_region"]
},
"usage_limits": {
"total_usage_limit": 1500,
"per_customer_limit": 5,
"daily_usage_limit": 150,
"current_usage": {
"total_used": 247,
"today_used": 18,
"remaining_uses": 1253,
"unique_customers": 189
}
},
"schedule": {
"start_date": "2025-04-14T00:00:00.000Z",
"end_date": "2025-05-31T23:59:59.000Z",
"time_restrictions": {
"days_of_week": ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday"],
"hours_of_day": {
"start": "06:00",
"end": "22:00"
}
}
},
"display_settings": {
"promotional_message": "Save 25% on Fresh Spring Produce - Extended Through May!",
"banner_text": "SPRING20 - Even More Fresh Savings!",
"badge_style": "seasonal_green",
"priority_level": 9
},
"performance_impact": {
"estimated_usage_change": "Increased usage expected due to higher discount and extended availability",
"revenue_impact_estimate": "Positive impact expected despite higher discount due to extended duration",
"customer_impact_notes": [
"Existing customers will see improved offer",
"Extended weekend availability may increase usage",
"Higher discount may attract new customer segments"
]
},
"validation_warnings": [
"Increasing discount from 20% to 25% will reduce profit margins",
"Extended end date overlaps with Memorial Day weekend - consider holiday impact"
],
"last_updated": "2025-04-20T15:45:00.000Z",
"updated_by": "marketing_manager_002",
"update_history": [
{
"timestamp": "2025-04-20T15:45:00.000Z",
"updated_by": "marketing_manager_002",
"fields_changed": ["discount_value", "usage_limits", "schedule.end_date"],
"reason": "Extending promotion due to high customer engagement and positive ROI"
},
{
"timestamp": "2025-04-15T10:30:00.000Z",
"updated_by": "marketing_admin_001",
"fields_changed": ["display_settings.banner_text"],
"reason": "Updated banner text for clarity"
}
]
}
Update Restrictions by Status
Update Restrictions by Status
Draft Status
- All fields can be freely modified
- No restrictions on changes
- Updates take effect immediately
- Most fields can be updated
- Start date can be modified if not within 24 hours
- Promotion code cannot be changed
- Limited field updates allowed
- Cannot decrease discount value or minimum purchase amounts
- Cannot restrict eligibility criteria
- Can extend end date and increase usage limits
- Display settings can be updated
- Same restrictions as active status
- Can modify status to resume or deactivate
- Schedule modifications allowed
- No modifications allowed except for display settings
- Updates primarily for archival and reporting purposes
- Cannot reactivate expired promotions
Update Safety: The system prevents updates that could negatively impact customers who have already used the promotion or are in the process of using it.
Performance Optimization: When updating active promotions, monitor performance metrics closely to ensure changes have the desired effect on customer engagement and business objectives.
Field Update Rules
Detailed Update Validation Rules
Detailed Update Validation Rules
Discount Rules
- Cannot decrease discount percentage for active promotions
- Cannot decrease maximum discount amount if customers have used higher amounts
- Cannot increase minimum purchase amount for active promotions
- Adding categories is allowed, removing requires validation
- Can increase limits at any time
- Cannot decrease below current usage levels
- Per-customer limits cannot exceed total limits
- Daily limits adjust automatically if needed
- Cannot move start date to the past
- Can extend end date for any status except expired
- Time restrictions can be expanded but not reduced for active promotions
- Timezone changes require special validation
- Cannot make criteria more restrictive for active promotions
- Can expand customer segments and geographic regions
- Loyalty tier requirements can be relaxed but not tightened
- New restrictions apply only to future usage
Status Actions
Available Status Actions
Available Status Actions
Activate
- Move from draft or scheduled to active
- Requires valid configuration and future or current start date
- Begins tracking performance metrics
- Temporarily disable active promotion
- Preserves configuration and usage statistics
- Can be resumed later
- Reactivate a paused promotion
- Continues from where it left off
- No configuration reset required
- Permanently disable promotion before natural expiration
- Cannot be reactivated
- Preserves all historical data
Error Responses
Common Update Error Scenarios
Common Update Error Scenarios
Invalid Update for StatusValidation FailureUsage Limit ConflictPromotion Not Found
{
"error": "Invalid update for promotion status",
"message": "Cannot decrease discount value for active promotion",
"code": "INVALID_UPDATE_FOR_STATUS",
"current_status": "active",
"rejected_field": "discount_rules.discount_value"
}
{
"error": "Validation failed",
"message": "End date must be after start date",
"code": "VALIDATION_FAILED",
"field": "schedule.end_date"
}
{
"error": "Usage limit conflict",
"message": "Cannot set total usage limit below current usage count",
"code": "USAGE_LIMIT_CONFLICT",
"current_usage": 247,
"requested_limit": 200
}
{
"error": "Promotion not found",
"message": "The specified promotion does not exist",
"code": "PROMOTION_NOT_FOUND"
}
Customer Impact: Updates to active promotions may affect customer experience. Consider the timing of updates and communicate significant changes to customers when appropriate.
Best Practices
Update Best Practices
Update Best Practices
Planning Updates
- Review current usage patterns before making changes
- Consider customer impact of modifications
- Test changes in staging environment when possible
- Document reasons for updates for audit trail
- Prefer extending rather than restricting benefits
- Update display settings for immediate customer visibility
- Monitor performance impact after changes
- Communicate significant changes to customer service team
- Track metrics before and after updates
- Set up alerts for unexpected usage pattern changes
- Review customer feedback for update impact
- Adjust based on real-world performance data
- Maintain detailed update logs
- Include business justification for changes
- Follow approval processes for significant modifications
- Ensure regulatory compliance for promotional changes
Integration Considerations
System Integration Impact
System Integration Impact
Frontend Applications
- Updated display settings reflect immediately
- Cache invalidation may be required
- Mobile app synchronization timing
- Real-time notification systems
- Performance metric recalculation
- Historical data integrity maintenance
- Reporting dashboard updates
- Trend analysis adjustments
- Email marketing system updates
- Push notification content changes
- Website banner modifications
- Social media content coordination
- Inventory planning adjustments
- Staff training on promotion changes
- Customer service preparation
- Financial impact assessment

