Follow

Overview

The REST API reference documents the available REST resources, along with expected HTTP response codes and sample requests.  REST stands for Representational State Transfer. It is developed as an alternative to the HTTP and SOAP-based WebServices API.

You can use the REST API to design and deploy campaigns, develop integrations between the platform and other applications, and script subscriber management. The REST resources are defined by nouns indicated which feature is affected, such as Lists, Templates, or Campaigns.  Each resource supports the ability to create, read, update, and delete using standard HTTP POST, GET, PUT, PATCH, and DELETE requests.

The REST API provides access to resources via URI paths. The Header provides authentication and supported data formatting instructions.  To use a REST API, make an HTTP request and parse the response. The REST API uses the JSON format to communicate requests and output results. 

Resource Requirements

The resource requires the following information:

Name

Req?

Description

Details

URI

Yes

Defines the resource to use.

http://[siteurl]/rest/[resourceName]

Request Method

Yes

Method to manipulate or request data.

POST, GET, PUT, DELETE

Authorization

Yes

Authentication code for API access as a Base64 encoded string.  This is required.  The command will fail if the Account and password do not match.

Authorization: Basic [account_name:api_password]

Content Type

Yes

Acceptable data format.  Only JSON is supported.

Content Type: application/json

Version

 

API version.  Most current version is v1.

Accept: application/vnd.whatcounts-v1+json

HTTP Request Types

The following HTTP Request types are supported:

  • POST - Create a new item
  • PUT - Update all fields defined in JSON with the defined values, update undefined values with NULL
  • PATCH - Update all fields defined in JSON with the defined values, ignore fields that are not defined in JSON
  • GET - Get the fields for the item identified in the request
  • DELETE - Delete the item identifed in the request

Supported Resources

The REST API supports the following system features as resources:

Additional features are coming soon:

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk