API Reference
Technical guide to the Campaign public REST API — create, update, search, and manage campaign lifecycles programmatically via the Omnium API.
Overview
The Campaign API lets external systems manage campaigns programmatically. Use it to integrate campaign management with your ERP, build custom campaign dashboards, or automate campaign workflows from external systems.
All endpoints are available at https://apitest.omnium.no/api/Campaigns (test) and your production API host under the same path.
What you can do
- Create and update campaigns with markets, stores, tags, and custom properties
- Search and filter campaigns by date range, status, market, and more
- Transition campaigns through their lifecycle (Planning → Active → Completed → Archived)
- Retrieve promotion IDs linked to a campaign
- Delete campaigns (with automatic promotion unlinking)
What the Campaign API does not do
Campaign API manages the campaign container itself. To manage the promotions within a campaign, use the Promotions API. To set SKU-level pricing, use the Price Lists API. The relationship looks like this:
Authentication and Authorization
All Campaign endpoints require a valid JWT Bearer token. Include it in the Authorization header:
Obtain a token via POST /api/Token. See Authentication for details.
Access Levels
| Operation | Required Role | Description |
|---|---|---|
| Read (GET, Search) | PromotionRead | View campaigns and linked promotions |
| Write (POST, PUT, PATCH, DELETE) | PromotionAdmin | Create, update, delete, and change status |
Campaign Model
The API returns campaigns using the OmniumCampaign model.
| Property | Type | Description |
|---|---|---|
Id | string | Unique campaign identifier (GUID). Auto-generated on create if not provided. |
Name | string | Campaign display name. Required. |
Description | string | Optional internal description. |
Tags | string[] | Labels for categorization and filtering (e.g., ["seasonal", "clearance"]). |
StartDate | datetime | When the campaign begins. Required. |
EndDate | datetime | When the campaign ends. Must be after StartDate. Required. |
Status | string | Lifecycle status: Planning, Active, Completed, or Archived. |
Markets | string[] | Market IDs where the campaign applies (e.g., ["NOR", "SWE"]). |
Stores | string[] | Store IDs where the campaign targets. Empty means all stores. |
PlanningNotes | string | Internal notes for the planning phase. |
CreatedDate | datetime? | When the campaign was created. Read-only (set by server). |
UpdatedDate | datetime? | When the campaign was last updated. Read-only (set by server). |
Properties | OmniumPropertyItem[] | Custom key-value pairs for extensibility. |
Errors | OmniumEntityError[] | Validation or processing errors. Read-only (set by server). |
OmniumPropertyItem
| Property | Type | Description |
|---|---|---|
Key | string | Property name |
Value | string | Property value |
KeyGroup | string | Optional grouping key |
ValueType | string | Optional type hint (e.g., "string", "number", "boolean") |
Endpoints
Get a Campaign
Returns a single campaign by ID.
Response: 200 OK with OmniumCampaign body, or 404 Not Found.
Example:
Search Campaigns
Search and filter campaigns with pagination. This is the primary way to list campaigns — there is no GET /api/Campaigns list endpoint.
Request body: OmniumCampaignSearchRequest
| Property | Type | Default | Description |
|---|---|---|---|
SearchText | string | — | Free-text search across name, description, tags, and ID. Supports fuzzy matching. |
StartFrom | datetime? | — | Campaigns that start on or after this date |
StartTo | datetime? | — | Campaigns that start on or before this date |
EndFrom | datetime? | — | Campaigns that end on or after this date |
EndTo | datetime? | — | Campaigns that end on or before this date |
Statuses | string[] | — | Filter by statuses. Empty means all. Values: Planning, Active, Completed, Archived |
MarketIds | string[] | — | Filter by market IDs |
StoreIds | string[] | — | Filter by store IDs |
Tags | string[] | — | Filter by tags |
CampaignIds | string[] | — | Filter by specific campaign IDs |
Page | int | 1 | Page number (1-based) |
Take | int | 20 | Results per page. Max 200. |
SortOrder | string | StartDateDesc | Sort order (see table below) |
ExcludeArchived | bool | true | Exclude archived campaigns from results |
Sort options:
| Value | Description |
|---|---|
StartDateDesc | Newest start date first (default) |
StartDateAsc | Oldest start date first |
EndDateDesc | Newest end date first |
EndDateAsc | Oldest end date first |
NameAsc | Alphabetical A-Z |
NameDesc | Alphabetical Z-A |
CreatedAsc | Oldest created first |
CreatedDesc | Newest created first |
Pagination limits: Take cannot exceed 200. Take × Page cannot exceed 10,000. For larger datasets, use narrower filters.
Response: 200 OK with OmniumSearchResult<OmniumCampaign>:
Example — Find all active campaigns in the Norwegian market:
Example — Find campaigns running during a specific week:
To find campaigns that overlap with a date range, combine StartTo and EndFrom. This returns campaigns where StartDate <= endOfRange AND EndDate >= startOfRange:
Example — Full-text search with tag filter:
Create a Campaign
Creates a new campaign. Returns the created campaign with server-set fields (Id, CreatedDate, Status).
Request body: OmniumCampaignRequest
| Property | Type | Required | Description |
|---|---|---|---|
Id | string | No | Custom ID. A GUID is generated if omitted. |
Name | string | Yes | Campaign display name |
Description | string | No | Internal description |
Tags | string[] | No | Categorization labels |
StartDate | datetime | Yes | Campaign start date |
EndDate | datetime | Yes | Campaign end date (must be after StartDate) |
Status | string | No | Initial status. Defaults to Planning if omitted. Must be a valid status. |
Markets | string[] | No | Market IDs |
Stores | string[] | No | Store IDs |
PlanningNotes | string | No | Internal planning notes |
Properties | OmniumPropertyItem[] | No | Custom key-value pairs |
Response: 201 Created with the full OmniumCampaign body.
Validation rules:
Namemust not be emptyEndDatemust be afterStartDateStatus(if provided) must be one of:Planning,Active,Completed,Archived
Example — Create a basic campaign:
Example — Create with custom properties:
Properties let you attach arbitrary metadata to campaigns. Use them for ERP references, budget tracking, or any custom data:
Update a Campaign
Replaces an existing campaign with the provided data. This is a full replacement — all fields in the request body overwrite the existing values. Fields you omit will be cleared (except server-managed fields like CreatedDate).
Request body: Same as Create (OmniumCampaignRequest).
Response: 200 OK with updated OmniumCampaign, or 404 Not Found.
Important behavior:
- The
Idin the URL takes precedence over anyIdin the request body CreatedDateis preserved from the original campaign- If
Statusis omitted or empty, the existing status is preserved - Server-managed fields (such as
CreatedDate,Errors) are preserved
Example — Update campaign dates and add a store filter:
Since PUT is a full replacement, include all fields you want to keep. For example, if the campaign had
Tagsand you omitTagsin the PUT request, the tags will be cleared.
Delete a Campaign
Permanently deletes a campaign. All promotions linked to the campaign are automatically unlinked (but not deleted).
Response: 204 No Content on success, or 404 Not Found.
Example:
Deletion is permanent. Campaign performance data is also removed. Linked promotions continue to function independently after being unlinked.
Update Campaign Status
Transitions a campaign to a new lifecycle status. This is the recommended way to change status — it triggers any configured workflow actions (such as notifications) and validates the transition.
Request body:
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Target status: Planning, Active, Completed, Archived |
Response: 200 OK with updated OmniumCampaign, 404 Not Found, or 400 Bad Request (invalid status value).
Status transition rules:
| From | Allowed Transitions |
|---|---|
Planning | → Active |
Active | → Completed, → Planning (rollback) |
Completed | → Archived |
Archived | (no transitions) |
Your Omnium environment may be configured with additional statuses and transitions. Use
Planning → Active → Completed → Archivedas the standard flow.
What happens on status change:
When you change a campaign's status, the system may execute configured workflow steps — for example, sending notification emails or SMS messages to relevant stakeholders. The workflow is configured per status in your environment settings.
Example — Activate a campaign:
Example — Complete a campaign after its end date:
Get Linked Promotions
Returns the IDs of all promotions linked to a campaign. Use these IDs with the Promotions API to retrieve full promotion details.
Response: 200 OK with string[], or 404 Not Found.
Example:
Promotion linking and unlinking is currently done through the Omnium UI. The public API provides read access to the linked promotion IDs.
Common Integration Patterns
ERP Campaign Sync
A typical ERP integration creates campaigns in Omnium to match campaign plans from the ERP, then tracks performance back:
Step 1: ERP creates the campaign via POST /api/Campaigns with an ERP reference in Properties:
Step 2: Merchandising team links promotions and sets targets in the Omnium UI.
Step 3: ERP activates the campaign via PATCH /api/Campaigns/{id}/status.
Step 4: ERP periodically searches for active campaigns to pull status updates:
Custom Dashboard
Build a campaign calendar or dashboard by searching for campaigns across a date range:
This returns all campaigns that overlap with the year 2026, sorted chronologically.
Automated Lifecycle Management
Use the status endpoint to automate campaign transitions based on business rules:
- Activate on start date: A scheduled job searches for
Planningcampaigns whereStartDatehas passed, then callsPATCH /statuswithActive - Complete on end date: Search for
Activecampaigns whereEndDatehas passed, then transition toCompleted - Archive after review period: Search for
Completedcampaigns older than 90 days, then archive
Error Handling
All endpoints follow a consistent error pattern:
| Status Code | Meaning | When |
|---|---|---|
200 OK | Success | GET, PUT, PATCH |
201 Created | Resource created | POST (create) |
204 No Content | Deleted successfully | DELETE |
400 Bad Request | Validation error | Missing Name, invalid Status, EndDate before StartDate, pagination limits exceeded |
404 Not Found | Campaign not found | GET, PUT, PATCH, DELETE with non-existent ID |
401 Unauthorized | Missing or invalid token | Any endpoint |
403 Forbidden | Insufficient permissions | Write operations without PromotionAdmin role |
500 Internal Server Error | Server error | Unexpected failures |
400 errors return a descriptive message in the response body:
Endpoint Summary
| Method | Endpoint | Auth | Description |
|---|---|---|---|
GET | /api/Campaigns/{id} | Read | Get a single campaign |
POST | /api/Campaigns/Search | Read | Search with filters and pagination |
POST | /api/Campaigns | Admin | Create a new campaign |
PUT | /api/Campaigns/{id} | Admin | Full update of an existing campaign |
DELETE | /api/Campaigns/{id} | Admin | Delete a campaign |
PATCH | /api/Campaigns/{id}/status | Admin | Change campaign status |
GET | /api/Campaigns/{id}/promotions | Read | Get linked promotion IDs |
