Ortto supports exporting campaign data via API. This can be useful for exporting campaigns and their statuses, allowing you to audit your Ortto campaigns externally.
You can use this endpoint to export the following campaign types:
Email
Playbook
SMS
Journey
Push notification
WhatsApp
HTTP method and request resource
Requests to export campaign data in Ortto via API are submitted as a single POST method to the following URL:
https://api.ap3api.com/v1/campaign/get-all
NOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:
Australia: https://api.au.ap3api.com/
Europe: https://api.eu.ap3api.com/
For example: https://api.eu.ap3api.com/v1/<entity/endpoint>
All other Ortto users will use the default service endpoint (https://api.ap3api.com/).
Headers
This endpoint requires a custom API key and content type (application/json for the request body) in the header of the request:
The limit value determines the number of activities to be returned by Ortto from the request.
This value also represents the "page" length of campaigns (for pagination purposes). This element can be used in conjunction with offset to retrieve subsequent pages of campaign records.
The default value is 50 but also accepts between 1 and 50.
offset
integer
The offset parameter specifies how far through the list of campaigns to get this batch from, enabling pagination through the results. For example, assuming the default limit of 50, get the first 50 matching campaigns by using an offset of 0, and then get the next 50 campaigns by using an offset of 50. Keep adding 50 to the offset each time to iterate through the list.
q
string
The search tem or query to run against the campaign names to be returned. Example: "q": "newsletter"
sort_order
string
Ascending or descending order. Examples:
"sort_order": "asc"
"sort_order": "desc"
sort
string
The element by which to sort the results. Supported options:
name
state
edited_at
edited_by_name
created_at
created_by_name
delivered
opens
open_rate
email_clicks
email_click_rate
sms_clicks
sms_click_rate
push_clicks
push_click_rate
widget_clicks
widget_click_rate
widget_engagement
widget_engagement_rate
conversions
conversion_rate
revenue
replied
reply_rate
entered
exited
Response payload
The following JSON object is an example of a campaigns call that Ortto retrieves from your Ortto account’s CDP after a request to this endpoint.
To find the campaign IDs to include in your payload, open the relevant campaigns in your Ortto account and copy the ID from the URL in your browser's address bar.
Alternatively, you can call this endpoint without specifying the campaign IDs (you can still include campaign-related details like the search term), and we'll return the campaign ID for any matching campaigns.
Example of where to find a journey’s Campaign ID in the URL.
Finding the folder ID
To find the folder ID to include in your payload, open the relevant folder in your Ortto account and copy the ID from the URL in your browser's address bar.