Skip to main content
Use the Developer Platform campaign endpoints to manage the same campaign plans as the workspace Campaigns area (/app/{organizationId}/campaigns). A campaign is a brief, one or more offer windows, and the offers inside those windows. Each offer carries central promotion terms. The window owns the live start and end.

Authentication

Send an OmniCommerce API key or OAuth client-credentials token:
Campaigns use the promotions scopes because the workspace Campaigns pages use the same promotions permissions. OAuth clients must include the scope on the client. API keys created from organization settings receive all developer scopes by default. Session-authenticated calls must include organizationId in the query (GET) or JSON body (writes). Like the workspace Campaigns pages, a session member needs organization-wide access. A member limited to some stores or markets gets 403.

Errors

OpenAPI reference: API reference · Spec: openapi.json

List campaigns

Query parameters

Response

summary.totalCount counts the working set (draft and running), including campaigns outside the current page. stageCounts counts every stage that matches q. The top-level nextOffset is the next repository offset. pagination.nextOffset is null when hasMore is false.

Members and stores

Returns the organization members (id, name, email), the connected stores for brief.stores, and the promotionStores for offer promotion.targetStores. Use a member id for ownerId and approverId.

Create a draft

ownerId and approverId are the user ids of organization members, from GET /api/v1/campaigns/options. Every store must already be connected. Stores use the marketplace, country, and store id together. Supported marketplaces are Shopee, Lazada, TikTok Shop, Shopify, WhatsApp, Zalora, Amazon, and eBay.
The response is 201 with the campaign detail. A new campaign is a draft at revision 1. Offer promotion terms follow the promotions mechanic, without status, startsAt, or endsAt. Those dates come from the offer window. preparesAt is optional and must be at or before startsAt. The end is exclusive.

Read and revise

expectedRevision is required: send the revision from the last read. A draft or approved plan is replaced and returns to draft at the next revision. A running plan keeps executing, and the save becomes one proposed change for the approver. Ending and completed plans are locked. A missing campaign returns 404.

Run a campaign

approve, run, approve_and_run, resume, and approve_change must be called by the named approver. A session acts as the signed-in user id. An API key acts as oauth:{clientId}, so those approver actions are made from a session signed in as the approver. Archive and restore use POST /api/v1/campaigns/archive and do not use this action list.

Archive, restore, and delete

Archive by id:
Restore every archived campaign matching a name search, except an explicit opt-out:
Delete forever applies only to archived campaigns.
Both responses include success, campaignIds, succeededCount, failedCount, and ordered results. success is true only when every requested campaign succeeds.