1. Home
  2. Data & reports
  3. Engaging Networks Services (ENS)
  4. Engaging Networks Services: REST services

Engaging Networks Services: REST services

Advanced users only.

Our ENS REST API provides authentification services, supporter management and page services all in one package which means you could create an app or data syncing software.

To start using ENS REST you need to have an API User set up with a whitelisted IP address. 

The syntax of ENS can be found here.

Example

For accounts in the Dallas datacenter, use https://us.e-activist.com/

  1. Create an API User which will provide you with a token
  2. POST to https://e-activist.com/ens/service/authenticate with key of Content-Type and value of application/json; charset=UTF-8 in the Header, and the token in the body
  3. If successful, you will get an ens-auth-token returned with an expiry date
  4. You can then GET supporter details  as a JSON object via https://www.e-activist.com/ens/service/supporter?email=example@engagingnetworks.net with a Header key of ens-auth-token and the returned token as the value. This will return a JSON object containing the supporter fields including supporterID
  5. You can then GET their transactions as a JSON object (with the token in the header again) via https://www.e-activist.com/ens/service/supporter/XXXXX/transactions where XXXX is the supporterID
  6. You can also POST a new supporter (with the token in the header and also Content-Type of application/json) with the JSON in the body which consists of field names in your supporter record and their values, e.g.
    {
      "First Name": "Jane",
      "Last Name": "Smith",
      "Email": "jane.smith@noaddress.com",
      "questions":{
        "Opt in":"Y"
      }
    }

An Email to Target (ETT) example

An example of body code for an email-to-target is below. Note: This always submits as LIVE unless you add demo: true as in the example below.

POST https://e-activist.com/ens/service/page/{PAGEID}/process

Body:

{
  "demo": true,
  "supporter": {
    "First Name": "Iain",
    "Last Name": "Ure",
    "Email Address": "iain@example.com",
    "Postcode": "e123aa"
  },
  "questions": {
    "Opt in": "Y"
  },
  "contactMessage": {
    "subject": "A custom subject",
    "message": "A message from {user_data~First Name} to {contact_data~firstName}"
  }
}

Recurring donation with external references

In this example, we are posting a recurring donation along with external references:

{
  "supporter":{
    "Email Address":"joe.smith.recurring@example.com",
    "First Name":"Joe",
    "Last Name":"Smith Recurring",
    "Address 1":"111 Main St",
    "region":"DE",
    "Postcode":"23433",
    "Country":"USA",
    "questions": {
      "Opt In - Newsletters": "Y",
      "Standard Opt In": "Y"
    }
  },
  "transaction":{
    "paymenttype":"VISA",
    "donationAmt":"19.00",
    "ccnumber":"4222222222222220",
    "ccexpire":"12/2019",
    "recurrpay": "Y",
    "othamt1":"one",
    "othamt2":"two",
    "othmat3":"three",
    "othmat4":"four"
  },
  "trackingId":"fb111",
  "appealCode":"client appeal code 2",
  "originSource": "ogvalue123",
  "txn1":"client-ext-ref-value1",
  "txn2":"client-ext-ref-value2",
  "txn3":"client-ext-ref-value3",
  "txn4":"client-ext-ref-value4",
  "txn5":"client-ext-ref-value5",
  "txn6":"client-ext-ref-value6",
  "txn7":"client-ext-ref-value7",
  "txn8":"client-ext-ref-value8",
  "txn9":"client-ext-ref-value9",
  "txn10":"client-ext-ref-value10"
}

Creating a new supporter with an Origin Source

‘Origin Source’ can be set through the REST API by passing a value through “originSource”

Example :

{
	"supporter": {
		"First Name": "Joe",
		"Last Name": "Smith",
		"Email Address": "joe.smith@noaddress.com",
		"questions": {
			"Marketing Optin": "Y",
			"Interested Emails": "daily emails"
		}
	},
	"originSource": "ogvalue123",
	"trackingId": "fb111",
	"appealCode": "client appeal code",
	"txn1": "client-ext-ref-value1",
	"txn2": "client-ext-ref-value2"
}

Limits

The page processing limits are 200 requests per 5 mins, from a single source (IP address).

The ENS REST limit is 5,000 requests per 1 hour per API User.

Beyond these limits, requests are blocked.

Updated on February 10, 2020

Was this article helpful?

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support