Campaign Recent Campaigns API
The Recent Campaigns API allows you to pull in recent Campaigns into different parts of the website.
Campaigns will be returned in chronological order with the most recent campaigns first.
Minimum Tag
{ap_api:campaign:recentCampaigns templateId="1"}
Example Tags
{ap_api:campaign:recentCampaigns templateId="1" limit="5"}
This will return 5 recent campaigns.
{ap_api:campaign:recentCampaigns templateId="1" categoryId="3" limit="10"}
This will return 10 recent campaigns for the category that has an ID of 3.
Tag Parameters
Parameter | Description |
---|---|
categoryId | Type: Integer Description: The ID of a single category to get campaigns for Example: categoryId="3" |
limit | Type: Integer Description: The number of results to return. Defaults to return all matching results (no limit). Example: limit="5" |
responseFormat | Type: String Description: Sets how the API response will be returned. Values: template - The default value. This tells the system to use a Content Template to build the API response. ui - This is used if the data from the API call will used in the administration as a UI form component. A Content Template will be used to structure the data correctly to build the form component HTML. Example: responseFormat="ui" |
startAt | Type: Integer Description: Where to start in the results. Defaults to 0. Example: startAt="2" |
templateId | Type: Integer Description: Required if responseFormat is not 'data'. The id of the content template to use. If this is not passed when it's required then nothing will be returned. Example: templateId="3" |
/layouts/branch-code