PUT
{stores_service_api_base_url}
/
stores
/
company
/
{company_id}
/
campaigns
/
{campaign_id}
/
stores
{
  "success": true,
  "message": "<string>",
  "campaign_id": "<string>",
  "updated_fields": [
    {}
  ],
  "effective_immediately": true,
  "timestamp": "<string>"
}
This endpoint allows you to modify existing campaign settings including basic information, scheduling, targeting criteria, and promotional parameters. Updates are applied immediately and affect all associated stores and promotions.
Campaign updates are immediately effective and will impact any active promotions or store associations. Consider the timing of updates for campaigns that are currently running.

Path Parameters

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

Request Body

name
string
Updated campaign name
description
string
Updated campaign description
campaign_identifier
string
Unique campaign identifier for internal tracking
starts_at
string
Updated campaign start time (ISO 8601 format)
ends_at
string
Updated campaign end time (ISO 8601 format)
status
string
Updated campaign status: “active”, “inactive”, “scheduled”, “expired”

Response

success
boolean
Indicates whether the update was successful
message
string
Confirmation message or error details
campaign_id
string
The ID of the updated campaign
updated_fields
array
List of fields that were successfully updated
effective_immediately
boolean
Whether changes take effect immediately
timestamp
string
Timestamp when the update was applied

Request Example

{
  "name": "Bi-Yearly Specials",
  "description": "Bi-yearly promotions and special offers for customers",
  "campaign_identifier": "BI_YEARLY_SPECIALS",
  "starts_at": "2024-01-01T00:00:00.000Z",
  "ends_at": "2999-12-31T23:59:59.000Z",
  "status": "active"
}

Response Example

{
  "success": true,
  "message": "Campaign successfully updated",
  "campaign_id": "1000010",
  "updated_fields": [
    "name",
    "description",
    "campaign_identifier",
    "starts_at",
    "ends_at",
    "status"
  ],
  "effective_immediately": true,
  "timestamp": "2024-01-15T14:30:00Z"
}
Timing Considerations: Updates to active campaigns take effect immediately. For scheduled changes, consider creating new campaigns or using the scheduling features instead of updating active campaigns.
Version Control: The system maintains an audit trail of all campaign changes. You can track who made changes and when for compliance and analysis purposes.

Update Scenarios

Error Responses

Active Campaign Updates: Modifying active campaigns affects real-time promotions and customer experience. Consider the impact on current customers and orders in progress.

Field Validation