Engaging Network Services

ENS API

https://e-activist.com/

https://www.e-activist.com
Headers
ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
API Methods

Common Authentication Errors

  1. “Invalid api key [XXXXXXXXXXXXXXXXXXXX]” The API key passed into the authenticate request is invalid

  2. “A user was not found for api key[XXXXXXXXXXXXXXXXXXXXX]. Please contact support” The API key passed in does not have a valid user associated to it.

  3. “Authentication call is being made from an unregistered source address for this ENS api key” The request is being made from an IP address that is not whitelisted for the ApiUser in EN

  4. “The user specified by api key [XXXXXXXXXXXXXXXXXXXX] is not active or does not have access to EN services” The user associated to the API key is inactive or has been removed from the system.

  5. “The user with username [api@engagingnetworks.net] has exceeded its api limit” The API user has used up the request limit for the hour and will need to wait before making more requests.

Authentication Services

These services are used to authenticate to ENS

POST /ens/service/authenticate
GET /ens/service/authenticate/{token}
DELETE /ens/service/authenticate/{token}
Authenticate to ENS
POST /ens/service/authenticate

Pass in your API key to the autenticate call to get back a ens-auth-key to use in alls subsequent calls. NOTE: The ens-auth-key is not required on this call. This call requires the API key to be posted to the system to get back an ens-auth-key.

Request headers

Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json

Request body

a022e7be-47ae-4ea9-b435-97e072f639a6

string
Validate ENS Authentication
GET /ens/service/authenticate/{token}

Use this call to validate if your ENS session token is still valid

Path variables

token
string required

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Delete session
DELETE /ens/service/authenticate/{token}

Remove this session key for usage.

Path variables

token
string required

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Supporter Services

These services are for manipulating supporter data

Note: These services are rate limited. If you are ‘syncing’ large amounts of records, please consider using the ‘bulk API’ tools instead. Please contact support for further information.

GET /ens/service/supporter/{supporterId}
POST /ens/service/supporter
GET /ens/service/supporter
PUT /ens/service/supporter/{supporterId}
DELETE /ens/service/supporter/{supporterId}
GET /ens/service/supporter/{supporterId}/transactions
GET /ens/service/supporter/fields
GET /ens/service/supporter/questions
GET /ens/service/supporter/questions/{id}
GET /ens/service/supporter/query
Get Supporter By ID
GET /ens/service/supporter/{supporterId}

Path variables

supporterId
number required

Request parameters

includeQuestions
boolean optional

Whether to return question responses from the supporter

includeMemberships
boolean optional

Whether to return membership details for this supporter

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Add or Update Supporter
POST /ens/service/supporter

Add a new supporter or update an existing supporter if the supporter’s email address already exists in the system.

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Add a new supporter
Update an existing supporter's optin status
POST https://www.e-activist.com/ens/service/supporter HTTP/1.1 

Content-Type: application/json

{
   "First Name": "Joe",
   "Last Name": "Smith",
   "Email Address": "joe.smith@noaddress.com",
   "Date of Birth": "1985-12-01",
   "questions": {
      "Marketing Optin": "Y",
      "Interested Emails": "daily emails"
   }
}
POST https://www.e-activist.com/ens/service/supporter HTTP/1.1 

Content-Type: application/json

{
   "Email Address": "joe.smith@noaddress.com",
   "questions": {
      "Marketing Optin": "N",
   }
}
Get Supporter By Email Address
GET /ens/service/supporter

Pass in the supporter email address you are looking for (all lowercase)

Request parameters

email
string required

The email address of the supporter you are looking for (lower case)

includeQuestions
boolean optional

If the response should include question responses along with supporter data

includeMemberships
boolean optional

Whether to include membership details for this supporter

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Update Supporter Email
PUT /ens/service/supporter/{supporterId}

Path variables

supporterId
number required

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Update supporter's email address
PUT https://www.e-activist.com/ens/service/supporter/{supporterId} HTTP/1.1 

Content-Type: application/json

{   
   "Email Address": "joe.smith.updated@noaddress.com"
}
Delete Supporter
DELETE /ens/service/supporter/{supporterId}

Path variables

supporterId
number required

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Get Supporter Transactions
GET /ens/service/supporter/{supporterId}/transactions

Get transactions for this supporter

Path variables

supporterId
number required

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Get Supporter Fields
GET /ens/service/supporter/fields

Get the list of supporter fields that can be saved or updated for this supporter in the POST/PUT calls.

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Get Supporter Questions
GET /ens/service/supporter/questions

Get the list of question fields that can be saved or updated for this supporter in the POST/PUT calls.

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json

Responses

200 OK
Body
Object
id
integer
Example:
6321
questionId
integer
Example:
615
name
string
Example:
Double Opt-in
type
string
Example:
CONF
Get Supporter Question by ID
GET /ens/service/supporter/questions/{id}

Get a question by id that includes its pull configuration (html field type and field values)

Path variables

id
string required

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Example:
application/json
Query Supporters
GET /ens/service/supporter/query

Query supporters by various search functions.

  1. latestCreated - the latest supporters created in the system
  2. latestModified - the latest supporters modified in the system
  3. suppressed - Supporters that are currently suppressed in the system
  4. profile - Supporters that belong to a particular profile

Request parameters

type
string required

the type of query to perform (latestCreated, latestModified, suppressed, profile)

daysBack
integer optional

the number of days to go back for the search, this is not required for profile searches but required for all other types. Valid values are 1 to 32.

Min: 1
Max: 32
Default:
1
exportGroup
string optional

the export group to use that identifies the attributes of the supporter to return

profileId
integer optional

the ID of the profile to return the supporters for (only applies when type=profile)

start
integer optional

the row to start from for pagination

rows
integer optional

the number of rows to return (maximum=100)

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Get Suppressed Supporters
Get Supporters By Profile
Get Supporters By Create Date

Return the supporters that have been suppressed in the past 7 days

/supporter/query?type=suppressed&daysBack=7

Return the list of supporters that belong to a particular profile

/supporter/query?type=profile&daysBack=10&profileId=333

Get the list of supporters that have been created in the past 3 days using export group ‘basic only’

/supporter/query?type=latestCreated&daysBack=3&exportGroup=basic only
Page Services

A set of services that can be used to manipulate pages built in EN.

Note: These services are rate limited. If you are ‘syncing’ large amounts of records, please consider using the ‘bulk API’ tools instead. Please contact support for further information.

GET /ens/service/page?type=dcf&status=live
GET /ens/service/page/{pageId}
POST /ens/service/page/{pageId}/process
Get Pages by Type
GET /ens/service/page?type=dcf&status=live

Get all pages by type and status. type is a required parameter and status is optional. Valid values for type are [dcf,mem,ems,unsub,pet,et,nd] Valid values for status are [live,new,tested]

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json
Get Page Details
GET /ens/service/page/{pageId}

Gets basica attributes about a page

Path variables

pageId
integer required

Return some basic attributes about a page

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json

Responses

200 OK
Body
Object
id
integer
Example:
1045
campaignId
integer
Example:
652343
name
string
Example:
My Page
title
string
Example:
My Page Title
type
string
Example:
dc
subType
string
Example:
PET
clientId
integer
Example:
1234
createdOn
integer
Example:
1485423965000
modifiedOn
integer
Example:
1487614627000
campaignBaseUrl
string
Example:
https://e-activist.com
campaignStatus
string
Example:
new
defaultLocale
string
Example:
en-US
campaignAttributes
Array
Example:
["Save the Whales","Trees"]
string
Example:
Save the Whales
locales
Array
Example:
["fr-FR","fr-CA"]
string
Example:
fr-FR
trackingParameters
Array of string

[“facebook”,“email”]

Process a Page Request
POST /ens/service/page/{pageId}/process

Process an EN page

Path variables

pageId
integer required

Processes a page built in EN

Request headers

ens-auth-token
string required

The ens-auth-token is the session token obtained from authenticating to ENS using your api key and is required on all calls after authentication.

Example:
f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type
string required

All responses for the service come back as JSON. This header is required on all calls after authentication.

Default:
application/json

Responses

200 Created
Body
Object
id
integer
Example:
1231231
status
string
Example:
SUCCESS
supporterEmailAddress
string
Example:
joe.smith@noaddress.com
supporterId
integer
Example:
2343122
Process a data capture page
Process a donation page
Process an advocacy page
Process a page
POST https://www.e-activist.com/ens/service/page/100/process HTTP/1.1 

ens-auth-token: f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type: application/json
{
   "supporter": {
      "First Name": "Joe",
      "Last Name": "Smith",
      "Email Address": "joe.smith@noaddress.com",
      "questions": {
        "Marketing Optin": "Y",
        "Interested Emails": "daily emails"
      }
   },
   "suppressAutoResponder": true,
   "trackingId": "fb111",
   "appealCode":  "client appeal code",
   "txn1": "client-ext-ref-value1",
   "txn2": "client-ext-ref-value2"   
}
POST https://www.e-activist.com/ens/service/page/{pageId}/process HTTP/1.1 

ens-auth-token: f472b605-bae1-4e26-ad5b-829c91735f63

HTTP/1.1 200 OK 

Content-Type: application/json

{
	"supporter": {
		"Email Address": "joe.smith@noaddress.com",
		"First Name": "Joe",
		"Last Name": "Smith",
		"Address 1": "111 Main St",
		"region": "DE",
		"Postcode": "23433",
		"Country": "USA"
	},
	"transaction": {
		"paymenttype": "VISA",
        "donationAmt": "1.00",
        "ccnumber": "4222222222222220",
        "ccexpire": "12/2018"
	},
	"trackingId": "fb111",
	"appealCode": "client appeal code",
	"txn1": "client-ext-ref-value1",
	"txn2": "client-ext-ref-value2"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
  "id": 67710,
  "type": "CREDIT_SINGLE",
  "currency": "GBP",
  "status": "SUCCESS",
  "error": "",
  "recurringPayment": false,
  "paymentType": "VISA",
  "amount": 1,
  "transactionId": "ND3212T5291521174653468672__A659106__A3E6A98",
  "supporterEmailAddress": "joe.smith@noaddress.com",
  "supporterId": 139846,
  "createdOn": 1487353181180
}


POST https://www.e-activist.com/ens/service/page/{pageId}/process HTTP/1.1 

ens-auth-token: f472b605-bae1-4e26-ad5b-829c91735f63

HTTP/1.1 200 OK 

Content-Type: application/json
{
    "demo": true,
    "supporter": {
        "First Name": "Spider",
        "Last Name": "Man",
        "Email Address": "spider.man@avengers.com",
        "Address 1": "100 Main St",
        "Postal Code": "43031",
        "Country": "US"
    },
    "contactMessage": {
        "subject": "Please help",
        "message": "{contact_data~salutation}\nMr Freeze is destroying the city!\n\nKind regards,\n\nSpidey"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json
{
  "id": 67710,
  "status": "SUCCESS",
  "supporterEmailAddress": "spider.man@avengers.com",
  "supporterId": 139846,
  "createdOn": 1487353181180
}

Process a data capture page this time using standard supporter field properties. For question responses, the componentId of the question is used in the attribute name.

POST https://www.e-activist.com/ens/service/page/100/process HTTP/1.1 

ens-auth-token: f472b605-bae1-4e26-ad5b-829c91735f63
Content-Type: application/json
{
   "standardFieldNames": true,
   "supporter": {
      "firstName": "Joe",
      "lastName": "Smith",
      "emailAddress": "joe.smith@noaddress.com",
      "NOT_TAGGED_1": "a generic field response"
      "questions": {
        "question.4512": "Y"
      }
   },
   "trackingId": "fb111",
   "appealCode":  "client appeal code",
   "txn1": "client-ext-ref-value1",
   "txn2": "client-ext-ref-value2"   
}

HTTP/1.1 200 OK 
Content-Type: application/json

{
    "id": 1231231,
    "status": "SUCCESS",
    "supporterEmailAddress": "joe.smith@noaddress.com",
    "supporterId": 2343122
}