POST
{micro_service_base_url}
/
stores
/
company
/
{company_id}
/
campaigns
/
bulk
{
  "success": true,
  "message": "<string>",
  "campaignIds": [
    {}
  ],
  "updates": {},
  "updated_count": 123,
  "failed_updates": [
    {
      "campaign_id": "<string>",
      "error": "<string>",
      "error_code": "<string>"
    }
  ],
  "timestamp": "<string>"
}
This endpoint allows you to apply the same updates to multiple campaigns at once, streamlining campaign management for scenarios where you need to modify several campaigns with identical changes.
Bulk updates are processed as a single transaction. If any campaign update fails, the entire operation is rolled back to maintain data consistency.

Path Parameters

company_id
string
required
The unique identifier of the company that owns the campaigns

Request Body

campaignIds
array
required
Array of campaign IDs to update
updates
object
required
Object containing the updates to apply to all specified campaigns

Response

success
boolean
Indicates whether the bulk update was successful
message
string
Confirmation message or error details
campaignIds
array
Array of campaign IDs that were updated
updates
object
Echo of the updates that were applied
updated_count
integer
Number of campaigns successfully updated
failed_updates
array
Array of campaigns that failed to update with error details
timestamp
string
Timestamp when the bulk update was processed

Request Example

{
  "campaignIds": [
    1000013
  ],
  "updates": {
    "name": "Get the Turkey club combo $10.99",
    "description": "Hey! You can avail the opportunity this time and get benefits by choosing 'Get the Turkey club combo $10.99'",
    "end_date": "2025-03-25",
    "start_date": "2025-12-31",
    "status": "inactive"
  }
}

Response Example

{
  "success": true,
  "message": "Bulk update completed successfully",
  "campaignIds": [
    1000013
  ],
  "updates": {
    "name": "Get the Turkey club combo $10.99",
    "description": "Hey! You can avail the opportunity this time and get benefits by choosing 'Get the Turkey club combo $10.99'",
    "end_date": "2025-03-25",
    "start_date": "2025-12-31",
    "status": "inactive"
  },
  "updated_count": 1,
  "failed_updates": [],
  "timestamp": "2024-01-15T16:45:00Z"
}
Transaction Safety: Bulk updates use database transactions to ensure either all campaigns are updated successfully or none are modified, maintaining data consistency.
Performance Consideration: For large numbers of campaigns (>50), consider breaking the update into smaller batches to avoid timeout issues and improve processing speed.

Use Cases

Error Handling

Impact Assessment: Bulk updates affect multiple campaigns simultaneously. Ensure you understand the impact on active promotions, customer experience, and store operations before proceeding.

Best Practices

Limitations