# 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
."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.
?customer=9224437
.
# 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": [
{
"name": "3 issues",
"campaign_id": "3i",
"active": true,
"customer_facing_name": "Three beautiful issues",
"duration_based_on": "assignments",
"period_assignments": 3,
"price": 199.95,
"currency": "EUR",
"next_campaign_id": "3i",
"products": [
{
"name": "Test Magazine",
"external_id": "testexternal"
}
],
":Segment": "B2B",
},
{
"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",
"products": [
{
"name": "Test Magazine",
"external_id": "testexternal"
}
],
":Segment": "B2C",
}
]
}