Follow

Overview

The Rest API supports the ability to manage Subscriptions to Lists. The Rest API URI for the Subscriptions resource is in the format:

https://[siteurl]/rest/subscriptions

Commands

API Commands for Subscription management include:

Name

HTTP Method

Endpoint

Description

Create Subscription POST /rest/subscriptions Create a Subscription for a Subscriber to a List
Update Subscription PATCH /rest/subscription/{subscriptionId} Update the format of a Subscription
Delete Subscription by Subscription ID DELETE /rest/subscriptions/{subscriptionId} Delete specific Subscription for a Subscriber on a List
Delete Subscription by Subscriber ID DELETE /rest/subscriptions Delete specific Subscription for a Subscriber on a List by JSON object
Get All Subscribers by List ID GET /rest/lists/{listID}/subscribers Get details for all Subscribers in a List.  Does not return Subscription ID.
Get Subscriptions by Subscriber ID GET

/rest/subscribers/{subscriberId}/subscriptions

Get all Subscriptions for a Subscriber by Subscriber ID. Includes each Subscription ID.
Get Subscriptions by Customer Key GET /rest/subscribers/{customerKey}/subscriptions Get all Subscriptions for a Subscriber by Customer Key. Includes each Subscription ID.

Subscription Data Fields

The following data fields may be set and viewed.  

Field Name

Methods

Description

Type

Example

Subscriber ID

POST, GET, DELETE

Unique identifier of the Subscriber

Integer

"subscriberId": [subscriberId]

Subscription ID

GET, DELETE

Identifier of the Subscription to the List

Integer

"subscriptionId": [subscriptionId]

List ID

POST, GET, DELETE

Unique Identifier of the List.

Integer

"listId": [listId]

List Name

POST, GET, DELETE Unique Name of the List. String "listName": [listName]

Subscription Format

POST, PUT, PATCH, GET

The preferred format of the email message content to send.

  • Plain Text = 1
  • HTML = 2
  • Multipart MIME = 99
Integer "formatId": [formatId]

Subscription Created Date

GET Date Subscription to List first created. Date/Time "createdDate": "Mar 23, 2016 12:45:04 PM"

Account ID (Realm ID)

GET

Identifier of the Account in which the Subscriber exists.

Integer

"realmId": [realmId]

Email

POST, DELETE, GET

Email address of the Subscriber.

String 

"email": "[email]"

Customer Key

POST, DELETE, GET

Unique identifier for the Subscriber in Accounts in which Customer Key is required.

String 

"customerKey": "[customerKey]"

First Name

POST, DELETE, GET

Subscriber first name

String 

"firstName": "[firstName]"

Last Name

GET 

Subscriber last name.

String 

"lastName": "[lastName]"

Company

GET 

Subscriber company.

String 

"company": "[company]"

Address 1

GET 

Subscriber address part 1.

String

"address1": "[address1]"

Address 2

GET 

Subscriber address part 2. 

String

"address": "[address2]"

City

GET 

Subscriber city.

String

"city": "[city]"

State

POST, PUT, GET

Subscriber state, four character limit.

String "state": "[stat]"

Zip

POST, PUT, GET

Subscriber zip or postal code.

String "zip": "[zip]"

Country

GET 

Subscriber country.

String

"country": "[country]"

Phone

GET 

Subscriber phone number. 

String

"phone": "[phone]"

Fax

GET  

Subscriber fax number.

String

"fax": "[fax]"

Subscriber Created Date

GET 

Date Subscriber record first created.

Date/Time

"createdDate": "Mar 23, 2016 12:45:04 PM"

Subscriber Updated Date

GET 

Date Subscriber record last updated.

Date/Time

"updatedDate": "Mar 23, 2016 12:45:04 PM"

MD5 Encryption

GET 

Encrypted Subscriber identifier.

String 

"md5Encryption": "[md5Encryption]"

SHA1 Encryption

GET 

Encrypted Subscriber identifier.

String 

"sha1Encryption": "[sha1Encryption]"

IP Address

GET 

Subscriber IP Address from last Open or Click tracking event.

String

"ipAddress": "[ipAddress]"

Custom Fields

GET 

Custom data stored for Subscriber.

String, Integer, Float, Date

"customFieldName": "string"
"customFieldName": integer or float
"customFieldName": "date"

Skip

GET

Parameter to retrieve next set of results.  See Pagination for more details.

Integer 

"skip": 0

Max

GET

Max is not in use.

Integer 

"max": 0

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

Comments

Powered by Zendesk