Introduction
Welcome to the new documentation for the ONTRAPORT API! If you are looking for the old documentation, you can find it here.
Our API offers a simple, RESTful interface with JSON-formatted responses. With it, you can manage contacts, process transactions, add and remove tags and sequences, and much more.
This documentation contains detailed information about our most widely used API endpoints and general information about best practices.
We currently offer an official PHP client library for our API to simplify building your integration. Code examples using this library and cURL are offered on the right side of the page. You can toggle between languages using the tabs at the top.
Getting Started
Obtain an API Key
In order to get started making requests on our API, you must obtain a unique API key and App ID. These credentials can be requested in your Administration settings. Your API key provides access to powerful functionality and should not be shared with anyone.
Once you have an API key, you can also try out some requests on your account using our live documentation. These requests will be performed on your actual data, so use caution in deciding which requests to make.
Obtain a sandbox
Any requests made using your API key will be performed using real data in your ONTRAPORT account. You can email support@ontraport.com to request a sandboxed account to test your integration.
Answering the following questions in your email will help us to consider your request more quickly:
- What does your product do?
- What will this integration do for ONTRAPORT clients?
- Is this integration for a particular client or will the integration be available to the public?
- Have you done integrations before?
- What support do you offer once your integration is complete? (channels –e.g. chat, phone, email– and hours)
- What is your…
- Company name
- Contact name(s) - marketing, support, product development
- Company address
- Email (to be used as username)
- Phone
- Website
- When do you anticipate the integration will be complete?
Base URL
The base URL for all of the requests detailed in this documentation is:
https://api.ontraport.com/1/
All requests must be made over HTTPS. Any insecure requests are redirected to the HTTPS equivalent URL.
The /1/
prefix in the URL is the version number. When substantial changes to the API are released, this number will change.
Authentication
# Using curl, you can just pass the correct header with each request
curl -X "API endpoint here" \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
// Authentication occurs when the API Key and App ID are sent as request headers
// These headers are set when you create a new instance of the Ontraport client
$client = new Ontraport("2_AppID_12345678","Key5678");
?>
Example values are used for API key and App ID, your unique credentials must be used in your request.
To interact with our API, authentication credentials must be sent with each HTTP request as headers. These credentials include a unique API key and App ID. Any requests sent without valid credentials in the headers will fail.
Header | Value |
---|---|
Api-key |
Set to your unique API key. This must be used in conjunction with your unique site ID or your request will not authenticate. Required. |
Api-Appid |
Set to your unique site ID. Required. |
Rate limiting
Each ONTRAPORT account is allowed up to 180 requests per minute. This is a rolling limit that resets each minute.
If you find that your application needs more than the allotted number of calls, you may wish to check that you are utilizing our pagination tools and/or consider implementing cache functionality.
Our support staff will consider reasonable requests to increase rate limits on a per-account basis.
You can track your rate limit status via response headers:
Header | Description |
---|---|
X-Rate-Limit-Limit |
The upper limit of API requests allowed per minute. |
X-Rate-Limit-Remaining |
The number of requests remaining in this one-minute period. |
X-Rate-Limit-Reset |
The number of seconds until the rolling limit resets. |
Object identifiers
Each ONTRAPORT object has both an object type ID and an object ID. In this documentation, object type ID refers to the identifier that differentiates one object type from another. All objects of the same type have the same object type ID.
ID refers to the identifier for that specific object. For example, a contact will always have an object type ID of 0, but each contact will also have a unique ID by which it can be accessed. All objects of the same type will have a different ID.
Plural and singular endpoints
Example retrieving a contact with the unique ID of 15:
curl -X GET 'https://api.ontraport.com/1/Contact?id=15' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$queryParams = array(
"id" => 15
);
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->contact()->retrieveSingle($queryParams);
?>
Example retrieving first name, last name and email for contacts with the last name “Smith”:
curl -X GET 'https://api.ontraport.com/1/Contacts?condition=%5B%7B%20%22field%22%3A%7B%22field%22%3A%22lastname%22%7D%2C%20%22op%22%3A%22%3D%22%2C%20%22value%22%3A%7B%22value%22%3A%22Smith%22%7D%20%7D%5D&listFields=firstname%2Clastname%2Cemail' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$queryParams = array(
"condition" => "[{
\"field\":{\"field\":\"lastname\"},
\"op\":\"=\",
\"value\":{\"value\":\"Smith\"}
}]",
"listFields" => "firstname,lastname,email"
);
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->contact()->retrieveMultiple($queryParams);
?>
Many of our objects have plural and singular endpoints. Through utilizing plural endpoints with pagination and criteria, you can minimize the number of API calls needed for your integration. Singular endpoints should be used only in the case that you want to retrieve or delete a specific object by its ID. If you wish to perform operations on a collection of objects, the plural endpoints should be used.
Retrieving an object using its singular endpoint will bring back all the data for that object, whereas using plural endpoints allows you to specify exactly which fields you would like to retrieve.
Pagination
Example retrieving the count for a contacts collection:
# The response data contains a "count" field which holds the object count
curl -X GET 'https://api.ontraport.com/1/Contacts/getInfo' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->contact()->retrieveCollectionInfo(array());
$response = json_decode($response, true);
$count = $response["data"]["count"];
?>
Example retrieving a collection of contacts:
curl -X GET 'https://api.ontraport.com/1/Contacts?start=0' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
curl -X GET 'https://api.ontraport.com/1/Contacts?start=50' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
curl -X GET 'https://api.ontraport.com/1/Contacts?start=100' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
curl -X GET 'https://api.ontraport.com/1/Contacts?start=150' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$start = 0;
$range = 50;
$requestParams = array(
"start" => $start,
"range" => $range
);
$contacts = $client->contact()->retrieveMultiplePaginated();
?>
When making requests on collections of objects, the number of results returned defaults to the maximum, which is 50.
This means that without using pagination to iterate through your collections, you will only ever access the first 50 objects.
The start
and range
parameters allow you to navigate through larger data sets.
To determine the count of objects in your collection, you can make a call to getInfo for your desired resource and retrieve the count.
Parameter | Type | Description |
---|---|---|
start |
integer | The offset from which your requested data should begin. |
range |
integer | The number of records returned per request. |
Criteria
Example: “email = test@test.com”
[{
"field":{"field":"email"},
"op":"=",
"value":{"value":"test@test.com"}
}]
Example: “id IN (1, 2)”
[{
"field":{"field":"id"},
"op":"IN",
"value":{"list":[{"value":1},{"value":2}]}
}]
Example: “email IS NULL OR email = ”“
[{
"field":{"field":"email"},
"op":"=",
"value":{"value":""}
},
"OR",
{
"field":{"field":"email"},
"op":"IS",
"value":"NULL"
}]
We offer additional parameters to ensure that you are retrieving only those objects you specifically want. For example, if you would like to perform an action on contacts with the last name "Smith”, it is better to target those records in your query as opposed to retrieving all your contacts and then filtering the results.
Parameter | Type | Description |
---|---|---|
search |
string | The string to search your object collection for. |
searchNotes |
boolean | Indicates whether or not notes should be searched for the search string. This parameter can’t be used independently of the search parameter. |
condition |
string | This JSON-encoded field allows you to very specifically evaluate objects for a condition. You can check whether or not fields in your object meet a particular condition. field is where you designate what field you want to check for a condition. op indicates the comparison operator you would like to use. value is where you can set a value or list of values to compare field to. Possible operators include:> : Greater than < : Less than >= : Greater than or equal to <= : Less than or equal to = : Equal to IN : Field is one of a list of values You can also string conditions together with AND , to check that both conditions are true, or OR , to check that at least one of the conditions is true. Examples can be seen to the right. |
Sometimes you may just be interested in a few object fields and not the entire object. If you have a relationship between two objects, you may wish to gather information from the related object as well. In these cases, you can describe a list of the fields you would like returned.
Parameter | Type | Description |
---|---|---|
listFields |
string | An array as a comma-delimited list of object fields to retrieve. |
externs |
string | An array as a comma-delimited list of related external fields to retrieve. |
Instead of retrieving objects by specific IDs, you can also perform actions on a collection of objects by group ID.
Group IDs should be accompanied by the performAll
parameter. However, if you set performAll = 1
, remember that a value of 0 for group_ids
effectively selects all objects in a collection.
Parameter | Type | Description |
---|---|---|
group_ids |
string | An integer array as a comma-delimited list of group IDs to be affected. If set to 0, all members of a collection will be selected. In most cases, if ids is a required parameter, group_ids can be substituted. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. |
Standard requests
Unique URLs
Each resource in our API is identified by a unique URL. For example, contacts can be created, retrieved, updated and deleted at:
https://api.ontraport.com/1/Contacts
HTTP Methods
When making an HTTP request, you must specify the method to be used. Our API accepts GET, PUT, POST and DELETE methods. Each of these methods corresponds to a persistent storage CRUD operation:
Method | Operation | Usage |
---|---|---|
POST |
Create | Adds new data to your database. |
GET |
Retrieve | Brings back data from your database. |
PUT |
Update | Replaces old data with new. |
DELETE |
Delete | Permanently removes data from your database. |
Request Headers
API requests must be accompanied by headers to specify what data formats will be sent and received. All responses will be JSON-encoded regardless of request method. The following is a list of all the headers you may be expected to send with your requests.
Header | Description |
---|---|
Api-key |
Set to your unique API key. This must be used in conjunction with your unique site ID or your request will not authenticate. Required. |
Api-Appid |
Set to your unique site ID. Required. |
Content-Type |
Specifies the format of data being sent with your request. Set to application/x-www-form-urlencoded or application/json . Required for POST and PUT requests. See the documentation for specific endpoints in these cases. |
Request Parameters
Parameters for GET and DELETE requests should be encoded to a query string and appended to the URL:
https://api.ontraport.com/1/Object?param1=value1¶m2=value2¶m3=value3
Parameters for PUT and POST requests are sent in the request body.
The data type expected in the request body is indicated in the Content-Type
header.
When JSON is expected, parameters should be JSON-encoded:
{"param1":"value1","param2":"value2","param3":"value3"}
When form data is expected, parameters should be URL-encoded:
param1=value1¶m2=value2¶m3=value3
Extended Functionality
Simple object endpoints typically handle basic CRUD functionality for that object. For many objects, we have extended endpoints to allow for additional functionality. For example, you can obtain detailed information about the contact object by appending “getMeta” to the URL:
https://api.ontraport.com/1/Contacts/getMeta
Requests must be made over HTTPS. Any insecure requests are redirected to the HTTPS equivalent URL.
Standard responses
Example response:
{
"code": 0,
"data": {
"id": "1",
"owner": "1",
"firstname": "Frodo",
"lastname": "Baggins",
"email": "fb@gmail.com",
"address": null,
"city": null,
"state": null,
"zip": null,
"birthday": null,
"date": "1487705750",
"notes": null,
"status": null,
"category": null,
"lead_source": null,
"cell_phone": null,
"home_phone": null,
"sms_number": null,
"dla": "1487705750",
"contact_cat": "",
"bulk_mail": "1",
"bulk_sms": "0",
"lastvisit": null,
"referer": "0",
"lastaction": null,
"office_phone": null,
"fax": null,
"dlm": "1487705765",
"company": null,
"address2": null,
"title": null,
"website": null,
"country": null,
"system_source": "0",
"source_location": null,
"import_id": "0",
"ip_addy": null,
"visits": "0",
"freferrer": "0",
"lreferrer": "0",
"n_lead_source": "0",
"n_content": "0",
"n_term": "0",
"n_media": "0",
"n_medium": "0",
"n_campaign": "0",
"referral_page": null,
"aff_sales": "0",
"aff_amount": "0",
"program_id": "0",
"aff_paypal": null,
"fb_birthday": "0",
"fb_gender": null,
"fb_likes": null,
"fb_groups": null,
"fb_website": null,
"fb_hometown": null,
"fb_location": null,
"mrcAmount": "0",
"mrcUnpaid": "0.00",
"mriInvoiceNum": "0",
"mriInvoiceTotal": "0",
"ccType": "0",
"ccExpirationMonth": "0",
"ccExpirationYear": "0",
"ccExpirationDate": "0",
"ccNumber": null,
"mrcResult": "0",
"bindex": "0",
"last_inbound_sms": null,
"spent": null,
"num_purchased": null,
"updateSequence": "",
"grade": "0.00"
},
"account_id": "12345"
}
Every successful API call returns a JSON-formatted response containing:
Element | Type | Description |
---|---|---|
code |
integer | Indicates the success or failure of the call. If code is 0 , this indicates an HTTP 200 successful call. |
data |
object | Contains object-specific attributes and data |
account_id |
integer | ID of the account making the API call |
Error and response codes
Both successful and unsuccessful calls will return HTTP response codes. The most common codes you will encounter using our API are as follows:
Code | Description |
---|---|
200 |
OK - Your request was completed successfully. |
400 |
Bad Request - Your request data is not properly formed. |
401 |
Unauthorized - You are not authenticated. |
403 |
Forbidden - You do not have permissions to access this resource. |
404 |
Not Found - You are requesting a resource that does not exist. |
429 |
Too Many Requests - You have exceeded your maximum rate limit of 180 requests per minute. |
500 |
Internal Server Error - Something has gone wrong on the website’s server. |
Click here to see a full listing of possible codes.
Objects
The objects API provides powerful and versatile functionality for a wide variety of our objects. Although we provide many endpoints for specific object types, using generic object endpoints with an object type ID provides an interface for most objects.
You can create new objects, get or delete single objects or collections of objects, and update object data. You can also retrieve meta for all objects or a single object to obtain more detailed information about object attributes, and retrieve information about a collection of objects.
This API also contains functionality allowing you to tag and untag, add and remove objects from sequences, and pause and unpause rules and sequences.
To perform a request on any object endpoint, you must provide a valid object type ID. All other parameters are specific to the object you are accessing.
The generic object
Attributes
Generic object endpoints are unique because of their flexibility. Functions can be performed on any object using these endpoints given that a valid object type ID and correctly structured data is provided. However, if the data for your API request is not supplied as expected for that object type, your request will fail.
If you are not sure what the correct parameters are to send with your request, you can use the objects/meta endpoint to retrieve information about object fields before proceeding.
Create an object
curl -X POST -d '{
"objectID": 0,
"firstname": "Mary",
"lastname": "Smith",
"email": "msmith@ontraport.com"
}' 'https://api.ontraport.com/1/objects' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678' \
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"firstname" => "Mary",
"lastname" => "Smith",
"email" => "msmith@ontraport.com"
);
$response = $client->object()->create($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"firstname": "Mary",
"lastname": "Smith",
"email": "msmith@ontraport.com",
"id": "7",
"owner": "1",
"address": null,
"city": null,
"state": null,
"zip": null,
"birthday": null,
"date": "1492557339",
"cell_phone": null,
"home_phone": null,
"sms_number": null,
"dla": "1492557339",
"contact_cat": "",
"bulk_mail": "1",
"bulk_sms": "0",
"office_phone": null,
"fax": null,
"dlm": "1492557339",
"company": null,
"address2": null,
"title": null,
"website": null,
"country": null,
"system_source": "3",
"source_location": null,
"import_id": "0",
"ip_addy": null,
"visits": "0",
"freferrer": "0",
"lreferrer": "0",
"n_lead_source": "0",
"n_content": "0",
"n_term": "0",
"n_media": "0",
"n_medium": "0",
"n_campaign": "0",
"referral_page": null,
"aff_sales": "0",
"aff_amount": "0",
"program_id": "0",
"aff_paypal": null,
"fb_birthday": "0",
"fb_gender": null,
"fb_likes": null,
"fb_groups": null,
"fb_website": null,
"fb_hometown": null,
"fb_location": null,
"mrcAmount": "0",
"mrcUnpaid": "0.00",
"mriInvoiceNum": "0",
"mriInvoiceTotal": "0",
"ccType": "0",
"ccExpirationMonth": "0",
"ccExpirationYear": "0",
"ccExpirationDate": "0",
"ccNumber": null,
"mrcResult": "0",
"last_inbound_sms": null,
"spent": null,
"num_purchased": null,
"updateSequence": "",
"grade": "0.00"
},
"account_id": "12345"
}
This endpoint will add a new object to your database. It can be used for any object type as long as the correct parameters are supplied. This endpoint allows duplication; if you want to avoid duplicates you should merge instead.
Request Endpoint
POST https://api.ontraport.com/1/object
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
*All other parameters depend upon the object.
Create or merge an object
curl -X POST -d 'objectID=0&firstname=Marie&email=msmith@ontraport.com' 'https://api.ontraport.com/1/objects/saveorupdate' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"firstname" => "Marie",
"email" => "msmith@ontraport.com" // The unique field for the contact object
);
$response = $client->object()->saveOrUpdate($requestParams);
Example Response:
{
"code": 0,
"data": {
"attrs": {
"firstname": "Marie",
"dlm": "1500506335",
"id": "7"
}
},
"account_id": "12345"
}
Looks for an existing object with a matching unique field and merges supplied data with existing data. If no unique field is supplied or if no existing object has a matching unique field, a new object will be created.
Request Endpoint
POST https://api.ontraport.com/1/objects/saveorupdate
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
*All other parameters depend upon the object.
Retrieve a single object
curl -X GET 'https://api.ontraport.com/1/object?objectID=14&id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::TAG, // Object type ID: 14
"id" => 1
);
$response = $client->object()->retrieveSingle($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"tag_id": "1",
"tag_name": "Contact Tags",
"group_id": "0",
"object_type_id": "0"
},
"account_id": "12345"
}
Retrieves all the information for an existing object of the specified object type.
Request Endpoint
GET https://api.ontraport.com/1/object
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
id |
integer | The ID of the specific object. Required. |
Retrieve multiple objects
curl -X GET 'https://api.ontraport.com/1/objects?objectID=0&sort=lastname&sortDir=desc' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"sort" => "lastname",
"sortDir" => "desc",
"listFields" => "id,firstname,lastname,email"
);
$response = $client->object()->retrieveMultiple($requestParams);
?>
Example Response:
{
"code": 0,
"data": [
{
"id": "1",
"firstname": "Mary",
"lastname": "Smith",
"email": "msmith@ontraport.com",
"owner": "1"
},
{
"id": "2",
"firstname": "Fred",
"lastname": "Brown",
"email": "fbrown@ontraport.com",
"owner": "1"
}
],
"account_id": "12345",
"misc": []
}
Retrieves a collection of objects based on a set of parameters. You can limit unnecessary API requests by utilizing criteria and our pagination tools to select only the data set you require.
Request Endpoint
GET https://api.ontraport.com/1/objects
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
ids |
string | An integer array as a comma-delimited list of the IDs of the objects to retrieve. Entering a value of 0 will result in all objects of specified type being selected. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects you want to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not object notes should be searched for the specified string in addition to other object fields. |
group_ids |
string | An integer array as comma-delimited list of the group ids of objects to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | A string array as a comma-delimited list of the fields which should be returned in your results. |
Retrieve objects having a tag
curl -X GET 'https://api.ontraport.com/1/objects/tag?objectID=0&tag_id=1&listFields=id%2Cowner%2Cfirstname%2Clastname%2Cemail' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$queryParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"tag_id" => 2,
"listFields" => "id,firstname,lastname,email"
);
$response = $client->object()->retrieveAllWithTag($queryParams);
Example Response:
{
"code": 0,
"data": [
{
"id": "3",
"owner": "1",
"firstname": "John",
"lastname": "Doe",
"email": "john@ontraport.com"
},
{
"id": "4",
"owner": "1",
"firstname": "Jane",
"lastname": "Doe",
"email": "jane@ontraport.com"
}
],
"account_id": "12345",
"misc": []
}
Retrieves a collection of objects having a specified tag.
Request Endpoint
GET https://api.ontraport.com/1/objects/tag
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
tag_id |
integer | The ID of the tag you would like to filter your objects by. Either tag_id or tag_name is required. If both are provided, tag_id will be prioritized. |
tag_name |
string | The name of the tag you would like to filter your objects by. Either tag_id or tag_name is required. If both are provided, tag_name will be ignored. |
count |
boolean | Indicates whether to retrieve a count of the collection instead of the collection itself. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects you want to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not object notes should be searched for the specified string in addition to other object fields. |
group_ids |
string | An integer array as comma-delimited list of the group ids of objects to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | A string array as a comma-delimited list of the fields which should be returned in your results. |
Retrieve an object ID by email
curl -X GET 'https://api.ontraport.com/1/object/getByEmail?objectID=0&email=tester%40ontraport.com&all=0' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"email" => "tester@ontraport.com",
"all" => 0
);
$response = $client->object()->retrieveIdByEmail($requestParams);
?>
Example Response: (retrieving single ID)
{
"code": 0,
"data": {
"id": "6"
},
"account_id": "12345"
}
Example Response: (retrieving array of IDs)
{
"code": 0,
"data": {
"ids": [
"6",
"12"
]
},
"account_id": "12345"
}
Retrieves the IDs of contact objects or custom objects by their email fields. You can retrieve an array of all the IDs of objects with matching emails, or you can retrieve the first matching ID.
Request Endpoint
GET https://api.ontraport.com/1/object/getByEmail
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
email |
integer | The email of the object you would like to retrieve. Required. |
all |
integer | A binary integer flag indicating whether you would like to retrieve an array of all IDs for objects with a matching email. The default value of 0 indicates that you just want the first matching ID. A value of 1 indicates that you would like an array of all matching IDs. |
Retrieve object meta
curl -X GET 'https://api.ontraport.com/1/objects/meta?format=byId&objectID=7' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::MESSAGE, // Object type ID: 7
"format" => "byId"
);
$response = $client->object()->retrieveMeta($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"7": {
"name": "Message",
"fields": {
"owner": {
"alias": "Owner",
"type": "parent",
"parent_object": 2
},
"alias": {
"alias": "Name",
"type": "text"
},
"name": {
"alias": "Name",
"type": "mergefield"
},
"subject": {
"alias": "Subject",
"type": "text"
},
"spam_score": {
"alias": "Spam Score",
"type": ""
},
"type": {
"alias": "Type",
"type": "drop",
"options": {
"e-mail": "Email",
"Task": "Task",
"sms": "SMS",
"Postcard": "Postcard",
"[\"e-mail\",\"Template\"]": "Email/Template",
"Template": "Template"
}
},
"mcsent": {
"alias": "Sent",
"type": "numeric"
},
"mcopened": {
"alias": "Opened",
"type": "percentage"
},
"mcclicked": {
"alias": "Clicked",
"type": "percentage"
},
"mcabuse": {
"alias": "Complaints",
"type": "percentage"
},
"mcunsub": {
"alias": "Opt Outs",
"type": "percentage"
},
"date": {
"alias": "Date Added",
"type": "timestamp"
},
"mcnotopened": {
"alias": "Not Opened",
"type": "percentage"
},
"mcnotclicked": {
"alias": "Not Clicked",
"type": "percentage"
}
}
}
},
"account_id": "12345"
}
Retrieves the field meta data for the specified object.
Request Endpoint
GET https://api.ontraport.com/1/objects/meta
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. If none is supplied, meta for all objects will be retrieved. |
format |
string | Indicates whether the list should be indexed by object name or object type ID. Possible values are byId and byName (default). |
Retrieve object collection info
curl -X GET 'https://api.ontraport.com/1/objects/getInfo?objectID=0&search=Mary' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"search" => "Mary"
);
$response = $client->object()->retrieveCollectionInfo($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"listFields": [
"fn",
"email",
"office_phone",
"date",
"grade",
"dla",
"contact_id"
],
"listFieldSettings": [],
"count": "2"
},
"account_id": "12345"
}
Retrieves information about a collection of objects, such as the number of objects that match the given criteria.
Request Endpoint
GET https://api.ontraport.com/1/objects/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects you wish to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other object fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of objects to retrieve information about. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Update an object’s data
curl -X PUT -d '{
"objectID": 0,
"id": 7,
"lastname": "Smyth"
}' 'https://api.ontraport.com/1/objects' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"id" => 7,
"lastname" => "Smyth",
);
$response = $client->object()->update($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"attrs": {
"lastname": "Smyth",
"dlm": "1500506494",
"id": "7"
}
},
"account_id": "12345"
}
Updates an existing object with given data. The object type ID and ID of the object to update are required. The other fields should only be used if you want to change the existing value.
Request Endpoint
GET https://api.ontraport.com/1/objects
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
id |
integer | The ID of the object. Required. |
*All other parameters depend upon the object.
Delete a single object
curl -X DELETE 'https://api.ontraport.com/1/object?objectID=0&id=4' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"id" => 4
);
$response = $client->object()->deleteSingle($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
Deletes an existing object of the specified object type.
Request Endpoint
DELETE https://api.ontraport.com/1/object
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID to delete. Required. |
id |
integer | The ID of the specific object to delete. Required. |
Delete multiple objects
curl -X DELETE 'https://api.ontraport.com/1/objects?objectID=14&ids=1%2C2' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::TAG, // Object type ID: 14
"ids" => "1,2"
);
$response = $client->object()->deleteMultiple($requestParams);
?>
Example Response:
{
"code": 0,
"data": "Deleted",
"account_id": "12345"
}
This endpoint deletes a collection of objects. Use caution with this endpoint.
Request Endpoint
DELETE https://api.ontraport.com/1/objects
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
ids |
string | An integer array as a comma-delimited list of the IDs of objects to delete. Entering a value of 0 will result in all objects of specified type being selected. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects you want to delete. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not object notes should be searched for the specified string in addition to other object fields. |
group_ids |
string | An integer array as comma-delimited list of the group ids of objects to delete. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Add an object to a sequence
curl -X PUT -d 'objectID=0&add_list=1&ids=6' 'https://api.ontraport.com/1/objects/sequence' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"ids" => 6,
"add_list" => 1
);
$response = $client->object()->addToSequence($requestParams);
?>
Example Response:
{
"code": 0,
"data": "The subscription is now being processed.",
"account_id": "12345"
}
Adds one or more objects to one or more sequences.
Request Endpoint
PUT https://api.ontraport.com/1/objects/sequence
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
add_list |
string | An array as a comma-delimited list of the IDs of the sequence(s) to which objects should be added. Required. |
ids |
string | An array as a comma-delimited list of the IDs of the objects to be added to sequences. Required. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects to include in your query. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects should be affected. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
group_ids |
string | An array as a comma-delimited list of the group IDs of objects to add to sequences. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Tag an object
curl -X PUT -d 'objectID=0&add_list=2&ids=6' 'https://api.ontraport.com/1/objects/tag' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"ids" => 6,
"add_list" => 2
);
$response = $client->object()->addTag($requestParams);
?>
Example Response:
{
"code": 0,
"data": "The tag is now being processed.",
"account_id": "12345"
}
Adds one or more tags to one or more objects.
Request Endpoint
PUT https://api.ontraport.com/1/objects/tag
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
add_list |
string | An array as a comma-delimited list of the IDs of the tag(s) which should be added to objects. Required. |
ids |
string | An array as a comma-delimited list of the IDs of the objects to be tagged. Required. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects to include in your query. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects should be affected. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
group_ids |
string | An array as a comma-delimited list of the group IDs of objects to be tagged. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Tag an object by name
curl -X PUT -d '{
"objectID": 0,
"ids": [
2
],
"add_names": [
"Blue","Yellow"
]
}' 'https://api.ontraport.com/1/objects/tagByName' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"ids" => array(7),
"add_names" => array(
"Blue",
"Yellow",
)
);
$response = $client->object()->addTagByName($requestParams);
?>
Example Response:
{
"code": 0,
"data": "The tag is now being processed.",
"account_id": "12345"
}
Adds one or more tags to one or more objects by the tag name. This endpoint will create the tag if it doesn’t exist.
Request Endpoint
PUT https://api.ontraport.com/1/objects/tagByName
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
add_names |
string | An array of the names of the tag(s) which should be added to objects. Required. |
ids |
string | An array of the IDs of the objects to be tagged. Required. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects to include in your query. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects should be affected. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
group_ids |
string | An array of the group IDs of objects to be tagged. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Subscribe an object to a campaign or sequence
curl -X PUT -d 'objectID=0&add_list=3&ids=2&sub_type=Campaign' 'https://api.ontraport.com/1/objects/subscribe' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"ids" => 2,
"add_list" => 3,
"sub_type" => "Campaign"
);
$response = $client->object()->subscribe($requestParams);
?>
Example Response:
{
"code": 0,
"data": "The subscription is now being processed.",
"account_id": "12345"
}
Subscribes one or more objects to one or more campaigns or sequences.
Request Endpoint
PUT https://api.ontraport.com/1/objects/subscribe
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
add_list |
string | An array as a comma-delimited list of the IDs of the campaign(s) or sequence(s) the objects should be subscribed to. Required. |
ids |
string | An array as a comma-delimited list of the IDs of the objects to be subscribed. Required. |
sub_type |
string | Either Campaign or Sequence . If no value is supplied, Campaign will be used. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects should be affected. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
group_ids |
string | An array as a comma-delimited list of the group IDs of objects to be subscribed. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Remove an object from a sequence
curl -X DELETE -d 'objectID=0&remove_list=1&ids=6' 'https://api.ontraport.com/1/objects/sequence' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"ids" => 6,
"remove_list" => 1
);
$response = $client->object()->removeFromSequence($requestParams);
?>
Example Response:
{
"code": 0,
"data": "The subscription is now being processed.",
"account_id": "12345"
}
This endpoint removes one or more objects from one or more sequences.
Request Endpoint
DELETE https://api.ontraport.com/1/objects/sequence
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
remove_list |
string | An array as a comma-delimited list of the IDs of the sequences(s) from which to remove objects. Required. |
ids |
string | An array as a comma-delimited list of the IDs of the objects to be removed from sequence(s). Required. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects to include in your query. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects should be affected. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
group_ids |
string | An array as a comma-delimited list of the group IDs of objects to be removed from sequence(s). If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Remove a tag from an object
curl -X DELETE -d 'objectID=0&remove_list=2&ids=6' 'https://api.ontraport.com/1/objects/tag' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"ids" => 6,
"remove_list" => 2
);
$response = $client->object()->removeTag($requestParams);
?>
Example Response:
{
"code": 0,
"data": "The tag is now being processed.",
"account_id": "12345"
}
This endpoint removes one or more tags from one or more objects.
Request Endpoint
DELETE https://api.ontraport.com/1/objects/tag
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
remove_list |
string | An array as a comma-delimited list of the IDs of the tag(s) to be removed from objects. Required. |
ids |
string | An array as a comma-delimited list of the IDs of the objects to remove from tag(s). Required. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects to include in your query. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects should be affected. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
group_ids |
string | An array as a comma-delimited list of the group IDs of objects to remove from tag(s). If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Remove a tag from an object by name
curl -X DELETE -d '{
"objectID": 0,
"ids": [
2
],
"remove_names": [
"Blue","Yellow"
]
}' 'https://api.ontraport.com/1/objects/tagByName' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"ids" => array(7),
"remove_names" => array(
"Blue",
"Yellow",
)
);
$response = $client->object()->removeTagByName($requestParams);
?>
Example Response:
{
"data": "The tag is now being processed.",
"account_id": "12345"
}
This endpoint removes one or more tags from one or more objects by the tag name.
Request Endpoint
DELETE https://api.ontraport.com/1/objects/tagByName
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
remove_names |
string | An array of the names of the tag(s) to be removed from objects. Nonexistent tag names will be ignored and will not cause a failure. Required. |
ids |
string | An array of the IDs of the objects to remove from tag(s). Required. |
group_ids |
string | An array as a comma-delimited list of the group IDs of objects to remove from tag(s). If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Unsubscribe an object from a campaign or sequence
curl -X DELETE -d 'objectID=0&remove_list=3&ids=2&sub_type=Campaign' 'https://api.ontraport.com/1/objects/subscribe' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"ids" => 2,
"remove_list" => 3,
"sub_type" => "Campaign"
);
$response = $client->object()->unsubscribe($requestParams);
?>
Example Response:
{
"code": 0,
"data": "The subscription is now being processed.",
"account_id": "12345"
}
This endpoint unsubscribes one or more objects from one or more campaigns or sequences.
Request Endpoint
DELETE https://api.ontraport.com/1/objects/subscribe
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
remove_list |
string | An array as a comma-delimited list of the IDs of the campaign(s) or sequence(s) to unsubscribe objects from. Required. |
ids |
string | An array as a comma-delimited list of the IDs of the objects to unsubscribe. Required. |
sub_type |
string | Either Campaign or Sequence . If no value is provided, Campaign will be used. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects should be affected. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
group_ids |
string | An array as a comma-delimited list of the group IDs of objects to unsubscribe. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Remove a tag from an object by name
curl -X DELETE -d '{
"objectID": 0,
"ids": [
2
],
"remove_names": [
"Blue","Yellow"
]
}' 'https://api.ontraport.com/1/objects/tagByName' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"ids" => array(7),
"remove_names" => array(
"Blue",
"Yellow",
)
);
$response = $client->object()->removeTagByName($requestParams);
?>
{
"code": 0,
"data": "The tag is now being processed.",
"account_id": "12345"
}
This endpoint removes one or more tags from one or more objects by the tag name.
Request Endpoint
DELETE https://api.ontraport.com/1/objects/tagByName
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
remove_names |
string | An array of the names of the tag(s) to be removed from objects. Required. |
ids |
string | An array of the IDs of the objects to remove from tag(s). Required. |
group_ids |
string | An array of the group IDs of objects to remove from tag(s). If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Pause rules and sequences for an object
curl -X POST -d 'objectID=5&ids=1' 'https://api.ontraport.com/1/objects/pause' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::SEQUENCE, // Object type ID: 5
"ids" => 1,
);
$response = $client->object()->pause($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
This endpoint pauses rules, sequences, and sequence subscribers.
Request Endpoint
POST https://api.ontraport.com/1/objects/pause
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Possible object types are rules, sequences, and sequence subscribers. Required. |
ids |
string | An array as a comma-delimited list of the IDs of the objects to be paused. Required. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects to include in your query. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects should be affected. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
group_ids |
string | An array as a comma-delimited list of the group ids of objects to be paused. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Unpause rule and sequences for an object
curl -X POST -d 'objectID=5&ids=1' 'https://api.ontraport.com/1/objects/unpause' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
use OntraportAPI\ObjectType;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => ObjectType::SEQUENCE, // Object type ID: 5
"ids" => 1,
);
$response = $client->object()->unpause($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
Unpauses rules, sequences, and sequence subscribers.
Request Endpoint
POST https://api.ontraport.com/1/objects/unpause
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID to be unpaused. Possible object types are rules, sequences, and sequence subscribers. Required. |
ids |
string | An array as a comma-delimited list of the IDs of the objects to unpause. Required. |
start |
integer | The offset to start your search from. |
range |
integer | The number of objects to include in your query. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects should be affected. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
group_ids |
string | An array as a comma-delimited list of the group ids of objects to unpause. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Custom objects
# Retrieving a custom object using the generic objects endpoints
curl -X GET 'https://api.ontraport.com/1/object?objectID=10003&id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
# Retrieving a custom object using the specific endpoint for an example object
curl -X GET 'https://api.ontraport.com/1/Company?&id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
// Retrieving a sample custom object with object type ID 10003
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1
);
$response = $client->custom(10003)->retrieveSingle($requestParams);
?>
If you have custom objects you have created in the app, these can also be accessed through the API. All custom object attributes depend upon the object you have created.
Like other object types, you can use the objects API with the object type ID to access CRUD functionality for custom objects. You also can use the plural and singular endpoints which are dynamically created for your account for each custom object type in your database. For example, if you created a “Company” object you would have the following two endpoints:
https://api.ontraport.com/1/Company
and
https://api.ontraport.com/1/Companies
A listing of the endpoints available to you can be viewed in our live documentation.
Object type IDs for custom objects are always greater than 10000. You can spot these objects if you make a call to retrieve meta for all objects and look for IDs meeting that criteria.
Responses for these calls will follow the same model as responses for other resources, but the content of the data
array will vary.
Campaign Builder Items
Object Type ID: 140
These objects contain data on your CampaignBuilder campaigns, such as names, IDs, and current status. In this section, “campaign” refers to automated marketing campaigns. You can retrieve a single campaign or a list of campaigns. If you want to add a contact or custom object to a campaign, see this endpoint.
The Campaign Builder object
{
"id": "1",
"name": "Test Campaign",
"date": "1503016553",
"dlm": "1503016553",
"object_type_id": "0",
"pause": "0",
"deleted": "false"
}
Campaign attributes
Attribute | Type | Description |
---|---|---|
id |
integer | The campaign ID. |
name |
string | The campaign name. |
date |
timestamp | The date the campaign was created, measured in seconds from the Unix Epoch. |
dlm |
timestamp | The date the campaign was last modified, measured in seconds from the Unix Epoch. |
object_type_id |
integer | The ID of the object type the campaign relates to. |
pause |
integer | A binary integer flag indicating whether or not the campaign is paused. |
deleted |
boolean | Whether or not the campaign has been deleted. |
Retrieve a specific campaign
curl -X GET 'https://api.ontraport.com/1/CampaignBuilderItem?id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1
);
$response = $client->campaignbuilder()->retrieveSingle($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "1",
"name": "Test Campaign",
"date": "1503016553",
"dlm": "1503016553",
"object_type_id": "0",
"pause": "0",
"deleted": "false"
},
"account_id": "12345"
}
Retrieves data on an existing campaign.
Request URL
GET https://api.ontraport.com/1/CampaignBuilderItem
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The campaign ID. Required. |
Retrieve multiple campaigns
curl -X GET 'https://api.ontraport.com/1/CampaignBuilderItems?listFields=ids%2Cname' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"listFields" => "id,name"
);
$response = $client->campaignbuilder()->retrieveMultiple($requestParams);
?>
Example response:
{
"code": 0,
"data": [
{
"id": "1",
"name": "Test Campaign"
},
{
"id": "2",
"name": "Test Campaign 2"
}
],
"account_id": "12345",
"misc": []
}
Retrieves a list of Campaigns. You can limit unnecessary API requests by utilizing criteria and our pagination tools to select only the data set you require.
Request URL
GET https://api.ontraport.com/1/CampaignBuilderItems
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
ids |
string | An integer array as a comma-delimited list of the IDs of the campaigns to retrieve. Entering a value of 0 will result in all campaigns being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of campaigns you want to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which campaigns to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your campaign objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other task fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of tasks to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your campaign object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | A string array as a comma-delimited list of the fields which should be returned in your results. |
Retrieve campaign meta
curl -X GET 'https://api.ontraport.com/1/Tasks/meta' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->task()->retrieveMeta();
?>
Example Response:
{
"code": 0,
"data": {
"140": {
"name": "CampaignBuilder",
"fields": {
"name": {
"alias": "Name",
"type": "text"
},
"date": {
"alias": "Date Created",
"type": "fulldate"
},
"state": {
"alias": "State",
"type": "drop",
"options": {
"0": "Live",
"1": "Paused",
"2": "Unpublished"
}
},
"element_num": {
"alias": "# Elements",
"type": "numeric"
},
"todos": {
"alias": "# ToDos",
"type": "numeric"
},
"subs_ever": {
"alias": "# On Campaign Ever",
"type": "numeric"
},
"subs": {
"alias": "# On Campaign Now",
"type": "numeric"
},
"dlm": {
"alias": "Date Modified",
"type": "fulldate"
}
}
}
},
"account_id": "12345"
}
Retrieves the field meta data for the campaign object.
Request URL
GET https://api.ontraport.com/1/CampaignBuilderItems/meta
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
None
Retrieve campaign collection info
curl -X GET 'https://api.ontraport.com/1/CampaignBuilderItems/getInfo?search=Test' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"search" => "Test",
);
$response = $client->campaignbuilder()->retrieveCollectionInfo($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"listFields": [
"name",
"state",
"date",
"dlm",
"subs",
"subs_ever",
"element_num",
"todos"
],
"listFieldSettings": [],
"count": "2"
},
"account_id": "12345"
}
Retrieves information about a collection of campaigns, such as the number of campaigns that match the given criteria.
Request URL
GET https://api.ontraport.com/1/CampaignBuilderItems/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
condition |
string | A JSON encoded string to more specifically set criteria for which campaigns to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your campaign objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other campaign fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of campaigns to retrieve information about. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Contacts
Object Type ID: 0
Contact objects allow you to keep up-to-date records for all the contacts you are managing.
Through the contacts API, you can create, retrieve, update, merge and delete contacts. You can also retrieve meta for a contact object to obtain more detailed information about its attributes and retrieve information about a collection of contacts.
Contacts can be associated with many other objects such as tasks, tags, rules, and sequences. You can access additional functionality for tagging contacts and adding and removing contacts from sequences using the objects API with an objectID of 0.
The contact object
{
"id": "27",
"owner": "1",
"firstname": "First",
"lastname": "Last",
"email": "user@ontraport.com",
"address": "2040 Alameda Padre Serra",
"city": "Santa Barbara",
"state": "CA",
"zip": "93103",
"birthday": "469569600",
"date": "1491866009",
"cell_phone": null,
"home_phone": null,
"sms_number": "+18055555555",
"dla": "1491866009",
"contact_cat": "",
"bulk_mail": "1",
"bulk_sms": "0",
"office_phone": "805-555-5555",
"fax": null,
"dlm": "1491866203",
"company": "ONTRAPORT",
"address2": "Suite 220",
"title": "Employee",
"website": "www.ontraport.com",
"country": "US",
"system_source": "0",
"source_location": null,
"import_id": "0",
"ip_addy": null,
"visits": "0",
"freferrer": "0",
"lreferrer": "0",
"n_lead_source": "0",
"n_content": "0",
"n_term": "0",
"n_media": "0",
"n_medium": "0",
"n_campaign": "0",
"referral_page": null,
"aff_sales": "0",
"aff_amount": "0",
"program_id": "0",
"aff_paypal": null,
"fb_birthday": "0",
"fb_gender": null,
"fb_likes": null,
"fb_groups": null,
"fb_website": null,
"fb_hometown": null,
"fb_location": null,
"mrcAmount": "0",
"mrcUnpaid": "0.00",
"mriInvoiceNum": "0",
"mriInvoiceTotal": "0",
"ccType": "0",
"ccExpirationMonth": "0",
"ccExpirationYear": "0",
"ccExpirationDate": "0",
"ccNumber": null,
"mrcResult": "0",
"last_inbound_sms": null,
"spent": null,
"num_purchased": null,
"updateSequence": "",
"grade": "0.00"
}
Attributes | Type | Description |
---|---|---|
id |
integer | The contact’s ID. |
owner |
integer | The ID of the user who controls the contact. This field must contain a value for a contact object to be saved properly. |
firstname |
string | The contact’s first name. |
lastname |
string | The contact’s last name. |
email |
string | The contact’s email address. |
address |
string | The contact’s postal address. |
city |
string | The contact’s city. |
state |
string | The contact’s state. |
zip |
string | The contact’s postal code. |
birthday |
timestamp | The contact’s birthday, measured in seconds from the Unix Epoch. |
date |
timestamp | The date the contact was added, measured in seconds from the Unix Epoch. |
cell_phone |
string | The contact’s mobile phone number. |
home_phone |
string | The contact’s home phone number. |
sms_number |
string | The mobile number where the contact prefers receive text messages. |
dla |
integer | Date of the contact’s last activity. In this documentation, activity means that the contact interacted with a form, website, or email link. |
contact_cat |
string | Deprecated. The tags a contact is subscribed to. Each tag has an ID, and in this field the tags are appended together with the delimiter */* . A contact_cat entry containing multiple tags looks like this: */*1*/*2*/*3*/* . Tags are now related to contacts in a separate tag subscriber object. |
bulk_mail |
integer | A flag that indicates a contact’s bulk email status. Values are mapped as follows:0 => Transactional Only 1 => Opted-in 2 => Double opt-in -2 => Hard bounce -5 => Under review You can only set the value to 0 through the API. You cannot manually opt-in a contact who has opted to receive only transactional mail. |
bulk_sms |
integer | A flag that indicates whether or not a contact is opted in to receive bulk texts. Values are mapped as follows:0 => Opted-out 1 => Opted-in 2 => Double opt-in -2 => Hard bounce You can only set the value to 0 through the API. You cannot manually opt-in a contact who has opted out. |
office_phone |
string | The contact’s office phone number. |
fax |
string | The contact’s fax number. |
dlm |
timestamp | The date the contact was last modified, measured in seconds from the Unix Epoch. |
company |
string | The company the contact is affiliated with. |
address2 |
string | A second address field which is generally used for storing suite or unit numbers. |
title |
string | The contact’s job title. |
website |
string | The contact’s website. |
country |
string | The contact’s country. |
system_source |
integer | System field. Can’t be updated through the API. Identifies the source from which the contact was added to the database. |
source_location |
string | System field. Can’t be updated through the API. Identifies the specific location from which the contact was added to the database. |
import_id |
integer | System field. Can’t be updated through the API. The ID of the import batch the contact was imported with, if any. |
ip_addy |
string | The contact’s IP address. |
freferrer |
integer | The affiliate ID of the first affiliate to refer the contact. |
lreferrer |
integer | The affiliate ID of the last affiliate to refer the contact. |
n_lead_source |
integer | The lead source ID for the tracking URL the contact arrived from. |
n_content |
integer | The content ID for the tracking URL the contact arrived from. |
n_medium |
integer | The medium ID for the tracking URL the contact arrived from. |
n_campaign |
integer | The tracking campaign ID for the tracking URL the contact arrived from. |
n_term |
integer | The term ID for the tracking URL the contact arrived from. |
referral_page |
string | The page the contact was referred from. |
aff_sales |
integer | If the contact is an affiliate, the total number of affiliate sales. |
aff_amount |
double | If the contact is an affiliate, the total amount of affiliate sales. |
program_id |
integer | For affiliates, the partner program ID. |
aff_paypal |
string | Affiliate email address for Paypal payments. |
fb_birthday |
integer | The contact’s birthday as listed on Facebook. |
fb_gender |
string | The contact’s gender as listed on Facebook. |
fb_likes |
string | The contact’s Facebook “likes”. |
fb_groups |
string | Facebook groups the contact belongs to. |
fb_website |
string | The contact’s website as listed on Facebook. |
fb_hometown |
string | The contact’s hometown as listed on Facebook. |
fb_location |
string | The contact’s location as listed on Facebook. |
mrcAmount |
double | The amount of the contact’s most recent credit card charge. |
mrcUnpaid |
double | Total contact transactions remaining unpaid. |
mriInvoiceNum |
integer | The contact’s most recent invoice number. |
mriInvoiceTotal |
double | The contact’s most recent invoice total. |
ccType |
integer | The contact’s credit card type. Integer codes map to card providers as follows:0 => none ,1 => Visa 2 => Mastercard 3 => American Express 4 => Discover 5 => Paypal . |
ccExpirationMonth |
integer | The expiration month of the contact’s credit card. Integer values are mapped as follows:1 => January 2 => February 3 => March 4 => April 5 => May 6 => June 7 => July 8 => August 9 => September 10 => October 11 => November 12 => December |
ccExpirationYear |
integer | The year the contact’s credit card expires. |
ccExpirationDate |
integer | The day of the month that the contact’s credit card expires. |
ccNumber |
string | The last 4 digits of the contact’s credit card number. |
mrcResult |
integer | The result of the contact’s most recent credit card charge. Integer values map as follows:0 => Success 1 => Declined |
last_inbound_sms |
string | The last text message the contact received from you. |
spent |
double | The total amount the contact has spent with your company. |
num_purchased |
integer | The contact’s total orders. |
updateSequence |
string | Deprecated. The sequences a contact is subscribed to. Each sequence has an ID, and in this field the sequences are appended together with the delimiter */* . An updateSequence entry containing multiple tags looks like this: */*1*/*2*/*3*/* . Sequences are now related to contacts in a separate sequence subscribers object. |
grade |
integer | The contact’s score based upon lead scoring rules. |
{custom fields} |
varies | If you have created custom fields for your contact objects, they can be accessed through the API. These fields are unique to your account and will appear in the response when you retrieve a contact object. If you are not sure what a response field is used for, you can retrieve contact meta to check for the field name. |
Create a contact
curl -X POST -d 'firstname=Angie&lastname=Lopez&email=alopez%40ontraport.com' 'https://api.ontraport.com/1/Contacts' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"firstname" => "Angie",
"lastname" => "Lopez",
"email" => "alopez@gmail.com"
);
$response = $client->contact()->create($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"firstname": "Angie",
"lastname": "Lopez",
"email": "alopez@ontraport.com",
"id": "1",
"owner": "1",
"address": null,
"city": null,
"state": null,
"zip": null,
"birthday": null,
"date": "1493143903",
"cell_phone": null,
"home_phone": null,
"sms_number": null,
"dla": "1493143903",
"contact_cat": "",
"bulk_mail": "-5",
"bulk_sms": "0",
"office_phone": null,
"fax": null,
"dlm": "1493143903",
"company": null,
"address2": null,
"title": null,
"website": null,
"country": null,
"system_source": "3",
"source_location": null,
"import_id": "0",
"ip_addy": null,
"freferrer": "0",
"lreferrer": "0",
"n_lead_source": "0",
"n_content": "0",
"n_term": "0",
"n_media": "0",
"n_medium": "0",
"n_campaign": "0",
"referral_page": null,
"aff_sales": "0",
"aff_amount": "0",
"program_id": "0",
"aff_paypal": null,
"fb_birthday": "0",
"fb_gender": null,
"fb_likes": null,
"fb_groups": null,
"fb_website": null,
"fb_hometown": null,
"fb_location": null,
"mrcAmount": "0",
"mrcUnpaid": "0.00",
"mriInvoiceNum": "0",
"mriInvoiceTotal": "0",
"ccType": "0",
"ccExpirationMonth": "0",
"ccExpirationYear": "0",
"ccExpirationDate": "0",
"ccNumber": null,
"mrcResult": "0",
"last_inbound_sms": null,
"spent": null,
"num_purchased": null,
"updateSequence": "",
"grade": "0.00"
},
"account_id": "12345"
}
Creates a new contact object. This endpoint allows duplication; if you want to avoid duplicate emails you should merge instead.
Request Endpoint
POST https://api.ontraport.com/1/Contacts
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
firstname |
string | The contact’s first name. |
lastname |
string | The contact’s last name. |
email |
string | The contact’s email address. |
freferrer |
integer | The affiliate ID of the first affiliate to refer the contact. |
lreferrer |
integer | The affiliate ID of the last affiliate to refer the contact. |
address |
string | The contact’s postal address. |
address2 |
string | A second address field which is generally used for storing suite or unit numbers. |
city |
string | The contact’s city. |
state |
string | The contact’s state. |
zip |
string | The contact’s postal code. |
country |
string | The contact’s country. |
birthday |
timestamp | The contact’s birthday, measured in seconds from the Unix Epoch. |
cell_phone |
string | The contact’s mobile phone number. |
home_phone |
string | The contact’s home phone number. |
sms_number |
string | The mobile number where the contact prefers receive text messages. |
office_phone |
string | The contact’s office phone number. |
fax |
string | The contact’s fax number. |
company |
string | The company the contact is affiliated with. |
title |
string | The contact’s job title. |
website |
string | The contact’s website. |
contact_cat |
string | Deprecated. The tags a contact is subscribed to. Each tag has an ID, and in this field the tags are appended together with the delimiter */* . A contact_cat entry containing multiple tags looks like this: */*1*/*2*/*3*/* . Tags are now related to contacts in a separate tag subscriber object. |
bulk_mail |
integer | A flag that indicates a contact’s bulk email status. Values are mapped as follows:0 => Transactional Only 1 => Opted-in 2 => Double opt-in -2 => Hard bounce -5 => Under review You can only set the value to 0 through the API. You cannot manually opt-in a contact who has opted to receive only transactional mail. |
bulk_sms |
integer | A flag that indicates whether or not a contact is opted in to receive bulk texts. Values are mapped as follows:0 => Opted-out 1 => Opted-in 2 => Double opt-in -2 => Hard bounce You can only set the value to 0 through the API. You cannot manually opt-in a contact who has opted out. |
n_lead_source |
integer | The lead source ID for the tracking URL the contact arrived from. |
n_content |
integer | The content ID for the tracking URL the contact arrived from. |
n_medium |
integer | The medium ID for the tracking URL the contact arrived from. |
n_campaign |
integer | The tracking campaign ID for the tracking URL the contact arrived from. |
n_term |
integer | The term ID for the tracking URL the contact arrived from. |
referral_page |
string | The page the contact was referred from. |
aff_sales |
integer | If the contact is an affiliate, the total number of affiliate sales. |
aff_amount |
double | If the contact is an affiliate, the total amount of affiliate sales. |
program_id |
integer | For affiliates, the partner program ID. |
aff_paypal |
string | Affiliate email address for Paypal payments. |
mrcAmount |
double | The amount of the contact’s most recent credit card charge. |
mrcUnpaid |
double | Total contact transactions remaining unpaid. |
mriInvoiceNum |
integer | The contact’s most recent invoice number. |
mriInvoiceTotal |
double | The contact’s most recent invoice total. |
mrcResult |
integer | The result of the contact’s most recent credit card charge. Integer values map as follows:0 => Success 1 => Declined |
spent |
double | The total amount the contact has spent with your company. |
grade |
integer | The contact’s score based upon lead scoring rules. |
num_purchased |
integer | The contact’s total orders. |
updateSequence |
string | Deprecated. The sequences a contact is subscribed to. Each sequence has an ID, and in this field the sequences are appended together with the delimiter */* . An updateSequence entry containing multiple tags looks like this: */*1*/*2*/*3*/* . Sequences are now related to contacts in a separate sequence subscribers object. |
Retrieve a specific contact
curl -X GET 'https://api.ontraport.com/1/Contact?id=27' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 27
);
$response = $client->contact()->retrieveSingle($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "27",
"owner": "1",
"firstname": "First",
"lastname": "Last",
"email": "user@ontraport.com",
"address": "2040 Alameda Padre Serra",
"city": "Santa Barbara",
"state": "CA",
"zip": "93103",
"birthday": "469569600",
"date": "1491866009",
"cell_phone": null,
"home_phone": null,
"sms_number": "+18055555555",
"dla": "1491866009",
"contact_cat": "",
"bulk_mail": "1",
"bulk_sms": "0",
"office_phone": "805-555-5555",
"fax": null,
"dlm": "1491866203",
"company": "ONTRAPORT",
"address2": "Suite 220",
"title": "Employee",
"website": "www.ontraport.com",
"country": "US",
"system_source": "0",
"source_location": null,
"import_id": "0",
"ip_addy": null,
"freferrer": "0",
"lreferrer": "0",
"n_lead_source": "0",
"n_content": "0",
"n_term": "0",
"n_media": "0",
"n_medium": "0",
"n_campaign": "0",
"referral_page": null,
"aff_sales": "0",
"aff_amount": "0",
"program_id": "0",
"aff_paypal": null,
"fb_birthday": "0",
"fb_gender": null,
"fb_likes": null,
"fb_groups": null,
"fb_website": null,
"fb_hometown": null,
"fb_location": null,
"mrcAmount": "0",
"mrcUnpaid": "0.00",
"mriInvoiceNum": "0",
"mriInvoiceTotal": "0",
"ccType": "0",
"ccExpirationMonth": "0",
"ccExpirationYear": "0",
"ccExpirationDate": "0",
"ccNumber": null,
"mrcResult": "0",
"last_inbound_sms": null,
"spent": null,
"num_purchased": null,
"updateSequence": "",
"grade": "0.00"
},
"account_id": "12345"
}
Retrieves all the information for an existing contact. The only parameter needed is the ID for the contact which is returned in the response upon contact creation.
Request Endpoint
GET https://api.ontraport.com/1/Contact
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The contact ID. Required. |
Retrieve multiple contacts
curl -X GET 'https://api.ontraport.com/1/Contacts?ids=29%2C30%2C31&sort=lastname&sortDir=desc&listFields=firstname%2Clastname%2Cemail' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"ids" => "29,30,31",
"sort" => "lastname",
"sortDir" => "desc",
"listFields" => "firstname,lastname,email"
);
$response = $client->contact()->retrieveMultiple($requestParams);
?>
Example response:
{
"code": 0,
"data": [
{
"firstname": "John",
"lastname": "Smith",
"email": "john@ontraport.com",
"id": "29",
"owner": "1"
},
{
"firstname": "Jane",
"lastname": "Doe",
"email": "jane@ontraport.com",
"id": "30",
"owner": "1"
},
{
"firstname": "Mary",
"lastname": "Brown",
"email": "mary@ontraport.com",
"id": "31",
"owner": "1"
}
],
"account_id": "12345",
"misc": []
}
Retrieves a collection of contacts based on a set of parameters. You can limit unnecessary API requests by utilizing criteria and our pagination tools to select only the data set you require.
Request Endpoint
GET https://api.ontraport.com/1/Contacts
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
ids |
string | An array as a comma-delimited list of the IDs of the contacts to retrieve. Entering a value of 0 will result in all contacts being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of contacts you want to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which contacts to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your contact objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not contact notes should be searched for the specified string in addition to other contact fields. |
group_ids |
string | An array as a comma-delimited list of the group IDs of contacts to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your contact object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | An array as a comma-delimited list of the fields which should be returned in your results. |
Update a contact
curl -X PUT -d 'id=29&firstname=Bob&email=bob%40ontraport.com' 'https://api.ontraport.com/1/Contacts' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 29,
"firstname" => "Bob",
"email" => "bob@ontraport.com"
);
$response = $client->contact()->update($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"attrs": {
"firstname": "Bob",
"dlm": "1500507946",
"id": "29"
}
},
"account_id": "12345"
}
Updates an existing contact with given data. The ID of the contact to update is required. The other fields should only be used if you want to change the existing value.
Request Endpoint
PUT https://api.ontraport.com/1/Contacts
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
firstname |
string | The contact’s first name. |
lastname |
string | The contact’s last name. |
email |
string | The contact’s email address. |
freferrer |
integer | The affiliate ID of the first affiliate to refer the contact. |
lreferrer |
integer | The affiliate ID of the last affiliate to refer the contact. |
address |
string | The contact’s postal address. |
address2 |
string | A second address field which is generally used for storing suite or unit numbers. |
city |
string | The contact’s city. |
state |
string | The contact’s state. |
zip |
string | The contact’s postal code. |
country |
string | The contact’s country. |
birthday |
timestamp | The contact’s birthday, measured in seconds from the Unix Epoch. |
cell_phone |
string | The contact’s mobile phone number. |
home_phone |
string | The contact’s home phone number. |
sms_number |
string | The mobile number where the contact prefers receive text messages. |
office_phone |
string | The contact’s office phone number. |
fax |
string | The contact’s fax number. |
company |
string | The company the contact is affiliated with. |
title |
string | The contact’s job title. |
website |
string | The contact’s website. |
bulk_mail |
integer | A flag that indicates a contact’s bulk email status. Values are mapped as follows:0 => Transactional Only 1 => Opted-in 2 => Double opt-in -2 => Hard bounce -5 => Under review You can only set the value to 0 through the API. You cannot manually opt-in a contact who has opted to receive only transactional mail. |
bulk_sms |
integer | A flag that indicates whether or not a contact is opted in to receive bulk texts. alues are mapped as follows:0 => Opted-out 1 => Opted-in 2 => Double opt-in -2 => Hard bounce You can only set the value to 0 through the API. You cannot manually opt-in a contact who has opted out. |
n_lead_source |
integer | The lead source ID for the tracking URL the contact arrived from. |
n_content |
integer | The content ID for the tracking URL the contact arrived from. |
n_medium |
integer | The medium ID for the tracking URL the contact arrived from. |
n_campaign |
integer | The tracking campaign ID for the tracking URL the contact arrived from. |
n_term |
integer | The term ID for the tracking URL the contact arrived from. |
referral_page |
string | The page the contact was referred from. |
program_id |
integer | For affiliates, the partner program ID. |
aff_paypal |
string | Affiliate email address for Paypal payments. |
num_purchased |
integer | The contact’s total orders. |
Delete a specific contact
curl -X DELETE 'https://api.ontraport.com/1/Contact?id=2' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 2
);
$response = $client->contact()->deleteSingle($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
Deletes a specific contact by its ID.
Request Endpoint
DELETE https://api.ontraport.com/1/Contact
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The ID of the contact to delete. Required. |
Delete multiple contacts
curl -X DELETE 'http://api.ontraport.com/1/Contacts?ids=567%2C568%2C569&range=3&sort=firstname&sortDir=desc' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"ids" => "1,2,3",
"sort" => "lastname",
"sortDir" => "desc",
"listFields" => "firstname,lastname,email"
);
$response = $client->contact()->deleteMultiple($requestParams);
?>
Example Response:
{
"code": 0,
"data": "Deleted",
"account_id": "12345"
}
Deletes a collection of contacts based on a set of parameters. You can choose the ids for the contacts to delete or use our pagination tools for a mass delete. Be very careful using this endpoint with your API key. Specified contacts will be permanently deleted from your database.
Request Endpoint
DELETE https://api.ontraport.com/1/Contacts
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
ids |
string | An array as a comma-delimited list of the IDs of the contacts to delete. Entering a value of 0 will result in all contacts being selected. Caution should be used with this endpoint. |
start |
integer | The offset to delete results from. |
range |
integer | The number of contacts you want to delete. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which contacts to delete. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your contact objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not contact notes should be searched for the specified string in addition to other contact fields. |
group_ids |
string | An array as a comma-delimited list of the group IDs of contacts to delete. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Merge or create a contact
curl -X POST -d 'firstname=John&lastname=Doe&email=user%40ontraport.com' 'https://api.ontraport.com/1/Contacts/saveorupdate' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"firstname" => "John",
"lastname" => "Doe",
"email" => "user@ontraport.com"
);
$response = $client->contact()->saveOrUpdate($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"attrs": {
"firstname": "John",
"lastname": "Doe",
"dlm": "1500508058",
"id": "8"
}
},
"account_id": "12345"
}
Looks for an existing contact with a matching email
field and merges supplied data with existing data.
If no email
is supplied or if no existing contact has a matching email
field, a new contact will be created.
Recommended to avoid unwanted duplicate mailings.
Request Endpoint
POST https://api.ontraport.com/1/Contacts/saveorupdate
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
firstname |
string | The contact’s first name. |
lastname |
string | The contact’s last name. |
email |
string | The contact’s email address. |
freferrer |
integer | The affiliate ID of the first affiliate to refer the contact. |
lreferrer |
integer | The affiliate ID of the last affiliate to refer the contact. |
address |
string | The contact’s postal address. |
address2 |
string | A second address field which is generally used for storing suite or unit numbers. |
city |
string | The contact’s city. |
state |
string | The contact’s state. |
zip |
string | The contact’s postal code. |
country |
string | The contact’s country. |
birthday |
timestamp | The contact’s birthday, measured in seconds from the Unix Epoch. |
cell_phone |
string | The contact’s mobile phone number. |
home_phone |
string | The contact’s home phone number. |
sms_number |
string | The mobile number where the contact prefers receive text messages. |
office_phone |
string | The contact’s office phone number. |
fax |
string | The contact’s fax number. |
company |
string | The company the contact is affiliated with. |
title |
string | The contact’s job title. |
website |
string | The contact’s website. |
contact_cat |
string | Deprecated. The tags a contact is subscribed to. Each tag has an ID, and in this field the tags are appended together with the delimiter */* . A contact_cat entry containing multiple tags looks like this: */*1*/*2*/*3*/* . Tags are now related to contacts in a separate tag subscriber object. |
bulk_mail |
integer | A flag that indicates a contact’s bulk email status. Values are mapped as follows:0 => Transactional Only 1 => Opted-in 2 => Double opt-in -2 => Hard bounce -5 => Under review You can only set the value to 0 through the API. You cannot manually opt-in a contact who has opted to receive only transactional mail. |
bulk_sms |
integer | A flag that indicates whether or not a contact is opted in to receive bulk texts. alues are mapped as follows:0 => Opted-out 1 => Opted-in 2 => Double opt-in -2 => Hard bounce You can only set the value to 0 through the API. You cannot manually opt-in a contact who has opted out. |
n_lead_source |
integer | The lead source ID for the tracking URL the contact arrived from. |
n_content |
integer | The content ID for the tracking URL the contact arrived from. |
n_medium |
integer | The medium ID for the tracking URL the contact arrived from. |
n_campaign |
integer | The tracking campaign ID for the tracking URL the contact arrived from. |
n_term |
integer | The term ID for the tracking URL the contact arrived from. |
referral_page |
string | The page the contact was referred from. |
aff_sales |
integer | If the contact is an affiliate, the total number of affiliate sales. |
aff_amount |
double | If the contact is an affiliate, the total amount of affiliate sales. |
program_id |
integer | For affiliates, the partner program ID. |
aff_paypal |
string | Affiliate email address for Paypal payments. |
mrcAmount |
double | The amount of the contact’s most recent credit card charge. |
mrcUnpaid |
double | Total contact transactions remaining unpaid. |
mriInvoiceNum |
integer | The contact’s most recent invoice number. |
mriInvoiceTotal |
double | The contact’s most recent invoice total. |
mrcResult |
integer | The result of the contact’s most recent credit card charge. Integer values map as follows:0 => Success 1 => Declined |
spent |
double | The total amount the contact has spent with your company. |
grade |
integer | The contact’s score based upon lead scoring rules. |
num_purchased |
integer | The contact’s total orders. |
updateSequence |
string | Deprecated. The sequences a contact is subscribed to. Each sequence has an ID, and in this field the sequences are appended together with the delimiter */* . An updateSequence entry containing multiple tags looks like this: */*1*/*2*/*3*/* . Sequences are now related to contacts in a separate sequence subscribers object. |
Retrieve contact object meta
curl -X GET 'https://api.ontraport.com/1/Contacts/meta' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->contact()->retrieveMeta();
?>
Example Response:
{
"code": 0,
"data": {
"0": {
"name": "Contact",
"fields": {
"firstname": {
"alias": "First Name",
"type": "text"
},
"lastname": {
"alias": "Last Name",
"type": "text"
},
"email": {
"alias": "Email",
"type": "email"
},
"freferrer": {
"alias": "First Referrer",
"type": "parent",
"parent_object": 36
},
"lreferrer": {
"alias": "Last Referrer",
"type": "parent",
"parent_object": 36
},
"address": {
"alias": "Address",
"type": "text"
},
"city": {
"alias": "City",
"type": "text"
},
"state": {
"alias": "State",
"type": "state"
},
"zip": {
"alias": "Zip Code",
"type": "text"
},
"birthday": {
"alias": "Birthday",
"type": "fulldate"
},
"aff_paypal": {
"alias": "Paypal Address",
"type": "text"
},
"program_id": {
"alias": "Partner Program",
"type": "parent",
"parent_object": 35
},
"contact_cat": {
"alias": "Contact Tags",
"type": "subscription"
},
"bulk_mail": {
"alias": "Bulk Email Status",
"type": "check"
},
"office_phone": {
"alias": "Office Phone",
"type": "phone"
},
"fax": {
"alias": "Fax",
"type": "phone"
},
"company": {
"alias": "Company",
"type": "text"
},
"address2": {
"alias": "Address 2",
"type": "text"
},
"website": {
"alias": "Website",
"type": "text"
},
"title": {
"alias": "Title",
"type": "text"
},
"country": {
"alias": "Country",
"type": "country"
},
"date": {
"alias": "Date Added",
"type": "timestamp"
},
"dlm": {
"alias": "Date Modified",
"type": "timestamp"
},
"dla": {
"alias": "Last Activity",
"type": "timestamp"
},
"spent": {
"alias": "Spent",
"type": "price"
},
"n_lead_source": {
"alias": "First Lead Source",
"type": "parent",
"parent_object": 76
},
"n_campaign": {
"alias": "First Campaign",
"type": "parent",
"parent_object": 75
},
"n_content": {
"alias": "First Content",
"type": "parent",
"parent_object": 78
},
"n_medium": {
"alias": "First Medium",
"type": "parent",
"parent_object": 77
},
"referral_page": {
"alias": "Referring Page",
"type": "text"
},
"aff_sales": {
"alias": "Number of Sales",
"type": "numeric"
},
"aff_amount": {
"alias": "Total Sales",
"type": "price"
},
"mriInvoiceNum": {
"alias": "Last Invoice #",
"type": "numeric"
},
"mriInvoiceTotal": {
"alias": "Last Total Invoice Amount",
"type": "price"
},
"mrcAmount": {
"alias": "Last Charge Amount",
"type": "price"
},
"mrcUnpaid": {
"alias": "Total Amount of Unpaid Transactions",
"type": "price"
},
"ccType": {
"alias": "Card Type",
"type": "drop",
"options": {
"0": "",
"1": "Visa",
"2": "Mastercard",
"3": "American Express",
"4": "Discover",
"5": "Paypal"
}
},
"ccExpirationMonth": {
"alias": "Card Expiration Month",
"type": "drop",
"options": {
"1": "January",
"2": "February",
"3": "March",
"4": "April",
"5": "May",
"6": "June",
"7": "July",
"8": "August",
"9": "September",
"10": "October",
"11": "November",
"12": "December"
}
},
"ccExpirationYear": {
"alias": "Card Expiration Year",
"type": "numeric"
},
"ccNumber": {
"alias": "Card Number (Last 4)",
"type": "numeric"
},
"mrcResult": {
"alias": "Last CC Status",
"type": "drop",
"options": {
"0": "Success",
"1": "Declined"
}
},
"ccExpirationDate": {
"alias": "Card Expiration Date",
"type": "fulldate"
},
"lnf": {
"alias": "Name",
"type": "mergefield"
},
"fn": {
"alias": "Name",
"type": "mergefield"
},
"grade": {
"alias": "Score",
"type": "numeric"
},
"num_purchased": {
"alias": "Orders",
"type": "numeric"
},
"id": {
"alias": "Contact ID",
"type": "numeric"
},
"owner": {
"alias": "Owner",
"type": "parent",
"parent_object": 2
},
"bulk_sms": {
"alias": "Bulk SMS Status",
"type": "check"
},
"sms_number": {
"alias": "SMS Number",
"type": "sms"
},
"updateSequence": {
"alias": "Sequences",
"type": "subscription"
},
"n_term": {
"alias": "Term",
"type": "parent",
"parent_object": 79
},
"last_note": {
"alias": "Last Note",
"type": "text"
},
"ip_addy": {
"alias": "IP Address",
"type": "text"
},
"last_inbound_sms": {
"alias": "Last Inbound SMS",
"type": "text"
},
"updateCampaign": {
"alias": "Campaigns",
"type": "subscription"
},
"timezone": {
"alias": "Timezone",
"type": "timezone"
},
"l_lead_source": {
"alias": "Last Lead Source",
"type": "parent",
"parent_object": 76
},
"l_campaign": {
"alias": "Last Campaign",
"type": "parent",
"parent_object": 75
},
"l_content": {
"alias": "Last Content",
"type": "parent",
"parent_object": 78
},
"l_medium": {
"alias": "Last Medium",
"type": "parent",
"parent_object": 77
},
"l_term": {
"alias": "Last Term",
"type": "parent",
"parent_object": 79
}
}
}
},
"account_id": "12345"
}
Retrieves the field meta data for the contact object.
Request Endpoint
GET https://api.ontraport.com/1/Contacts/meta
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
None
Retrieve contact collection info
curl -X GET 'https://api.ontraport.com/1/Contacts/getInfo?search=John' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"search" => "John"
);
$response = $client->contact()->retrieveCollectionInfo($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"listFields": [
"fn",
"email",
"office_phone",
"date",
"grade",
"dla",
"contact_id"
],
"listFieldSettings": [],
"count": "2"
},
"account_id": "12345"
}
Retrieves information about a collection of contacts, such as the number of contacts that match the given criteria.
Request Endpoint
GET https://api.ontraport.com/1/Contacts/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
condition |
string | A JSON encoded string to more specifically set criteria for which contacts to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your contact objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not contact notes should be searched for the specified string in addition to other contact fields. |
group_ids |
string | An array as a comma-delimited list of the group IDs of contacts to retrieve information about. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Credit Cards
Object Type ID: 45
Credit cards objects store data for a contact’s saved credit cards, including card information, type, status, and billing details.
The credit card object
{
"id": "1",
"firstname": "Maria",
"lastname": "Romero",
"contact_id": "1",
"last4": "1111",
"type": "1",
"exp_month": "11",
"exp_year": "2027",
"address": "2040 Alameda Padre Serra",
"address2": "Suite 220",
"city": "Santa Barbara",
"state": "CA",
"zip": "93103",
"country": "US",
"status": "3",
"recent_sale": "0",
"invoice_id": "1"
}
Credit card attributes
Attribute | Type | Description |
---|---|---|
id |
integer | The credit card ID. |
firstname |
string | The first name of the credit card owner. |
lastname |
string | The last name of the credit card owner. |
contact_id |
integer | The ID of the contact associated with the credit card. |
last4 |
integer | The last four digits of the credit card number. |
type |
integer | The credit card issuer. Integer codes are mapped as follows:1 => Visa 2 => Mastercard 3 => American Express 4 => Discover 5 => Other |
exp_month |
integer | The two-digit integer representation of the credit card’s expiration month. |
exp_year |
integer | The four-digit credit card expiration year. |
address |
string | The credit card’s billing address. |
address2 |
string | Additional information about the credit card’s billing address, such as unit number. |
city |
string | The credit card’s billing address city. |
state |
string | The credit card’s billing address state. |
zip |
string | The credit card’s billing address zip code. |
country |
string | The credit card’s billing address country. |
status |
integer | The current status of the credit card. Integer codes are mapped as follows:1 => Active 2 => Expired 3 => Active Default 4 => Expired Default |
recent_sale |
timestamp | The date and time of the most recent charge measured in seconds from the Unix Epoch. |
invoice_id |
integer | The ID of the invoice generated in relation to the most recent charge to the credit card. |
Retrieve a specific credit card
curl -X GET 'https://api.ontraport.com/1/CreditCard?id=2' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$queryParams = array(
"id" => 2,
);
$response = $client->creditcard()->retrieveSingle($queryParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "1",
"firstname": "Maria",
"lastname": "Romero",
"contact_id": "1",
"last4": "1111",
"type": "1",
"exp_month": "11",
"exp_year": "2027",
"address": "2040 Alameda Padre Serra",
"address2": "Suite 220",
"city": "Santa Barbara",
"state": "CA",
"zip": "93103",
"country": "US",
"status": "3",
"recent_sale": "0",
"invoice_id": "1"
},
"account_id": "12345"
}
Retrieves all the information for an existing credit card.
Request Endpoint
GET https://api.ontraport.com/1/CreditCard
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The credit card ID. Required. |
Retrieve multiple credit cards
curl -X GET 'http://api.ontraport.com/1/CreditCards?listFields=contact_id%2C%20last4%2C%20exp_month%2C%20exp_year%2C%20status' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$queryParams = array(
"listFields" => "contact_id, last4, exp_month, exp_year, status"
);
$response = $client->creditcard()->retrieveMultiple($queryParams);
?>
Example Response:
{
"code": 0,
"data": [
{
"contact_id": "1",
"last4": "1111",
"exp_month": "11",
"exp_year": "2027",
"status": "3",
"id": "1"
},
{
"contact_id": "1",
"last4": "1111",
"exp_month": "9",
"exp_year": "2037",
"status": "1",
"id": "2"
}
],
"account_id": "12345",
"misc": []
}
Retrieves a collection of credit cards based on a set of parameters. You can limit unnecessary API requests by utilizing criteria and our pagination tools to select only the data set you require.
Request Endpoint
GET https://api.ontraport.com/1/CreditCards
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
ids |
string | An integer array as a comma-delimited list of the IDs of the credit cards to retrieve. Entering a value of 0 will result in all forms being selected. |
start |
integer | The id to start your search after. |
range |
integer | The number of credit cards you want to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which credit cards to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your form objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not object notes should be searched for the specified string in addition to native form fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of credit cards to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your credit card object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | A string array as a comma-delimited list of the fields which should be returned in your results. |
Retrieve credit card collection info
curl -X GET 'https://api.ontraport.com/1/CreditCards/getInfo?condition=%5B%7B%20%22field%22%3A%7B%22field%22%3A%22contact_id%22%7D%2C%20%22op%22%3A%22%3D%22%2C%20%22value%22%3A%7B%22value%22%3A1%7D%20%7D%5D' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$condition = new OntraportAPI\Criteria("contact_id", "=", 1);
$queryParams = array(
"condition" => $condition->fromArray()
);
$response = $client->creditcard()->retrieveCollectionInfo($queryParams);
?>
Example Response:
{
"code": 0,
"data": {
"listFields": [
"contact_id",
"last4",
"exp_month",
"exp_year"
],
"listFieldSettings": [],
"count": "2"
},
"account_id": "12345"
}
Retrieves information about a collection of credit cards, such as the number of credit cards that match the given criteria.
Request Endpoint
GET https://api.ontraport.com/1/CreditCards/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
condition |
string | A JSON encoded string to more specifically set criteria for which credit cards to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your credit card objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not object notes should be searched for the specified string in addition to native credit card fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of credit cards to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Retrieve credit card meta
curl -X GET 'https://api.ontraport.com/1/CreditCards/meta' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->creditcard()->retrieveMeta();
?>
Example Response:
{
"code": 0,
"data": {
"45": {
"name": "CreditCard",
"fields": {
"contact_id": {
"alias": "Contact",
"type": "parent"
},
"last4": {
"alias": "Card Number (last 4)",
"type": "text"
},
"type": {
"alias": "Card Type",
"type": "drop",
"options": {
"1": "Visa",
"2": "Mastercard",
"3": "AMEX",
"4": "Discover",
"6": "Other"
}
},
"status": {
"alias": "Card Status",
"type": "drop",
"options": {
"0": "Hidden",
"1": "Active",
"2": "Expired",
"3": "Active (Default)",
"4": "Expired (Default)"
}
},
"exp_month": {
"alias": "Card Expiration Month",
"type": "numeric"
},
"exp_year": {
"alias": "Card Expiration Year",
"type": "numeric"
},
"address": {
"alias": "Billing Address",
"type": "text"
},
"address2": {
"alias": "Billing Address 2",
"type": "text"
},
"city": {
"alias": "Billing City",
"type": "text"
},
"state": {
"alias": "Billing State",
"type": "state"
},
"zip": {
"alias": "Billing Zip",
"type": "text"
},
"country": {
"alias": "Billing \nCountry",
"type": "country"
},
"invoice_id": {
"alias": "Invoice",
"type": "parent",
"parent_object": 46
},
"firstname": {
"alias": "Billing First Name",
"type": "text"
},
"lastname": {
"alias": "Billing Last Name",
"type": "text"
}
}
}
},
"account_id": "12345"
}
Retrieves the field meta data for a credit card.
Request Endpoint
GET https://api.ontraport.com/1/CreditCards/meta
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
None
Set a default credit card
curl -X PUT --header 'Content-Type: application/x-www-form-urlencoded' -d 'id=11' 'http://api.ontraport.com/1/CreditCard/default' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$queryParams = array(
"id" => 2,
);
$response = $client->creditcard()->setDefault($queryParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "11",
"status": 3
},
"account_id": "12345"
}
Sets the status of an existing card to default and adjusts the status of the current default card.
Request Endpoint
PUT https://api.ontraport.com/1/CreditCard/default
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
id |
integer | The credit card ID. Required. |
Forms
Object Type ID: 122
Forms are used to simply and easily gather information from your contacts. Our ONTRAforms are the recommended form type, as we offer many pre-designed and customizable templates which will greatly simplify your process. We also offer legacy SmartForms, which allow you to create your own designs.
Through the form API, you can retrieve a single form or a collection of forms. You can also retrieve meta for a form object and retrieve information about a collection of forms.
The form object
{
"form_id": "2",
"formname": "Test Form",
"type": "11",
"tags": null,
"sequences": null,
"redirect": null,
"owner": "",
"captcha": "1",
"notif": null,
"fillouts": "0",
"json_raw_object": "0",
"deleted": "",
"object_type_id": "0",
"responsive": "1",
"visits": "0",
"unique_visits": "0",
"date": "1510703743",
"dlm": "1510703743"
}
Form attributes
Attribute | Type | Description |
---|---|---|
id |
integer | The forms’s ID. |
formname |
string | An arbitrary name for the form. |
type |
integer | The type of form. Integer codes are mapped as follows:10 => SmartForm 11 => ONTRAform Any other codes correspond to deprecated form types. |
tags |
string | The tags a contact should be added to upon form fillout. |
sequences |
string | The sequences a contact should be added to upon form fillout. |
redirect |
string | The URL for the thank you page the user is redirected to upon form fillout. |
owner |
integer | The ID of the user controlling the form. |
captcha |
integer | A binary integer flag indicating whether or not the form includes a Captcha. Values are mapped as follows:0 => false 1 => true |
notif |
string | The person to be notified when the form is filled out. |
fillouts |
integer | The number of times the form has been filled out. |
json_raw_object |
blob | JSON-encoded form data. |
deleted |
integer/boolean | A flag indicating whether or not the form has been deleted. Different forms may use either a binary integer or boolean value. If an integer, values are mapped as follows:0 => false 1 => true |
object_type_id |
integer | The ID of the object type associated with the form. |
responsive |
integer | A flag indicating whether or not the form has a responsive layout. Values are mapped as follows:0 => false 1 => true |
visits |
integer | The number of times the form has been visited. |
unique_visits |
integer | The number of times unique visitors have visited the form. |
date |
timestamp | The date and time the form was created measured in seconds from the Unix Epoch. Note that this field will not contain data for any forms created prior to November 7, 2017. |
dlm |
timestamp | The data and time the form was last modified measured in seconds from the Unix Epoch. |
Retrieve a specific form
curl -X GET 'https://api.ontraport.com/1/Form?id=2' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$queryParams = array(
"id" => 2,
);
$response = $client->form()->retrieveSingle($queryParams);
?>
Example Response:
{
"code": 0,
"data": {
"form_id": "2",
"formname": "Test Form",
"type": "11",
"tags": null,
"sequences": null,
"redirect": null,
"owner": "",
"captcha": "1",
"notif": null,
"fillouts": "0",
"json_raw_object": "0",
"deleted": "",
"object_type_id": "0",
"responsive": "1",
"visits": "0",
"unique_visits": "0",
"date": "1510703743",
"dlm": "1510703743"
},
"account_id": "12345"
}
Retrieves all the information for an existing form.
Request Endpoint
GET https://api.ontraport.com/1/Form
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The form ID. Required. |
Retrieve multiple forms
curl -X GET 'https://api.ontraport.com/1/Forms?sort=type&sortDir=asc&listFields=form_id%2Cformname%2Ctype' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$queryParams = array(
"sort" => "type",
"sortDir" => "asc",
"listFields" => "form_id,formname,type"
);
$response = $client->form()->retrieveMultiple($queryParams);
?>
Example Response:
{
"code": 0,
"data": [
{
"form_id": "4",
"formname": "Smart Form",
"type": "10",
"owner": ""
},
{
"form_id": "2",
"formname": "Test ONTRAform",
"type": "11",
"owner": ""
},
{
"form_id": "3",
"formname": "Test ONTRAform 2",
"type": "11",
"owner": ""
}
],
"account_id": "12345",
"misc": []
}
Retrieves a collection of forms based on a set of parameters. You can limit unnecessary API requests by utilizing criteria and our pagination tools to select only the data set you require.
Request Endpoint
GET https://api.ontraport.com/1/Forms
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
ids |
string | An integer array as a comma-delimited list of the IDs of the forms to retrieve. Entering a value of 0 will result in all forms being selected. |
start |
integer | The id to start your search after. |
range |
integer | The number of forms you want to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which forms to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your form objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not object notes should be searched for the specified string in addition to native form fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of forms to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your form object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | A string array as a comma-delimited list of the fields which should be returned in your results. |
Retrieve form collection info
curl -X GET 'https://api.ontraport.com/1/Forms/getInfo?search=Test' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$queryParams = array(
"search" => "Test",
);
$response = $client->form()->retrieveCollectionInfo($queryParams);
?>
Example Response:
{
"code": 0,
"data": {
"listFields": [
"formname",
"redirect"
],
"listFieldSettings": [],
"count": "1"
},
"account_id": "12345"
}
Retrieves information about a collection of forms, such as the number of forms that match the given criteria.
Request Endpoint
GET https://api.ontraport.com/1/Forms/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
condition |
string | A JSON encoded string to more specifically set criteria for which forms to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your form objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not object notes should be searched for the specified string in addition to native form fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of forms to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Retrieve Smart Form meta
curl -X GET 'https://api.ontraport.com/1/Forms/meta' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->form()->retrieveMeta();
?>
Example Response:
{
"code": 0,
"data": {
"22": {
"name": "SmartForm",
"fields": {
"formname": {
"alias": "Form Name",
"type": "text"
},
"redirect": {
"alias": "Thank you Page",
"type": "text"
},
"fillouts": {
"alias": "# Of Submissions (Conversion Rate)",
"type": "percentage"
}
}
}
},
"account_id": "12345"
}
Retrieves the field meta data for a SmartForm. If you want to retrieve meta for another form type, you should use the objects/meta endpoint with the appropriate object ID.
Request Endpoint
GET https://api.ontraport.com/1/Forms/meta
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
None
Retrieve Smart Form HTML
curl -X GET 'https://api.ontraport.com/1/form?id=4' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$queryParams = array(
"id" => 4,
);
$response = $client->form()->retrieveSmartFormHTML($queryParams);
?>
Example Response:
{
"code": 0,
"data": "<html>Insert HTML here</html>",
"account_id": "12345"
}
Retrieves the HTML for a SmartForm by its ID. This endpoint does not support ONTRAforms.
Request Endpoint
GET https://api.ontraport.com/1/form
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The ID of the form to retrieve HTML for. |
Retrieve all form blocks
curl -X GET 'api.ontraport.com/1/Form/getAllFormBlocks' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->form()->retrieveFormBlocks();
?>
Example Response:
{
"code": 0,
"data": {
"lp1.0.96bbda26-83fa-10ae-dd9a-5381b1fbf3dd": "Form on landingpage",
"f1": "Standalone form"
},
"account_id": "12345"
}
Retrieves name and ID pairs for all existing form blocks.
Request Endpoint
GET https://api.ontraport.com/1/getAllFormBlocks
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
page |
integer | The zero-indexed page number. 50 entries are returned per page. Optional. |
Retrieve all blocks for form
curl -X GET 'api.ontraport.com/1/Form/getBlocksByFormName?name=myLandingPage' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$queryParams = array(
"name" => "myLandingPage"
);
$response = $client->form()->retrieveBlocksByForm($queryParams);
?>
Example Response:
{
"code": 0,
"data": {
"block_ids": [
"lp1.0.6d1f42fd-4e7f-706b-a20a-bd160bdd0439",
"lp1.0.d41c1051-a2d8-7c68-d915-4f804185996e"
]
},
"account_id": "12345"
}
Retrieves IDs for all form blocks in a specified form or landing page.
Request Endpoint
GET https://api.ontraport.com/1/getBlocksByFormName
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
name |
string | The name of the form or landing page. Required. |
Messages
Object Type ID: 7
Message objects contain data for all of the messages in an account. Supported message types include ONTRAmail, legacy HTML emails, SMS, task messages, and postcards. All of these types can be retrieved through the API, and all but postcards can be created and updated. When modifying message content, pay close attention to the format required to avoid unexpected results.
The message object
{
"id": "3",
"alias": "Test EMail",
"type": "e-mail",
"last_save": "0",
"last_auto": "0",
"autosave": "",
"date": "1502832565",
"mcsent": "0",
"mcopened": "0",
"mcclicked": "0",
"mcabuse": "0",
"mcunsub": "0",
"spam_score": "4.4",
"subject": "Hi, [First Name]!",
"object_type_id": "0",
"dlm": "1510704661",
"transactional_email": "0",
"json_data": "",
"owner": "1",
"from": "owner",
"message_body": "<p>Dear [First Name],</p>\n\n<p>This is the message body.</p>\n\n<p> </p>",
"send_out_name": "",
"reply_to_email": "Contact owner email",
"plaintext": "",
"send_from": "tester@ONTRAPORT.com",
"email_header_data": "",
"send_to": "email",
"word_wrap_checkbox": "0"
}
Message attributes
Attribute | Type | Description |
---|---|---|
id |
integer | The message ID. |
alias |
string | The message name. |
type |
string | The message type. Types names map as follows:email => legacy email template => ONTRAmail sms => text message task => task messages postcard => postcard |
last_save |
timestamp | The last time the message was deliberately saved measured in seconds from the Unix Epoch. |
last_auto |
timestamp | The last time the message was automatically saved measured in seconds from the Unix Epoch. |
autosave |
string | The content of the last autosave. |
date |
timestamp | The date the message was created measured in seconds from the Unix Epoch. |
mcsent |
integer | The number of times the message has been sent. |
mcopened |
integer | The rate of messages that have been opened versus sent, represented as a percentage. |
mcclicked |
integer | The rate of clickthroughs in opened messages, represented as a percentage. |
mcabuse |
integer | The rate of complaints about sent messages, represented as a percentage. |
mcunsub |
integer | The rate of opt-outs on this message, represented as a percentage. |
spam_score |
float | The SpamAssassin spam score of the message. The lower the score, the better the rating. Messages with a spam score of 5 or higher will not be sent. |
subject |
string | The email subject line. |
object_type_id |
integer | The ID of the object type associated with the message. The default is 0 for contact objects. This field should only be changed if you are using custom objects. |
dlm |
timestamp | The data and time the message was last modified measured in seconds from the Unix Epoch. |
transactional_email |
integer | A binary integer flag indicating whether or not this message is transactional email. Values are mapped as follows:0 => false 1 => true Transactional email is NOT marketing email. It is email that delivers a product, an invoice, a request for payment for a purchase already made, or other messaging having to do with an existing client relationship. It is not to promote new stuff to an existing client. When you set this flag to 1, the email will be sent even if a contact has already unsubscribed. Because of this, if you send it to someone who isn’t a client and who has unsubscribed, you will be breaking CAN-SPAM and other anti-spam laws. This is your responsibility. In addition, ONTRAPORT can and will suspend your account should we discover marketing messages in emails that you have marked as Transactional Emails. |
json_data |
longtext | The content of an ONTRAmail message. |
owner |
integer | The ID of the user having ownership of the message. |
from |
string | Who the message will be sent from. Options are owner , custom , or the desired user ID. |
message_body |
string | For legacy emails only, the HTML content of the message. |
send_out_name |
string | If the from field is set to custom , the name the message should come from. |
reply_to_email |
string | The “reply to” email address. |
plaintext |
string | For email messages, the plain text version of your email. For SMS messages, the content to be sent. |
send_from |
string | Emails are automatically sent from your default email address. If you would like to send from another email address, this field can contain any validated email address. |
send_to |
string | Used only with custom objects and SMS messages. In custom objects, you can use this field to send to another email in a parent/child relationship. For example, you could send to a related child object instead of the contact’s default email address. The field is stored in the format {related_field}//{child_field} , where related_field is the parent field relating one object to another and child_field is the actual email field in the related object you would like to send to. For SMS messages, this field defaults to sms_number . |
email_header_data |
string | Custom HTML email header data. |
word_wrap_checkbox |
integer | A binary flag indicating whether or not long lines are being wrapped. |
Create a message
curl -X POST -d 'alias=Test%20Legacy%20Email&subject=Hi%2C%20%5BFirst%20Name%5D&type=e-mail&object_type_id=0&from=owner&send_out_name=owner&reply_to_email=Contact%20owner%20email&send_to=email&message_body=Sample%20message%20body' 'https://api.ontraport.com/1/message' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"alias" => "Test Legacy Email",
"subject" => "Hi, [First Name]",
"type" => "email",
"object_type_id" => 0,
"from" => "owner",
"send_out_name" => "owner",
"reply_to_email" => "Contact owner email",
"message_body" => "Sample message body"
);
$response = $client->message()->create($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": 4,
"date": "1502837435"
},
"account_id": "12345"
}
This endpoint will add a new message of designated type to your database.
Request Endpoint
POST https://api.ontraport.com/1/message
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
alias |
string | The message name. |
type |
string | The message type. Types names map as follows:e-mail => legacy email template => ONTRAmail sms => text message task => task messages Postcard messages can be retrieved but not created through the API. |
transactional_email |
integer | A binary integer flag indicating whether or not this message is transactional email. Values are mapped as follows:0 => false 1 => true Transactional email is NOT marketing email. It is email that delivers a product, an invoice, a request for payment for a purchase already made, or other messaging having to do with an existing client relationship. It is not to promote new stuff to an existing client. When you set this flag to 1, the email will be sent even if a contact has already unsubscribed. Because of this, if you send it to someone who isn’t a client and who has unsubscribed, you will be breaking CAN-SPAM and other anti-spam laws. This is your responsibility. In addition, ONTRAPORT can and will suspend your account should we discover marketing messages in emails that you have marked as Transactional Emails. |
subject |
string | The email subject line. |
object_type_id |
integer | The ID of the object type associated with the message. The default is 0 for contact objects. This field should only be changed if you are using custom objects. |
from |
string | Who the message will be sent from. Options are owner , custom , or the desired user ID. |
send_out_name |
string | If the from field is set to custom , the name the message should come from. |
reply_to_email |
string | The “reply to” email address. |
plaintext |
string | For email messages, the plain text version of your email. For SMS messages, the content to be sent. |
send_from |
string | Emails are automatically sent from your default email address. If you would like to send from another email address, this field can contain any validated email address. |
send_to |
string | Used only with custom objects and SMS messages. In custom objects, you can use this field to send to another email in a parent/child relationship. For example, you could send to a related child object instead of the contact’s default email address. The field is stored in the format {related_field}//{child_field} , where related_field is the parent field relating one object to another and child_field is the actual email field in the related object you would like to send to. For SMS messages, this field defaults to sms_number . |
message_body |
string | For legacy emails only; the HTML content of the message. |
resource |
string | For ONTRAmail messages only; the content of the message. Note that this can be extremely complex, so you should start by inspecting the resource that is sent when saving a message from inside the app. For SMS messages, use the plaintext field for content. |
email_title |
string | A short title that will appear as the first line in email clients. |
task_data |
string | For task messages only; the content of the message. |
due_date |
string | For task messages only; the number of days after assignment the task will be due. |
task_owner |
integer | The ID of the staff user having ownership of the task. |
task_form |
integer | The ID of the form to be filled out upon task completion. The form must already exist and cannot be created with this endpoint. |
Retrieve a specific message
curl -X GET 'https://api.ontraport.com/1/Message?id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1
);
$response = $client->message()->retrieveSingle($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "1",
"alias": "Test Task",
"type": "Task",
"last_save": "0",
"last_auto": "0",
"autosave": "",
"date": "1502823002",
"mcsent": "0",
"mcopened": "0",
"mcclicked": "0",
"mcabuse": "0",
"mcunsub": "0",
"spam_score": "",
"subject": "Do this",
"object_type_id": "0",
"dlm": "1510704661",
"json_data": "",
"owner": "1",
"topic": "Do this",
"due_date": "5",
"task_data": "[First Name], get cracking!",
"task_notification": "",
"task_form": "",
"task_owner": "0",
"task_notification_checkbox": "0"
},
"account_id": "12345"
}
Retrieves all the information for an existing message.
Request Endpoint
GET https://api.ontraport.com/1/Message?id=1
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The message ID. Required. |
Retrieve multiple messages
curl -X GET 'https://api.ontraport.com/1/Messages?ids=1%2C2%2C3&listFields=id%2Calias%2Ctype' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"ids" => "1,2,3",
"listFields" => "id,alias,type"
);
$response = $client->message()->retrieveMultiple($requestParams);
?>
Example Response:
{
"code": 0,
"data": [
{
"id": "1",
"alias": "Test Task",
"type": "Task"
},
{
"id": "2",
"alias": "ONTRAmail",
"type": "Template"
},
{
"id": "3",
"alias": "Test EMail",
"type": "e-mail"
}
],
"account_id": "12345",
"misc": []
}
Request Endpoint
GET https://api.ontraport.com/1/Messages
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Retrieve message meta
curl -X GET 'https://api.ontraport.com/1/Messages/meta' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->message()->retrieveMeta();
?>
Example Response:
{
"code": 0,
"data": {
"7": {
"name": "Message",
"fields": {
"owner": {
"alias": "Owner",
"type": "parent",
"parent_object": 2
},
"alias": {
"alias": "Name",
"type": "text"
},
"name": {
"alias": "Name",
"type": "mergefield"
},
"subject": {
"alias": "Subject",
"type": "text"
},
"spam_score": {
"alias": "Spam Score",
"type": ""
},
"type": {
"alias": "Type",
"type": "drop",
"options": {
"e-mail": "Email",
"Task": "Task",
"sms": "SMS",
"Postcard": "Postcard",
"[\"e-mail\",\"Template\"]": "Email/ONTRAmail",
"Template": "ONTRAmail"
}
},
"mcsent": {
"alias": "Sent",
"type": "numeric"
},
"mcopened": {
"alias": "Opened",
"type": "percentage"
},
"mcclicked": {
"alias": "Clicked",
"type": "percentage"
},
"mcabuse": {
"alias": "Complaints",
"type": "percentage"
},
"mcunsub": {
"alias": "Opt Outs",
"type": "percentage"
},
"date": {
"alias": "Date Added",
"type": "timestamp"
},
"mcnotopened": {
"alias": "Not Opened",
"type": "percentage"
},
"mcnotclicked": {
"alias": "Not Clicked",
"type": "percentage"
}
}
}
},
"account_id": "12345"
}
Request Endpoint
GET https://api.ontraport.com/1/Messages/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Retrieve message collection info
curl -X GET 'https://api.ontraport.com/1/Messages/getInfo' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$conditions = new OntraportAPI\Criteria("type", "=", "email");
$requestParams = array(
"condition" => $conditions->fromArray()
);
$response = $client->message()->retrieveCollectionInfo($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"listFields": [
"name",
"subject",
"spam_score",
"date",
"type",
"mcsent",
"mcopened",
"mcclicked",
"mcnotopened",
"mcnotclicked",
"mcunsub",
"mcabuse"
],
"listFieldSettings": [],
"count": "4"
},
"account_id": "12345"
}
Retrieves information about a collection of messages, such as the number of messages that match the given criteria.
Request Endpoint
GET https://api.ontraport.com/1/Messages/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
condition |
string | A JSON encoded string to more specifically set criteria for which messages you wish to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other object fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of objects to retrieve information about. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Update a message
curl -X PUT -d 'id=4&alias=New%20Name' 'https://api.ontraport.com/1/message' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678' \
--header 'Content-Type: application/x-www-form-urlencoded'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => "1",
"alias" => "New Name"
);
$response = $client->message()->update($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "4",
"date": "1502837435"
},
"account_id": "12345"
}
Request Endpoint
PUT https://api.ontraport.com/1/message
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
id |
integer | The message ID. Required. |
alias |
string | The message name. |
type |
string | The message type. Types names map as follows:e-mail => legacy email template => ONTRAmail sms => text message task => task messages Postcard messages can be retrieved but not created through the API. |
transactional_email |
integer | A binary integer flag indicating whether or not this message is transactional email. Values are mapped as follows:0 => false 1 => true Transactional email is NOT marketing email. It is email that delivers a product, an invoice, a request for payment for a purchase already made, or other messaging having to do with an existing client relationship. It is not to promote new stuff to an existing client. When you set this flag to 1, the email will be sent even if a contact has already unsubscribed. Because of this, if you send it to someone who isn’t a client and who has unsubscribed, you will be breaking CAN-SPAM and other anti-spam laws. This is your responsibility. In addition, ONTRAPORT can and will suspend your account should we discover marketing messages in emails that you have marked as Transactional Emails. |
subject |
string | The email subject line. |
object_type_id |
integer | The ID of the object type associated with the message. The default is 0 for contact objects. This field should only be changed if you are using custom objects. |
from |
string | Who the message will be sent from. Options are owner , custom , or the desired user ID. |
send_out_name |
string | If the from field is set to custom , the name the message should come from. |
reply_to_email |
string | The “reply to” email address. |
plaintext |
string | For email messages, the plain text version of your email. For SMS messages, the content to be sent. |
send_from |
string | Emails are automatically sent from your default email address. If you would like to send from another email address, this field can contain any validated email address. |
send_to |
string | Used only with custom objects and SMS messages. In custom objects, you can use this field to send to another email in a parent/child relationship. For example, you could send to a related child object instead of the contact’s default email address. The field is stored in the format {related_field}//{child_field} , where related_field is the parent field relating one object to another and child_field is the actual email field in the related object you would like to send to. For SMS messages, this field defaults to sms_number . |
message_body |
string | For legacy emails only; the HTML content of the message. |
resource |
string | For ONTRAmail messages only; the content of the message. Note that this can be extremely complex, so you should start by inspecting the resource that is sent when saving a message from inside the app. For SMS messages, use the plaintext field for content. |
email_title |
string | A short title that will appear as the first line in email clients. |
task_data |
string | For task messages only; the content of the message. |
due_date |
string | For task messages only; the number of days after assignment the task will be due. |
task_owner |
integer | The ID of the staff user having ownership of the task. |
task_form |
integer | The ID of the form to be filled out upon task completion. The form must already exist and cannot be created with this endpoint. |
Landing Pages
Object Type ID: 20
Landing page objects contain the data for one-off web pages a prospect can land on after clicking on an online marketing call-to-action.
We support professionally designed ONTRApage templates as well as redirects to other landing pages, “code mode” and legacy HTML pages.
Through the API, you can retrieve one or more landing pages and retrieve the hosted URL for a specific landing page. You can also retrieve meta for a landing page object to obtain more detailed information about its attributes and retrieve information about a collection of landing pages.
The landing page object
{
"id": "1",
"uri_id": null,
"resource": "[{\"templateId\":84,\"status\":true,\"blocks\":[{\"alias\":\"Banner\",\"blockId\":\"20\",\"blockTypeId\":3,\"id\":\"527f664f-a6a4-8e9d-634e-26c041d2bee5\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/20_event_banner\\/\",\"scripts\":\" \\/*block scripts*\\/\",\"theme\":{\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"header-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\"h1\\\">COMING SOON<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Header\"}},{\"id\":\"subHeader-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area h2 h2 h2\\\">Yes you're on the right page, but its not quite ready.<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Sub-Header\"}},{\"id\":\"header-group\",\"type\":\"group\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"alias\":\"header group\",\"visibility\":\"visible\"}},{\"id\":\"logo-1\",\"type\":\"image\",\"for\":null,\"tag\":\"IMG\",\"attrs\":{\"src\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.47135abcc7e84179f73c77f9e8f8af1b.PNG\",\"options\":false,\"visibility\":\"visible\",\"alias\":\"Logo\"}},{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\"}},{\"id\":\"tagline-1\",\"type\":\"html\",\"for\":null,\"tag\":\"H3\",\"attrs\":{\"html\":\" JOIN OUR LIVE WEBINAR \",\"visibility\":\"hidden\",\"options\":false,\"help\":false,\"alias\":\"Tagline\"}},{\"id\":\"date-1\",\"type\":\"html\",\"for\":null,\"tag\":\"H1\",\"attrs\":{\"html\":\" DECEMBER 25, 2015 \\/\\/ 1:00PM PST \",\"visibility\":\"hidden\",\"options\":false,\"help\":false,\"alias\":\"Date\"}},{\"id\":\"button-1\",\"type\":\"button\",\"for\":null,\"tag\":\"A\",\"attrs\":{\"visibility\":\"hidden\",\"alias\":\"Button\",\"html\":\"\\n SIGN ME UP\\n \",\"href\":\"javascript:\\/\\/\",\"target\":\"_self\",\"file_name\":null,\"page_select\":null,\"url_type\":null,\"src\":null,\"link_background\":\"\",\"hover_bg\":\"\",\"hover_text\":\"\"}}],\"visibility\":true,\"permissionLevel\":\"free\"},{\"alias\":\"Countdown timer\",\"blockId\":\"119\",\"blockTypeId\":22,\"id\":\"b681e5f2-2c31-a251-f0f6-fa5bb76469d8\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/119_count_down_timer\\/\",\"scripts\":\"\\/*block scripts*\\/\\n\\n\",\"theme\":{\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"header-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area h3 h3 h3\\\">PAGE WILL BE READY IN :<\\/span>\\n \",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Header\"}},{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\"}}],\"visibility\":true,\"permissionLevel\":\"premium\"},{\"alias\":\"Smart form\",\"blockId\":\"130\",\"blockTypeId\":10,\"id\":\"bd440856-4d06-bedf-1302-eb5f220c29e9\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/130_horizontal_text_and_form\\/\",\"scripts\":\" \\/*block scripts*\\/\",\"theme\":{\"spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-bottom\":\"100px\"}}}},\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\",\"fixed-width-default\":false}},{\"id\":\"bodyText-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area body-text body-text\\\">Enter you name & Email and we will let you know when its ready.<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Body Text\"}}],\"visibility\":true,\"direction\":1,\"settings\":{\"opt_in_settings\":\"single\",\"conditionsCustomUrl\":\"\",\"conditionsRedirectRadioButtons\":\"default\",\"form_contacts_thank_you_page_redir\":\"0\",\"singleCustomUrl\":\"\",\"thankYouRedirectRadioButtons\":\"default\",\"singleLandPageSelect\":\"\",\"conditionsLandPageSelect\":\"\",\"conditionsPopOntraformSelect\":\"\",\"confirmation_email\":\"\",\"tags\":[],\"sequences\":[],\"rules_default\":[],\"rules_transaction_fail\":[],\"notif\":\"\",\"cookie_overide\":\"0\",\"cgi\":\"0\",\"owner\":false,\"tyPopOntraformSelect\":\"\"},\"permissionLevel\":\"free\"}],\"settings\":{\"domain\":null,\"visits\":null,\"conversions\":null,\"design_type\":null,\"object_type_id\":null,\"listFields\":null,\"listFieldSettings\":null,\"count\":null,\"lpsent\":null,\"lpconvert\":null,\"id\":null,\"uri_id\":null,\"rotation\":null,\"last_save\":null,\"last_auto\":null,\"autosave\":null,\"visits_0\":null,\"visits_1\":null,\"visits_2\":null,\"visits_3\":null,\"platform\":null,\"ssl_enabled\":null,\"blocks\":null,\"block_type_id\":null,\"a_sent\":null,\"a_convert\":null,\"b_sent\":null,\"b_convert\":null,\"c_sent\":null,\"c_convert\":null,\"d_sent\":null,\"d_convert\":null,\"conditionsCustomUrl\":\"\",\"singleCustomUrl\":\"\",\"notif\":\"\",\"owner\":\"\",\"ontraformInstanceTimedOrUserScroll\":{\"opfActiveCheckbox\":\"0\",\"opfSettings\":{\"popPositionValue\":\"mc\",\"onScrollTo\":\"0\",\"onScrollToValue\":\"45\",\"onVisitDuration\":\"0\",\"onVisitDurationValue\":\"2\",\"filloutRestrictions\":\"0\",\"frequencyRestrictions\":\"1\",\"frequencyRestrictionsMaxTriggers\":2,\"frequencyRestrictionsTimeframe\":1}},\"ontraformInstanceExitIntent\":{\"opfActiveCheckbox\":\"0\",\"opfSettings\":{\"popPositionValue\":\"mc\",\"filloutRestrictions\":\"0\",\"frequencyRestrictions\":\"1\",\"frequencyRestrictionsMaxTriggers\":2,\"frequencyRestrictionsTimeframe\":1}},\"page_title\":\"\",\"meta_description\":\"\",\"header_custom_script\":\"\",\"footer_custom_script\":\"\",\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.ico\",\"sort_items\":\"newest\",\"search_items\":{\"search\":\"\"}},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"96px\",\"line-height\":\"98px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"34px\",\"line-height\":\"36px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"22px\",\"line-height\":\"24px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"22px\",\"line-height\":\"24px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"20px\",\"line-height\":\"22px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"400\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#17a4d1\",\"complimentary-color\":\"#328ed3\",\"dark-color\":\"#91cd47\",\"light-color\":\"#e9f4da\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG\",\"options\":[\"backgrounds\"],\"alias\":\"background\",\"src\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}}},\"templateData\":{\"account_id\":\"0\",\"remote_item_id\":\"0\",\"status\":\"approved\",\"share_type\":\"marketplace\",\"share_subtype\":\"free\",\"purchase_conditions\":\"\",\"featured\":\"1\",\"name\":\"Launchpad\",\"price\":\"0.00\",\"type\":\"Landing Page\",\"date\":\"1441818555\",\"date_approved\":\"0\",\"approved_by\":\"0\",\"dlm\":\"1445879184\",\"description\":\"Start the countdown with Launchpad. This template is a single, above the fold page that highlights a countdown timer, an icon image, a few lines of copy and a contact form.\",\"thumbnail\":\"https:\\/\\/app.ontraport.com\\/js\\/ontraport\\/opt_assets\\/templates\\/template_thumbs\\/84_thumbnail.png\",\"resource\":{\"templateId\":84,\"status\":true,\"blocks\":[{\"alias\":\"Banner\",\"blockId\":\"20\",\"blockTypeId\":3,\"id\":\"527f664f-a6a4-8e9d-634e-26c041d2bee5\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/20_event_banner\\/\",\"scripts\":\" \\/*block scripts*\\/\",\"theme\":{\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"header-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\"h1\\\">COMING SOON<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Header\"}},{\"id\":\"subHeader-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area h2 h2 h2\\\">Yes you're on the right page, but its not quite ready.<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Sub-Header\"}},{\"id\":\"header-group\",\"type\":\"group\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"alias\":\"header group\",\"visibility\":\"visible\"}},{\"id\":\"logo-1\",\"type\":\"image\",\"for\":null,\"tag\":\"IMG\",\"attrs\":{\"src\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.47135abcc7e84179f73c77f9e8f8af1b.PNG\",\"options\":false,\"visibility\":\"visible\",\"alias\":\"Logo\"}},{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\"}},{\"id\":\"tagline-1\",\"type\":\"html\",\"for\":null,\"tag\":\"H3\",\"attrs\":{\"html\":\" JOIN OUR LIVE WEBINAR \",\"visibility\":\"hidden\",\"options\":false,\"help\":false,\"alias\":\"Tagline\"}},{\"id\":\"date-1\",\"type\":\"html\",\"for\":null,\"tag\":\"H1\",\"attrs\":{\"html\":\" DECEMBER 25, 2015 \\/\\/ 1:00PM PST \",\"visibility\":\"hidden\",\"options\":false,\"help\":false,\"alias\":\"Date\"}},{\"id\":\"button-1\",\"type\":\"button\",\"for\":null,\"tag\":\"A\",\"attrs\":{\"visibility\":\"hidden\",\"alias\":\"Button\",\"html\":\"\\n SIGN ME UP\\n \",\"href\":\"javascript:\\/\\/\",\"target\":\"_self\",\"file_name\":null,\"page_select\":null,\"url_type\":null,\"src\":null,\"link_background\":\"\",\"hover_bg\":\"\",\"hover_text\":\"\"}}],\"visibility\":true},{\"alias\":\"Countdown timer\",\"blockId\":\"119\",\"blockTypeId\":22,\"id\":\"b681e5f2-2c31-a251-f0f6-fa5bb76469d8\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/119_count_down_timer\\/\",\"scripts\":\"\\/*block scripts*\\/\\n\\n$(function(){\\n var $blockStyle119 = $( \\\".block-style-119\\\" );\\n\\n \\/* Script applies a font size and line height that are 20px larger than the specified sizes. *\\/\\n $blockStyle119.each(function( index, element ) {\\n var $style = $( \\\"<style\\/>\\\" ).addClass( \\\"block-style-119-font-style\\\"),\\n $element = $( element ),\\n $countdownItem = $element.find( \\\".block-style-119__count-down-item\\\" ).first(),\\n _itemFontSize = $countdownItem.css(\\\"fontSize\\\").replace(\\\"px\\\", \\\"\\\"),\\n _itemLineHeight = $countdownItem.css(\\\"lineHeight\\\").replace(\\\"px\\\", \\\"\\\");\\n\\n _itemFontSize = +_itemFontSize + 20;\\n\\n _itemLineHeight = +_itemLineHeight + 20;\\n\\n $element.find( \\\"style.block-style-119-font-style\\\").remove();\\n\\n $element.prepend( $style.html( \\\".h1.block-style-119__count-down-item { font-size: \\\" + _itemFontSize + \\\"px; line-height: \\\" + _itemLineHeight + \\\"px; }\\\" ) );\\n\\n });\\n});\\n\\n\",\"theme\":{\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"header-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area h3 h3 h3\\\">PAGE WILL BE READY IN :<\\/span>\\n \",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Header\"}},{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\"}}],\"visibility\":true},{\"alias\":\"Smart form\",\"blockId\":\"130\",\"blockTypeId\":10,\"id\":\"bd440856-4d06-bedf-1302-eb5f220c29e9\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/130_horizontal_text_and_form\\/\",\"scripts\":\" \\/*block scripts*\\/\",\"theme\":{\"spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-bottom\":\"100px\"}}}},\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\",\"fixed-width-default\":false}},{\"id\":\"bodyText-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area body-text body-text\\\">Enter you name & Email and we will let you know when its ready.<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Body Text\"}}],\"visibility\":true,\"direction\":1,\"settings\":{\"opt_in_settings\":\"single\",\"conditionsCustomUrl\":\"\",\"conditionsRedirectRadioButtons\":\"default\",\"form_contacts_thank_you_page_redir\":\"0\",\"singleCustomUrl\":\"\",\"thankYouRedirectRadioButtons\":\"default\",\"singleLandPageSelect\":\"\",\"conditionsLandPageSelect\":\"\",\"conditionsPopOntraformSelect\":\"\",\"confirmation_email\":\"\",\"tags\":[],\"sequences\":[],\"rules_default\":[],\"rules_transaction_fail\":[],\"notif\":\"\",\"cookie_overide\":\"0\",\"cgi\":\"0\",\"owner\":false,\"tyPopOntraformSelect\":\"\"}}],\"settings\":{\"domain\":null,\"visits\":null,\"conversions\":null,\"design_type\":null,\"listFields\":null,\"listFieldSettings\":null,\"count\":null,\"lpsent\":null,\"lpconvert\":null,\"id\":null,\"uri_id\":null,\"rotation\":null,\"last_save\":null,\"last_auto\":null,\"autosave\":null,\"visits_0\":null,\"visits_1\":null,\"visits_2\":null,\"visits_3\":null,\"platform\":null,\"ssl_enabled\":null,\"type\":\"landing_page\",\"blocks\":null,\"block_type_id\":null,\"a_sent\":null,\"a_convert\":null,\"b_sent\":null,\"b_convert\":null,\"c_sent\":null,\"c_convert\":null,\"d_sent\":null,\"d_convert\":null,\"object_type_id\":null,\"conditionsCustomUrl\":\"\",\"singleCustomUrl\":\"\",\"page_title\":\"\",\"meta_description\":\"\",\"header_custom_script\":\"\",\"footer_custom_script\":\"\",\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.ico\",\"notif\":\"\",\"owner\":\"\",\"opt_canvas\":[],\"opt_palette\":[]},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"96px\",\"line-height\":\"98px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"34px\",\"line-height\":\"36px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"22px\",\"line-height\":\"24px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"22px\",\"line-height\":\"24px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"20px\",\"line-height\":\"22px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"400\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#17a4d1\",\"complimentary-color\":\"#328ed3\",\"dark-color\":\"#91cd47\",\"light-color\":\"#e9f4da\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG\",\"options\":[\"backgrounds\"],\"alias\":\"background\",\"src\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}}}},\"industries\":null,\"types\":null,\"tags\":null,\"opt_template_categories\":\" featured free\",\"id\":\"84\",\"displayObjectNotFoundErrors\":true},\"version\":\"v2\",\"mergedData\":\"<!DOCTYPE html><html><head> <!-- This page was built using ONTRApages. Create and host your pages free at ONTRApages.com or learn more about the most powerful business and marketing automation platform designed for entrepreneurs at ONTRAPORT.com --> <meta charset=\\\"utf-8\\\"> <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/skeleton\\/css\\/normalize.css\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/skeleton\\/css\\/skeleton.css\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/skeleton\\/css\\/skeleton.ontraport.css\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/skeleton\\/css\\/fonts.css\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/css\\/wysihtml5-textalign.css\\\"> <!--OPT-CUSTOM-HEADER-SCRIPT--><style class=\\\"theme-style\\\">h1, .h1.h1 { font-family: 'Dosis', sans-serif; font-size: 96px; line-height: 98px; font-weight: 100; text-decoration: inherit;}h2, .h2.h2 { font-family: 'Roboto', sans-serif; font-size: 34px; line-height: 36px; font-weight: 100; font-style: italic; text-decoration: inherit;}h3, .h3.h3 { font-family: 'Roboto', sans-serif; font-size: 22px; line-height: 24px; font-weight: 400; text-decoration: inherit;}.label.label { font-family: 'Dosis', sans-serif; font-size: 16px; line-height: 18px; font-weight: 600; text-decoration: inherit;}.button.button { font-family: 'Dosis', sans-serif; font-size: 22px; line-height: 24px; font-weight: 600; text-decoration: inherit;}.large-body-text.large-body-text { font-family: 'Roboto', sans-serif; font-size: 20px; line-height: 22px; font-weight: 400; text-decoration: inherit;}.body-text.body-text { font-family: 'Roboto', sans-serif; font-size: 16px; line-height: 18px; font-weight: 100; text-decoration: inherit;}blockquote, .blockquote { font-family: 'Dosis', sans-serif; font-size: 16px; line-height: 18px; font-weight: 400; font-style: italic; text-decoration: inherit;}.bb.bb.bb { color: #91cd47;}.v.v.v { color: #ffffff;}.ak.ak.ak { background-color: #ffffff;}.i.i.i { background-color: #91cd47;}.at.at.at, .at.at.at a { color: #ffffff; background-color: #17a4d1;}.q.q.q, .q.q.q a { color: #17a4d1; background-color: #ffffff;}.aw.aw.aw { background-color: #e9f4da;}.as.as.as { border-color: #91cd47;}.al.al { color: #91cd47;}.al.al.al:hover { color: #17a4d1;}.ba.ba.ba { color: #17a4d1;}.ba.ba.ba:hover { color: #91cd47;}hr.bc.bc.bc, span.bc.bc.bc, h1.bc.bc.bc, h2.bc.bc.bc, h3.bc.bc.bc, p.bc.bc.bc, .an.an.an { color: #17a4d1;}hr.bc.bc.bc, table.bc.bc.bc, div.bc.bc.bc, a.bc.bc.bc, .x.x.x { background-color: #17a4d1;}hr.bc.bc.bc, img.bc.bc.bc, a.bc.bc.bc, div.bc.bc.bc, .aj.aj.aj { border-color: #17a4d1;}hr.am.am.am, span.am.am.am, h1.am.am.am, h2.am.am.am, h3.am.am.am, p.am.am.am, .u.u.u { color: #328ed3;}hr.am.am.am, table.am.am.am, div.am.am.am, a.am.am.am, .h.h.h { background-color: #328ed3;}hr.am.am.am, img.am.am.am, a.am.am.am, div.am.am.am, .o.o.o { border-color: #328ed3;}hr.bf.bf.bf, span.bf.bf.bf, h1.bf.bf.bf, h2.bf.bf.bf, h3.bf.bf.bf, p.bf.bf.bf, .ax.ax.ax { color: #91cd47;}hr.bf.bf.bf, table.bf.bf.bf, div.bf.bf.bf, a.bf.bf.bf, .ah.ah.ah { background-color: #91cd47;}hr.bf.bf.bf, img.bf.bf.bf, a.bf.bf.bf, div.bf.bf.bf, .aq.aq.aq { border-color: #91cd47;}hr.be.be.be, span.be.be.be, h1.be.be.be, h2.be.be.be, h3.be.be.be, p.be.be.be, .ar.ar.ar { color: #e9f4da;}hr.be.be.be, table.be.be.be, div.be.be.be, a.be.be.be, .ad.ad.ad { background-color: #e9f4da;}hr.be.be.be, img.be.be.be, a.be.be.be, div.be.be.be, .ao.ao.ao { border-color: #e9f4da;}hr.bd.bd.bd, span.bd.bd.bd, h1.bd.bd.bd, h2.bd.bd.bd, h3.bd.bd.bd, p.bd.bd.bd, .au.au.au { color: #ffffff;}hr.bd.bd.bd, table.bd.bd.bd, div.bd.bd.bd, a.bd.bd.bd, .ab.ab.ab { background-color: #ffffff;}hr.bd.bd.bd, img.bd.bd.bd, a.bd.bd.bd, div.bd.bd.bd, .ap.ap.ap { border-color: #ffffff;}a { color: #17a4d1; text-decoration: none;}a:hover { text-decoration: underline;}.spacing { padding-top: 20px; padding-bottom: 20px;}<\\/style><style class=\\\"block-theme-css\\\">.b .bb.bb.bb { color: #ffffff;}.b .v.v.v { color: #17a4d1;}.b .ak.ak.ak { background-color: #17a4d1;}.b .i.i.i { background-color: #ffffff;}.b .at.at.at,.b .at.at.at a { color: #17a4d1; background-color: #ffffff;}.b .q.q.q,.b .q.q.q a { color: #ffffff; background-color: #17a4d1;}.b .aw.aw.aw { background-color: #ffffff;}.b .as.as.as { border-color: #ffffff;}.b .al.al.al { color: #ffffff;}.b .al.al.al:hover { color: #91cd47;}.b .ba.ba.ba { color: #ffffff;}.b .ba.ba.ba:hover { color: #91cd47;}.b hr.bc.bc.bc,.b span.bc.bc.bc,.b h1.bc.bc.bc,.b h2.bc.bc.bc,.b h3.bc.bc.bc,.b p.bc.bc.bc,.b .an.an.an { color: #e9f4da;}.b hr.bc.bc.bc,.b table.bc.bc.bc,.b div.bc.bc.bc,.b a.bc.bc.bc,.b .x.x.x { background-color: #e9f4da;}.b hr.bc.bc.bc,.b img.bc.bc.bc,.b a.bc.bc.bc,.b div.bc.bc.bc,.b .aj.aj.aj { border-color: #e9f4da;}.b hr.am.am.am,.b span.am.am.am,.b h1.am.am.am,.b h2.am.am.am,.b h3.am.am.am,.b p.am.am.am,.b .u.u.u { color: #328ed3;}.b hr.am.am.am,.b table.am.am.am,.b div.am.am.am,.b a.am.am.am,.b .h.h.h { background-color: #328ed3;}.b hr.am.am.am,.b img.am.am.am,.b a.am.am.am,.b div.am.am.am,.b .o.o.o { border-color: #328ed3;}.b hr.bf.bf.bf,.b span.bf.bf.bf,.b h1.bf.bf.bf,.b h2.bf.bf.bf,.b h3.bf.bf.bf,.b p.bf.bf.bf,.b .ax.ax.ax { color: #ffffff;}.b hr.bf.bf.bf,.b table.bf.bf.bf,.b div.bf.bf.bf,.b a.bf.bf.bf,.b .ah.ah.ah { background-color: #ffffff;}.b hr.bf.bf.bf,.b img.bf.bf.bf,.b a.bf.bf.bf,.b div.bf.bf.bf,.b .aq.aq.aq { border-color: #ffffff;}.b hr.be.be.be,.b span.be.be.be,.b h1.be.be.be,.b h2.be.be.be,.b h3.be.be.be,.b p.be.be.be,.b .ar.ar.ar { color: #e9f4da;}.b hr.be.be.be,.b table.be.be.be,.b div.be.be.be,.b a.be.be.be,.b .ad.ad.ad { background-color: #e9f4da;}.b hr.be.be.be,.b img.be.be.be,.b a.be.be.be,.b div.be.be.be,.b .ao.ao.ao { border-color: #e9f4da;}.b hr.bd.bd.bd,.b span.bd.bd.bd,.b h1.bd.bd.bd,.b h2.bd.bd.bd,.b h3.bd.bd.bd,.b p.bd.bd.bd,.b .au.au.au { color: #17a4d1;}.b hr.bd.bd.bd,.b table.bd.bd.bd,.b div.bd.bd.bd,.b a.bd.bd.bd,.b .ab.ab.ab { background-color: #17a4d1;}.b hr.bd.bd.bd,.b img.bd.bd.bd,.b a.bd.bd.bd,.b div.bd.bd.bd,.b .ap.ap.ap { border-color: #17a4d1;}.b a { color: #17a4d1; text-decoration: none;}.b a:hover { text-decoration: underline;}.c .bb.bb.bb { color: #ffffff;}.c .v.v.v { color: #17a4d1;}.c .ak.ak.ak { background-color: #17a4d1;}.c .i.i.i { background-color: #ffffff;}.c .at.at.at,.c .at.at.at a { color: #17a4d1; background-color: #ffffff;}.c .q.q.q,.c .q.q.q a { color: #ffffff; background-color: #17a4d1;}.c .aw.aw.aw { background-color: #ffffff;}.c .as.as.as { border-color: #ffffff;}.c .al.al.al { color: #ffffff;}.c .al.al.al:hover { color: #91cd47;}.c .ba.ba.ba { color: #ffffff;}.c .ba.ba.ba:hover { color: #91cd47;}.c hr.bc.bc.bc,.c span.bc.bc.bc,.c h1.bc.bc.bc,.c h2.bc.bc.bc,.c h3.bc.bc.bc,.c p.bc.bc.bc,.c .an.an.an { color: #e9f4da;}.c hr.bc.bc.bc,.c table.bc.bc.bc,.c div.bc.bc.bc,.c a.bc.bc.bc,.c .x.x.x { background-color: #e9f4da;}.c hr.bc.bc.bc,.c img.bc.bc.bc,.c a.bc.bc.bc,.c div.bc.bc.bc,.c .aj.aj.aj { border-color: #e9f4da;}.c hr.am.am.am,.c span.am.am.am,.c h1.am.am.am,.c h2.am.am.am,.c h3.am.am.am,.c p.am.am.am,.c .u.u.u { color: #328ed3;}.c hr.am.am.am,.c table.am.am.am,.c div.am.am.am,.c a.am.am.am,.c .h.h.h { background-color: #328ed3;}.c hr.am.am.am,.c img.am.am.am,.c a.am.am.am,.c div.am.am.am,.c .o.o.o { border-color: #328ed3;}.c hr.bf.bf.bf,.c span.bf.bf.bf,.c h1.bf.bf.bf,.c h2.bf.bf.bf,.c h3.bf.bf.bf,.c p.bf.bf.bf,.c .ax.ax.ax { color: #ffffff;}.c hr.bf.bf.bf,.c table.bf.bf.bf,.c div.bf.bf.bf,.c a.bf.bf.bf,.c .ah.ah.ah { background-color: #ffffff;}.c hr.bf.bf.bf,.c img.bf.bf.bf,.c a.bf.bf.bf,.c div.bf.bf.bf,.c .aq.aq.aq { border-color: #ffffff;}.c hr.be.be.be,.c span.be.be.be,.c h1.be.be.be,.c h2.be.be.be,.c h3.be.be.be,.c p.be.be.be,.c .ar.ar.ar { color: #e9f4da;}.c hr.be.be.be,.c table.be.be.be,.c div.be.be.be,.c a.be.be.be,.c .ad.ad.ad { background-color: #e9f4da;}.c hr.be.be.be,.c img.be.be.be,.c a.be.be.be,.c div.be.be.be,.c .ao.ao.ao { border-color: #e9f4da;}.c hr.bd.bd.bd,.c span.bd.bd.bd,.c h1.bd.bd.bd,.c h2.bd.bd.bd,.c h3.bd.bd.bd,.c p.bd.bd.bd,.c .au.au.au { color: #17a4d1;}.c hr.bd.bd.bd,.c table.bd.bd.bd,.c div.bd.bd.bd,.c a.bd.bd.bd,.c .ab.ab.ab { background-color: #17a4d1;}.c hr.bd.bd.bd,.c img.bd.bd.bd,.c a.bd.bd.bd,.c div.bd.bd.bd,.c .ap.ap.ap { border-color: #17a4d1;}.c a { color: #17a4d1; text-decoration: none;}.c a:hover { text-decoration: underline;}.a .spacing { padding-bottom: 100px;}.a .bb.bb.bb { color: #ffffff;}.a .v.v.v { color: #17a4d1;}.a .ak.ak.ak { background-color: #17a4d1;}.a .i.i.i { background-color: #ffffff;}.a .at.at.at,.a .at.at.at a { color: #17a4d1; background-color: #ffffff;}.a .q.q.q,.a .q.q.q a { color: #ffffff; background-color: #17a4d1;}.a .aw.aw.aw { background-color: #ffffff;}.a .as.as.as { border-color: #ffffff;}.a .al.al.al { color: #ffffff;}.a .al.al.al:hover { color: #91cd47;}.a .ba.ba.ba { color: #ffffff;}.a .ba.ba.ba:hover { color: #91cd47;}.a hr.bc.bc.bc,.a span.bc.bc.bc,.a h1.bc.bc.bc,.a h2.bc.bc.bc,.a h3.bc.bc.bc,.a p.bc.bc.bc,.a .an.an.an { color: #e9f4da;}.a hr.bc.bc.bc,.a table.bc.bc.bc,.a div.bc.bc.bc,.a a.bc.bc.bc,.a .x.x.x { background-color: #e9f4da;}.a hr.bc.bc.bc,.a img.bc.bc.bc,.a a.bc.bc.bc,.a div.bc.bc.bc,.a .aj.aj.aj { border-color: #e9f4da;}.a hr.am.am.am,.a span.am.am.am,.a h1.am.am.am,.a h2.am.am.am,.a h3.am.am.am,.a p.am.am.am,.a .u.u.u { color: #328ed3;}.a hr.am.am.am,.a table.am.am.am,.a div.am.am.am,.a a.am.am.am,.a .h.h.h { background-color: #328ed3;}.a hr.am.am.am,.a img.am.am.am,.a a.am.am.am,.a div.am.am.am,.a .o.o.o { border-color: #328ed3;}.a hr.bf.bf.bf,.a span.bf.bf.bf,.a h1.bf.bf.bf,.a h2.bf.bf.bf,.a h3.bf.bf.bf,.a p.bf.bf.bf,.a .ax.ax.ax { color: #ffffff;}.a hr.bf.bf.bf,.a table.bf.bf.bf,.a div.bf.bf.bf,.a a.bf.bf.bf,.a .ah.ah.ah { background-color: #ffffff;}.a hr.bf.bf.bf,.a img.bf.bf.bf,.a a.bf.bf.bf,.a div.bf.bf.bf,.a .aq.aq.aq { border-color: #ffffff;}.a hr.be.be.be,.a span.be.be.be,.a h1.be.be.be,.a h2.be.be.be,.a h3.be.be.be,.a p.be.be.be,.a .ar.ar.ar { color: #e9f4da;}.a hr.be.be.be,.a table.be.be.be,.a div.be.be.be,.a a.be.be.be,.a .ad.ad.ad { background-color: #e9f4da;}.a hr.be.be.be,.a img.be.be.be,.a a.be.be.be,.a div.be.be.be,.a .ao.ao.ao { border-color: #e9f4da;}.a hr.bd.bd.bd,.a span.bd.bd.bd,.a h1.bd.bd.bd,.a h2.bd.bd.bd,.a h3.bd.bd.bd,.a p.bd.bd.bd,.a .au.au.au { color: #17a4d1;}.a hr.bd.bd.bd,.a table.bd.bd.bd,.a div.bd.bd.bd,.a a.bd.bd.bd,.a .ab.ab.ab { background-color: #17a4d1;}.a hr.bd.bd.bd,.a img.bd.bd.bd,.a a.bd.bd.bd,.a div.bd.bd.bd,.a .ap.ap.ap { border-color: #17a4d1;}.a a { color: #17a4d1; text-decoration: none;}.a a:hover { text-decoration: underline;}<\\/style><link rel=\\\"shortcut icon\\\" type=\\\"image\\/x-icon\\\" href=\\\"\\/\\/app.ontraport.com\\/favicon.ico\\\"><link rel=\\\"dns-prefetch\\\" href=\\\"https:\\/\\/optassets.ontraport.com\\\"><link rel=\\\"dns-prefetch\\\" href=\\\"\\/\\/ajax.googleapis.com\\\"><link rel=\\\"dns-prefetch\\\" href=\\\"\\/\\/app.ontraport.com\\\"><link rel=\\\"dns-prefetch\\\" href=\\\"\\/\\/optassets.ontraport.com\\\"><\\/head><body> <div class=\\\"opt-container\\\" opt-id=\\\"template-background\\\" opt-type=\\\"background\\\" style=\\\"background-size: cover; background-image: url("https:\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG");\\\" opt-options=\\\"["backgrounds"]\\\" opt-alias=\\\"background\\\"><div><div class=\\\"row b\\\" opt-id=\\\"527f664f-a6a4-8e9d-634e-26c041d2bee5\\\" opt-type=\\\"block\\\" opt-block-type-id=\\\"3\\\" opt-block-style-id=\\\"20\\\"><div class=\\\"block-style\\\"><style class=\\\"block-css\\\">\\/*block styles*\\/ .az { text-align: center; width: 100%; background-position: center center;} .af { max-width: 100%;} .ac,.s,.z,.p { margin-bottom: 20px;} .l { padding: 40px 0;} .r { margin-bottom: 40px; margin-top:0;}.j { margin-bottom: 0;} .r,.j { border: 0; height: 1px;} .w { display: block;} .ae { margin-top: 30px; padding-top: 15px; padding-bottom: 15px; min-width: 150px;}<\\/style> <div class=\\\"block-wrapper az ak spacing\\\" style=\\\"background-color: transparent; background-image: none;\\\"> <div class=\\\"container body-text\\\"> <div aria-description=\\\"Event Banner\\\"> <img src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.47135abcc7e84179f73c77f9e8f8af1b.PNG\\\" class=\\\"af\\\"> <div class=\\\"l\\\"> <hr class=\\\"ah r\\\"> <div class=\\\"ac bb\\\"><span class=\\\"h1\\\">COMING SOON<\\/span><\\/div> <div class=\\\"s bb\\\"><span class=\\\" opt-palette-editor__text-area h2 h2 h2\\\">Yes you're on the right page, but its not quite ready.<\\/span><\\/div> <hr class=\\\"ah j\\\"> <\\/div> <\\/div> <\\/div><\\/div> <\\/div><\\/div><div class=\\\"row c\\\" opt-id=\\\"b681e5f2-2c31-a251-f0f6-fa5bb76469d8\\\" opt-type=\\\"block\\\" opt-block-type-id=\\\"22\\\" opt-block-style-id=\\\"119\\\"><div class=\\\"block-style\\\"><style class=\\\"block-css\\\">\\/*block styles*\\/ .aa { max-width: 100%; margin-bottom: 10px;} .d { display: block;} .f { list-style: none; max-width: 85%; margin-left: auto; margin-right: auto; word-wrap: break-word;} .f li { display: inline-block; margin-right: 30px; min-width: 125px;} .g { margin-bottom: 0;}<\\/style> <div class=\\\"block-wrapper ak block-style-119 spacing\\\" style=\\\"background-color: transparent; background-image: none;\\\"> <div class=\\\"container opt-center\\\"> <div class=\\\"aa bb\\\"><span class=\\\" opt-palette-editor__text-area h3 h3 h3\\\">PAGE WILL BE READY IN :<\\/span> <\\/div> <ontraport-countdown month=\\\"5\\\" redirect_href=\\\"#\\\" class=\\\"d countdown\\\" day=\\\"12\\\" then=\\\"1494572400000\\\"> <ul class=\\\"f\\\"> <li><p class=\\\"ce-days bb h1 g\\\">29<\\/p> <span class=\\\"bb h3\\\">DAYS<\\/span><\\/li> <li><p class=\\\"ce-hours bb h1 g\\\">14<\\/p> <span class=\\\"bb h3\\\">HOURS<\\/span><\\/li> <li><p class=\\\"ce-minutes bb h1 g\\\">16<\\/p> <span class=\\\"bb h3\\\">MINUTES<\\/span><\\/li> <li><p class=\\\"ce-seconds bb h1 g\\\">34<\\/p> <span class=\\\"bb h3\\\">SECONDS<\\/span><\\/li> <\\/ul> <\\/ontraport-countdown> <\\/div><\\/div> <\\/div><\\/div><div class=\\\"row a\\\" opt-id=\\\"bd440856-4d06-bedf-1302-eb5f220c29e9\\\" opt-type=\\\"block\\\" opt-block-type-id=\\\"10\\\" opt-block-style-id=\\\"130\\\"><div class=\\\"block-style\\\"><style class=\\\"block-css\\\">.k { display: none;} .ay { display: inline;} .t { margin-right: 5px; position: relative; top: -1px;} .ai { margin-bottom: 25px;} .ag { margin-bottom: 0;} .m { display: inline-block; margin-right: 1%; width: 35%; vertical-align: top;} .n { display: inline;} .e { display: inline-block;} .y input[type=\\\"email\\\"], .y input[type=\\\"number\\\"], .y input[type=\\\"search\\\"], .y input[type=\\\"text\\\"], .y input[type=\\\"tel\\\"], .y input[type=\\\"url\\\"], .y input[type=\\\"password\\\"], .y input[type=\\\"date\\\"], .y textarea,.y select { width: 100%; display: inline-block;} .av label { word-wrap: break-word;} .y input[type=\\\"submit\\\"].button-style { padding: 0 20px; border-radius: 3px; text-decoration: none; letter-spacing: inherit; text-transform: none; border: 0; height: 38px; line-height: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; vertical-align: middle; -webkit-transition: opacity .4s ease-in-out; transition: opacity .4s ease-in-out;}.y input[type=\\\"submit\\\"].button-style:hover { opacity: .9;} @media (max-width: 1200px) { .block-style-130__columns.block-style-130__columns { text-align: center; width: 100%; } .m { width: 24%; }} @media (max-width: 549px) { .m { width: 100%; } }.opt-page-size-mobile .m { width: 100%;} <\\/style> <div class=\\\"block-wrapper block-style-130 ak spacing\\\" style=\\\"background-color: transparent; background-image: none;\\\"> <div class=\\\"container\\\"> <div class=\\\"y\\\"> <div class=\\\"row\\\"> <div class=\\\"six columns block-style-130__columns\\\"> <div class=\\\"ai bb\\\"><span class=\\\" opt-palette-editor__text-area body-text body-text\\\">Enter you name & Email and we will let you know when its ready.<\\/span><\\/div> <\\/div> <div class=\\\"six columns block-style-130__columns\\\"> <form role=\\\"form\\\" accept-charset=\\\"UTF-8\\\" method=\\\"post\\\" action=\\\"[system_form_processor_bd440856-4d06-bedf-1302-eb5f220c29e9]\\\" class=\\\"ag opt-center\\\"> <div class=\\\"n\\\"> <div class=\\\"m\\\"> <label class=\\\"bb label k\\\" for=\\\"firstname\\\" opt-for=\\\"firstname-input\\\">First Name<\\/label> <input class=\\\"aw\\\" type=\\\"text\\\" name=\\\"firstname\\\" id=\\\"firstname\\\" placeholder=\\\"First Name\\\"> <\\/div> <div class=\\\"m\\\"> <label class=\\\"bb label k\\\" for=\\\"email\\\" opt-for=\\\"email-input\\\">Email<\\/label> <input class=\\\"aw\\\" type=\\\"email\\\" name=\\\"email\\\" id=\\\"email\\\" placeholder=\\\"Email\\\" required=\\\"required\\\"> <\\/div> <\\/div> <div class=\\\"e\\\"> <input type=\\\"submit\\\" value=\\\"Submit\\\" class=\\\"button button-style at\\\"> <\\/div> <span style=\\\"display: none;\\\">[system_form_fields_bd440856-4d06-bedf-1302-eb5f220c29e9]<\\/span> <\\/form> <\\/div> <\\/div> <\\/div> <\\/div> <\\/div> <\\/div><\\/div><\\/div> <!--OPT-AD-BLOCK-HERE--> <\\/div> <script src=\\\"\\/\\/ajax.googleapis.com\\/ajax\\/libs\\/jquery\\/1.7.1\\/jquery.min.js\\\"><\\/script> <script class=\\\"opt-page-script\\\" type=\\\"text\\/javascript\\\" src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/jQueryPageBackgroundPro\\/js\\/libs\\/underscore.js\\\"><\\/script> <span style=\\\"display: none;\\\" class=\\\"opt-system-scripts\\\">[system_scripts]<\\/span> <span style=\\\"display: none;\\\" class=\\\"opt-form-scripts\\\">[system_form_scripts]<\\/span> <script type=\\\"text\\/javascript\\\" class=\\\"opt-page-script opt-form-scripts\\\" src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/jQueryCloneVal\\/jquery-cloneVal.js\\\"><\\/script> <script src=\\\"\\/\\/app.ontraport.com\\/js\\/globalize\\/globalize.js\\\"><\\/script> <script type=\\\"text\\/javascript\\\" class=\\\"opt-page-script opt-document-register-element-driver\\\" src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/templates\\/custom-elements\\/document-register-element\\/build\\/document-register-element.js\\\"><\\/script> <script type=\\\"text\\/javascript\\\" class=\\\"opt-page-script opt-countdown-script\\\" src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/templates\\/custom-elements\\/countdown\\/countdown.js\\\"><\\/script> <span style=\\\"display: none;\\\">[bot_catcher]<\\/span> <!--OPT-CUSTOM-FOOTER-SCRIPT--><script> <\\/script><\\/body><\\/html>\",\"formBlockIds\":[\"bd440856-4d06-bedf-1302-eb5f220c29e9\"]},{\"templateId\":false,\"status\":false,\"blocks\":[],\"settings\":{\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.png\"},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"50px\",\"line-height\":\"50px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"30px\",\"line-height\":\"32px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"20px\",\"line-height\":\"20px\",\"font-weight\":\"900\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"16px\",\"line-height\":\"16px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"14px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"18px\",\"line-height\":\"24px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#1e88e5\",\"complimentary-color\":\"#41baff\",\"dark-color\":\"#333333\",\"light-color\":\"#f3efea\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"#ffffff\",\"options\":[\"backgrounds\"],\"alias\":\"background\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}},\"theme_dimensions\":{\"widthType\":\"option\",\"width\":\"100%\",\"height\":null},\"border\":{\"color\":\"#000000\",\"size\":\"0px\"}},\"mergedData\":\"\",\"formBlockIds\":[]},{\"templateId\":false,\"status\":false,\"blocks\":[],\"settings\":{\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.png\"},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"50px\",\"line-height\":\"50px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"30px\",\"line-height\":\"32px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"20px\",\"line-height\":\"20px\",\"font-weight\":\"900\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"16px\",\"line-height\":\"16px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"14px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"18px\",\"line-height\":\"24px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#1e88e5\",\"complimentary-color\":\"#41baff\",\"dark-color\":\"#333333\",\"light-color\":\"#f3efea\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"#ffffff\",\"options\":[\"backgrounds\"],\"alias\":\"background\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}},\"theme_dimensions\":{\"widthType\":\"option\",\"width\":\"100%\",\"height\":null},\"border\":{\"color\":\"#000000\",\"size\":\"0px\"}},\"mergedData\":\"\",\"formBlockIds\":[]},{\"templateId\":false,\"status\":false,\"blocks\":[],\"settings\":{\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.png\"},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"50px\",\"line-height\":\"50px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"30px\",\"line-height\":\"32px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"20px\",\"line-height\":\"20px\",\"font-weight\":\"900\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"16px\",\"line-height\":\"16px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"14px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"18px\",\"line-height\":\"24px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#1e88e5\",\"complimentary-color\":\"#41baff\",\"dark-color\":\"#333333\",\"light-color\":\"#f3efea\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"#ffffff\",\"options\":[\"backgrounds\"],\"alias\":\"background\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}},\"theme_dimensions\":{\"widthType\":\"option\",\"width\":\"100%\",\"height\":null},\"border\":{\"color\":\"#000000\",\"size\":\"0px\"}},\"mergedData\":\"\",\"formBlockIds\":[]}]",
"design_type": "3",
"name": "Welcome",
"rotation": "0",
"last_save": "0",
"last_auto": "0",
"autosave": "",
"visits_0": "0",
"visits_1": "0",
"visits_2": "0",
"visits_3": "0",
"platform": "0",
"domain": null,
"ssl_enabled": "0",
"date": "1510704945",
"dlm": "1510704945"
}
Landing page attributes
Attribute | Type | Description |
---|---|---|
id |
integer | The landing page’s ID. |
uri_id |
integer | The hosted URL’s ID. |
resource |
blob | JSON encoded data containing the entire structure of the landing page. |
design_type |
integer | The landing page’s design type. Integer codes are mapped as follows:0 => HTML 1 => Code Mode 2 => Redirect 3 => ONTRApages |
name |
string | The landing page’s name. |
rotation |
integer | If using split testing, the ID of the next split test in line for rotation. |
last_save |
timestamp | The time and date the landing page was last manually saved. |
last_auto |
timestamp | The time and date the landing page was last automatically saved. |
autosave |
longtext | The content of the last autosaved data. |
visits_0 |
integer | The count of visits for split test A. |
visits_1 |
integer | The count of visits for split test B. |
visits_2 |
integer | The count of visits for split test C. |
visits_3 |
integer | The count of visits for split test D. |
domain |
string | The URL where the landing page is hosted. |
ssl_enabled |
integer | A flag designating whether or not ssl certification is enabled. Values can be 0 or 1 . |
date |
timestamp | The date and time the landing page was created measured in seconds from the Unix Epoch. Note that this field will not contain data for any forms created prior to November 7, 2017. |
dlm |
timestamp | The data and time the landing page was last modified measured in seconds from the Unix Epoch. |
Retrieve a specific landing page
curl -X GET 'https://api.ontraport.com/1/LandingPage?id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1
);
$response = $client->landingpage()->retrieveSingle($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "1",
"uri_id": null,
"resource": "[{\"templateId\":84,\"status\":true,\"blocks\":[{\"alias\":\"Banner\",\"blockId\":\"20\",\"blockTypeId\":3,\"id\":\"527f664f-a6a4-8e9d-634e-26c041d2bee5\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/20_event_banner\\/\",\"scripts\":\" \\/*block scripts*\\/\",\"theme\":{\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"header-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\"h1\\\">COMING SOON<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Header\"}},{\"id\":\"subHeader-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area h2 h2 h2\\\">Yes you're on the right page, but its not quite ready.<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Sub-Header\"}},{\"id\":\"header-group\",\"type\":\"group\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"alias\":\"header group\",\"visibility\":\"visible\"}},{\"id\":\"logo-1\",\"type\":\"image\",\"for\":null,\"tag\":\"IMG\",\"attrs\":{\"src\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.47135abcc7e84179f73c77f9e8f8af1b.PNG\",\"options\":false,\"visibility\":\"visible\",\"alias\":\"Logo\"}},{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\"}},{\"id\":\"tagline-1\",\"type\":\"html\",\"for\":null,\"tag\":\"H3\",\"attrs\":{\"html\":\" JOIN OUR LIVE WEBINAR \",\"visibility\":\"hidden\",\"options\":false,\"help\":false,\"alias\":\"Tagline\"}},{\"id\":\"date-1\",\"type\":\"html\",\"for\":null,\"tag\":\"H1\",\"attrs\":{\"html\":\" DECEMBER 25, 2015 \\/\\/ 1:00PM PST \",\"visibility\":\"hidden\",\"options\":false,\"help\":false,\"alias\":\"Date\"}},{\"id\":\"button-1\",\"type\":\"button\",\"for\":null,\"tag\":\"A\",\"attrs\":{\"visibility\":\"hidden\",\"alias\":\"Button\",\"html\":\"\\n SIGN ME UP\\n \",\"href\":\"javascript:\\/\\/\",\"target\":\"_self\",\"file_name\":null,\"page_select\":null,\"url_type\":null,\"src\":null,\"link_background\":\"\",\"hover_bg\":\"\",\"hover_text\":\"\"}}],\"visibility\":true,\"permissionLevel\":\"free\"},{\"alias\":\"Countdown timer\",\"blockId\":\"119\",\"blockTypeId\":22,\"id\":\"b681e5f2-2c31-a251-f0f6-fa5bb76469d8\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/119_count_down_timer\\/\",\"scripts\":\"\\/*block scripts*\\/\\n\\n\",\"theme\":{\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"header-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area h3 h3 h3\\\">PAGE WILL BE READY IN :<\\/span>\\n \",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Header\"}},{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\"}}],\"visibility\":true,\"permissionLevel\":\"premium\"},{\"alias\":\"Smart form\",\"blockId\":\"130\",\"blockTypeId\":10,\"id\":\"bd440856-4d06-bedf-1302-eb5f220c29e9\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/130_horizontal_text_and_form\\/\",\"scripts\":\" \\/*block scripts*\\/\",\"theme\":{\"spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-bottom\":\"100px\"}}}},\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\",\"fixed-width-default\":false}},{\"id\":\"bodyText-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area body-text body-text\\\">Enter you name & Email and we will let you know when its ready.<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Body Text\"}}],\"visibility\":true,\"direction\":1,\"settings\":{\"opt_in_settings\":\"single\",\"conditionsCustomUrl\":\"\",\"conditionsRedirectRadioButtons\":\"default\",\"form_contacts_thank_you_page_redir\":\"0\",\"singleCustomUrl\":\"\",\"thankYouRedirectRadioButtons\":\"default\",\"singleLandPageSelect\":\"\",\"conditionsLandPageSelect\":\"\",\"conditionsPopOntraformSelect\":\"\",\"confirmation_email\":\"\",\"tags\":[],\"sequences\":[],\"rules_default\":[],\"rules_transaction_fail\":[],\"notif\":\"\",\"cookie_overide\":\"0\",\"cgi\":\"0\",\"owner\":false,\"tyPopOntraformSelect\":\"\"},\"permissionLevel\":\"free\"}],\"settings\":{\"domain\":null,\"visits\":null,\"conversions\":null,\"design_type\":null,\"object_type_id\":null,\"listFields\":null,\"listFieldSettings\":null,\"count\":null,\"lpsent\":null,\"lpconvert\":null,\"id\":null,\"uri_id\":null,\"rotation\":null,\"last_save\":null,\"last_auto\":null,\"autosave\":null,\"visits_0\":null,\"visits_1\":null,\"visits_2\":null,\"visits_3\":null,\"platform\":null,\"ssl_enabled\":null,\"blocks\":null,\"block_type_id\":null,\"a_sent\":null,\"a_convert\":null,\"b_sent\":null,\"b_convert\":null,\"c_sent\":null,\"c_convert\":null,\"d_sent\":null,\"d_convert\":null,\"conditionsCustomUrl\":\"\",\"singleCustomUrl\":\"\",\"notif\":\"\",\"owner\":\"\",\"ontraformInstanceTimedOrUserScroll\":{\"opfActiveCheckbox\":\"0\",\"opfSettings\":{\"popPositionValue\":\"mc\",\"onScrollTo\":\"0\",\"onScrollToValue\":\"45\",\"onVisitDuration\":\"0\",\"onVisitDurationValue\":\"2\",\"filloutRestrictions\":\"0\",\"frequencyRestrictions\":\"1\",\"frequencyRestrictionsMaxTriggers\":2,\"frequencyRestrictionsTimeframe\":1}},\"ontraformInstanceExitIntent\":{\"opfActiveCheckbox\":\"0\",\"opfSettings\":{\"popPositionValue\":\"mc\",\"filloutRestrictions\":\"0\",\"frequencyRestrictions\":\"1\",\"frequencyRestrictionsMaxTriggers\":2,\"frequencyRestrictionsTimeframe\":1}},\"page_title\":\"\",\"meta_description\":\"\",\"header_custom_script\":\"\",\"footer_custom_script\":\"\",\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.ico\",\"sort_items\":\"newest\",\"search_items\":{\"search\":\"\"}},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"96px\",\"line-height\":\"98px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"34px\",\"line-height\":\"36px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"22px\",\"line-height\":\"24px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"22px\",\"line-height\":\"24px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"20px\",\"line-height\":\"22px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"400\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#17a4d1\",\"complimentary-color\":\"#328ed3\",\"dark-color\":\"#91cd47\",\"light-color\":\"#e9f4da\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG\",\"options\":[\"backgrounds\"],\"alias\":\"background\",\"src\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}}},\"templateData\":{\"account_id\":\"0\",\"remote_item_id\":\"0\",\"status\":\"approved\",\"share_type\":\"marketplace\",\"share_subtype\":\"free\",\"purchase_conditions\":\"\",\"featured\":\"1\",\"name\":\"Launchpad\",\"price\":\"0.00\",\"type\":\"Landing Page\",\"date\":\"1441818555\",\"date_approved\":\"0\",\"approved_by\":\"0\",\"dlm\":\"1445879184\",\"description\":\"Start the countdown with Launchpad. This template is a single, above the fold page that highlights a countdown timer, an icon image, a few lines of copy and a contact form.\",\"thumbnail\":\"https:\\/\\/app.ontraport.com\\/js\\/ontraport\\/opt_assets\\/templates\\/template_thumbs\\/84_thumbnail.png\",\"resource\":{\"templateId\":84,\"status\":true,\"blocks\":[{\"alias\":\"Banner\",\"blockId\":\"20\",\"blockTypeId\":3,\"id\":\"527f664f-a6a4-8e9d-634e-26c041d2bee5\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/20_event_banner\\/\",\"scripts\":\" \\/*block scripts*\\/\",\"theme\":{\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"header-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\"h1\\\">COMING SOON<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Header\"}},{\"id\":\"subHeader-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area h2 h2 h2\\\">Yes you're on the right page, but its not quite ready.<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Sub-Header\"}},{\"id\":\"header-group\",\"type\":\"group\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"alias\":\"header group\",\"visibility\":\"visible\"}},{\"id\":\"logo-1\",\"type\":\"image\",\"for\":null,\"tag\":\"IMG\",\"attrs\":{\"src\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.47135abcc7e84179f73c77f9e8f8af1b.PNG\",\"options\":false,\"visibility\":\"visible\",\"alias\":\"Logo\"}},{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\"}},{\"id\":\"tagline-1\",\"type\":\"html\",\"for\":null,\"tag\":\"H3\",\"attrs\":{\"html\":\" JOIN OUR LIVE WEBINAR \",\"visibility\":\"hidden\",\"options\":false,\"help\":false,\"alias\":\"Tagline\"}},{\"id\":\"date-1\",\"type\":\"html\",\"for\":null,\"tag\":\"H1\",\"attrs\":{\"html\":\" DECEMBER 25, 2015 \\/\\/ 1:00PM PST \",\"visibility\":\"hidden\",\"options\":false,\"help\":false,\"alias\":\"Date\"}},{\"id\":\"button-1\",\"type\":\"button\",\"for\":null,\"tag\":\"A\",\"attrs\":{\"visibility\":\"hidden\",\"alias\":\"Button\",\"html\":\"\\n SIGN ME UP\\n \",\"href\":\"javascript:\\/\\/\",\"target\":\"_self\",\"file_name\":null,\"page_select\":null,\"url_type\":null,\"src\":null,\"link_background\":\"\",\"hover_bg\":\"\",\"hover_text\":\"\"}}],\"visibility\":true},{\"alias\":\"Countdown timer\",\"blockId\":\"119\",\"blockTypeId\":22,\"id\":\"b681e5f2-2c31-a251-f0f6-fa5bb76469d8\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/119_count_down_timer\\/\",\"scripts\":\"\\/*block scripts*\\/\\n\\n$(function(){\\n var $blockStyle119 = $( \\\".block-style-119\\\" );\\n\\n \\/* Script applies a font size and line height that are 20px larger than the specified sizes. *\\/\\n $blockStyle119.each(function( index, element ) {\\n var $style = $( \\\"<style\\/>\\\" ).addClass( \\\"block-style-119-font-style\\\"),\\n $element = $( element ),\\n $countdownItem = $element.find( \\\".block-style-119__count-down-item\\\" ).first(),\\n _itemFontSize = $countdownItem.css(\\\"fontSize\\\").replace(\\\"px\\\", \\\"\\\"),\\n _itemLineHeight = $countdownItem.css(\\\"lineHeight\\\").replace(\\\"px\\\", \\\"\\\");\\n\\n _itemFontSize = +_itemFontSize + 20;\\n\\n _itemLineHeight = +_itemLineHeight + 20;\\n\\n $element.find( \\\"style.block-style-119-font-style\\\").remove();\\n\\n $element.prepend( $style.html( \\\".h1.block-style-119__count-down-item { font-size: \\\" + _itemFontSize + \\\"px; line-height: \\\" + _itemLineHeight + \\\"px; }\\\" ) );\\n\\n });\\n});\\n\\n\",\"theme\":{\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"header-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area h3 h3 h3\\\">PAGE WILL BE READY IN :<\\/span>\\n \",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Header\"}},{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\"}}],\"visibility\":true},{\"alias\":\"Smart form\",\"blockId\":\"130\",\"blockTypeId\":10,\"id\":\"bd440856-4d06-bedf-1302-eb5f220c29e9\",\"path\":\"\\/js\\/ontraport\\/opt_assets\\/blocks\\/landing_page\\/130_horizontal_text_and_form\\/\",\"scripts\":\" \\/*block scripts*\\/\",\"theme\":{\"spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-bottom\":\"100px\"}}}},\"color_variation\":\"option-4\"},\"userDefinedData\":[{\"id\":\"block-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"transparent\",\"options\":false,\"alias\":\"block background\",\"src\":\"\\/js\\/ontraport\\/components\\/opt_palette_editor\\/image\\/views\\/noimage.png\",\"fixed-width-default\":false}},{\"id\":\"bodyText-1\",\"type\":\"html\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"html\":\"<span class=\\\" opt-palette-editor__text-area body-text body-text\\\">Enter you name & Email and we will let you know when its ready.<\\/span>\",\"visibility\":\"visible\",\"options\":false,\"help\":false,\"alias\":\"Body Text\"}}],\"visibility\":true,\"direction\":1,\"settings\":{\"opt_in_settings\":\"single\",\"conditionsCustomUrl\":\"\",\"conditionsRedirectRadioButtons\":\"default\",\"form_contacts_thank_you_page_redir\":\"0\",\"singleCustomUrl\":\"\",\"thankYouRedirectRadioButtons\":\"default\",\"singleLandPageSelect\":\"\",\"conditionsLandPageSelect\":\"\",\"conditionsPopOntraformSelect\":\"\",\"confirmation_email\":\"\",\"tags\":[],\"sequences\":[],\"rules_default\":[],\"rules_transaction_fail\":[],\"notif\":\"\",\"cookie_overide\":\"0\",\"cgi\":\"0\",\"owner\":false,\"tyPopOntraformSelect\":\"\"}}],\"settings\":{\"domain\":null,\"visits\":null,\"conversions\":null,\"design_type\":null,\"listFields\":null,\"listFieldSettings\":null,\"count\":null,\"lpsent\":null,\"lpconvert\":null,\"id\":null,\"uri_id\":null,\"rotation\":null,\"last_save\":null,\"last_auto\":null,\"autosave\":null,\"visits_0\":null,\"visits_1\":null,\"visits_2\":null,\"visits_3\":null,\"platform\":null,\"ssl_enabled\":null,\"type\":\"landing_page\",\"blocks\":null,\"block_type_id\":null,\"a_sent\":null,\"a_convert\":null,\"b_sent\":null,\"b_convert\":null,\"c_sent\":null,\"c_convert\":null,\"d_sent\":null,\"d_convert\":null,\"object_type_id\":null,\"conditionsCustomUrl\":\"\",\"singleCustomUrl\":\"\",\"page_title\":\"\",\"meta_description\":\"\",\"header_custom_script\":\"\",\"footer_custom_script\":\"\",\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.ico\",\"notif\":\"\",\"owner\":\"\",\"opt_canvas\":[],\"opt_palette\":[]},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"96px\",\"line-height\":\"98px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"34px\",\"line-height\":\"36px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"22px\",\"line-height\":\"24px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"22px\",\"line-height\":\"24px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"20px\",\"line-height\":\"22px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"'Roboto', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"'Dosis', sans-serif\",\"font-size\":\"16px\",\"line-height\":\"18px\",\"font-weight\":\"400\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#17a4d1\",\"complimentary-color\":\"#328ed3\",\"dark-color\":\"#91cd47\",\"light-color\":\"#e9f4da\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG\",\"options\":[\"backgrounds\"],\"alias\":\"background\",\"src\":\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}}}},\"industries\":null,\"types\":null,\"tags\":null,\"opt_template_categories\":\" featured free\",\"id\":\"84\",\"displayObjectNotFoundErrors\":true},\"version\":\"v2\",\"mergedData\":\"<!DOCTYPE html><html><head> <!-- This page was built using ONTRApages. Create and host your pages free at ONTRApages.com or learn more about the most powerful business and marketing automation platform designed for entrepreneurs at ONTRAPORT.com --> <meta charset=\\\"utf-8\\\"> <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/skeleton\\/css\\/normalize.css\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/skeleton\\/css\\/skeleton.css\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/skeleton\\/css\\/skeleton.ontraport.css\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/skeleton\\/css\\/fonts.css\\\"> <link rel=\\\"stylesheet\\\" href=\\\"\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/css\\/wysihtml5-textalign.css\\\"> <!--OPT-CUSTOM-HEADER-SCRIPT--><style class=\\\"theme-style\\\">h1, .h1.h1 { font-family: 'Dosis', sans-serif; font-size: 96px; line-height: 98px; font-weight: 100; text-decoration: inherit;}h2, .h2.h2 { font-family: 'Roboto', sans-serif; font-size: 34px; line-height: 36px; font-weight: 100; font-style: italic; text-decoration: inherit;}h3, .h3.h3 { font-family: 'Roboto', sans-serif; font-size: 22px; line-height: 24px; font-weight: 400; text-decoration: inherit;}.label.label { font-family: 'Dosis', sans-serif; font-size: 16px; line-height: 18px; font-weight: 600; text-decoration: inherit;}.button.button { font-family: 'Dosis', sans-serif; font-size: 22px; line-height: 24px; font-weight: 600; text-decoration: inherit;}.large-body-text.large-body-text { font-family: 'Roboto', sans-serif; font-size: 20px; line-height: 22px; font-weight: 400; text-decoration: inherit;}.body-text.body-text { font-family: 'Roboto', sans-serif; font-size: 16px; line-height: 18px; font-weight: 100; text-decoration: inherit;}blockquote, .blockquote { font-family: 'Dosis', sans-serif; font-size: 16px; line-height: 18px; font-weight: 400; font-style: italic; text-decoration: inherit;}.bb.bb.bb { color: #91cd47;}.v.v.v { color: #ffffff;}.ak.ak.ak { background-color: #ffffff;}.i.i.i { background-color: #91cd47;}.at.at.at, .at.at.at a { color: #ffffff; background-color: #17a4d1;}.q.q.q, .q.q.q a { color: #17a4d1; background-color: #ffffff;}.aw.aw.aw { background-color: #e9f4da;}.as.as.as { border-color: #91cd47;}.al.al { color: #91cd47;}.al.al.al:hover { color: #17a4d1;}.ba.ba.ba { color: #17a4d1;}.ba.ba.ba:hover { color: #91cd47;}hr.bc.bc.bc, span.bc.bc.bc, h1.bc.bc.bc, h2.bc.bc.bc, h3.bc.bc.bc, p.bc.bc.bc, .an.an.an { color: #17a4d1;}hr.bc.bc.bc, table.bc.bc.bc, div.bc.bc.bc, a.bc.bc.bc, .x.x.x { background-color: #17a4d1;}hr.bc.bc.bc, img.bc.bc.bc, a.bc.bc.bc, div.bc.bc.bc, .aj.aj.aj { border-color: #17a4d1;}hr.am.am.am, span.am.am.am, h1.am.am.am, h2.am.am.am, h3.am.am.am, p.am.am.am, .u.u.u { color: #328ed3;}hr.am.am.am, table.am.am.am, div.am.am.am, a.am.am.am, .h.h.h { background-color: #328ed3;}hr.am.am.am, img.am.am.am, a.am.am.am, div.am.am.am, .o.o.o { border-color: #328ed3;}hr.bf.bf.bf, span.bf.bf.bf, h1.bf.bf.bf, h2.bf.bf.bf, h3.bf.bf.bf, p.bf.bf.bf, .ax.ax.ax { color: #91cd47;}hr.bf.bf.bf, table.bf.bf.bf, div.bf.bf.bf, a.bf.bf.bf, .ah.ah.ah { background-color: #91cd47;}hr.bf.bf.bf, img.bf.bf.bf, a.bf.bf.bf, div.bf.bf.bf, .aq.aq.aq { border-color: #91cd47;}hr.be.be.be, span.be.be.be, h1.be.be.be, h2.be.be.be, h3.be.be.be, p.be.be.be, .ar.ar.ar { color: #e9f4da;}hr.be.be.be, table.be.be.be, div.be.be.be, a.be.be.be, .ad.ad.ad { background-color: #e9f4da;}hr.be.be.be, img.be.be.be, a.be.be.be, div.be.be.be, .ao.ao.ao { border-color: #e9f4da;}hr.bd.bd.bd, span.bd.bd.bd, h1.bd.bd.bd, h2.bd.bd.bd, h3.bd.bd.bd, p.bd.bd.bd, .au.au.au { color: #ffffff;}hr.bd.bd.bd, table.bd.bd.bd, div.bd.bd.bd, a.bd.bd.bd, .ab.ab.ab { background-color: #ffffff;}hr.bd.bd.bd, img.bd.bd.bd, a.bd.bd.bd, div.bd.bd.bd, .ap.ap.ap { border-color: #ffffff;}a { color: #17a4d1; text-decoration: none;}a:hover { text-decoration: underline;}.spacing { padding-top: 20px; padding-bottom: 20px;}<\\/style><style class=\\\"block-theme-css\\\">.b .bb.bb.bb { color: #ffffff;}.b .v.v.v { color: #17a4d1;}.b .ak.ak.ak { background-color: #17a4d1;}.b .i.i.i { background-color: #ffffff;}.b .at.at.at,.b .at.at.at a { color: #17a4d1; background-color: #ffffff;}.b .q.q.q,.b .q.q.q a { color: #ffffff; background-color: #17a4d1;}.b .aw.aw.aw { background-color: #ffffff;}.b .as.as.as { border-color: #ffffff;}.b .al.al.al { color: #ffffff;}.b .al.al.al:hover { color: #91cd47;}.b .ba.ba.ba { color: #ffffff;}.b .ba.ba.ba:hover { color: #91cd47;}.b hr.bc.bc.bc,.b span.bc.bc.bc,.b h1.bc.bc.bc,.b h2.bc.bc.bc,.b h3.bc.bc.bc,.b p.bc.bc.bc,.b .an.an.an { color: #e9f4da;}.b hr.bc.bc.bc,.b table.bc.bc.bc,.b div.bc.bc.bc,.b a.bc.bc.bc,.b .x.x.x { background-color: #e9f4da;}.b hr.bc.bc.bc,.b img.bc.bc.bc,.b a.bc.bc.bc,.b div.bc.bc.bc,.b .aj.aj.aj { border-color: #e9f4da;}.b hr.am.am.am,.b span.am.am.am,.b h1.am.am.am,.b h2.am.am.am,.b h3.am.am.am,.b p.am.am.am,.b .u.u.u { color: #328ed3;}.b hr.am.am.am,.b table.am.am.am,.b div.am.am.am,.b a.am.am.am,.b .h.h.h { background-color: #328ed3;}.b hr.am.am.am,.b img.am.am.am,.b a.am.am.am,.b div.am.am.am,.b .o.o.o { border-color: #328ed3;}.b hr.bf.bf.bf,.b span.bf.bf.bf,.b h1.bf.bf.bf,.b h2.bf.bf.bf,.b h3.bf.bf.bf,.b p.bf.bf.bf,.b .ax.ax.ax { color: #ffffff;}.b hr.bf.bf.bf,.b table.bf.bf.bf,.b div.bf.bf.bf,.b a.bf.bf.bf,.b .ah.ah.ah { background-color: #ffffff;}.b hr.bf.bf.bf,.b img.bf.bf.bf,.b a.bf.bf.bf,.b div.bf.bf.bf,.b .aq.aq.aq { border-color: #ffffff;}.b hr.be.be.be,.b span.be.be.be,.b h1.be.be.be,.b h2.be.be.be,.b h3.be.be.be,.b p.be.be.be,.b .ar.ar.ar { color: #e9f4da;}.b hr.be.be.be,.b table.be.be.be,.b div.be.be.be,.b a.be.be.be,.b .ad.ad.ad { background-color: #e9f4da;}.b hr.be.be.be,.b img.be.be.be,.b a.be.be.be,.b div.be.be.be,.b .ao.ao.ao { border-color: #e9f4da;}.b hr.bd.bd.bd,.b span.bd.bd.bd,.b h1.bd.bd.bd,.b h2.bd.bd.bd,.b h3.bd.bd.bd,.b p.bd.bd.bd,.b .au.au.au { color: #17a4d1;}.b hr.bd.bd.bd,.b table.bd.bd.bd,.b div.bd.bd.bd,.b a.bd.bd.bd,.b .ab.ab.ab { background-color: #17a4d1;}.b hr.bd.bd.bd,.b img.bd.bd.bd,.b a.bd.bd.bd,.b div.bd.bd.bd,.b .ap.ap.ap { border-color: #17a4d1;}.b a { color: #17a4d1; text-decoration: none;}.b a:hover { text-decoration: underline;}.c .bb.bb.bb { color: #ffffff;}.c .v.v.v { color: #17a4d1;}.c .ak.ak.ak { background-color: #17a4d1;}.c .i.i.i { background-color: #ffffff;}.c .at.at.at,.c .at.at.at a { color: #17a4d1; background-color: #ffffff;}.c .q.q.q,.c .q.q.q a { color: #ffffff; background-color: #17a4d1;}.c .aw.aw.aw { background-color: #ffffff;}.c .as.as.as { border-color: #ffffff;}.c .al.al.al { color: #ffffff;}.c .al.al.al:hover { color: #91cd47;}.c .ba.ba.ba { color: #ffffff;}.c .ba.ba.ba:hover { color: #91cd47;}.c hr.bc.bc.bc,.c span.bc.bc.bc,.c h1.bc.bc.bc,.c h2.bc.bc.bc,.c h3.bc.bc.bc,.c p.bc.bc.bc,.c .an.an.an { color: #e9f4da;}.c hr.bc.bc.bc,.c table.bc.bc.bc,.c div.bc.bc.bc,.c a.bc.bc.bc,.c .x.x.x { background-color: #e9f4da;}.c hr.bc.bc.bc,.c img.bc.bc.bc,.c a.bc.bc.bc,.c div.bc.bc.bc,.c .aj.aj.aj { border-color: #e9f4da;}.c hr.am.am.am,.c span.am.am.am,.c h1.am.am.am,.c h2.am.am.am,.c h3.am.am.am,.c p.am.am.am,.c .u.u.u { color: #328ed3;}.c hr.am.am.am,.c table.am.am.am,.c div.am.am.am,.c a.am.am.am,.c .h.h.h { background-color: #328ed3;}.c hr.am.am.am,.c img.am.am.am,.c a.am.am.am,.c div.am.am.am,.c .o.o.o { border-color: #328ed3;}.c hr.bf.bf.bf,.c span.bf.bf.bf,.c h1.bf.bf.bf,.c h2.bf.bf.bf,.c h3.bf.bf.bf,.c p.bf.bf.bf,.c .ax.ax.ax { color: #ffffff;}.c hr.bf.bf.bf,.c table.bf.bf.bf,.c div.bf.bf.bf,.c a.bf.bf.bf,.c .ah.ah.ah { background-color: #ffffff;}.c hr.bf.bf.bf,.c img.bf.bf.bf,.c a.bf.bf.bf,.c div.bf.bf.bf,.c .aq.aq.aq { border-color: #ffffff;}.c hr.be.be.be,.c span.be.be.be,.c h1.be.be.be,.c h2.be.be.be,.c h3.be.be.be,.c p.be.be.be,.c .ar.ar.ar { color: #e9f4da;}.c hr.be.be.be,.c table.be.be.be,.c div.be.be.be,.c a.be.be.be,.c .ad.ad.ad { background-color: #e9f4da;}.c hr.be.be.be,.c img.be.be.be,.c a.be.be.be,.c div.be.be.be,.c .ao.ao.ao { border-color: #e9f4da;}.c hr.bd.bd.bd,.c span.bd.bd.bd,.c h1.bd.bd.bd,.c h2.bd.bd.bd,.c h3.bd.bd.bd,.c p.bd.bd.bd,.c .au.au.au { color: #17a4d1;}.c hr.bd.bd.bd,.c table.bd.bd.bd,.c div.bd.bd.bd,.c a.bd.bd.bd,.c .ab.ab.ab { background-color: #17a4d1;}.c hr.bd.bd.bd,.c img.bd.bd.bd,.c a.bd.bd.bd,.c div.bd.bd.bd,.c .ap.ap.ap { border-color: #17a4d1;}.c a { color: #17a4d1; text-decoration: none;}.c a:hover { text-decoration: underline;}.a .spacing { padding-bottom: 100px;}.a .bb.bb.bb { color: #ffffff;}.a .v.v.v { color: #17a4d1;}.a .ak.ak.ak { background-color: #17a4d1;}.a .i.i.i { background-color: #ffffff;}.a .at.at.at,.a .at.at.at a { color: #17a4d1; background-color: #ffffff;}.a .q.q.q,.a .q.q.q a { color: #ffffff; background-color: #17a4d1;}.a .aw.aw.aw { background-color: #ffffff;}.a .as.as.as { border-color: #ffffff;}.a .al.al.al { color: #ffffff;}.a .al.al.al:hover { color: #91cd47;}.a .ba.ba.ba { color: #ffffff;}.a .ba.ba.ba:hover { color: #91cd47;}.a hr.bc.bc.bc,.a span.bc.bc.bc,.a h1.bc.bc.bc,.a h2.bc.bc.bc,.a h3.bc.bc.bc,.a p.bc.bc.bc,.a .an.an.an { color: #e9f4da;}.a hr.bc.bc.bc,.a table.bc.bc.bc,.a div.bc.bc.bc,.a a.bc.bc.bc,.a .x.x.x { background-color: #e9f4da;}.a hr.bc.bc.bc,.a img.bc.bc.bc,.a a.bc.bc.bc,.a div.bc.bc.bc,.a .aj.aj.aj { border-color: #e9f4da;}.a hr.am.am.am,.a span.am.am.am,.a h1.am.am.am,.a h2.am.am.am,.a h3.am.am.am,.a p.am.am.am,.a .u.u.u { color: #328ed3;}.a hr.am.am.am,.a table.am.am.am,.a div.am.am.am,.a a.am.am.am,.a .h.h.h { background-color: #328ed3;}.a hr.am.am.am,.a img.am.am.am,.a a.am.am.am,.a div.am.am.am,.a .o.o.o { border-color: #328ed3;}.a hr.bf.bf.bf,.a span.bf.bf.bf,.a h1.bf.bf.bf,.a h2.bf.bf.bf,.a h3.bf.bf.bf,.a p.bf.bf.bf,.a .ax.ax.ax { color: #ffffff;}.a hr.bf.bf.bf,.a table.bf.bf.bf,.a div.bf.bf.bf,.a a.bf.bf.bf,.a .ah.ah.ah { background-color: #ffffff;}.a hr.bf.bf.bf,.a img.bf.bf.bf,.a a.bf.bf.bf,.a div.bf.bf.bf,.a .aq.aq.aq { border-color: #ffffff;}.a hr.be.be.be,.a span.be.be.be,.a h1.be.be.be,.a h2.be.be.be,.a h3.be.be.be,.a p.be.be.be,.a .ar.ar.ar { color: #e9f4da;}.a hr.be.be.be,.a table.be.be.be,.a div.be.be.be,.a a.be.be.be,.a .ad.ad.ad { background-color: #e9f4da;}.a hr.be.be.be,.a img.be.be.be,.a a.be.be.be,.a div.be.be.be,.a .ao.ao.ao { border-color: #e9f4da;}.a hr.bd.bd.bd,.a span.bd.bd.bd,.a h1.bd.bd.bd,.a h2.bd.bd.bd,.a h3.bd.bd.bd,.a p.bd.bd.bd,.a .au.au.au { color: #17a4d1;}.a hr.bd.bd.bd,.a table.bd.bd.bd,.a div.bd.bd.bd,.a a.bd.bd.bd,.a .ab.ab.ab { background-color: #17a4d1;}.a hr.bd.bd.bd,.a img.bd.bd.bd,.a a.bd.bd.bd,.a div.bd.bd.bd,.a .ap.ap.ap { border-color: #17a4d1;}.a a { color: #17a4d1; text-decoration: none;}.a a:hover { text-decoration: underline;}<\\/style><link rel=\\\"shortcut icon\\\" type=\\\"image\\/x-icon\\\" href=\\\"\\/\\/app.ontraport.com\\/favicon.ico\\\"><link rel=\\\"dns-prefetch\\\" href=\\\"https:\\/\\/optassets.ontraport.com\\\"><link rel=\\\"dns-prefetch\\\" href=\\\"\\/\\/ajax.googleapis.com\\\"><link rel=\\\"dns-prefetch\\\" href=\\\"\\/\\/app.ontraport.com\\\"><link rel=\\\"dns-prefetch\\\" href=\\\"\\/\\/optassets.ontraport.com\\\"><\\/head><body> <div class=\\\"opt-container\\\" opt-id=\\\"template-background\\\" opt-type=\\\"background\\\" style=\\\"background-size: cover; background-image: url("https:\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.1f36335d542d468765dd98e598ffbf9f.PNG");\\\" opt-options=\\\"["backgrounds"]\\\" opt-alias=\\\"background\\\"><div><div class=\\\"row b\\\" opt-id=\\\"527f664f-a6a4-8e9d-634e-26c041d2bee5\\\" opt-type=\\\"block\\\" opt-block-type-id=\\\"3\\\" opt-block-style-id=\\\"20\\\"><div class=\\\"block-style\\\"><style class=\\\"block-css\\\">\\/*block styles*\\/ .az { text-align: center; width: 100%; background-position: center center;} .af { max-width: 100%;} .ac,.s,.z,.p { margin-bottom: 20px;} .l { padding: 40px 0;} .r { margin-bottom: 40px; margin-top:0;}.j { margin-bottom: 0;} .r,.j { border: 0; height: 1px;} .w { display: block;} .ae { margin-top: 30px; padding-top: 15px; padding-bottom: 15px; min-width: 150px;}<\\/style> <div class=\\\"block-wrapper az ak spacing\\\" style=\\\"background-color: transparent; background-image: none;\\\"> <div class=\\\"container body-text\\\"> <div aria-description=\\\"Event Banner\\\"> <img src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/stockPhoto\\/84\\/29694.1.47135abcc7e84179f73c77f9e8f8af1b.PNG\\\" class=\\\"af\\\"> <div class=\\\"l\\\"> <hr class=\\\"ah r\\\"> <div class=\\\"ac bb\\\"><span class=\\\"h1\\\">COMING SOON<\\/span><\\/div> <div class=\\\"s bb\\\"><span class=\\\" opt-palette-editor__text-area h2 h2 h2\\\">Yes you're on the right page, but its not quite ready.<\\/span><\\/div> <hr class=\\\"ah j\\\"> <\\/div> <\\/div> <\\/div><\\/div> <\\/div><\\/div><div class=\\\"row c\\\" opt-id=\\\"b681e5f2-2c31-a251-f0f6-fa5bb76469d8\\\" opt-type=\\\"block\\\" opt-block-type-id=\\\"22\\\" opt-block-style-id=\\\"119\\\"><div class=\\\"block-style\\\"><style class=\\\"block-css\\\">\\/*block styles*\\/ .aa { max-width: 100%; margin-bottom: 10px;} .d { display: block;} .f { list-style: none; max-width: 85%; margin-left: auto; margin-right: auto; word-wrap: break-word;} .f li { display: inline-block; margin-right: 30px; min-width: 125px;} .g { margin-bottom: 0;}<\\/style> <div class=\\\"block-wrapper ak block-style-119 spacing\\\" style=\\\"background-color: transparent; background-image: none;\\\"> <div class=\\\"container opt-center\\\"> <div class=\\\"aa bb\\\"><span class=\\\" opt-palette-editor__text-area h3 h3 h3\\\">PAGE WILL BE READY IN :<\\/span> <\\/div> <ontraport-countdown month=\\\"5\\\" redirect_href=\\\"#\\\" class=\\\"d countdown\\\" day=\\\"12\\\" then=\\\"1494572400000\\\"> <ul class=\\\"f\\\"> <li><p class=\\\"ce-days bb h1 g\\\">29<\\/p> <span class=\\\"bb h3\\\">DAYS<\\/span><\\/li> <li><p class=\\\"ce-hours bb h1 g\\\">14<\\/p> <span class=\\\"bb h3\\\">HOURS<\\/span><\\/li> <li><p class=\\\"ce-minutes bb h1 g\\\">16<\\/p> <span class=\\\"bb h3\\\">MINUTES<\\/span><\\/li> <li><p class=\\\"ce-seconds bb h1 g\\\">34<\\/p> <span class=\\\"bb h3\\\">SECONDS<\\/span><\\/li> <\\/ul> <\\/ontraport-countdown> <\\/div><\\/div> <\\/div><\\/div><div class=\\\"row a\\\" opt-id=\\\"bd440856-4d06-bedf-1302-eb5f220c29e9\\\" opt-type=\\\"block\\\" opt-block-type-id=\\\"10\\\" opt-block-style-id=\\\"130\\\"><div class=\\\"block-style\\\"><style class=\\\"block-css\\\">.k { display: none;} .ay { display: inline;} .t { margin-right: 5px; position: relative; top: -1px;} .ai { margin-bottom: 25px;} .ag { margin-bottom: 0;} .m { display: inline-block; margin-right: 1%; width: 35%; vertical-align: top;} .n { display: inline;} .e { display: inline-block;} .y input[type=\\\"email\\\"], .y input[type=\\\"number\\\"], .y input[type=\\\"search\\\"], .y input[type=\\\"text\\\"], .y input[type=\\\"tel\\\"], .y input[type=\\\"url\\\"], .y input[type=\\\"password\\\"], .y input[type=\\\"date\\\"], .y textarea,.y select { width: 100%; display: inline-block;} .av label { word-wrap: break-word;} .y input[type=\\\"submit\\\"].button-style { padding: 0 20px; border-radius: 3px; text-decoration: none; letter-spacing: inherit; text-transform: none; border: 0; height: 38px; line-height: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; vertical-align: middle; -webkit-transition: opacity .4s ease-in-out; transition: opacity .4s ease-in-out;}.y input[type=\\\"submit\\\"].button-style:hover { opacity: .9;} @media (max-width: 1200px) { .block-style-130__columns.block-style-130__columns { text-align: center; width: 100%; } .m { width: 24%; }} @media (max-width: 549px) { .m { width: 100%; } }.opt-page-size-mobile .m { width: 100%;} <\\/style> <div class=\\\"block-wrapper block-style-130 ak spacing\\\" style=\\\"background-color: transparent; background-image: none;\\\"> <div class=\\\"container\\\"> <div class=\\\"y\\\"> <div class=\\\"row\\\"> <div class=\\\"six columns block-style-130__columns\\\"> <div class=\\\"ai bb\\\"><span class=\\\" opt-palette-editor__text-area body-text body-text\\\">Enter you name & Email and we will let you know when its ready.<\\/span><\\/div> <\\/div> <div class=\\\"six columns block-style-130__columns\\\"> <form role=\\\"form\\\" accept-charset=\\\"UTF-8\\\" method=\\\"post\\\" action=\\\"[system_form_processor_bd440856-4d06-bedf-1302-eb5f220c29e9]\\\" class=\\\"ag opt-center\\\"> <div class=\\\"n\\\"> <div class=\\\"m\\\"> <label class=\\\"bb label k\\\" for=\\\"firstname\\\" opt-for=\\\"firstname-input\\\">First Name<\\/label> <input class=\\\"aw\\\" type=\\\"text\\\" name=\\\"firstname\\\" id=\\\"firstname\\\" placeholder=\\\"First Name\\\"> <\\/div> <div class=\\\"m\\\"> <label class=\\\"bb label k\\\" for=\\\"email\\\" opt-for=\\\"email-input\\\">Email<\\/label> <input class=\\\"aw\\\" type=\\\"email\\\" name=\\\"email\\\" id=\\\"email\\\" placeholder=\\\"Email\\\" required=\\\"required\\\"> <\\/div> <\\/div> <div class=\\\"e\\\"> <input type=\\\"submit\\\" value=\\\"Submit\\\" class=\\\"button button-style at\\\"> <\\/div> <span style=\\\"display: none;\\\">[system_form_fields_bd440856-4d06-bedf-1302-eb5f220c29e9]<\\/span> <\\/form> <\\/div> <\\/div> <\\/div> <\\/div> <\\/div> <\\/div><\\/div><\\/div> <!--OPT-AD-BLOCK-HERE--> <\\/div> <script src=\\\"\\/\\/ajax.googleapis.com\\/ajax\\/libs\\/jquery\\/1.7.1\\/jquery.min.js\\\"><\\/script> <script class=\\\"opt-page-script\\\" type=\\\"text\\/javascript\\\" src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/jQueryPageBackgroundPro\\/js\\/libs\\/underscore.js\\\"><\\/script> <span style=\\\"display: none;\\\" class=\\\"opt-system-scripts\\\">[system_scripts]<\\/span> <span style=\\\"display: none;\\\" class=\\\"opt-form-scripts\\\">[system_form_scripts]<\\/span> <script type=\\\"text\\/javascript\\\" class=\\\"opt-page-script opt-form-scripts\\\" src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/blocks\\/common\\/jQueryCloneVal\\/jquery-cloneVal.js\\\"><\\/script> <script src=\\\"\\/\\/app.ontraport.com\\/js\\/globalize\\/globalize.js\\\"><\\/script> <script type=\\\"text\\/javascript\\\" class=\\\"opt-page-script opt-document-register-element-driver\\\" src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/templates\\/custom-elements\\/document-register-element\\/build\\/document-register-element.js\\\"><\\/script> <script type=\\\"text\\/javascript\\\" class=\\\"opt-page-script opt-countdown-script\\\" src=\\\"https:\\/\\/optassets.ontraport.com\\/opt_assets\\/templates\\/custom-elements\\/countdown\\/countdown.js\\\"><\\/script> <span style=\\\"display: none;\\\">[bot_catcher]<\\/span> <!--OPT-CUSTOM-FOOTER-SCRIPT--><script> <\\/script><\\/body><\\/html>\",\"formBlockIds\":[\"bd440856-4d06-bedf-1302-eb5f220c29e9\"]},{\"templateId\":false,\"status\":false,\"blocks\":[],\"settings\":{\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.png\"},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"50px\",\"line-height\":\"50px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"30px\",\"line-height\":\"32px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"20px\",\"line-height\":\"20px\",\"font-weight\":\"900\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"16px\",\"line-height\":\"16px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"14px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"18px\",\"line-height\":\"24px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#1e88e5\",\"complimentary-color\":\"#41baff\",\"dark-color\":\"#333333\",\"light-color\":\"#f3efea\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"#ffffff\",\"options\":[\"backgrounds\"],\"alias\":\"background\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}},\"theme_dimensions\":{\"widthType\":\"option\",\"width\":\"100%\",\"height\":null},\"border\":{\"color\":\"#000000\",\"size\":\"0px\"}},\"mergedData\":\"\",\"formBlockIds\":[]},{\"templateId\":false,\"status\":false,\"blocks\":[],\"settings\":{\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.png\"},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"50px\",\"line-height\":\"50px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"30px\",\"line-height\":\"32px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"20px\",\"line-height\":\"20px\",\"font-weight\":\"900\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"16px\",\"line-height\":\"16px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"14px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"18px\",\"line-height\":\"24px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#1e88e5\",\"complimentary-color\":\"#41baff\",\"dark-color\":\"#333333\",\"light-color\":\"#f3efea\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"#ffffff\",\"options\":[\"backgrounds\"],\"alias\":\"background\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}},\"theme_dimensions\":{\"widthType\":\"option\",\"width\":\"100%\",\"height\":null},\"border\":{\"color\":\"#000000\",\"size\":\"0px\"}},\"mergedData\":\"\",\"formBlockIds\":[]},{\"templateId\":false,\"status\":false,\"blocks\":[],\"settings\":{\"favicon_uploader\":\"\\/\\/app.ontraport.com\\/favicon.png\"},\"theme\":{\"theme_font\":{\"children\":{\"h1, ~h1~h1\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"50px\",\"line-height\":\"50px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"h2, ~h2~h2\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"30px\",\"line-height\":\"32px\",\"font-weight\":\"400\",\"font-style\":\"normal\"}},\"h3, ~h3~h3\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"20px\",\"line-height\":\"20px\",\"font-weight\":\"900\",\"font-style\":\"normal\"}},\"~label~label\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"16px\",\"line-height\":\"16px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"~button~button\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"14px\",\"font-weight\":\"600\",\"font-style\":\"normal\"}},\"~large-body-text~large-body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"18px\",\"line-height\":\"24px\",\"font-weight\":\"100\",\"font-style\":\"normal\"}},\"~body-text~body-text\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"300\",\"font-style\":\"normal\"}},\"blockquote, ~blockquote\":{\"attributes\":{\"font-family\":\"Arial, sans-serif\",\"font-size\":\"14px\",\"line-height\":\"22px\",\"font-weight\":\"100\",\"font-style\":\"italic\"}}}},\"theme_colors\":{\"primary-color\":\"#1e88e5\",\"complimentary-color\":\"#41baff\",\"dark-color\":\"#333333\",\"light-color\":\"#f3efea\",\"white-color\":\"#ffffff\"},\"theme_background\":{\"id\":\"template-background\",\"type\":\"background\",\"for\":null,\"tag\":\"DIV\",\"attrs\":{\"bg\":\"#ffffff\",\"options\":[\"backgrounds\"],\"alias\":\"background\"}},\"theme_spacing\":{\"children\":{\"~spacing\":{\"attributes\":{\"padding-top\":\"20px\",\"padding-bottom\":\"20px\"}}}},\"theme_dimensions\":{\"widthType\":\"option\",\"width\":\"100%\",\"height\":null},\"border\":{\"color\":\"#000000\",\"size\":\"0px\"}},\"mergedData\":\"\",\"formBlockIds\":[]}]",
"design_type": "3",
"name": "Welcome",
"rotation": "0",
"last_save": "0",
"last_auto": "0",
"autosave": "",
"visits_0": "0",
"visits_1": "0",
"visits_2": "0",
"visits_3": "0",
"platform": "0",
"domain": null,
"ssl_enabled": "0",
"date": "1510704945",
"dlm": "1510704945"
},
"account_id": "12345"
}
Retrieves all the information for an existing landing page.
Request Endpoint
GET https://api.ontraport.com/1/LandingPage
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Parameter | Type | Description |
---|---|---|
id |
integer | The landing page ID. Required. |
Retrieve multiple landing pages
curl -X GET 'https://api.ontraport.com/1/LandingPages?sort=name&sortDir=asc&listFields=id%2Cname' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"sort" => "name",
"sortDir" => "asc",
"listFields" => "id,name"
);
$response = $client->landingpage()->retrieveMultiple($requestParams);
?>
Example response:
{
"code": 0,
"data": [
{
"id": "2",
"name": "Thank You"
},
{
"id": "1",
"name": "Welcome"
}
],
"account_id": "12345",
"misc": []
}
Retrieves a collection of landing pages based on a set of parameters. You can limit unnecessary API requests by utilizing criteria and our pagination tools to select only the data set you require.
Request Endpoint
GET https://api.ontraport.com/1/LandingPages
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Parameter | Type | Description |
---|---|---|
ids |
string | A comma separated list of the IDs of the landing pages you wish to retrieve. Entering a value of 0 will result in all landing pages being selected. |
start |
integer | The offset to start your search from. |
range |
integer | The number of landing pages to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which objects you wish to bring back. See criteria examples for more details. |
search |
string | A string to search your landing page objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other landing page fields. |
group_ids |
string | A comma separated list of the group IDs of landing pages to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your landing page object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | A comma separated list of the fields which should be returned in your results. |
Retrieve landing page meta
curl -X GET 'https://api.ontraport.com/1/LandingPages/meta' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->landingpage()->retrieveMeta();
?>
Example response:
{
"code": 0,
"data": {
"20": {
"name": "LandingPage",
"fields": {
"name": {
"alias": "Name",
"type": "text"
},
"domain": {
"alias": "Domain",
"type": "text"
},
"visits": {
"alias": "Visits",
"type": "mergefield"
},
"conversions": {
"alias": "Conversions",
"type": "mergefield"
},
"design_type": {
"alias": "Type",
"type": "drop",
"options": {
"0": "Code Mode",
"1": "Legacy Pages",
"2": "Redirect",
"3": "ONTRAPAGES"
}
}
}
}
},
"account_id": "12345"
}
Retrieves the field meta data for the landing page object.
Request Endpoint
GET https://api.ontraport.com/1/LandingPage/meta
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
None
Retrieve landing page collection info
curl -X GET 'https://api.ontraport.com/1/LandingPages/getInfo?search=Welcome' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"search" => "Welcome",
);
$response = $client->landingpage()->retrieveCollectionInfo($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"listFields": [
"name",
"domain",
"visits",
"conversions"
],
"listFieldSettings": [],
"count": "1"
},
"account_id": "12345"
}
Retrieves information about a collection of landing pages, such as the number of landing pages that match the given criteria.
Request Endpoint
GET https://api.ontraport.com/1/LandingPages/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Parameter | Type | Description |
---|---|---|
condition |
string | A JSON encoded string to more specifically set criteria for which landing pages to bring back. See criteria examples for more details. |
search |
string | A string to search your landing page objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to landing page object fields. |
group_ids |
string | A comma separated list of the group IDs of landing pages to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Retrieve hosted URL
curl -X GET 'https://api.ontraport.com/1/landingPage/getHostedURL?id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1,
);
$response = $client->landingpage()->getHostedURL($requestParams);
?>
Example Response:
{
"code": 0,
"data": "http://hostedforms.ontraport.com/12345/1/c196822625fffc4f75dabcbb3c048f38/1",
"account_id": "12345"
}
Retrieves the hosted URL for a landing page by its ID.
Request Endpoint
GET https://api.ontraport.com/1/landingPage/getHostedURL
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Parameter | Type | Description |
---|---|---|
id |
integer | The landing page ID. |
Transactions
Object Type ID: 46
A transaction object is created when one of your contacts purchases a product.
Through the transactions API, you can retrieve a single transaction or a collection of transactions. You can manually process a transaction, which creates a new transaction object. You can change the status of a transaction, resend an invoice to a contact, rerun a transaction or partner commission, and void, write off, or refund a transaction. You can also retrieve an order, which is an instance of a recurring subscription.
The transaction object
{
"id": "1",
"hidden": "0",
"status": 6,
"contact_id": "1",
"order_id": "0",
"form_id": "0",
"lp_id": null,
"cc_id": "1",
"gateway_id": "25",
"date": "1492624700",
"template_id": "1",
"subtotal": "400.00",
"tax": "0.00",
"shipping": "0.00",
"total": "400.00",
"zip": "",
"city": null,
"state": null,
"county": null,
"tax_city": "0.00",
"tax_state": "0.00",
"tax_county": "0.00",
"external_order_id": "",
"oprid": "0",
"offer_data": "{\"products\":[{\"quantity\":\"20\",\"minQuantity\":\"1\",\"maxQuantity\":\"99\",\"total\":\"400.00\",\"shipping\":\"false\",\"tax\":\"false\",\"price\":[{\"price\":\"20.00\",\"payment_count\":\"1\",\"unit\":\"month\",\"id\":\"97092058792\"}],\"type\":\"\",\"quantityEditable\":\"false\",\"index\":\"0\",\"name\":\"Lambas Bread\",\"description\":\"\",\"owner\":\"1\",\"date\":\"1492622772\",\"dlm\":\"1492622772\",\"level1\":\"0\",\"level2\":\"0\",\"external_id\":\"null\",\"product_group\":\"null\",\"offer_to_affiliates\":\"true\",\"trial_period_unit\":\"day\",\"trial_period_count\":\"0\",\"trial_price\":\"0\",\"setup_fee\":\"0\",\"delay_start\":\"0\",\"sku\":\"null\",\"setup_fee_when\":\"immediately\",\"setup_fee_date\":\"0\",\"product_type\":\"digital\",\"subscription_fee\":\"0\",\"subscription_count\":\"0\",\"subscription_unit\":\"day\",\"download_limit\":\"0\",\"download_time_limit\":\"0\",\"taxable\":\"null\",\"deleted\":\"false\",\"total_income\":\"null\",\"total_purchases\":\"null\",\"id\":\"5\",\"uid\":\"bd068323-5782-54cd-3980-1fe6637cdbfe\"}],\"shipping\":\"null\",\"delay\":\"0\",\"invoice_template\":\"1\",\"subTotal\":\"400\",\"grandTotal\":\"400.00\",\"hasTaxes\":\"false\",\"hasShipping\":\"false\",\"paypalValid\":\"true\",\"offerCoupon\":\"false\",\"coupon\":\"null\",\"shipping_charge_reoccurring_orders\":\"false\",\"resorted\":\"null\",\"name\":\"Introductory Offer\",\"id\":\"3\"}",
"last_recharge_date": "1492643964",
"recharge_attempts": "2",
"recharge": null,
"contact_name": "Mary Smith"
}
Transaction attributes
Attribute | Type | Description |
---|---|---|
id |
string | The transaction’s ID. |
hidden |
integer | A binary integer flag designating whether or not the transaction is assessible. Integer codes map as follows:0 => Accessible 1 => Hidden |
status |
integer | The status of the transaction. Integer codes are mapped as follows:0 => Unpaid 1 => Paid 2 => Refunded 3 => Partially refunded 4 => Void 5 => Declined 6 => Written off 7 => Pending |
contact_id |
integer | The ID of the contact who made the transaction. |
contact_name |
string | The full name of the contact who made the transaction. |
order_id |
integer | If the transaction resulted from a subscription purchase, the ID of the associated order. |
form_id |
integer | If the transaction resulted from a purchase made via a form, the ID of that form. |
lp_id |
integer | If the transaction resulted from a purchase made via a landing page, the ID of that landing page. |
cc_id |
integer | The ID of the credit card used to charge the transaction. |
gateway_id |
integer | The ID of the payment gateway used to complete the transaction. |
date |
timestamp | The date and time the transaction was made measured in seconds from the Unix Epoch. |
template_id |
integer | The ID of the invoice template sent to the contact. |
subtotal |
integer | The amount of the transaction prior to tax and shipping. |
tax |
integer | The amount of the tax on the transaction. |
tax_city |
integer | The amount of any city tax on the transaction. |
tax_state |
integer | The amount of any state tax on the transaction. |
tax_county |
integer | The amount of any county tax on the transaction. |
shipping |
integer | The cost of shipping for the transaction. |
total |
integer | The total amount of the transaction. |
zip |
string | The zip code for the shipping address. |
city |
string | The city for the shipping address. |
state |
string | The state for the shipping address. |
county |
string | The county for the shipping address. |
external_order_id |
integer | If a sale comes from another system, the order ID sent from that system. |
oprid |
integer | The ID of the affiliate to be credited for the transaction. |
offer_data |
string | JSON encoded offer data. The offer object contains all information about products, quantities, coupons, tax and shipping. |
last_recharge_date |
timestamp | If the transaction has been recharged, the date and time of the last attempt measured in seconds from the Unix Epoch. |
recharge_attempts |
integer | If the transaction has been recharged, the count of the number of times this has been attempted. |
recharge |
integer | A binary integer flag indicating whether or not the transaction should be recharged. Values are mapped as follows:0 => false 1 => true |
Retrieve a single transaction
curl -X GET 'https://api.ontraport.com/1/Transaction?id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1
);
$response = $client->transaction()->retrieveSingle($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "1",
"hidden": "0",
"status": 6,
"contact_id": "1",
"order_id": "0",
"form_id": "0",
"lp_id": null,
"cc_id": "1",
"gateway_id": "25",
"date": "1492624700",
"template_id": "1",
"subtotal": "400.00",
"tax": "0.00",
"shipping": "0.00",
"total": "400.00",
"zip": "",
"city": null,
"state": null,
"county": null,
"tax_city": "0.00",
"tax_state": "0.00",
"tax_county": "0.00",
"external_order_id": "",
"oprid": "0",
"offer_data": "{\"products\":[{\"quantity\":\"20\",\"minQuantity\":\"1\",\"maxQuantity\":\"99\",\"total\":\"400.00\",\"shipping\":\"false\",\"tax\":\"false\",\"price\":[{\"price\":\"20.00\",\"payment_count\":\"1\",\"unit\":\"month\",\"id\":\"97092058792\"}],\"type\":\"\",\"quantityEditable\":\"false\",\"index\":\"0\",\"name\":\"Lambas Bread\",\"description\":\"\",\"owner\":\"1\",\"date\":\"1492622772\",\"dlm\":\"1492622772\",\"level1\":\"0\",\"level2\":\"0\",\"external_id\":\"null\",\"product_group\":\"null\",\"offer_to_affiliates\":\"true\",\"trial_period_unit\":\"day\",\"trial_period_count\":\"0\",\"trial_price\":\"0\",\"setup_fee\":\"0\",\"delay_start\":\"0\",\"sku\":\"null\",\"setup_fee_when\":\"immediately\",\"setup_fee_date\":\"0\",\"product_type\":\"digital\",\"subscription_fee\":\"0\",\"subscription_count\":\"0\",\"subscription_unit\":\"day\",\"download_limit\":\"0\",\"download_time_limit\":\"0\",\"taxable\":\"null\",\"deleted\":\"false\",\"total_income\":\"null\",\"total_purchases\":\"null\",\"id\":\"5\",\"uid\":\"bd068323-5782-54cd-3980-1fe6637cdbfe\"}],\"shipping\":\"null\",\"delay\":\"0\",\"invoice_template\":\"1\",\"subTotal\":\"400\",\"grandTotal\":\"400.00\",\"hasTaxes\":\"false\",\"hasShipping\":\"false\",\"paypalValid\":\"true\",\"offerCoupon\":\"false\",\"coupon\":\"null\",\"shipping_charge_reoccurring_orders\":\"false\",\"resorted\":\"null\",\"name\":\"Introductory Offer\",\"id\":\"3\"}",
"last_recharge_date": "1492643964",
"recharge_attempts": "2",
"recharge": null,
"contact_name": "Mary Smith"
},
"account_id": "12345"
}
Retrieves all the information for an existing transaction.
Request Endpoint
GET https://api.ontraport.com/1/Transaction
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The transaction ID. Required. |
Retrieve multiple transactions
curl -X GET 'https://api.ontraport.com/1/Transactions?ids=1%2C2%2C3&sort=contact_id&sortDir=desc&listFields=id%2Ccontact_id%2Ctotal' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"ids" => "1,2,3",
"sort" => "contact_id",
"sortDir" => "desc",
"listFields" => "id,contact_id,total"
);
$response = $client->transaction()->retrieveMultiple($requestParams);
?>
Example Response:
{
"code": 0,
"data": [
{
"id": "3",
"contact_id": "3",
"total": "400.00",
"date": 1492702394,
"status": 7
},
{
"id": "2",
"contact_id": "2",
"total": "400.00",
"date": 1492702394,
"status": 7
},
{
"id": "1",
"contact_id": "1",
"total": "400.00",
"date": 1492702394,
"status": 7
}
],
"account_id": "12345",
"misc": []
}
Retrieves a collection of transactions based on a set of parameters. You can limit unnecessary API requests by utilizing criteria and our pagination tools to select only the data set you require.
Request Endpoint
GET https://api.ontraport.com/1/Transactions
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
ids |
string | An integer array as a comma-delimited list of the IDs of the transactions to retrieve. Entering a value of 0 will result in all transactions being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of transactions you want to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which transactions to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your transaction objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other transaction fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of transactions to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your transaction object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | A string array as a comma-delimited list of the fields which should be returned in your results. |
Retrieve transaction object meta
curl -X GET 'https://api.ontraport.com/1/Transactions/meta' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->transaction()->retrieveMeta();
?>
{
"code": 0,
"data": {
"46": {
"name": "Invoice",
"fields": {
"date": {
"alias": "Date Created",
"type": "timestamp"
},
"status": {
"alias": "Status",
"type": "drop",
"options": {
"0": "Collections",
"1": "Paid",
"2": "Refunded",
"3": "Partially Refunded",
"4": "Voided",
"5": "Declined",
"6": "Write Off",
"7": "Pending"
}
},
"total": {
"alias": "Total",
"type": "price"
},
"tax": {
"alias": "Total Tax",
"type": "price"
},
"subtotal": {
"alias": "Subtotal",
"type": "price"
},
"shipping": {
"alias": "Shipping",
"type": "price"
},
"zip": {
"alias": "Tax Zip",
"type": "text"
},
"city": {
"alias": "Tax City",
"type": "text"
},
"state": {
"alias": "Tax State",
"type": "text"
},
"county": {
"alias": "Tax County",
"type": "text"
},
"tax_city": {
"alias": "Tax City Amount",
"type": "price"
},
"tax_state": {
"alias": "Tax State Amount",
"type": "price"
},
"tax_county": {
"alias": "Tax County Amount",
"type": "price"
},
"contact_name": {
"alias": "Contact Name",
"type": "text"
},
"gateway_id": {
"alias": "Gateway",
"type": "parent",
"parent_object": 130
}
}
}
},
"account_id": "50"
}
Retrieves the field meta data for the transaction object.
Request Endpoint
GET https://api.ontraport.com/1/Transactions/meta
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
None
Retrieve transaction collection info
curl -X GET 'https://api.ontraport.com/1/Transactions/getInfo?search=400&searchNotes=true' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"search" => "400"
);
$response = $client->transaction()->retrieveCollectionInfo($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"listFields": [
"status",
"total",
"contact_name",
"date"
],
"listFieldSettings": [],
"count": "3",
"sums": {
"total": 1200
}
},
"account_id": "12345"
}
Retrieves information about a collection of transactions, such as the number of transactions that match the given criteria.
Request Endpoint
GET https://api.ontraport.com/1/Transactions/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
condition |
string | A JSON encoded string to more specifically set criteria for which transactions to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your transaction objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other transaction fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of transactions to retrieve information about. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Convert transaction to collections
curl -X PUT -d 'id=1' 'https://api.ontraport.com/1/transaction/convertToCollections' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1
);
$response = $client->transaction()->convertToCollections($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
Marks a transaction as in collections.
Request Endpoint
PUT https://api.ontraport.com/1/transaction/convertToCollections
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
id |
integer | The transaction ID. Required. |
Convert transaction to declined
curl -X PUT -d 'id=1' 'https://api.ontraport.com/1/transaction/convertToDecline' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1
);
$response = $client->transaction()->convertToDeclined($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
Marks a transaction as declined.
Request Endpoint
PUT https://api.ontraport.com/1/transaction/convertToDecline
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
id |
integer | The transaction ID. Required. |
Mark transaction as paid
curl -X PUT -d 'id=4' 'https://api.ontraport.com/1/transaction/markPaid' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 4
);
$response = $client->transaction()->markAsPaid($requestParams);
?>
Example Response:
{
"code": 0,
"data": [],
"account_id": "12345"
}
Marks a transaction as paid.
Request Endpoint
PUT https://api.ontraport.com/1/transaction/markPaid
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
id |
integer | The transaction ID. Required. |
Retrieve an order
curl -X GET 'https://api.ontraport.com/1/transaction/order?id=2' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678' \
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 2
);
$response = $client->transaction()->retrieveOrder($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"products": [],
"shipping": "null",
"delay": "0",
"invoice_template": "1",
"subTotal": "10000000",
"grandTotal": "10000000.00",
"hasTaxes": "false",
"hasShipping": "false",
"paypalValid": "false",
"offerCoupon": "false",
"coupon": "null",
"shipping_charge_reoccurring_orders": "false",
"resorted": "null",
"name": "Awesome Offer",
"data": "{\"products\":[{\"quantity\":1,\"minQuantity\":1,\"maxQuantity\":99,\"total\":\"10000000.00\",\"shipping\":false,\"tax\":false,\"price\":[{\"price\":\"10000000.00\",\"payment_count\":1,\"unit\":\"year\",\"id\":250271583026}],\"type\":\"subscription\",\"quantityEditable\":\"false\",\"index\":0,\"name\":\"Mithril\",\"uid\":\"42c5547e-38cc-b61b-69b4-26f67d03ed9a\",\"id\":\"6\",\"description\":\"\",\"owner\":\"1\",\"date\":\"1492641931\",\"dlm\":\"1492641931\",\"level1\":\"0\",\"level2\":\"0\",\"external_id\":null,\"product_group\":null,\"offer_to_affiliates\":\"true\",\"trial_period_unit\":\"day\",\"trial_period_count\":\"0\",\"trial_price\":\"0\",\"setup_fee\":\"0\",\"delay_start\":\"0\",\"sku\":null,\"setup_fee_when\":\"immediately\",\"setup_fee_date\":\"0\",\"product_type\":\"digital\",\"subscription_fee\":\"0\",\"subscription_count\":\"0\",\"subscription_unit\":\"day\",\"download_limit\":\"0\",\"download_time_limit\":\"0\",\"taxable\":null,\"deleted\":\"false\",\"total_income\":null,\"total_purchases\":null}],\"taxes\":[],\"paymentmethods\":[],\"shipping\":null,\"delay\":0,\"invoice_template\":1,\"subTotal\":10000000,\"grandTotal\":\"10000000.00\",\"hasTaxes\":false,\"hasShipping\":false,\"paypalValid\":false,\"offerCoupon\":false,\"coupon\":null,\"shipping_charge_reoccurring_orders\":false,\"resorted\":null,\"name\":\"Awesome Offer\"}",
"public": "1",
"referenced": "0",
"id": "4",
"offer_id": "5",
"order_id": "2",
"payment_next_date": "1524178068",
"status": "1",
"gateway_id": "1",
"affiliate_id": "0"
},
"account_id": "12345"
}
Retrieves all information about a specified order.
Request Endpoint
GET https://api.ontraport.com/1/transaction/order
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Parameter | Type | Description |
---|---|---|
id |
integer | The transaction ID. Required. |
Update an order
curl -X PUT -d '{ \
"offer": { \
"products": [ \
{ \
"price": [ \
{ \
"price": 10.00, \
"id": 1 \
} \
], \
"id": 1 \
} \
], \
"offer_id": 8, \
"order_id": 1, \
"cc_id": 2 \
} \
}' 'http://api.ontraport.com/1/transaction/order'
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678' \
--header 'Content-Type: application/json'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$data = array(
"offer" => array(
"products" => array(
array(
"price" => array(
array(
"price" => 10,
"id" => 1
)
),
"id" => 5
),
),
"offer_id" => 8,
"order_id" => 3,
"cc_id" => 1
)
);
$client->transaction()->updateOrder($data);
?>
Example Response:
{
"code": 0,
"data": {
"id": "1",
"contact_id": "9",
"offer_id": "9",
"affiliate": "0",
"cc_id": 1,
"name": "Widget",
"payment_next_date": "1515441600",
"orig_month_date": "0",
"unit": "month",
"count": "1",
"gateway_id": "3",
"shipping_address": null,
"shipping_city": null,
"shipping_state": null,
"shipping_zip": null,
"shipping_country": null,
"shipping_last_charge": "0",
"shipping_service": null,
"status": "0",
"hidden": "0",
"dlm": "1512762376",
"order_form_json": null,
"cancellation_date": "0",
"next_sub": "40.00",
"tax": "0.00",
"shipping": "0.00",
"next_charge": "10.00",
"transactions": "1",
"transactions_remaining": "0",
"charged": "10.00"
},
"account_id": "12345"
}
Updates an order to include new offer data. For example, to update the credit card tied to the recurring subscription.
Request Endpoint
PUT https://api.ontraport.com/1/transaction/order
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
offer |
Offer | The product and pricing offer for the transaction. Required. Array keys must include: products => array[Product] order_id => integer offer_id => integer cc_id => integer Array keys may include: taxes => array[Tax] shipping => array[Shipping] delay => integer subTotal => number grandTotal => number hasTaxes => boolean hasShipping => boolean shipping_charge_recurring_orders => boolean ccExpirationDate => string If offer data is not provided, the order will be deleted. |
Process a transaction manually
curl -X POST -d '{
"contact_id": 1,
"chargeNow": "chargeNow",
"trans_date": 1369820760000,
"invoice_template": 1,
"gateway_id": 1,
"offer": {
"products": [
{
"quantity": 1,
"shipping": false,
"tax": false,
"price": [
{
"price": 10,
"payment_count": 0,
"unit": "month",
"id": 314159265
}
],
"type": "subscription",
"owner": 1,
"offer_to_affiliates": true,
"trial_period_unit": "day",
"trial_period_count": 0,
"setup_fee_when": "immediately",
"setup_fee_date": "string",
"delay_start": 0,
"subscription_count": 0,
"subscription_unit": "month",
"taxable": false,
"id": 5
}
]
},
"billing_address": {
"address": "123 XYZ St.",
"city": "Santa Barbara",
"state": "CA",
"zip": "93101",
"country": "US"
}, \
"payer": {
"ccnumber": "4111111111111111",
"code": "123",
"expire_month": 1,
"expire_year": 2035
}
}' 'https://api.ontraport.com/1/transaction/processManual' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"contact_id" => 1,
"chargeNow" => "chargeNow",
"trans_date" => 1369820760000,
"invoice_template" => 1,
"gateway_id" => 1,
"offer" => array(
"products" => array(
array(
"quantity" => 1,
"shipping" => false,
"tax" => false,
"price" => array(
array(
"price" => 10,
"payment_count" => 0,
"unit" => "month",
"id" => 314159265
)
),
"type" => "subscription",
"owner" => 1,
"offer_to_affiliates" => true,
"trial_period_unit" => "day",
"trial_period_count" => 0,
"setup_fee_when" => "immediately",
"setup_fee_date" => "string",
"delay_start" => 0,
"subscription_count" => 0,
"subscription_unit" => "month",
"taxable" => false,
"id" => 5
),
)
),
"billing_address" => array(
"address" => "123 XYZ St",
"city" => "Santa Barbara",
"state" => "CA",
"zip" => "93101",
"country" => "US"
),
"payer" => array(
"ccnumber" => "4111111111111111",
"code" => "123",
"expire_month" => 1,
"expire_year" => 2035
)
);
$response = $client->transaction()->processManual($requestParams);
?>
Example Response (processed transactions):
*Note that invoice ID can be used interchangeably with transaction ID.
{
"code":0,
"data":{
"result_code":1,
"transaction_id":"1",
"external_txn":"000TEST",
"message":"Success!",
"invoice_id":1
}
}
Processes a transaction for a contact. Please note that this request requires valid parameters for all associated members of the transaction or the request will fail. If you have doubled-checked all parameters and the request is still failing, check that the payload JSON format is correct by using JSONLint.
If credit card and billing information already exist for this contact, you may use the cc_id
parameter and can choose
which stored credit card the transaction is charged to. In this case, you may omit billing_address
and payer
from the request.
If credit card and billing information are already on file for this client and you want this transaction to be charged to the contact’s default credit card,
you do not need to submit cc_id
, billing_address
or payer
.
Note that trans_date
is given in milliseconds elapsed since midnight on 1/1/1970.
If you would like to log a transaction without actually processing it, you can use this endpoint with chargeNow
set to
“chargeLog”. You can see an example of this here.
Request Endpoint
POST https://api.ontraport.com/1/transaction/processManual
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameter | Type | Description |
---|---|---|
contact_id |
integer | The ID of the contact for whom a transaction should be created. Required. |
chargeNow |
string | Whether a transaction should be charged or simply logged. Should be set to “chargeNow”. Required. |
external_order_id |
string | Optional external order id that you can save within the generated transaction |
trans_date |
integer | The time of the transaction represented in milliseconds since the Unix Epoch. |
invoice_template |
integer | The ID of the invoice template to use for this transaction. The default invoice ID is 1. Required. |
gateway_id |
integer | The ID of the gateway to use for this transaction. Note that this is the ID of the gateway object itself and not the external_id of the gateway. A transaction can’t succeed without a valid gateway. Required. |
offer |
Offer | The product and pricing offer for the transaction. Required. Array keys may include: products => array[Product] taxes => array[Tax] shipping => array[Shipping] delay => integer subTotal => number grandTotal => number hasTaxes => boolean hasShipping => boolean shipping_charge_recurring_orders => boolean ccExpirationDate => string |
billing_address |
Address | The complete billing address information for this transaction. Only required if not already on file for this contact. Array keys may include: address => string address2 => string city => string state => string zip => string country => string |
payer |
Payer | The credit card information for this transaction. Only required if not already on file for this contact. Array keys may include: ccNumber => string code => string expire_month => integer expire_year => integer |
Offer
An offer needs to be included with each manual transaction. This includes information on products, tax, and shipping. If invalid information is included in your offer, your request will fail.
Parameter | Type | Description |
---|---|---|
products |
array[Product] | An array of products to include in your offer. Required. Array keys may include: quantity => integer total => number shipping => boolean tax => boolean price => array[Price] type => string owner => integer level1 => number level2 => number offer_to_affiliates => boolean trial_period_unit => string trial_period_count => integer trial_price => number setup_fee => number setup_fee_when => string setup_fee_date => string delay_start => integer subscription_fee => number subscription_count => integer subscription_unit => integer taxable => boolean id => integer |
taxes |
array[Tax] | An array of taxes to be applied to your offer. Array keys may include: id => integer rate => number name => string taxShipping => boolean taxTotal => number form_id => integer |
shipping |
array[Shipping] | An array of shipping detail to be applied to your offer. Array keys may include: id => integer name => string price => number form_id => integer |
delay |
integer | The number of days to delay the start of the offer. |
subTotal |
number | The product total cost before tax, shipping and discounts. |
grandTotal |
number | The total cost of the entire offer. |
hasTaxes |
boolean | Indicates whether or not there are applicable taxes for this offer. |
hasShipping |
boolean | Indicates whether or not shipping should be applied to this offer. |
shipping_charge_recurring_orders |
boolean | Indicates whether or not shipping charges should be applied to recurring orders. |
send_recurring_invoice |
boolean | For subscriptions, indicates whether or not an invoice should be sent with every recurring order. This value defaults to false. |
ccExpirationDate |
string | The expiration date of the credit card on file. |
Address
If billing address information is not already on file for a contact, this information must be included with any manual transaction. Address information does not need to be included if it is already on file.
Parameter | Type | Description |
---|---|---|
address |
string | The contact’s billing address. Required. |
address2 |
string | Any additional address information for the contact, such as building or suite number. |
city |
string | The contact’s city. Required. |
state |
string | The contact’s state. Required. |
zip |
string | The contact’s zip code. Required. |
country |
string | The contact’s country. Required. |
Payer
Payer information is stored for contacts with credit card information on file. If this information is not currently on file for a contact, it needs to be included in order to successfully process a transaction.
Parameter | Type | Description |
---|---|---|
ccnumber |
string | The contact’s full credit card number. Required. |
code |
string | The CVV code for the contact’s credit card. Required. |
expire_month |
integer | The expiration month, in digits, of the credit card to be processed. Required. |
expire_year |
integer | The four-digit expiration year of the credit card to be processed. Required. |
Products
An array of products is included with every offer. If valid, existing products are not included, a transaction can’t be processed.
Parameter | Type | Description |
---|---|---|
quantity |
integer | The total number of this item to be included in the purchase. Required. |
total |
number | The total amount of this purchase. Required. |
shipping |
boolean | Indicates whether or not there is a cost to ship this product. |
taxable |
boolean | Indicates whether or not this product should be taxed. |
price |
array[Price] | An array of pricing elements associated with this product. Array keys may include: price => number payment_count => integer unit => string id => integer |
type |
string | The type of product. Values can be:subscription => a recurring purchase item one_time => a single purchase item payment_plan => a product paid for on installment |
owner |
integer | The ID of the user controlling the product. |
level1 |
number | The partner level 1 commission percentage, if any. |
level2 |
number | The partner level 2 commission percentage, if any. |
offer_to_affiliates |
boolean | Indicates whether or not this product is offered to affiliates. |
trial_period_unit |
string | If there is a trial period for the product, indicates the units of length of the trial period. Options can be: day , week , month , quarter , year . |
trial_period_count |
integer | Indicates the length of the trial period. Must be used in conjunction with trial_period_unit . |
trial_price |
number | The price of the product during the trial period. |
setup_fee |
number | The cost of of any one-time set-up fee, if applicable. |
setup_fee_when |
string | Indicates when the setup fee should be applied. Values can be: immediately , after_trial , on_date . |
setup_fee_date |
timestamp | If the value for setup_fee_when is on_date , the date of when the steup fee should be applied in seconds elapsed since the Unix Epoch. |
delay_start |
integer | The number of days to delay the start of a subscription. |
subscription_fee |
number | The cost of any additional fee for a subscription product. |
subscription_count |
integer | The number of subscriptions. |
subscription_unit |
string | Indicates how often a subscription product is delivered. Options can be: day , week , month , quarter , year . |
id |
integer | The product ID. This must be the ID of an existing product or your request will fail. Required. |
Tax
An array of tax data can be included with an offer where taxes are applicable.
Parameter | Type | Description |
---|---|---|
id |
integer | The ID of the existing tax object to apply to the offer. Required. |
rate |
number | The rate at which the offer should be taxed. |
name |
string | The name of the tax to be applied. |
taxShipping |
boolean | Indicates whether or not shipping charges should be taxed. |
taxTotal |
number | The total amount of the applied taxes. |
form_id |
integer | The ID of the related form, if any. |
Shipping
An array of shipping data can be included with an offer where shipping is applicable.
Parameter | Type | Description |
---|---|---|
id |
integer | The ID of the shipping method being applied to the offer. This must be an existing shipping method. Required. |
name |
string | The name of the shipping method being used. |
price |
number | The cost of charges incurred for this shipping method. |
form_id |
integer | The ID of the related form, if any. |
Price
Any array of price data should be included with products.
Parameter | Type | Description |
---|---|---|
id |
integer | The ID of the pricing item. |
price |
number | The price of the product. |
payment_count |
integer | If a payment plan item, the number of payments to be made. |
unit |
string | The units of time of payments. Options can be: day , week , month , quarter , year . |
Log a transaction
curl -X POST -d '{
"contact_id": 1,
"chargeNow": "chargeLog",
"invoice_template": 1,
"offer": {
"products": [
{
"quantity": 1,
"owner": 1,
"id": 1
}
]
}
}' 'https://api.ontraport.com/1/transaction/processManual' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"contact_id" => 1,
"invoice_template" => 1,
"chargeNow" => "chargeLog",
"offer" => array(
"products" => array(
array(
"quantity" => 1,
"owner" => 1,
"id" => 1
)
)
)
);
$response = $client->transaction()->processManual($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"invoice_id": 3
},
"account_id": "12345"
}
If you would like to pass in a previously charged transaction to be logged in ONTRAPORT without actually charging your contact, you can use
the transaction/processManual endpoint
with the chargeNow
field set to “chargeLog”.
Far less data is needed to simply log a transaction than to manually process one. The gateway, payer, and billing details are unnecessary in this case. The mandatory information in this case include a contact ID, the “chargeLog” designation, and product and pricing details.
Request Endpoint
POST https://api.ontraport.com/1/transaction/processManual
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameter | Type | Description |
---|---|---|
contact_id |
integer | The ID of the contact for whom a transaction should be created. Required. |
chargeNow |
string | Whether a transaction should be charged or simply logged. Should be set to “chargeLog”. Required. |
external_order_id |
string | Optional external order id that you can save within the generated transaction |
trans_date |
integer | The time of the transaction represented in milliseconds since the Unix Epoch. |
invoice_template |
integer | The ID of the invoice template to use for this transaction. The default invoice ID is 1. If you would like to suppress the sending of invoices for logged transactions, this parameter should be set to -1. |
offer |
Offer | The product and pricing offer for the transaction. Required. Array keys must include: products => array[Product] |
Refund a transaction
curl -X PUT -d '{
"ids": [
2
]
}' 'https://api.ontraport.com/1/transaction/refund' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => 0,
"ids" => array(2)
);
$response = $client->transaction()->refund($requestParams);
?>
Example Response:
{
"code": 0,
"data": "Refunded",
"account_id": "12345"
}
Refunds a previously charged transaction.
Request Endpoint
PUT https://api.ontraport.com/1/transaction/refund
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
ids |
array[int] | An array of the IDs of the transactions to refund. Entering a value of 0 will result in all transactions being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of transactions you want to refund. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which transactions to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your transaction objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other transaction fields. |
group_ids |
array[int] | An array of the group IDs of transactions to refund. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Rerun a transaction
curl -X POST -d '{"ids": [1]}' 'https://api.ontraport.com/1/transaction/rerun' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => 0,
"ids" => array(1)
);
$response = $client->transaction()->rerun($requestParams);
?>
Example Response:
{
"code": 0,
"data": 1,
"account_id": "12345"
}
Reruns a previously charged transaction.
Request Endpoint
POST https://api.ontraport.com/1/transaction/rerun
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
ids |
array[int] | An array of the IDs of the transactions to rerun. Entering a value of 0 will result in all transactions being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of transactions you want to rerun. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which transactions to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your transaction objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other transaction fields. |
group_ids |
array[int] | An array of the group IDs of transactions to rerun. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Rerun a transaction’s commissions
curl -X PUT -d '{"ids": [1]}' 'https://api.ontraport.com/1/transaction/rerunCommission' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => 0,
"ids" => array(1)
);
$response = $client->transaction()->rerunCommission($requestParams);
?>
Example Response:
{
"code": 0,
"data": "Re-ran commissions",
"account_id": "99"
}
Reruns partner commissions for a previously charged transaction.
Request Endpoint
PUT https://api.ontraport.com/1/transaction/rerunCommission
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
ids |
array[int] | An array of the IDs of the transactions to rerun commissions for. Entering a value of 0 will result in all transactions being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of transactions you want to rerun commissions for. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which transactions to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your transaction objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other transaction fields. |
group_ids |
array[int] | An array of the group IDs of transactions to rerun commissions for. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Resend an invoice
curl -X POST -d '{
"objectID": 0,
"ids": [
2
]
}' 'https://api.ontraport.com/1/transaction/resendInvoice' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => 0,
"ids" => array(1)
);
$response = $client->transaction()->resendInvoice($requestParams);
?>
Example Response:
{
"code": 0,
"data": "",
"account_id": "12345"
}
Resends an invoice for a previously charged transaction.
Request Endpoint
POST https://api.ontraport.com/1/transaction/resendInvoice
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
ids |
array[int] | An array of the IDs of the transactions to resend invoices for. Entering a value of 0 will result in all transactions being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of transactions you want to resend invoices for. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which transactions to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your transaction objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other transaction fields. |
group_ids |
array[int] | An array of the group IDs of transactions to resend invoices for. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Void a transaction
curl -X PUT -d '{
"ids": [
1
]
}' 'https://api.ontraport.com/1/transaction/void' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => 0,
"ids" => array(1)
);
$response = $client->transaction()->void($requestParams);
?>
Example Response:
{
"code": 0,
"data": "Voided",
"account_id": "12345"
}
Voids a previously charged transaction.
Request Endpoint
PUT https://api.ontraport.com/1/transaction/void
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
ids |
array[int] | An array of the IDs of the transactions to void. Entering a value of 0 will result in all transactions being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of transactions you want to void. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which transactions to void. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your transaction objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other transaction fields. |
group_ids |
array[int] | An array of the group IDs of transactions to void. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Write off a transaction
curl -X PUT -d '{
"objectID": 0,
"ids": [
1
]}' 'https://api.ontraport.com/1/transaction/writeOff' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678' \
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => 0,
"ids" => array(1)
);
$response = $client->transaction()->writeOff($requestParams);
?>
Example Response:
{
"code": 0,
"data": 1,
"account_id": "12345"
}
Writes off a previously charged transaction.
Request Endpoint
PUT https://api.ontraport.com/1/transaction/writeOff
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
ids |
array[int] | An array of the IDs of the transactions to write off. Entering a value of 0 will result in all transactions being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of transactions you want to write off. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which transactions to write off. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your transaction objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other transaction fields. |
group_ids |
array[int] | An array of the group IDs of transactions to write off. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Tasks
Object Type ID: 1
A task object is created when a task is assigned to a contact or other object.
Through the task API, you can retrieve a single task or a collection of tasks, as well as update the data for a task. You can also assign, cancel, reschedule, and mark tasks as complete.
The task object
{
"id": "1",
"owner": "1",
"drip_id": "0",
"contact_id": "32",
"step_num": "0",
"subject": "Do this.",
"date_assigned": "1491929050",
"date_due": "1522341850",
"date_complete": null,
"status": "0",
"type": "0",
"details": "Fred, please complete this task.",
"hidden": "0",
"call_outcome_id": "0",
"item_id": "7",
"notifications": "{\"notifications_sent\":[false]}",
"rules": null,
"object_type_id": "0",
"object_name": "Contacts"
}
Task attributes
Attribute | Type | Description |
---|---|---|
id |
integer | The task’s ID. |
owner |
integer | The user who has control of the task. |
drip_id |
integer | If the task is a step in a sequence, the ID of that sequence. |
contact_id |
integer | The ID of the contact the task is related to. |
step_num |
integer | If the task is a step in a sequence, the order in the sequence of that step. |
subject |
string | The subject line of the task email. |
date_assigned |
timestamp | The date and time the task was assigned. |
date_due |
timestamp | The date and time the task should be completed by. |
date_complete |
timestamp | The date and time the task was marked as completed. |
status |
integer | The task completion status. Integer codes are mapped as follows:0 => Pending 1 => Complete 2 => Cancelled |
type |
integer | The task type. Integer codes are mapped as follows:-1 => Fulfillment tasks 0 => Normal tasks (default) |
details |
string | The content of the task message. |
hidden |
integer | A binary integer flag designating whether or not the task is assessible. Integer codes map as follows:0 => Not hidden 1 => Hidden |
call_outcome_id |
integer | If the task has an outcome, the ID of that outcome. Task outcomes are user-defined and stored as a related object. |
item_id |
integer | The ID of the task message. The task message is the generic template the task was created from. |
notifications |
string | A JSON encoded string including information about sent notifications. |
rules |
string | If the task has rules associated with it, the events, conditions and actions of those rules. |
object_type_id |
integer | The ID for the type of object the task is associated with. |
object_name |
string | The name of the type of object the task is associated with. |
Retrieve a specific task
curl -X GET 'https://api.ontraport.com/1/Task?id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1
);
$response = $client->task()->retrieveSingle($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "1",
"owner": "1",
"drip_id": "0",
"contact_id": "32",
"step_num": "0",
"subject": "Do this.",
"date_assigned": "1491929050",
"date_due": "1522341850",
"date_complete": null,
"status": "0",
"type": "0",
"details": "Fred, please complete this task.",
"hidden": "0",
"call_outcome_id": "0",
"item_id": "7",
"notifications": "{\"notifications_sent\":[false]}",
"rules": null,
"object_type_id": "0",
"object_name": "Contacts"
},
"account_id": "12345"
}
Retrieves all the information for an existing task.
Request URL
GET https://api.ontraport.com/1/Task
Required Headers
Api-Key: Key5678
Api-Appid: 2_AppID_12345678
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The task ID. Required. |
Retrieve multiple tasks
curl -X GET 'https://api.ontraport.com/1/Tasks?sort=date_due&sortDir=desc&listFields=id%2Csubject%2Cdate_due' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"sort" => "date_due",
"sortDir" => "desc",
"listFields" => "id,subject,date_due"
);
$response = $client->task()->retrieveMultiple($requestParams);
?>
Example response:
{
"code": 0,
"data": [
{
"id": "2",
"subject": "Do this.",
"date_due": "1713628490",
"owner": "1"
},
{
"id": "1",
"subject": "Help!",
"date_due": "1605628490",
"owner": "1"
},
{
"id": "3",
"subject": "Follow up with this contact",
"date_due": "1493152240",
"owner": "1"
}
],
"account_id": "12345",
"misc": []
}
Retrieves a collection of tasks based on a set of parameters. You can limit unnecessary API requests by utilizing criteria and our pagination tools to select only the data set you require.
Request URL
GET https://api.ontraport.com/1/Tasks
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
ids |
string | An integer array as a comma-delimited list of the IDs of the tasks to retrieve. Entering a value of 0 will result in all tasks being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of tasks you want to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which tasks to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your task objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other task fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of tasks to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your task object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | A string array as a comma-delimited list of the fields which should be returned in your results. |
Retrieve task object meta
curl -X GET 'https://api.ontraport.com/1/Tasks/meta' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->task()->retrieveMeta();
?>
Example Response:
{
"code": 0,
"data": {
"1": {
"name": "Task",
"fields": {
"owner": {
"alias": "Assignee",
"type": "parent",
"parent_object": 2
},
"contact_id": {
"alias": "Contact",
"type": "parent"
},
"call_outcome_id": {
"alias": "Outcome",
"type": "parent",
"parent_object": 66
},
"subject": {
"alias": "Subject",
"type": "text"
},
"details": {
"alias": "Details",
"type": "longtext"
},
"date_assigned": {
"alias": "Date Assigned",
"type": "timestamp"
},
"date_complete": {
"alias": "Date Complete",
"type": "timestamp"
},
"date_due": {
"alias": "Date Due",
"type": "fulldate"
},
"item_id": {
"alias": "Task",
"type": "parent",
"parent_object": 7
},
"status": {
"alias": "Status",
"type": "drop",
"options": {
"0": "Pending",
"1": "Complete",
"2": "Canceled"
}
},
"drip_id": {
"alias": "Sequence",
"type": "parent",
"parent_object": 5
},
"object_type_id": {
"alias": "Object",
"type": "parent",
"parent_object": "99"
},
"object_name": {
"alias": "Related Object",
"type": "related_data"
}
}
}
},
"account_id": "12345"
}
Retrieves the field meta data for the task object.
Request URL
GET https://api.ontraport.com/1/Tasks/meta
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
None
Retrieve task collection info
curl -X GET 'https://api.ontraport.com/1/Tasks/getInfo?search=Test' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"search" => "Task",
);
$response = $client->task()->retrieveCollectionInfo($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"listFields": [
"owner",
"subject",
"status",
"date_assigned",
"date_due",
"date_complete",
"contact_id",
"call_outcome_id"
],
"listFieldSettings": [],
"count": "2"
},
"account_id": "50"
}
Retrieves information about a collection of tasks, such as the number of tasks that match the given criteria.
Request URL
GET https://api.ontraport.com/1/Tasks/getInfo
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
condition |
string | A JSON encoded string to more specifically set criteria for which tasks to select. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your task objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other task fields. |
group_ids |
string | An integer array as a comma-delimited list of the group IDs of tasks to retrieve information about. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Update a task
curl -X PUT -d 'id=1&status=2' 'https://api.ontraport.com/1/Tasks' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 1,
"status" => 2
);
$response = $client->task()->update($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"attrs": {
"status": "2",
"id": "1"
}
},
"account_id": "12345"
}
Updates a task with a new assignee, due date, or status.
Request URL
PUT https://api.ontraport.com/1/Tasks
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
id |
integer | The task ID. Required. |
owner |
integer | The ID of the task assignee. |
date_due |
timestamp | The date and time the task should be due measured in seconds from the Unix Epoch. |
status |
string | The task’s status. Integer codes map as follows:0 => Pending 1 => Complete 2 => Cancelled |
Assign a task
curl -X POST -d '{
"object_type_id": 0,
"ids": [
31
],
"group_ids": [
0
],
"message": {
"id": 6,
"type": "Task",
"due_date": 7,
"task_owner": 0
}
}' 'https://api.ontraport.com/1/task/assign' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"object_type_id" => 0,
"ids" => array(5),
"group_ids" => array(0),
"message" => array(
"id" => 1,
"type" => "Task",
"due_date" => 7,
"task_owner" => 0
)
);
$response = $client->task()->assign($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
Assigns a task to one or more contacts.
Request URL
POST https://api.ontraport.com/1/task/assign
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
object_type_id |
integer | The object type ID of the object type tasks will be assigned to. This value is 0 for contacts. Required. |
ids |
array[int] | An array of the IDs of contacts to assign a task to. (group_ids may be substituted for ids ). |
group_ids |
array[int] | An array of the group IDs of contacts to assign a task to. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
message |
TaskMessage | An array of data for the task message to assign to contacts. See below for descriptions of the parameters which should be included in this array. |
Task Message
When assigning a task through the API, you can include an array of data pertaining to the task message. You can specify which task message to use, the type of task, and the due date and assignee of the task.
Parameter | Type | Description |
---|---|---|
id |
integer | The task message ID. |
type |
integer | The task type. Integer codes are mapped as follows:-1 => Fulfillment tasks 0 => Normal tasks (default) |
due_date |
timestamp | The date and time the task will be due, measured in seconds from the Unix Epoch. |
task_owner |
integer | The ID of the user responsible for the task. |
Cancel a task
curl -X POST -d '{
"objectID": 0,
"ids": [
1
]
}' 'https://api.ontraport.com/1/task/cancel' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"objectID" => 0,
"ids" => array(
1
)
);
$response = $client->task()->cancel($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
Cancels one or more tasks.
To affect a single task or list of specific tasks, specify ids
in the body of your request.
Otherwise, you should use performAll
and other criteria to select a group of tasks to cancel.
Request URL
POST https://api.ontraport.com/1/task/assign
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
objectID |
integer | The object type ID. Required. |
ids |
array[int] | An array of the IDs of the tasks to cancel. Entering a value of 0 will result in all tasks being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of tasks you want to cancel. The maximum and default range is 50. |
condition |
string | A JSON encoded string to more specifically set criteria for which tasks to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your task objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not notes should be searched for the specified string in addition to other task fields. |
group_ids |
array[int] | An array of the group IDs of tasks to cancel. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
Complete a task
curl -X POST -d '{
"object_type_id": 0,
"ids": [
3
],
"data": {
"outcome": ":=success",
"task_form_lastname": "Green"
}
}' 'https://api.ontraport.com/1/task/complete' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"object_type_id" => 0,
"ids" => array(3),
"data" => array(
"outcome" => ":=success",
"task_form_lastname" => "Green"
)
);
$response = $client->task()->complete($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
Marks one or more tasks as completed.
To affect a single task or list of specific tasks, specify ids
in the body of your request.
Otherwise, you should use performAll
and other criteria to select a group of tasks to complete.
Request URL
POST https://api.ontraport.com/1/task/complete
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Parameter | Type | Description |
---|---|---|
object_type_id |
integer | The ID of the object type to mark a task as complete for. This value defaults to 0 for a contact object. Required. |
ids |
array[int] | An array of the object IDs the task should be marked as completed for. (group_ids can be substituted for ids ). |
group_ids |
array[int] | An array of the group IDs the task should be marked as completed for. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
data |
TaskData | An array of task data, including:outcome => string followup => TaskFollowup task_form_{fieldname} => string See below for a description of these parameters. |
Task Data
When you mark a task as completed, you have the option of specifying additional actions to be taken. This optional array of task data allows you to create a task outcome, assign a followup task, and update any task fields as needed.
Parameter | Type | Description |
---|---|---|
outcome |
string | Task outcome name. This must start with “:=” For example, “:=signed”. |
followup |
TaskFollowup | An array of task followup data, including:message_id => integer due_date => integer task_owner => integer See a description of those parameters below. |
task_form_{field} |
string | These fields can be used to update associated object data when completing a task. For example, set task_form_title to “New title” to change the contact’s title. |
Task Followup
If you want to create another task to follow up upon task completion, you can include an array of data for a followup task. This allows you to specify the message you want to use in addition to the due date and assignee of the new task.
Parameter | Type | Description |
---|---|---|
message_id |
integer | Message ID of a new task to be created for further followup. This task message must currently exist. New task messages can be created using the objects/create endpoint with objectID set to 1. |
due_date |
integer | The due date of the new task, given as number of days from current date. |
task_owner |
integer | The ID of the user responsible for the new task. |
Reschedule a task
curl -X POST -d '{
"id": 2,
"newtime": 1713628490
}' 'https://api.ontraport.com/1/task/reschedule' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 2,
"newtime" => 1713628490
);
$response = $client->task()->reschedule($requestParams);
?>
Example Response:
{
"code": 0,
"account_id": "12345"
}
Reschedules a task for a different date and time.
Request URL
POST https://api.ontraport.com/1/task/reschedule
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/json
Request Parameters
Parameters should be sent in the request body as a JSON-encoded string.
Field | Type | Description |
---|---|---|
id |
integer | The task ID. Required. |
newtime |
timestamp | The date and time the task should be rescheduled for, measured in seconds from the Unix Epoch. |
Webhooks
Object Type ID: 145
You can use webhooks subscriptions to receive notifications about events occurring within your ONTRAPORT account.
Events you can currently subscribe to are as follows:
Event | Triggered When | Details |
---|---|---|
object_create | A new contact or custom object is added | Event |
object_submits_form | Any contact or custom object fills out the specified form | Event |
sub_tag | Any contact or custom object is added to the specified tag | Event |
unsub_tag | Any contact or custom object is removed from the specified tag | Event |
The webhook object
{
"id": "27",
"event": "sub_tag(1)",
"data": "{\"format\":\"notify\"}",
"url": "https://www.testurl.com",
"last_hook": 1516128699,
"last_code": 200,
"last_payload":"{\"webhook_id\":\"10\",\"object_type_id\":\"0\",\"event\":{\"type\":\"sub_tag\",\"tag_id\":\"1\"},\"data\":{\"id\":\"1\",\"firstname\":\"Michael\",\"lastname\":\"Brown\",\"email\":\"mbrown@ontraport.com\"},\"timestamp\":1519774345}"
}
Attributes | Type | Description |
---|---|---|
id |
integer | The webhook ID. |
event |
string | The event triggering the webhook. |
data |
string | Additional json-formatted data regarding the format of the payload |
url |
string | The URL the payload should be sent to. |
last_code |
string | The last HTTP response code. |
last_hook |
timestamp | The date and time of the last webhook, measured in seconds from the Unix Epoch. |
last_payload |
string | The form-encoded contents of the last payload. |
Payload data formats
You can limit the amount of data sent in webhooks by specifying a data format.
Notify
data: {"format":"notify"}
A simple notification is good for when you want to be notified that an event occurs, but you don’t need a lot of information about the related object or you would like to handle retrieving the information about that object through a separate API call.
Lightweight
data: {"format":"lightweight"}
A lightweight notification is available for contacts and custom objects, and is useful when you would like to have basic fields sent, but don’t need all of the fields for that record. In the case, the ID, first name, last name, and email for the contact will be returned. If this flag is included for a custom object, the ID in addition to the first three custom fields for that object will be returned.
Retrieve a specific webhook
curl -X GET 'https://api.ontraport.com/1/Webhook?id=23' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 23
);
$response = $client->webhook()->retrieveSingle($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"id": "27",
"event": "sub_tag(1)",
"data": "{\"format\":\"notify\"}",
"url": "https://www.testurl.com",
"last_hook": 1516128699,
"last_code": 200,
"last_payload":"{\"webhook_id\":\"10\",\"object_type_id\":\"0\",\"event\":{\"type\":\"sub_tag\",\"tag_id\":\"1\"},\"data\":{\"id\":\"1\",\"firstname\":\"Michael\",\"lastname\":\"Brown\",\"email\":\"mbrown@ontraport.com\"},\"timestamp\":1519774345}"
},
"account_id": "12345"
}
Retrieves all the information for an existing webhook. The only parameter needed is the ID for the webhook.
Request Endpoint
GET https://api.ontraport.com/1/Webhook
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The webhook ID. Required. |
Retrieve multiple webhooks
curl -X GET 'http://api.ontraport.com/1/Webhooks?listFields=id%2Cevent%2Curl' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"listFields" => "id,event,url"
);
$response = $client->webhook()->retrieveMultiple($requestParams);
?>
Example response:
{
"code": 0,
"data": [
{
"id": "8",
"event": "sub_tag(1)",
"url": "https://testsite.com"
},
{
"id": "10",
"event": "unsub_tag(2)",
"url": "https://testsite.com"
},
{
"id": "15",
"event": "object_create(0)",
"url": "https://testsite2.com"
}
],
"account_id": "12345",
"misc": []
}
Retrieves a collection of webhooks based on a set of parameters. You can limit unnecessary API requests by utilizing criteria and our pagination tools to select only the data set you require.
Request Endpoint
GET https://api.ontraport.com/1/Webhooks
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
ids |
string | An array as a comma-delimited list of the IDs of the webhooks to retrieve. Entering a value of 0 will result in all webhooks being selected. |
start |
integer | The offset to return results from. |
range |
integer | The number of webhooks you want to retrieve. The maximum and default range is 50. |
sort |
string | The field results should be sorted on. |
sortDir |
string | The direction your results should be sorted. Your options are asc and desc . This field must be used in conjunction with the sort parameter. |
condition |
string | A JSON encoded string to more specifically set criteria for which webhooks to bring back. For example, to check that a field equals a certain value. See criteria examples for more details. |
search |
string | A string to search your webhook objects for. |
searchNotes |
boolean | A boolean flag used in conjunction with the search parameter to indicate whether or not webhook notes should be searched for the specified string in addition to other webhook fields. |
group_ids |
string | An array as a comma-delimited list of the group IDs of webhooks to retrieve. If set to a non-zero value, performAll should be set to 1. |
performAll |
integer | A binary integer flag to be used in conjunction with group_ids . A value of 1 indicates that specified action should be performed on all members of a group. Be sure that group_ids has a non-zero value when using this parameter unless you want to affect all objects in a collection. |
externs |
string | If you have a relationship between your webhook object and another object, you may want to include the data from a related field in your results. Each external field is listed in the format {object}//{field} . Multiple fields are separated by commas. |
listFields |
string | An array as a comma-delimited list of the fields which should be returned in your results. |
Retrieve webhook object meta
curl -X GET 'https://api.ontraport.com/1/Webhooks/meta' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$response = $client->webhook()->retrieveMeta();
?>
Example Response:
{
"code": 0,
"data": {
"145": {
"name": "Webhook",
"fields": {
"event": {
"alias": "Event",
"type": "longtext"
},
"data": {
"alias": "Data",
"type": "longtext"
},
"url": {
"alias": "URL",
"type": "longtext"
},
"last_code": {
"alias": "Last Response Code",
"type": "numeric"
},
"last_hook": {
"alias": "Last Webhook",
"type": "timestamp"
},
"last_payload": {
"alias": "Last Payload",
"type": "longtext"
}
}
}
},
"account_id": "12345"
}
Retrieves the field meta data for the webhook object.
Request Endpoint
GET https://api.ontraport.com/1/Webhooks/meta
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
None
Subscribe to a webhook
curl -X POST -d 'url=https%3A%2F%2Ftestme.com&event=object_create(0)' 'http://api.ontraport.com/1/Webhook/subscribe' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"event" => "object_create(0)",
"url" => "https://testme.com",
);
$client->webhook()->subscribe($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"url": "https://testme.com",
"event": "object_create(0)",
"id": 3,
"owner": "1"
},
"account_id": "12345"
}
Subscribes to a new webhook.
Request Endpoint
POST https://api.ontraport.com/1/Webhooks/subscribe
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Content-Type: application/x-www-form-urlencoded
Request Parameters
Parameters should be sent in the request body as a URL-encoded string.
Parameter | Type | Description |
---|---|---|
url |
string | The URL to send the payload to. |
event |
string | The event to subscribe to. |
data |
string | Additional information about the format of the payload. |
Unsubscribe from a webhook
curl -X DELETE 'https://api.ontraport.com/1/Contact?id=2' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"id" => 2
);
$response = $client->webhook()->unsubscribe($requestParams);
?>
Example Response:
{
"code": 0,
"data": "Deleted",
"account_id": "12345"
}
Unsubscribe from a specific webhook by its ID.
Request Endpoint
DELETE https://api.ontraport.com/1/Webhook/unsubscribe
Required Headers
Api-Key: {api_key}
Api-Appid: {app_id}
Request Parameters
Request parameters should be appended to the URL as a query string.
Parameter | Type | Description |
---|---|---|
id |
integer | The ID of the webhook to unsubscribe from. Required. |
Webhook Events
Form is submitted
# Subscribe to this event with a standard payload
curl -X POST -d 'url=https%3A%2F%2Ftestsite.com&event=object_submits_form(1)&data=%7B%22format%22%3A%22lightweight%22%7D' 'http://api.ontraport.com/1/Webhook/subscribe' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
// Subscribe to this event with a standard payload
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"event" => "object_submits_form(1)",
"url" => "https://testsite.com"
);
$client->webhook()->subscribe($requestParams);
Example Payload:
{
"webhook_id":"12",
"object_type_id":"0",
"event": {
"type":"object_submits_form",
"form_id":"4"
},
"data": {
"id":"14",
"owner":"owner",
"firstname":"Manuel",
"lastname":"Romero",
"email":"mromero@ontraport.com",
"birthday":"",
"date":"1-26-2018",
"dla":"1-26-2018",
"contact_cat":"",
"bulk_mail":"Single Opt-in",
"bulk_sms":"Unsubscribed",
"referer":"0",
"dlm":"1-26-2018",
"system_source":"0",
"import_id":"0",
"visits":"0",
"freferrer":"0",
"lreferrer":"0",
"n_lead_source":"",
"n_content":"",
"n_term":"",
"n_media":"0",
"n_medium":"",
"n_campaign":"",
"l_lead_source":"",
"l_content":"",
"l_term":"",
"l_medium":"",
"l_campaign":"",
"aff_sales":"0",
"aff_amount":"0",
"program_id":"0",
"mrcAmount":"$0.00",
"mrcUnpaid":"$0.00",
"mriInvoiceNum":"0",
"mriInvoiceTotal":"$0.00",
"ccType":"",
"ccExpirationMonth":"",
"ccExpirationYear":"0",
"ccExpirationDate":"",
"mrcResult":"",
"bindex":"0",
"spent":"$0.00",
"grade":"0"
},
"timestamp":"1514940140"
}
This event triggers when a contact or custom object submits a specific form.
Event Name
object_submits_form
Event Parameters
The single parameter indicates the ID of the specific form or form block to trigger the webhook for. Not providing this ID will cause an error upon subscription to the webhook.
If you would like the webhook to be triggered upon submission of a standalone ONTRAform or Smart Form, the parameter passed in is simply the form ID.
object_submits_form(1)
You can also trigger this webhook based on the submission of a form block within a landing page. In this case, a form block ID must be passed in. To determine the block ID of the form in your landing page, you can retrieve a list of IDs using the getBlocksByFormName endpoint. The list will return IDs with an “f” prepended if the block refers to a standalone form, and with an “lp” prepended if the block exists within a landingpage. When saving a webhook, the prefix is stripped from the ID.
object_submits_form(3.0.96bbda26-83fa-10ae-dd9a-5381b1fbf3dd)
Payload Format
Payload is sent as JSON.
Payload Data
Attribute | Type | Description |
---|---|---|
webhook_id |
integer | The webhook ID. |
object_type_id |
integer | The object type ID of the object triggering the event. |
event[type] |
string | The name of the triggering event. |
event[form_id] |
integer | The form ID. |
data |
array | The attributes of the object triggering the event. This data can be limited to a simple ID, limited to just essential fields, or contain the full array of object data. For a contact, full data looks like this. Custom object data will vary. |
timestamp |
timestamp | The date and time of the webhook, measured in seconds from the Unix Epoch. |
Object is created
curl -X POST -d 'url=https%3A%2F%2Ftestsite.com&event=object_create(0)' 'http://api.ontraport.com/1/Webhook/subscribe' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
// Be notified when a new contact is created
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"event" => "object_create(0)",
"url" => "https://testsite.com",
"data" => "{\"format\":\"notify\"}"
);
$client->webhook()->subscribe($requestParams);
Example Payload:
{
"webhook_id":"7",
"object_type_id":"0",
"event": {
"type":"object_create"
},
"data": {
"id":"10"
},
"timestamp":"1514940140"
}
This event triggers on the creation of a new contact or custom object record.
Event Name
object_create
Event Parameters
The single parameter indicates the object type ID of the contact or custom object to trigger the webhook for. Not providing this ID will cause an error upon subscription to the webhook.
object_create(0)
Payload Format
Payload is sent as JSON.
Payload Data
Attribute | Type | Description |
---|---|---|
webhook_id |
integer | The webhook ID. |
object_type_id |
integer | The object type ID of the object triggering the event. |
event[type] |
string | The name of the triggering event. |
data |
array | The attributes of the object triggering the event. This data can be limited to a simple ID, limited to just essential fields, or contain the full array of object data. For a contact, full data looks like this. Custom object data will vary. Note that at different points during object creation, more or less data may be saved for a contact. For example, when contacts are added in-app, the contact object is created first and fields are subsequently updated, meaning object_create will send an ID and updated date fields. If a contact is created via the API, all data included in the request will sent with the webhook. |
timestamp |
timestamp | The date and time of the webhook, measured in seconds from the Unix Epoch. |
Tag is added
# Subscribe to this event, request a lightweight payload
curl -X POST -d 'url=https%3A%2F%2Ftestsite.com&event=sub_tag(4)&data=%7B%22format%22%3A%22lightweight%22%7D' 'http://api.ontraport.com/1/Webhook/subscribe' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
// Subscribe to this event, request a lightweight payload
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"event" => "sub_tag(4)",
"url" => "https://testsite.com",
"data" => "{\"format\":\"lightweight\"}"
);
$client->webhook()->subscribe($requestParams);
Example Payload:
{
"webhook_id":"3",
"object_type_id":"0",
"event": {
"type":"sub_tag",
"tag_id":"4"
},
"data": {
"id":"8",
"firstname":"Mary",
"lastname":"Smith",
"email":"mary@ontraport.com"
},
"timestamp":"1514940140"
}
This event triggers when a specific tag is added to a contact or custom object.
Event Name
sub_tag
Event Parameters
The single parameter indicates the ID of the specific tag to trigger the webhook for. Not providing the tag ID will cause an error upon subscription to the webhook.
sub_tag(4)
Payload Format
Payload is sent as JSON.
Payload Data
Attribute | Type | Description |
---|---|---|
webhook_id |
integer | The webhook ID. |
object_type_id |
integer | The object type ID of the object triggering the event. |
event[type] |
string | The name of the triggering event. |
event[tag_id] |
integer | The tag ID. |
data |
array | The attributes of the object triggering the event. This data can be limited to a simple ID, limited to just essential fields, or contain the full array of object data. For a contact, full data looks like this. Custom object data will vary. |
timestamp |
timestamp | The date and time of the webhook, measured in seconds from the Unix Epoch. |
Tag is removed
# Subscribe to this event, request a lightweight payload
curl -X POST -d 'url=https%3A%2F%2Ftestsite.com&event=unsub_tag(4)&data=%7B%22format%22%3A%22lightweight%22%7D' 'http://api.ontraport.com/1/Webhook/subscribe' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
// Subscribe to this event, request a lightweight payload
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"event" => "unsub_tag(4)",
"url" => "https://testsite.com",
"data" => "{\"format\":\"lightweight\"}"
);
$client->webhook()->subscribe($requestParams);
Example Payload:
{
"webhook_id":"4",
"object_type_id":"0",
"event": {
"type":"unsub_tag",
"tag_id":"4"
},
"data": {
"id":"8",
"firstname":"Mary",
"lastname":"Smith",
"email":"mary@ontraport.com"
},
"timestamp":"1514940140"
}
This event triggers when a specific tag is removed from a contact or custom object.
Event Name
unsub_tag
Event Parameters
The single parameter indicates the ID of the specific tag to trigger the webhook for. Not providing the tag ID will cause an error upon subscription to the webhook.
unsub_tag(4)
Payload Format
Payload is sent as JSON.
Payload Data
Attribute | Type | Description |
---|---|---|
webhook_id |
integer | The webhook ID. |
object_type_id |
integer | The object type ID of the object triggering the event. |
event[type] |
string | The name of the triggering event. |
event[tag_id] |
integer | The tag ID. |
data |
array | The attributes of the object triggering the event. This data can be limited to a simple ID, limited to just essential fields, or contain the full array of object data. For a contact, full data looks like this. Custom object data will vary. |
timestamp |
timestamp | The date and time of the webhook, measured in seconds from the Unix Epoch. |
Use Cases
This section contains a number of useful multistep processes which can be completed via the API. Explanations of the steps involved are detailed below, and code samples are included at the right. Example PHP scripts are written using our official PHP client library.
Change gateways on an open order
# Retrieve the gateway data for your current gateway to obtain the external_id
curl -X GET 'https://api.ontraport.com/1/object?objectID=70&id=1' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"name": "Dummy",
"status": 0,
"date": "1503003727",
"type": "dummy",
"id": "1",
"external_id": "53713",
"owner": "1"
},
"account_id": "12345"
}
# Bring back all of the orders with a gateway ID that matches the external_id
curl -X GET --header 'https://api.ontraport.com/1/objects?objectID=52&condition=%5B%7B%20%22field%22%3A%7B%22field%22%3A%22gateway_id%22%7D%2C%20%22op%22%3A%22%3D%22%2C%20%22value%22%3A%7B%22value%22%3A%2253713%22%7D%20%7D%5D&listFields=id%2Coffer_id%2Ccontact_id%2Cgateway_id' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": [
{
"id": "2",
"offer_id": "15",
"contact_id": "1",
"gateway_id": "53713"
},
{
"id": "3",
"offer_id": "16",
"contact_id": "7",
"gateway_id": "53713"
}
],
"account_id": "12345",
"misc": []
}
# Retrieve the offer for each order
curl -X GET --header 'https://api.ontraport.com/1/object?objectID=65&id=15' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"id": "15",
"name": null,
"public": "0",
"data": "{\"products\":[{\"quantity\":\"1\",\"minQuantity\":\"1\",\"maxQuantity\":\"99\",\"total\":\"10.00\",\"shipping\":\"false\",\"tax\":\"false\",\"price\":[{\"price\":\"10.00\",\"payment_count\":\"1\",\"unit\":\"month\",\"id\":\"270337994670\"}],\"type\":\"subscription\",\"quantityEditable\":\"false\",\"index\":\"0\",\"name\":\"Slime\",\"description\":\"\",\"owner\":\"1\",\"date\":\"1503354425\",\"dlm\":\"1503354425\",\"level1\":\"0\",\"level2\":\"0\",\"external_id\":\"null\",\"product_group\":\"null\",\"offer_to_affiliates\":\"true\",\"trial_period_unit\":\"day\",\"trial_period_count\":\"0\",\"trial_price\":\"0\",\"setup_fee\":\"0\",\"delay_start\":\"0\",\"sku\":\"null\",\"setup_fee_when\":\"immediately\",\"setup_fee_date\":\"0\",\"product_type\":\"digital\",\"subscription_fee\":\"0\",\"subscription_count\":\"0\",\"subscription_unit\":\"day\",\"download_limit\":\"0\",\"download_time_limit\":\"0\",\"taxable\":\"null\",\"deleted\":\"false\",\"total_income\":\"null\",\"total_purchases\":\"null\",\"id\":\"2\",\"uid\":\"eaf93424-a5f2-ef69-6013-9555f127191c\"}],\"shipping\":\"null\",\"delay\":\"0\",\"invoice_template\":\"1\",\"subTotal\":\"10\",\"grandTotal\":\"10.00\",\"hasTaxes\":\"false\",\"hasShipping\":\"false\",\"paypalValid\":\"false\",\"offerCoupon\":\"false\",\"coupon\":\"null\",\"shipping_charge_reoccurring_orders\":\"false\",\"resorted\":\"null\"}",
"referenced": "1"
},
"account_id": "12345"
}
# Update the gateway ID of each order
curl -X PUT -d '{
"objectID":0,
"contact_id":"1",
"gateway_id":1,
"offer":{
"products":[
{
"quantity":"1",
"minQuantity":"1",
"maxQuantity":"99",
"total":"10.00",
"shipping":"false",
"tax":"false",
"price":[
{
"price":"10.00",
"payment_count":"1",
"unit":"month",
"id":"270337994670"
}
],
"type":"subscription",
"quantityEditable":"false",
"index":"0",
"name":"Slime",
"description":"",
"owner":"1",
"date":"1503354425",
"dlm":"1503354425",
"level1":"0",
"level2":"0",
"external_id":"null",
"product_group":"null",
"offer_to_affiliates":"true",
"trial_period_unit":"day",
"trial_period_count":"0",
"trial_price":"0",
"setup_fee":"0",
"delay_start":"0",
"sku":"null",
"setup_fee_when":"immediately",
"setup_fee_date":"0",
"product_type":"digital",
"subscription_fee":"0",
"subscription_count":"0",
"subscription_unit":"day",
"download_limit":"0",
"download_time_limit":"0",
"taxable":"null",
"deleted":"false",
"total_income":"null",
"total_purchases":"null",
"id":"2",
"uid":"eaf93424-a5f2-ef69-6013-9555f127191c"
}
],
"shipping":"null",
"delay":"0",
"invoice_template":"1",
"subTotal":"10",
"grandTotal":"10.00",
"hasTaxes":"false",
"hasShipping":"false",
"paypalValid":"false",
"offerCoupon":"false",
"coupon":"null",
"shipping_charge_reoccurring_orders":"false",
"resorted":"null",
"offer_id":"15",
"order_id":"2"
}
}' 'https://api.ontraport.com/1/transaction/order' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
require_once(dirname(__FILE__) . "/pathto/Ontraport.php");
use OntraportAPI\Ontraport as Client;
use OntraportAPI\ObjectType;
$api_key = "Key5678";
$app_id = "2_AppID_12345678";
$from_gateway = 2;
$to_gateway = 1;
// Instantiate client
$client = new Client($app_id, $api_key);
// Retrieve external gateway ID
$params = array(
"objectID" => ObjectType::GATEWAY, // Object type ID: 70
"id" => $from_gateway
);
if ($from_gateway_external = json_decode($client->object()->retrieveSingle($params), true))
{
$from_gateway_external = $from_gateway_external["data"]["external_id"];
// Retrieve all orders with a specific gateway
$conditions = new OntraportAPI\Criteria("gateway_id", "=", $from_gateway_external);
$order_params = array(
"objectID" => ObjectType::ORDER, // Object type ID: 52
"condition" => $conditions->fromArray()
);
}
// Make sure to paginate requests so you can retrieve all matching orders
$pages = json_decode($client->object()->retrieveMultiplePaginated($order_params), true);
foreach ($pages as $page)
{
foreach ($page["data"] as $order)
{
$order_id = $order["id"];
$offer_id = $order["offer_id"];
$contact_id = $order["contact_id"];
// Retrieve offer
$params = array(
"objectID" => ObjectType::OFFER, // Object type ID: 65
"id" => $offer_id
);
$offer = json_decode($client->object()->retrieveSingle($params), true);
$offer_data = json_decode($offer["data"]["data"], true);
// Update order with new gateway -- if offer data isn't included, the order will be deleted
$update_order_data = array(
"objectID" => ObjectType::CONTACT, // Object type ID: 0
"contact_id" => $contact_id,
"gateway_id" => $to_gateway,
"offer" => $offer_data
);
$update_order_data["offer"]["offer_id"] = $offer_id;
$update_order_data["offer"]["order_id"] = $order_id;
$client->transaction()->updateOrder($update_order_data);
}
}
If you are changing card processors, you may want to change the gateway for your subscription orders. This can be accomplished through the API with a few steps.
1. Retrieve the gateway data for your current gateway to obtain the external_id
- Make a GET request to the /object endpoint with object ID: 70.
- The
external_id
will be returned in the response data.
2. Bring back all of the orders with a gateway ID that matches the external_id
- Make a GET request to the /objects endpoint with object ID: 52.
- Use a condition to check that the order’s
gateway_id
field is equal to the gateway’sexternal_id
. - If you will have more than 50 matching results, you will need to utilize pagination.
3. Retrieve the offer for each order
- If you only want to update the gateway for an order, you will want to provide the original offer data.
- The easiest way to make sure your offer data is valid is to retrieve the current offer data for the order and pass it back in.
- Make a GET request to the /object endpoint with object ID: 65.
4. Update the gateway ID of each order
- Make a PUT request to the /transaction/order endpoint.
- You must include an
objectID
, thegateway_id
for your new gateway, and thecontact_id
for the order. - The
offer
field should contain the offer data you retrieved in the previous call. - You need to add two parameters to the offer data:
offer_id
andorder_id
, which can both be obtained from the order response. Without these two parameters, the update will not succeed.
Completed task outcomes/followups
# Create your followup task message and retain the id
curl -X POST -d 'alias=Followup%20Task&subject=Follow%20up&type=Task&object_type_id=0&from=owner&task_data=%5BFirst%20Name%5D%2C%20please%20follow%20up%20on%20this%20task.&due_date=5&task_owner=1' 'https://api.ontraport.com/1/message' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"id": 16,
"date": "1503594192"
},
"account_id": "12345"
}
# Mark your primary task completed, create outcome and assign followup task
curl -X POST -d '{ \
"object_type_id": 0, \
"ids": [ \
2 \
], \
"data": { \
"outcome": ":=Pending", \
"followup": { \
"message_id": 16, \
} \
} \
}' 'https://api.ontraport.com/1/task/complete' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"account_id": "12345"
}
<?php
require_once(dirname(__FILE__) . "/api/sdks/php/src/Ontraport.php");
use OntraportAPI\Ontraport as Client;
use OntraportAPI\ObjectType;
$api_key = "Key5678";
$app_id = "2_AppID_12345678";
$initial_task_id = 1;
// Instantiate client
$client = new Client($app_id, $api_key);
// Create follow-up task
$task_params = array(
"alias" => "Followup Task",
"type" => "Task",
"object_type_id" => ObjectType::CONTACT, // Object type ID: 0
"subject" => "Follow up",
"from" => "owner",
"task_data" => "[First Name], please follow up on this task.",
"due_date" => 5,
"task_owner" => 1
);
if ($task = json_decode($client->message()->create($task_params), true))
{
$followup_task_id = $task["data"]["id"];
// Mark task as completed with specific outcome, assign followup task
$complete_params = array(
"object_type_id" => ObjectType::CONTACT, // Object type ID: 0
"ids" => array($initial_task_id),
"data" => array(
"outcome" => ":=Pending",
"followup" => array(
"message_id" => $followup_task_id,
)
)
);
$client->task()->complete($complete_params);
}
When managing tasks, you may want to monitor task outcomes and follow up task completion with additional tasks. The following is an example of how to mark a task completed, create an outcome for that task, and assign a secondary followup task using the API.
1. Create your followup task message
- Make a POST request to the /message endpoint.
- The task’s
id
will be returned in the response data.
2. Mark your primary task completed, create outcome and assign followup task
- Make a POST request to the /task/complete endpoint.
- In the
data
array’soutcome
field, include the name of the task outcome you want to create and assign to the completed task. Note that the string must be in the following format: “:=outcome”. - The
data
array’sfollowup
field needs to contain at least themessage_id
of the followup task you created.
Create and assign a task
# Create your task message and retain the `id` field from the response data
curl -X POST -d 'alias=Test%20Task&subject=Task%20Assignment&type=Task&object_type_id=0&from=owner&task_data=%5BFirst%20Name%5D%2C%20please%20complete%20this%20task.&due_date=3&task_owner=1' 'https://api.ontraport.com/1/message' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"id": 17,
"date": "1503595111"
},
"account_id": "12345"
}
# Assign the task for your contact using the task message `id` you just created
curl -X POST -d '{ \
"object_type_id": 0, \
"ids": [ \
1 \
], \
"message": { \
"id": 17 \
} \
}' 'https://api.ontraport.com/1/task/assign' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
require_once(dirname(__FILE__) . "/pathto/Ontraport.php");
use OntraportAPI\Ontraport as Client;
use OntraportAPI\ObjectType;
$api_key = "Key5678";
$app_id = "2_AppID_12345678";
$contact_id = 1;
// Instantiate client
$client = new Client($app_id, $api_key);
// Create task
$task_params = array(
"alias" => "Test Task",
"type" => "Task",
"object_type_id" => ObjectType::CONTACT, // Object type ID: 0
"subject" => "Task Assignment",
"from" => "owner",
"task_data" => "[First Name], please complete this task.",
"due_date" => 3,
"task_owner" => 1
);
$task = json_decode($client->message()->create($task_params), true);
$task_id = $task["data"]["id"];
// Assign task
$assign_params = array(
"object_type_id" => ObjectType::CONTACT, // Object type ID: 0
"ids" => array(1),
"message" => array(
"id" => $task_id,
)
);
$client->task()->assign($assign_params);
1. Create your task message
- Make a POST request to the /message endpoint.
- The task’s
id
will be returned in the response data.
2. Create a task assignment
- Make a POST request to the /task/assign endpoint.
- In the
message
array, include at least the ID of the task message you created.
Create transaction offers
# Create a tax object and retain the entire response `data` array
curl -X POST -d 'name=Retail&rate=8.75' 'https://api.ontraport.com/1/Taxes' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"name": "Retail",
"rate": "8.75",
"id": "11",
"form_id": "0",
"rules": ""
},
"account_id": "12345"
}
# Create a shipping object and retain the entire response `data` array
curl -X POST -d 'name=Ground&price=10' 'https://api.ontraport.com/1/ShippingMethods' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"name": "Ground",
"price": "10.00",
"id": "1",
"form_id": "0",
"rules": ""
},
"account_id": "12345"
}
# Create a product object and retain at least the `id` and `price` from the response data
curl -X POST -d 'name=Test&price=50' 'https://api.ontraport.com/1/Products' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"name": "Gadget",
"price": "50",
"id": "11",
"description": "",
"owner": "1",
"date": "1503589761",
"dlm": "1503589761",
"level1": "0",
"level2": "0",
"external_id": null,
"product_group": null,
"offer_to_affiliates": "true",
"trial_period_unit": "day",
"trial_period_count": "0",
"trial_price": "0",
"setup_fee": "0",
"delay_start": "0",
"shipping": "0",
"sku": null,
"type": "one_time",
"setup_fee_when": "immediately",
"setup_fee_date": "0",
"product_type": "digital",
"subscription_fee": "0",
"subscription_count": "0",
"subscription_unit": "day",
"download_limit": "0",
"download_time_limit": "0",
"taxable": null,
"deleted": "false",
"total_income": null,
"total_purchases": null
},
"account_id": "12345"
}
# Process your transaction, including created product, tax, and shipping in your offer data
curl -X POST -d '{
"contact_id":1,
"chargeNow":"chargeNow",
"trans_date":1369820760000,
"invoice_template":1,
"gateway_id":1,
"offer": {
"products": [
{
"quantity":1,
"shipping":true,
"tax":true,
"price": [
{
"price":"200"
}
],
"type":"single",
"owner":1,
"taxable":true,
"id":"11"
}
],
"taxes": [
{
"name":"Retail",
"rate":"8.75",
"id":"11",
"form_id":"0",
"rules":""
}
],
"shipping": [
{
"name":"Ground",
"price":"10.00",
"id":"1",
"form_id":"0",
"rules":""
}
],
"hasTaxes":true,
"hasShipping":true
},
"billing_address": {
"address":"123 XYZ St",
"city":"Santa Barbara",
"state":"CA","zip":"93101",
"country":"US"},
"payer": {
"ccnumber":"4111111111111111",
"code":"123",
"expire_month":1,
"expire_year":2035
}
}' 'https://api.ontraport.com/1/transaction/processManual' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
require_once(dirname(__FILE__) . "/pathto/Ontraport.php");
use OntraportAPI\Ontraport as Client;
use OntraportAPI\ObjectType;
$api_key = "Key5678";
$app_id = "2_AppID_12345678";
$contact_id = 1;
$gateway_id = 1;
$invoice_id = 1;
// Instantiate client
$client = new Client($app_id, $api_key);
// Create tax
$tax_params = array(
"objectID" => ObjectType::TAX, // Object type ID: 63
"name" => "Retail",
"rate" => "8.75",
);
$tax = json_decode($client->object()->create($tax_params), true);
$tax_data = $tax["data"];
// Create shipping
$shipping_params = array(
"objectID" => ObjectType::SHIPPING_METHOD, // Object type ID: 64
"name" => "Ground",
"price" => "10",
);
$shipping = json_decode($client->object()->create($shipping_params), true);
$shipping_data = $shipping["data"];
// Create product
$product_params = array(
"objectID" => ObjectType::PRODUCT, // Object type ID: 16
"name" => "Gadget",
"price" => "200"
);
$product = json_decode($client->object()->create($product_params), true);
$product_data = $product["data"];
// Process transaction
$transaction_params = array(
"contact_id" => $contact_id,
"chargeNow" => "chargeNow",
"trans_date" => 1369820760000,
"invoice_template" => $invoice_id,
"gateway_id" => $gateway_id,
"offer" => array(
"products" => array(
array(
"quantity" => 1,
"shipping" => true,
"tax" => true,
"price" => array(
array(
"price" => $product_data["price"]
)
),
"type" => "single",
"owner" => 1,
"taxable" => true,
"id" => $product_data["id"]
)
),
"taxes" => array($tax_data),
"shipping" => array($shipping_data),
"hasTaxes" => true,
"hasShipping" => true,
),
"billing_address" => array(
"address" => "123 XYZ St",
"city" => "Santa Barbara",
"state" => "CA",
"zip" => "93101",
"country" => "US"
),
"payer" => array(
"ccnumber" => "4111111111111111",
"code" => "123",
"expire_month" => 1,
"expire_year" => 2035
)
);
$client->transaction()->processManual($transaction_params);
Processing manual transactions through the API can require some complicated data. This is an example of how to create some of the pieces of an offer, such as products, tax, and shipping, prior to initiating a manual transaction.
1. Create a tax object
- Make a POST request to the /object endpoint using object ID: 63.
- You will need to retain all the
data
from the response.
2. Create a shipping object
- Make a POST request to the /object endpoint using object ID: 64.
- You will need to retain all the
data
from the response.
3. Create a new product
- Make a POST request to the /object endpoint using object ID: 16.
- You will need to retain at least the
id
andprice
fields from the responsedata
array.
4. Process your transaction
- Make a POST request to the /transaction/processManual endpoint.
- Include your created tax, shipping and product object data within your offer.
- Review the example data carefully – if all of the data is not provided as expected, the transaction will fail.
Get all contacts with a tag
# Retrieve a count of all contacts with desired tag from response data
curl -X GET 'https://api.ontraport.com/1/objects/getInfo?objectID=138&condition=%5B%7B%20%22field%22%3A%7B%22field%22%3A%22tag_id%22%7D%2C%20%22op%22%3A%22%3D%22%2C%20%22value%22%3A%7B%22value%22%3A%223%22%7D%20%7D%5D' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"listFields": [
""
],
"listFieldSettings": [],
"count": "64"
},
"account_id": "12345"
}
# Make sequential requests to retrieve all tag subscribers by increasing `start` by `range` until `count` is reached
curl -X GET 'https://api.ontraport.com/1/objects?objectID=138&start=0&range=50&condition=%5B%7B%20%22field%22%3A%7B%22field%22%3A%22tag_id%22%7D%2C%20%22op%22%3A%22%3D%22%2C%20%22value%22%3A%7B%22value%22%3A%223%22%7D%20%7D%5D' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
curl -X GET 'https://api.ontraport.com/1/objects?objectID=138&start=50&range=50&condition=%5B%7B%20%22field%22%3A%7B%22field%22%3A%22tag_id%22%7D%2C%20%22op%22%3A%22%3D%22%2C%20%22value%22%3A%7B%22value%22%3A%223%22%7D%20%7D%5D' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> The `object_id` field in the response data contains ID of each contact
{
"code": 0,
"data": [
{
"id": "1",
"object_id": "1",
"tag_id": "3"
}
],
"account_id": "12345",
"misc": []
}
<?php
require_once("pathto/Ontraport.php");
use OntraportAPI\Ontraport as Client;
use OntraportAPI\ObjectType;
$api_key = "Key5678";
$app_id = "2_AppID_12345678";
$tag_id = 1;
// Instantiate client
$client = new Client($app_id, $api_key);
// Build condition object
$condition = new OntraportAPI\Criteria("tag_id", "=", $tag_id);
// Using pagination, retrieve the contact IDs from the tag subscriber objects
$result = $client->object()->retrieveMultiplePaginated(
array(
"objectID" => ObjectType::TAG_SUBSCRIBER, // Object type ID: 138
"condition" => $condition->fromArray(),
)
);
You may want to retrieve a list of all the contacts having a specific tag. Because you can only bring back a maximum of fifty objects per API request, you will need to utilize pagination tools. The tag subscriber object, object ID number 138, will provide you a list of all related objects and tags.
1. Construct a condition object
- Check that the
tag_id
field is equal to the ID of the tag you want to find in contacts.
2. Retrieve a count of tag subscribers matching that condition
- Make a GET request to the /objects/getInfo endpoint to retrieve a count of all tag subscribers related to that tag.
- If you are using our SDK, you can skip this step.
3. Using pagination, retrieve those tag subscribers
- Make sequential GET requests to the /objects endpoint until all subscribers have been retrieved
- The
object_id
field references the contact object’sid
field. - If you are using our SDK,
the
retrieveMultiplePaginated()
function handles the pagination for you.
Log a transaction
curl -X POST -d '{
"contact_id": 1,
"chargeNow": "chargeLog",
"invoice_template": 1,
"offer": {
"products": [
{
"quantity": 1,
"shipping": false,
"tax": false,
"price": [
{
"price": 40.00,
"id": 1
}
],
"type": "single",
"owner": 1,
"id": 1
}
]
}
}' 'https://api.ontraport.com/1/transaction/processManual' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
use OntraportAPI\Ontraport;
$client = new Ontraport("2_AppID_12345678","Key5678");
$requestParams = array(
"contact_id" => 1,
"chargeNow" => "chargeLog",
"offer" => array(
"products" => array(
array(
"quantity" => 1,
"shipping" => false,
"tax" => false,
"price" => array(
array(
"price" => 40,
"payment_count" => 0,
"id" => 1
)
),
"type" => "single",
"owner" => 1,
"id" => 1
)
)
)
);
$response = $client->transaction()->processManual($requestParams);
?>
Example Response:
{
"code": 0,
"data": {
"invoice_id": 3
},
"account_id": "12345"
}
If you would like to pass in a previously charged transaction to be logged in ONTRAPORT without actually charging your contact, you can use
the transaction/processManual endpoint
with the chargeNow
field set to “chargeLog”.
Far less data is needed to simply log a transaction than to manually process one. The gateway, payer, and billing details are unnecessary in this case. The mandatory information in this case include a contact ID, the “chargeLog” designation, and product and pricing details.
Product-specific coupons
# Create a new product and retain the `id` from the response data
curl -X POST -d '{
"objectID": 16,
"name": "Widget",
"price": "1000"
}' 'https://api.ontraport.com/1/objects' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"name": "Widget",
"price": "1000",
"id": "21",
"description": "",
"owner": "1",
"date": "1503598868",
"dlm": "1503598868",
"level1": "0",
"level2": "0",
"external_id": null,
"product_group": null,
"offer_to_affiliates": "true",
"trial_period_unit": "day",
"trial_period_count": "0",
"trial_price": "0",
"setup_fee": "0",
"delay_start": "0",
"shipping": "0",
"sku": null,
"type": "one_time",
"setup_fee_when": "immediately",
"setup_fee_date": "0",
"product_type": "digital",
"subscription_fee": "0",
"subscription_count": "0",
"subscription_unit": "day",
"download_limit": "0",
"download_time_limit": "0",
"taxable": null,
"deleted": "false",
"total_income": null,
"total_purchases": null
},
"account_id": "12345"
}
# Create a product specific coupon using the `id` of the product you just created
curl -X POST -d '{
"objectID": 123,
"name": "$100 off Widgets",
"type": "personal",
"discount_type": "flat",
"discount_value": "100",
"discount_description": "Save $100 on Widget purchase.",
"valid_type": "time",
"valid_timeframe": "240",
"status": "Valid",
"product_selection": "specific",
"products": [21]
}' 'https://api.ontraport.com/1/objects' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"id": 13
},
"account_id": "12345"
}
# Create a message with the coupon code and expiration date in the body
curl -X POST -d 'alias=Coupon%20Message&subject=Save%20%24100%20on%20a%20Widget!&type=e-mail&object_type_id=0&from=owner&message_body=%5BFirst%20Name%5D%2C%20your%20single%20use%20coupon%20code%20%5BONTRACOUPON_13_code%5D%20expires%20%5BONTRACOUPON_13_expiration%5D.' 'https://api.ontraport.com/1/message' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
require_once(dirname(__FILE__) . "/pathto/Ontraport.php");
use OntraportAPI\Ontraport as Client;
use OntraportAPI\ObjectType;
$api_key = "Key5678";
$app_id = "2_AppID_12345678";
// Instantiate client
$client = new Client($app_id, $api_key);
// Create product
$product_params = array(
"objectID" => ObjectType::PRODUCT, // Object type ID: 16
"name" => "Widget",
"price" => "1000"
);
$product = json_decode($client->object()->create($product_params), true);
$product_id = $product["data"]["id"];
// Create product specific coupon
$coupon_params = array(
"objectID" => ObjectType::COUPON, // Object type ID: 123
"name" => "$100 off Widgets",
"type" => "personal",
"discount_type" => "flat",
"discount_value" => "100",
"discount_description" => "Save $100 on Widget purchase.",
"valid_type" => "time",
"valid_timeframe" => "240",
"status" => "Valid",
"product_selection" => "specific",
"products" => array($product_id)
);
$coupon = json_decode($client->object()->create($coupon_params), true);
$coupon_id = $coupon["data"]["id"];
// Create a message containing the coupon code
$client->message()->create(
array(
"alias" => "Coupon Message",
"type" => "e-mail",
"object_type_id" => ObjectType::CONTACT, // Object type ID: 0
"subject" => "Save $100 on a Widget!",
"from" => "owner",
"message_body" => "[First Name], your single use coupon code [ONTRACOUPON_{$coupon_id}_code] expires [ONTRACOUPON_{$coupon_id}_expiration].",
)
);
Coupons can either be general or product specific, and can either be general use group coupons or generated specifically for individuals. This is an example of how to create a product and a coupon for that product, and then create a message capable of sending individual coupon codes for this product to your contacts:
1. Create a new product
- Make a POST request to the /object endpoint using object ID: 16.
2. Create a product-specific coupon
- Make a POST request to the /object endpoint using object ID: 123.
- In order to make the coupon specific to your product, you must set the
product_selection
field to “specific”, and include aproduct
array containing the ID of the product you created.
3. Create your message with your coupon code and expiration date in the body
- Make a POST request to the /message endpoint.
- In the
message_body
, include bracketed merge fields for your coupon’s code and expiration.- Coupon code mergefields are formatted:
[ONTRACOUPON_{coupon_id}_code]
- Expiration date mergefields are formatted:
[ONTRACOUPON_{coupon_id}_expiration]
- Coupon code mergefields are formatted:
Sales reporting
# Retrieve sales report information meeting minimum and maximum date conditions
curl -X GET 'https://api.ontraport.com/1/objects/getInfo?objectID=95&condition=%5B%7B%20%20%20%22field%22%3A%7B%22field%22%3A%22date%22%7D%2C%20%20%20%22op%22%3A%22%3E%22%2C%20%20%20%22value%22%3A%7B%22value%22%3A%221500768000%22%7D%20%7D%2C%20%22AND%22%2C%20%7B%20%20%20%22field%22%3A%7B%22field%22%3A%22date%22%7D%2C%20%20%20%22op%22%3A%22%3C%22%2C%20%20%22value%22%3A%7B%22value%22%3A%221503528963%22%7D%20%7D%5D' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Reponse:
{
"code": 0,
"data": {
"listFields": [
"date",
"product_id",
"contact_id",
"source",
"status",
"attempted",
"paid",
"declined",
"refunded",
"voided",
"tax",
"net"
],
"listFieldSettings": [],
"count": "9",
"sums": {
"attempted": 263,
"paid": 213,
"declined": 50,
"refunded": 0,
"voided": 0,
"tax": 0,
"net": 213
}
},
"account_id": "12345"
}
<?php
require_once(dirname(__FILE__) . "/pathto/Ontraport.php");
use OntraportAPI\Ontraport as Client;
use OntraportAPI\ObjectType;
$api_key = "Key5678";
$app_id = "2_AppID_12345678";
$min_date = 1500768000;
$max_date = 1503528963;
// Instantiate client
$client = new Client($app_id, $api_key);
// Construct minimum date condition
$conditions = new OntraportAPI\Criteria("date", ">", $min_date);
// Add maximum date condition
$conditions->andCondition("date", "<", $max_date);
// Retrieve data
$params = array(
"objectID" => ObjectType::PRODUCT_SALES_LOG_REPORT, // Object type ID: 95
"condition" => $conditions->fromArray()
);
$purchase_log = json_decode($client->object()->retrieveCollectionInfo($params), true);
echo "Total purchased: $" . $purchase_log["data"]["sums"]["paid"] . "\n";
echo "Total declined: $" . $purchase_log["data"]["sums"]["declined"] . "\n";
There are a number of different ways to retrieve sales reporting via the API. Sometimes you may not want the details but just to retrieve the total amount of sales meeting a certain criteria, such as sales within a designated time period. The following is an example of how to retrieve high level sales reporting within a minimum and maximum date:
1. Retrieve sales report information meeting minimum and maximum date conditions
- Construct a condition checking that the
date
field is greater than the minimum date and greater than the manximum date. - Make a GET request to the /objects/getInfo endpoint using object ID: 95 and the condition constructed above.
- The resulting data will include in its
sums
array sales reporting details such as total purchases attempted, total paid, total declined, etc.
Search message subject
# Retrieve messages meeting condition
curl -X GET 'https://api.ontraport.com/1/Messages?condition=%5B%7B%20%22field%22%3A%7B%22field%22%3A%22subject%22%7D%2C%20%22op%22%3A%22LIKE%22%2C%20%22value%22%3A%7B%22value%22%3A%22%25subject%25%22%7D%20%7D%5D'
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
require_once("pathto/Ontraport.php");
use OntraportAPI\Ontraport as Client;
$api_key = "Key5678";
$app_id = "2_AppID_12345678";
// Instantiate client
$client = new Client($app_id, $api_key);
// Create a condition checking for your phrase in the subject line
$conditions = new OntraportAPI\Criteria("subject", "LIKE", "%Test%");
// Retrieve messages matching that condition
$messages = $client->message()->retrieveMultiplePaginated(array("condition" => $conditions->fromArray()));
If you have many messages, you may want to search the subject line (or another field) to find one with specific content. This can be easily accomplished via our API:
1. Construct a condition object
- Construct a condition object checking that the
subject
field (or other field, such asmessage_body
) either equals or matches the text you are looking for. - You can use the equality operator (=) to check for an exact match, or “LIKE” in combination with wildcards. The percent sign (%) used as a wildcard can represent zero, one, or multiple characters. The underscore (_) used as a wildcard can represent a single character.
2. Retrieve messages meeting condition
- Pass the condition object you constructed in to a GET request to the /Messages endpoint to retrieve matching messages.
- If this is a broad search, you should utilize pagination to make sure you retrieve all of the results. If you are looking for only a few results, pagination won’t be necessary.
Tracked links in messages
# Create a tracked link, retaining the `id` and `turl_code` from the response data
curl -X POST -d '{
"objectID":80,
"name":"Test Tracked Link",
"url":"http:\/\/testtracking.com"
}' 'https://api.ontraport.com/1/objects' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
> Example Response:
{
"code": 0,
"data": {
"objectID": 80,
"name": "Test Tracked Link",
"url": "http://testtracking.com",
"id": 10,
"turl_code": "http://tester.ontraport.com/tl/10"
},
"account_id": "12345"
}
# Create a message with a tracked link retrieved from `turl_code` in the body
curl -X POST -d 'alias=Tracked%20Link%20message&subject=Cool%20free%20stuff!&type=e-mail&object_type_id=0&from=owner&message_body=%5BFirst%20Name%5D%2C%20check%20out%20the%20free%20content%20on%20%3Ca%20href%3D%22http%3A%2F%2Ftester.ontraport.com%2Ftl%2F10%22%3Eour%20site%3C%2Fa%3E!' 'https://api.ontraport.com/1/message' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
# Create a rule to perform an action if the tracked link is clicked
curl -X POST -d '{
"objectID": 6,
"name": "Tracked Link Rule",
"events": "clicks_tracked_link(10)",
"actions": "Add_contact_to_category(1)"
}' 'https://api.ontraport.com/1/objects' \
--header 'Content-Type: application/json' \
--header 'Api-Key: Key5678' \
--header 'Api-Appid: 2_AppID_12345678'
<?php
require_once(dirname(__FILE__) . "/pathto/Ontraport.php");
use OntraportAPI\Ontraport as Client;
use OntraportAPI\ObjectType;
$api_key = "Key5678";
$app_id = "2_AppID_12345678";
// Instantiate client
$client = new Client($app_id, $api_key);
// Create tracked link
$link_params = array(
"objectID" => ObjectType::TRACKED_LINK, // Object type ID: 80
"name" => "Test Tracked Link",
"url" => "http://testtracking.com"
);
$tracked_link = json_decode($client->object()->create($link_params), true);
$tracking_url = $tracked_link["data"]["turl_code"];
$link_id = $tracked_link["data"]["id"];
// Create message with tracked link in the content
$client->message()->create(
array(
"alias" => "Tracked Link Message",
"type" => "e-mail",
"object_type_id" => ObjectType::CONTACT, // Object type ID: 0
"subject" => "Cool free stuff!",
"from" => "owner",
"message_body" => "[First Name], check out the free content on <a href=\"" . $tracking_url . "\">our site</a>!",
)
);
// You can also create a rule to run when the tracked link is clicked
$tag_id = 2;
$client->object()->create(
array(
"objectID" => ObjectType::RULE, // Object type ID: 6
"name" => "Tracked Link Rule",
"events" => "clicks_tracked_link(" . $link_id . ")",
"actions" => "Add_contact_to_category(" . $tag_id . ")"
)
);
Tracked links allow you to keep tabs on how effective your emails and landing pages are at directing traffic where you want it to go. You can create tracked links through the API and add them to messages. If you have global rules enabled, you can also create rules for actions to be taken when the link is clicked:
1. Create a tracked link
- Make a POST request to the /object endpoint using object ID: 80. Make sure the
url
you pass in begins with a valid protocol such as http:// or https:// or your request will fail. - You will need the
id
andturl_code
fields from the response data.
2. Create your message with the tracked link in the body
- Make a POST request to the /message endpoint.
- In the
message_body
, include an HTML link to the tracking URL in the tracked link response data’sturl_code
field.
3. Create a rule to perform an action if the tracked link is clicked
- Make a POST request to the /object endpoint using object ID: 6.
- The
event
field would containclicks_tracked_link({link_id})
. - The
action
field can contain a directive to:- Add a tag to the contact:
Add_contact_to_category({tag_id})
- Send the contact an email:
Send_contact_an_emailmbs({message_id})
- Add the contact to a campaign:
campaign_builder_action_change(0,{campaign_id})
- Or many other options
- Add a tag to the contact:
API Change Log
March 27, 2018 |
---|
- Added
transactional_email
field to message object.
March 6, 2018 |
---|
- Exposed GET
/Webhooks
endpoint. - Exposed
Webhook/subscribe
andWebhook/unsubscribe
endpoint. - Allowed subscribing to the following events: object_create, sub_tag, unsub_tag, object_submits_form.
February 26, 2018 |
---|
- Unset passwords from response data.
December 22, 2017 |
---|
- Added rate limiting headers to API responses.
December 12, 2017 |
---|
- Added
CreditCard/setDefault
endpoint to allow setting the status of a credit card to default. - Included updated order in response data for
transactions/setOrder
November 30, 2017 |
---|
- Enabled retrieving credit card objects via the API and added a wrapper class in the PHP SDK.
November 17, 2017 |
---|
- Added
ObjectType
class to SDK to allow the use of constants for supported object type IDs.
November 10, 2017 |
---|
- Added
all
parameter to allow retrieving an array of all matching IDs with/objects/getByEmail
.
November 7, 2017 |
---|
- Added
date
field to sequences, rules, forms, upsell forms, partner programs, and landing pages to indicate the date the object was created. Note that this field will not contain data for any objects created prior to November 7, 2017. - Added
dlm
field to sequences, rules, forms, messages, upsell forms, partner programs, and landing pages to indicate the date the object was last modified.
November 2, 2017 |
---|
- Allowed updating the
external_order_id
when processing manual transactions.
September 8, 2017 |
---|
- Updated documentation:
- Added documentation for message endpoints.
- Added “Try It Out Live” buttons for each endpoint.
- Added example scripts for multi-step use cases.
- Updated SDK:
- Added method to construct conditions.
- Added method to paginate multiple GET requests.
- Added messages and campaign builder items.
- Added endpoints to retrieve information on CampaignBuilder campaigns.
- Added
objects/getByEmail
. With this endpoint, you can retrieve contacts and custom objects by email instead of ID. - Removed old and unnecessary fields from API responses. Removed fields include:
- Messages:
tags
,private
,platform
,rules
,mta
,filebox
,my_file_list
- Messages:
September 1, 2017 |
---|
cc_id
attribute was added to transaction objects. Transactions can now be charged to any of multiple credit cards on file for a contact.
August 9th, 2017 |
---|
- Added
objects/tagByName
. With this endpoint, you can create a tag if it doesn’t exist and add it to an object. You can also remove a tag from an object by name.
July 25th, 2017 |
---|
- Order objects (
objectID => 52
) can now be deleted via the API. - Calls to
/update
and/saveorupdate
endpoints will now return all updated fields and the ID of the object in the response.
May 25th, 2017 |
---|
- New API documentation is released. Old documentation is accessible at https://api.ontraport.com/live.
- Old fields will no longer be returned in API responses. Obsolete fields include:
- Contacts:
notes
,status
,category
,lead_source
,visits
,lastvisit
,lastaction
,referer
- Tasks:
history
,flags
,notify_manager
,notes
- Landingpages:
platform
- Forms:
fields
,fieldoptions
,fieldsrequired
,form_format
,raw_data
,attach
- Transactions:
transaction_id
- Contacts: