Skip to content

Campaigns

A campaign pairs an email template with a customer group (and an optional event) and sends that template to the group. It mirrors the admin Marketing → Communications → Campaigns screen.

How a campaign works

A campaign brings together four pieces and then sends them as one email blast.

  • Templatemarketing_template_id points at the email template whose HTML body is sent. The subject is the email subject line.
  • Audiencecustomer_group_id selects which customer group receives the email. Only subscribed members of that group are mailed. When the group is the guest group, the guest newsletter subscribers are mailed instead.
  • Channelchannel_id is the storefront channel the campaign sends from.
  • Eventmarketing_event_id is an optional event the campaign can be timed against; it may be null.

Status. status (0/1) toggles the campaign on. The send action refuses an inactive (status = 0) campaign.

Resolved objects. The detail endpoint resolves the channel, customerGroup, marketingTemplate, and marketingEvent objects (marketingEvent is an object or null when no event is linked). These objects are null on list rows.

Sending. Send queues the email to every subscribed member of the customer group right away, skipping any event-date gate. There is no mass-delete for campaigns — the admin UI exposes per-row delete only.

Relations. Campaigns draw their body from Email Templates, can be timed against Events, and reach the subscribed members tracked under Newsletter Subscribers.

Operations in this menu

ActionEndpoint
ListGET /api/admin/marketing/campaigns
DetailGET /api/admin/marketing/campaigns/{id}
CreatePOST /api/admin/marketing/campaigns
UpdatePUT /api/admin/marketing/campaigns/{id}
DeleteDELETE /api/admin/marketing/campaigns/{id}
SendPOST /api/admin/marketing/campaigns/{id}/send

All Campaigns endpoints require an admin Bearer token — see Authentication.

Released under the MIT License.