Skip to main content
PUT
{promotions_service_api_base_url}
/
promotions
/
company
/
{company_id}
/
campaigns
/
{campaign_id}
/
promotions
/
{promotion_id}
{
  "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

company_id
string
required
The unique identifier of the company that owns the promotion
campaign_id
string
required
The unique identifier of the campaign containing the promotion
promotion_id
string
required
The unique identifier of the promotion to update

Request Body

promotion_name
string
Updated display name for the promotion
description
string
Updated detailed description of the promotion offer
discount_rules
object
Updated discount calculation rules and parameters
eligibility_criteria
object
Updated customer and order eligibility requirements
usage_limits
object
Updated promotion usage restrictions and limits
schedule
object
Updated promotion timing and availability schedule
display_settings
object
Updated visual presentation and marketing settings
status_action
string
Action to perform on promotion status: “activate”, “pause”, “resume”, “deactivate”
auto_apply
boolean
Updated setting for automatic application without requiring a code
stackable
boolean
Updated setting for combination with other promotions
update_reason
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

promotion_id
string
Unique identifier for the updated promotion
campaign_id
string
Parent campaign identifier
promotion_name
string
Updated display name of the promotion
status
string
Current promotion status after update
updates_applied
array
List of fields that were successfully updated
updates_rejected
array
List of fields that could not be updated due to restrictions
discount_rules
object
Complete updated discount configuration
eligibility_criteria
object
Updated customer eligibility requirements
usage_limits
object
Updated usage restrictions with current statistics
schedule
object
Updated promotion timing and availability
display_settings
object
Updated visual presentation configuration
performance_impact
object
Estimated impact of changes on promotion performance
validation_warnings
array
Non-blocking warnings about the updated configuration
last_updated
string
Timestamp of this update
updated_by
string
User who performed the update
update_history
array
Recent update history for audit purposes

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"
    }
  ]
}
Draft Status
  • All fields can be freely modified
  • No restrictions on changes
  • Updates take effect immediately
Scheduled Status
  • Most fields can be updated
  • Start date can be modified if not within 24 hours
  • Promotion code cannot be changed
Active Status
  • 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
Paused Status
  • Same restrictions as active status
  • Can modify status to resume or deactivate
  • Schedule modifications allowed
Expired/Completed Status
  • 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

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
Usage Limits
  • 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
Schedule Changes
  • 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
Eligibility Criteria
  • 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

Activate
  • Move from draft or scheduled to active
  • Requires valid configuration and future or current start date
  • Begins tracking performance metrics
Pause
  • Temporarily disable active promotion
  • Preserves configuration and usage statistics
  • Can be resumed later
Resume
  • Reactivate a paused promotion
  • Continues from where it left off
  • No configuration reset required
Deactivate
  • Permanently disable promotion before natural expiration
  • Cannot be reactivated
  • Preserves all historical data

Error Responses

Invalid Update for Status
{
  "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"
}
Validation Failure
{
  "error": "Validation failed",
  "message": "End date must be after start date",
  "code": "VALIDATION_FAILED",
  "field": "schedule.end_date"
}
Usage Limit Conflict
{
  "error": "Usage limit conflict",
  "message": "Cannot set total usage limit below current usage count",
  "code": "USAGE_LIMIT_CONFLICT",
  "current_usage": 247,
  "requested_limit": 200
}
Promotion Not Found
{
  "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

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
Active Promotion Updates
  • 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
Performance Monitoring
  • 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
Compliance and Audit
  • Maintain detailed update logs
  • Include business justification for changes
  • Follow approval processes for significant modifications
  • Ensure regulatory compliance for promotional changes

Integration Considerations

Frontend Applications
  • Updated display settings reflect immediately
  • Cache invalidation may be required
  • Mobile app synchronization timing
  • Real-time notification systems
Analytics Systems
  • Performance metric recalculation
  • Historical data integrity maintenance
  • Reporting dashboard updates
  • Trend analysis adjustments
Customer Communications
  • Email marketing system updates
  • Push notification content changes
  • Website banner modifications
  • Social media content coordination
Business Operations
  • Inventory planning adjustments
  • Staff training on promotion changes
  • Customer service preparation
  • Financial impact assessment
I