# Campaigns
The /api/campaigns/ endpoint enables you to retrieve
information about active campaigns. A campaign in Iteras describes
what the customer should receive in a single period, how the period is
billed and if the subscription should be renewed.
# Parameters
The endpoint uses GET and currently supports the following parameters, all optional:
"campaign_id" - (optional) ID of a specific campaign, e.g.
?campaign_id=12MPRO. If left out, information for all campaigns is returned."include_archived" - (optional) include archived campaigns, e.g.
?include_archived=1."price_calculated_for_customer" - (optional) campaign prices are calculated with the provided customer ID which sometimes make a difference, for instance if there are conditional invoice lines, e.g.
?price_calculated_for_customer=9224437."price_calculated_for_date" - (optional) campaign prices are calculated for a specific date, e.g.
?price_calculated_for_date=2026-08-28."business_entity" (optional) - the external ID of the business entity to fetch campaigns for
# Return value
The data returned is an object with an array of campaign information (possibly empty array).
Note that the content depends on what fields have been set up inside Iteras and filled in on a given campaign. In general, only filled-in fields are returned, so for instance if a campaign doesn't have a particular field set, it won't show up in the data for the campaign.
Campaigns can refer to other campaigns. Such a reference is an object with the Iteras ID of the campaign in "id" and the campaign ID in "campaign_id", so it can be matched up with the corresponding entry in the returned array of campaigns.
A subscription on a campaign can control other subscriptions, either as a group or as add-ons to it. The campaigns that those controlled subscriptions can be created on are listed in "controlled_group_campaigns" and "controlled_addon_campaigns". Group structures can be nested, so a controlled campaign may itself control further campaigns.
The campaigns a subscription can be switched to are listed under "switching", divided into the situations where they are offered.
{
"campaigns": [
{
"id": "308",
"name": "3 issues",
"campaign_id": "3i",
"active": true,
"customer_facing_name": "Three beautiful issues",
"duration_based_on": "assignments",
"period_assignments": 3,
"price": 224.5,
"currency": "EUR",
"next_campaign_id": "3i",
"business_entity": "DKbranch", // if the business entity has an external ID
"lines": [
{
"text": "3 issues",
"amount": 24950,
"tax_rate": 0.25
},
{
"text": "Special discount",
"percentage": -0.10
}
],
"products": [
{
"name": "Test Magazine",
"external_id": "testexternal",
":Special": "Holiday edition" // Product custom field
}
],
"switching": { // campaigns this one can be switched to
"allowed_from_selfservice": [
{
"id": "309",
"campaign_id": "6m"
}
],
"offered_instead_of_cancel": [ // offered when cancelling in the selfservice
{
"id": "309",
"campaign_id": "6m"
}
],
"offered_from_invoice": [ // offered by a link in the invoice
{
"id": "309",
"campaign_id": "6m"
}
]
},
":Segment": "B2B",
},
{
"id": "309",
"name": "1/2 year",
"campaign_id": "6m",
"active": true,
"customer_facing_name": "Half a year",
"duration_based_on": "time",
"time": "6m",
"fixed_date": null,
"price": 500,
"currency": "EUR",
"next_campaign_id": "6m",
"lines": [
{
"text": "Subscription 6 months",
"amount": 50000,
"tax_rate": 0.0
}
],
"products": [
{
"name": "Test Magazine",
"external_id": "testexternal",
":Special": "Holiday edition" // Product custom field
}
],
":Segment": "B2C",
},
{
"id": "310",
"name": "Division",
"campaign_id": "division",
"active": true,
"customer_facing_name": "Division",
"duration_based_on": "time",
"time": "12m",
"price": 0,
"currency": "EUR",
"next_campaign_id": "division",
"products": [],
"controlled_group_campaigns": [ // campaigns the group can have subscriptions on
{
"id": "311",
"campaign_id": "employee"
}
],
"controlled_addon_campaigns": [ // campaigns that can be added on to a subscription
{
"id": "312",
"campaign_id": "digital-extra"
}
]
}
]
}