New campaigns are created in the specified status and can be immediately associated with stores and promotions for complete marketing campaign setup.
Path Parameters
The unique identifier of the company creating the campaign
Request Body
Campaign name for identification and management
Detailed description of the campaign objectives and content
Campaign start date (YYYY-MM-DD format)
Campaign end date (YYYY-MM-DD format)
Campaign status: “active”, “inactive”, “scheduled”, “expired”
Base64 encoded image data for campaign visual assets
Response
Unique campaign identifier
Company identifier this campaign belongs to
Campaign name
Campaign description
Campaign start date
Campaign end date
Current campaign status
URL to the uploaded campaign image
ID of the user who created the campaign
ID of the user who last updated the campaign
Campaign creation timestamp
Campaign last update timestamp
Deletion timestamp (null for active campaigns)
Request Example
Response Example
Campaign Creation Workflow
Campaign Creation Workflow
When a campaign is created, the following processes occur:
- Validation: Campaign data is validated for completeness and consistency
- Image Processing: Base64 image is processed and uploaded to cloud storage
- ID Generation: Unique campaign identifier is generated
- Database Storage: Campaign details are stored with audit information
- Status Initialization: Campaign is set to specified initial status
- Availability Setup: Campaign becomes available for store association and promotion creation
Image Processing: Campaign images are automatically processed, optimized, and stored in cloud storage. The response includes the final image URL for use in marketing materials.
Date Validation: Ensure end_date is after start_date and both dates are in the future for scheduled campaigns. Past dates are allowed for historical campaign tracking.
Campaign Status Guide
Campaign Status Meanings
Campaign Status Meanings
active
- Campaign is currently running and accepting customers
- Promotions are being applied to qualifying orders
- Campaign is visible in customer-facing applications
- Campaign is created but not currently running
- Promotions are not being applied
- Campaign can be activated when ready
- Campaign is set to start at a future date
- System will automatically activate when start_date arrives
- Useful for planned marketing initiatives
- Campaign has passed its end_date
- No longer accepting new customers
- Historical data remains available for analysis
Error Responses
Common Error Scenarios
Common Error Scenarios
Invalid Date RangeCompany Not FoundImage Processing ErrorValidation Error
Image Size: Campaign images should be optimized for web use. Large images may cause processing delays or failures. Recommended maximum size is 2MB.
Use Cases
Common Campaign Scenarios
Common Campaign Scenarios
Seasonal Campaigns
- Holiday promotions (Christmas, Halloween, Valentine’s Day)
- Seasonal product features (summer drinks, winter clothing)
- Weather-based campaigns (rainy day specials, heat wave promotions)
- New product introductions with special pricing
- Limited edition product features
- Brand partnership campaigns
- Welcome campaigns for new customers
- Referral program promotions
- Social media engagement campaigns
- Clearance campaigns for slow-moving inventory
- Upselling campaigns for high-margin products
- Bundle promotion campaigns