REST API

Should you read this? You probably will need to at some point. This is all about server-side API integration. This is useful if you want to create or manage resources on the back-end, or if you want to do server-side access control.

What APIs Are Available?

If you haven’t had a chance to check out the REST API Interface Overview you probably should do that right now. We’ll wait.

Ok - now that that’s all sorted, let’s talk about the APIs or endpoints. The Wallit REST API is really split into two main APIs with multiple endpoints on each. Both Access API and Manage API communicate with the same protocols and message formats. The only thing different is the type of API key you use for each. Remember, use the proper API Key from the Manage UI for each of the APIs.

API Request Format

There are three headers that are required with each request: Accept, Timestamp and Authentication. If your request contains a payload, an additional Content-Type header is needed.

Message Data Format

The APIs support JSON data. When making an HTTP request to the API, use the following two headers to indicate JSON:

Header Name Value
Content-Type application/json
Accept application/json

If your system does not currently support JSON, please contact us for personal assistance and support.

Timestamp

Each request requires a Timestamp header in UTC RFC1123 format. Please make sure that your server time is correct. We accept requests that are dated within 5 minutes before or after the current time maximum. Otherwise, your request will be rejected with a HTTP 401 or HTTP 403 error.

Authentication

The Authentication header is required on each request. The format is the current API key, a colon, and then the authentication token. Requests without an Authentication header, without a token, or with an invalid token, will result in an HTTP 401 error.

Each token is created by a hash calculated for each request.

To create the token, follow the following steps:

1) Join the four strings described below and join them with a new line character
2) Hash the string using Binary SHA-256 HMAC using the secret key associated with the API key you’re using
3) Base64 encode the output

For example, you might see something like this:

Authentication: BB772A5B-1E7B-461C-8AC6-CA9E6E2FD2B9:y8s48zxCy62NXUFe5699i7vktOpLvDnt2TCifpZDzJw=

Token Values

The following table describes the four pieces of content that are required to create the hash.

Item Description Example
HTTP Method The method used for this request in all caps. POST
Timestamp The timestamp described above. Wed, 05 Oct 2016 15:08:05 GMT
URI of Request Convert this value to all lower case. Do not include any query strings. /api/property/bb772a5b-1e7b-461c-8ac6-ca9e6e2fd2b9
Query Parameters Ampersand-joined alphabetically ordered list of parameters used for this request. Both names and values should be lowercase and not url-encoded. byline=guy smiley&externalkey=1234&name=my article

Looking to validate your token? Good news - we’ve built a tool that can help you.
Go to the Token Validation Tool.

API Endpoint Documentation

This section describes the API URL’s and endpoints for Wallit.

Resource Access API

The Resource Access API is used for access control, validating a user’s access to content.

https://accessapi.wallit.io

GET /api/Resource/{accessKey}/{resourceKey}

Returns access data about a resource based on its resource key

Parameters
Name Where Description Type
accessKey path

Your Resource Access API access key.

String
resourceKey path

The external key for the resource being accessed.

String
ResourceURL query

A URL for the resource. If dynamic resource creation needs to occur, this URL will be spidered by iMoneza to gather resource data.

String
UserToken query

An existing user token that was stored as a cookie. This value can be empty if the user doesn’t have an existing user token cookie, but the parameter is required.

String
IP query

The IP address of the user requesting a resource. This parameter is optional. The IP address can be IPv4 or IPv6.

String
AdBlockerStatus query

The result of any ad blocker detection performed by the API consumer.

String
  • Unknown
  • DetectionNotPerformed
  • AdBlockerNotDetected
  • AdBlockerDetected
UseLegacyPaywall query

Whether or not to use the legacy paywall.

Boolean
Responses
200

A resource access object

Example
{
  "UserToken": "e313128d-21c4-4dad-a8e4-8928993f08a7|635633302264795088|2OnHROFPE3WgONGDeUyZJkluyORc0UBYOXABTLaU",
  "PropertyName": "Acme, Inc.",
  "PaywallDisplayStyle": "RedirectMobile",
  "ResourceName": "Front Page News",
  "UserName": "johndoe",
  "FirstName": "John",
  "IsAnonymousUser": false,
  "IsAdSupported": false,
  "AdSupportedMessageTitle": "",
  "AdSupportedMessage": "",
  "AdBlockerStatus": "Unknown",
  "IsNoCost": false,
  "Quota": {
    "IsEnabled": false,
    "HitCount": -1,
    "AllowedHits": -1,
    "PeriodStartDate": "2015-03-30T16:37:06.4795088Z",
    "PeriodName": "",
    "IsMet": true
  },
  "Subscription": {
    "IsExpired": false,
    "ExpirationDate": "2015-03-30T16:37:06.4795088Z",
    "IsCurrent": false,
    "SubscriptionGroupID": ""
  },
  "Purchase": {
    "IsPurchased": false
  },
  "AccessAction": "Purchase",
  "AccessReason": "Deny",
  "AccessActionURL": "https://accessui.imoneza.com/ResourceAccess/?ApiKey=2ba53ade-07a7-427f-8e06-2bc7733a2fc8&ResourceKey=51&UserToken=e313128d-21c4-4dad-a8e4-8928993f08a7%7c635633302264795088%7c2OnHROFPE3WgONGDeUyZJkluyORc0UBYOXABTLaU&SendTemporaryUserToken=True"
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

GET /api/TemporaryUserToken/{accessKey}/{temporaryUserToken}

Returns resource access data based on a temporary user token.

Parameters
Name Where Description Type
accessKey path

Your Resource Access API access key.

String
temporaryUserToken path

A temporary user token that was passed to the page in the iMonezaTUT URL parameter.

String
ResourceKey query

The external key for the resource being accessed.

String
ResourceURL query

A URL for the resource. If dynamic resource creation needs to occur, this URL will be spidered by iMoneza to gather resource data.

String
IP query

The IP address of the user requesting a resource. This parameter is optional. The IP address can be IPv4 or IPv6.

String
AdBlockerStatus query

The result of any ad blocker detection performed by the API consumer.

String
  • Unknown
  • DetectionNotPerformed
  • AdBlockerNotDetected
  • AdBlockerDetected
UseLegacyPaywall query

Whether or not to use the legacy paywall.

Boolean
Responses
200

A resource access object

Example
{
  "UserToken": "e313128d-21c4-4dad-a8e4-8928993f08a7|635633302264795088|2OnHROFPE3WgONGDeUyZJkluyORc0UBYOXABTLaU",
  "PropertyName": "Acme, Inc.",
  "PaywallDisplayStyle": "RedirectMobile",
  "ResourceName": "Front Page News",
  "UserName": "johndoe",
  "FirstName": "John",
  "IsAnonymousUser": false,
  "IsAdSupported": false,
  "AdSupportedMessageTitle": "",
  "AdSupportedMessage": "",
  "AdBlockerStatus": "Unknown",
  "IsNoCost": false,
  "Quota": {
    "IsEnabled": false,
    "HitCount": -1,
    "AllowedHits": -1,
    "PeriodStartDate": "2015-03-30T16:37:06.4795088Z",
    "PeriodName": "",
    "IsMet": true
  },
  "Subscription": {
    "IsExpired": false,
    "ExpirationDate": "2015-03-30T16:37:06.4795088Z",
    "IsCurrent": false,
    "SubscriptionGroupID": ""
  },
  "Purchase": {
    "IsPurchased": false
  },
  "AccessAction": "Purchase",
  "AccessReason": "Deny",
  "AccessActionURL": "https://accessui.imoneza.com/ResourceAccess/?ApiKey=2ba53ade-07a7-427f-8e06-2bc7733a2fc8&ResourceKey=51&UserToken=e313128d-21c4-4dad-a8e4-8928993f08a7%7c635633302264795088%7c2OnHROFPE3WgONGDeUyZJkluyORc0UBYOXABTLaU&SendTemporaryUserToken=True"
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

Resource Management API

This API is used for managing resource data, providing merchants access to certain resource-level configuration without needing to use the Management UI.

https://manageapi.wallit.io

GET /api/Property/{propertyID}

Returns property information including access information and subscription & pricing groups.

Parameters
Name Where Description Type
propertyID path

The Property ID for this request.

String
Responses
200

A property object

Example
{
  "Name": "WordPress Plugin Sandbox",
  "Title": "WordPress Plugin Sandbox",
  "DynamicallyCreateResources": false,
  "EnableQuota": true,
  "EnableSubscriptions": true,
  "EnableSinglePurchases": true,
  "FreeResourcesRequireAuthentication": false,
  "Quota": 2,
  "QuotaPeriod": "Monthly",
  "SubscriptionGroups": [
    {
     "SubscriptionGroupID": "57f294fb-9e4e-4d54-bd9c-514d0165650a",
     "Name": "Premium",
     "Title": "Premium Subscription",
     "Price": 10.00,
     "Period": "Monthly",
     "PaywallDescription": "",
     "PaywallShortDescription": ""
    },
    {
     "SubscriptionGroupID": "e3786c3e-f733-4777-a34f-d89fb48085e5",
     "Name": "Default",
     "Title": "Subscription",
     "Price": 5.00,
     "Period": "Monthly"
     "PaywallDescription": "",
     "PaywallShortDescription": ""
    }
  ],
  "PricingGroups": [
    {
      "PricingGroupID": "a0dbe1be-eef9-4f2e-a10f-5a4c35ac2caa",
      "Name": "Pay What You Want",
      "IsDefault": false,
      "PricingModel": "VariablePrice",
      "Price": 0.00,
      "ExpirationPeriodUnit": "Never",
      "ExpirationPeriodValue": 0,
      "TargetConversionRate": 0.00,
      "TargetConversionPriceFloor": 0.00,
      "TargetConversionHitsPerRecalculationPeriod": 0
    },
    {
      "PricingGroupID": "ea45a17f-b4b3-474f-8871-b769bdfbebaf",
      "Name": "Premium",
      "IsDefault": false,
      "PricingModel": "FixedPrice",
      "Price": 1.00,
      "ExpirationPeriodUnit": "Never",
      "ExpirationPeriodValue": 0,
      "TargetConversionRate": 0.00,
      "TargetConversionPriceFloor": 0.00,
      "TargetConversionHitsPerRecalculationPeriod": 0
    },
    {
      "PricingGroupID": "d0cb0c67-743f-41e7-bd90-dc3991743f90",
      "Name": "Default",
      "IsDefault": true,
      "PricingModel": "FixedPrice",
      "Price": 0.50,
      "ExpirationPeriodUnit": "Never",
      "ExpirationPeriodValue": 0,
      "TargetConversionRate": 0.00,
      "TargetConversionPriceFloor": 0.00,
      "TargetConversionHitsPerRecalculationPeriod": 0
    },
    {
      "PricingGroupID": "f3a10c67-28b4-41e7-bd90-dc3991746cd4",
      "Name": "Features",
      "IsDefault": true,
      "PricingModel": "TargetConversion",
      "Price": 0.50,
      "ExpirationPeriodUnit": "Never",
      "ExpirationPeriodValue": 0,
      "TargetConversionRate": 0.20,
      "TargetConversionPriceFloor": 0.05,
      "TargetConversionHitsPerRecalculationPeriod": 100
    }
  ]
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

GET /api/Property/{propertyID}/Resource

Returns all the resources belonging to a property.

Parameters
Name Where Description Type
propertyID path

The Property ID for this request.

String
Responses
200

An array of resource objects

Example
[
  {
    "Name": "Third Post",
    "ExternalKey": "13",
    "Active": true,
    "URL": "http://localhost:64653/?p=13",
    "Title": "Third Post",
    "Byline": "",
    "Description": "",
    "PublicationDate": "2014-07-07T16:08:30",
    "PricingGroup": {
      "PricingGroupID": "a0dbe1be-eef9-4f2e-a10f-5a4c35ac2caa",
      "Name": "Pay What You Want",
      "IsDefault": false,
      "PricingModel": "VariablePrice",
      "Price": 0.00,
      "ExpirationPeriodUnit": "Never",
      "ExpirationPeriodValue": 0
    },
    "PricingModel": "Inherit",
    "Price": 0.00,
    "ExpirationPeriodUnit": "Never",
    "ExpirationPeriodValue": 0,
    "TargetConversionRate": 0.00,
    "TargetConversionPriceFloor": 0.00,
    "TargetConversionHitsPerRecalculationPeriod": 0,
    "PaywallDescription": "",
    "PaywallShortDescription": "",
    "Property": null
  },
  {
    "Name": "Hello, world.",
    "ExternalKey": "1",
    "Active": true,
    "URL": "http://localhost:64653/?p=1",
    "Title": "Hello, world.",
    "Byline": "by Chris Wilson",
    "Description": "",
    "PublicationDate": "2014-06-13T09:35:07",
    "PricingGroup": {
      "PricingGroupID": "d0cb0c67-743f-41e7-bd90-dc3991743f90",
      "Name": "Default",
      "IsDefault": true,
      "PricingModel": "FixedPrice",
      "Price": 0.50,
      "ExpirationPeriodUnit": "Never",
      "ExpirationPeriodValue": 0
    },
    "PricingModel": "Inherit",
    "Price": 0.00,
    "ExpirationPeriodUnit": "Never",
    "ExpirationPeriodValue": 0,
    "TargetConversionRate": 0.00,
    "TargetConversionPriceFloor": 0.00,
    "TargetConversionHitsPerRecalculationPeriod": 0,
    "PaywallDescription": "",
    "PaywallShortDescription": "",
    "Property": null
  }
]
401

Authentication Failure

403

Not Authorized

404

Item Not found

PUT /api/Property/{propertyID}/Resource/{externalKey}

Creates/Updates a resource, identified by an external key.

Parameters
Name Where Description Type
propertyID path

The Property ID for this request.

String
externalKey path

The external key or public identifier of a resource.

String
ExternalKey formData

The external key or public identifier of a resource.

String
Name formData

The internal name of the resource (required only on creation)

String
Active formData

Boolean of whether this item is active

Boolean
URL formData

The URL of the resource

String
Title formData

The title of the resource

String
Byline formData

Who authored the resource

String
Description formData

Description of the resource that appears if the paywall type is set to “Modal”

String
PublicationDate formData

The publication date of the resource

String
PricingGroup formData

Update or set the pricing group for the resource (required only on creation) (see special formatting notes below)

String
PricingModel formData

The resource pricing model

String
  • Inherit
  • Free
  • AuthenticationRequired
  • FixedPrice
  • VariablePrice
  • TimeTiered
  • ViewTiered
  • SubscriptionOnly
  • TargetConversion
Price formData

The price of the resource

Number
ExpirationPeriodUnit formData

Expiration Period Unit

String
  • Never
  • Years
  • Months
  • Weeks
  • Days
ExpirationPeriodValue formData

Expiration Period Value

String
TargetConversionRate formData

Target Conversion Rate

String
TargetConversionPriceFloor formData

Target Conversion Price Floor

String
TargetConversionHitsPerRecalculationPeriod formData

Target Conversion Hits Per Recalculation Period

String
PaywallDescription formData

The description of the resource that will appear on the Purchase Options step on the paywall

String
PaywallShortDescription formData

The short description of the resource that will appear at the top of paywall after the Purchase Options step

String
Responses
200

Successful creation or updating of the item.

401

Authentication Failure

403

Not Authorized

404

Item Not found

PUT /api/Property/{apiKey}/ExternalSubscriber/{subscriberKey}

Adds or updates a single external subscriber.

Parameters
Name Where Description Type
apiKey path

The api key for this request.

String
subscriberKey path

The subscriber key

String
SubscriberKey formData

The subscriber key

String
MaximumLinkedUsers formData

Maximum Linked Users

String
ValidationFields formData

Array of objects with two properties - Name relates to the name of the field data and Value relates to the value of said data.

String
EligibleSubscriptions formData

An array of objects with two properties - SubscriptionGroupKey is the subscription group key and EligibilityEndDate is when eligibility to this subscription ends.

String
AutomaticSubscriptions formData

An array of objects with two properties - SubscriptionGroupKey is the subscription group key and ExpirationDate is the end of the subscription.

String
Responses
200

A subscriber element containing only the demographic fields

Example
{
  "SubscriberKey": "ABC-123",
  "MaximumLinkedUsers": 5,
  "ValidationFields": [
    {
      "Name": "PrintSubscriptionNumber",
      "Value": "12345678"
    },
    {
      "Name": "ZipCode",
      "Value": "53211"
    }
  ],
  "EligibleSubscriptions": [
    {
      "SubscriptionGroupKey": "Digital-All-Access",
      "EligibilityEndDate": "2015-11-16T13:30:00Z"
    }
  ],
  "AutomaticSubscriptions": [
    {
      "SubscriptionGroupKey": "Digital-Basic",
      "ExpirationDate": "2015-11-09T19:00:00Z"
    }
  ]
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

GET /api/Property/{apiKey}/ExternalSubscriber/{subscriberKey}/LinkedUser

Retrieves a single external subscriber and linked iMoneza users.

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
subscriberKey path

The subscriber key

String
Responses
200

A subscriber element

Example
{
  "SubscriberKey": "ABC-123",
  "Users": [
    {
      "ApplicationUserID": "43f4c9e1-00fe-4520-8311-929c5351a637",
      "DemographicFields": [
        {
          "Name": "EmailAddress",
          "Value": "john.doe@fake.com"
        },
        {
          "Name": "PhoneNumber",
          "Value": "555-555-5555"
        }
      ],
      "Subscriptions": [
        {
          "SubscriptionKey": "Digital-All-Access",
          "ExpirationDate": "2016-01-09T16:27:11.77"
        }
      ]
    }
  ]
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

POST /api/Property/{apiKey}/ExternalSubscriberImport

Add or update multiple external subscribers.

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
data formData

Contains a property called Subscribers which is an array of Subcriber elements.

String
Responses
200

A queue element

Example
{
  "ID": "e63f94b4-247f-405d-9222-af01507271ec|0635781205603107443",
  "NotificationEmailAddress": null,
  "Status": "Queued"
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

POST /api/Property/{apiKey}/ExternalSubscriberExport

Begins an external subscriber export.

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
StartDate formData

The timestamp of the beginning of the list

String
EndDate formData

The timestamp of the end of the list

String
Responses
200

A queue element

Example
{
  "ID": "8CFDC883-88A5-43C2-ADC5-E80CB4BA7D16",
  "NotificationEmailAddress": null,
  "Status": "Queued",
  "StartDate": "2016-04-20T05:00:00+00:00",
  "EndDate": "2016-04-21T04:59:59+00:00"
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

POST /api/Property/{apiKey}/ExternalFulfillmentSubscriptionExport

Begins an external fulfillment export of subscribers eligible at the date given.

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
SubscriptionGroupID formData

The subscription group ID that needs to be fulfilled

String
AsOfDate formData

The timestamp indicating the point in time to retrieve active subscriptions from.

String
NotificationEmailAddress formData

An optional email address that will be notified when this finishes.

String
Responses
200

A queue element

Example
{
  "ID": "cd49cd82-f256-46d2-bd9e-79a57d30dc9a|0635968527481530084",
  "NotificationEmailAddress": "email@address.com",
  "Status": "Queued",
  "SubscriptionGroupID": "14b00cc8-40a0-431e-94f1-27ffc4baf843",
  "AsOfDate": "2015-12-09T21:03:55Z",
  "Data": null
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

GET /api/Property/{apiKey}/CallbackResult/{ExternalSubscriberLinkedCallbackToken}

Retrieve data about an iMoneza user after an external subscriber is linked

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
ExternalSubscriberLinkedCallbackToken path

This is the token retrieved from the callback of type ExternalSubscriberLinked

String
Responses
200

A data element with a subscriber element child (the Subscriptions element will always be empty)

Example
{
  "SubscriberKey": "ABC-123",
  "Users": [
    {
      "ApplicationUserID": "43f4c9e1-00fe-4520-8311-929c5351a637",
      "DemographicFields": [
        {
          "Name": "EmailAddress",
          "Value": "john.doe@fake.com"
        },
        {
          "Name": "PhoneNumber",
          "Value": "555-555-5555"
        }
      ],
      "Subscriptions": []
    }
  ]
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

GET /api/Property/{apiKey}/CallbackResult/{EligibleSubscriptionPurchasedCallbackToken}

Retrieve data about a subscription purchase

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
EligibleSubscriptionPurchasedCallbackToken path

This is the token retrieved from the callback of type EligibleSubscriptionPurchased

String
Responses
200

A data element with a subscriber element child

Example
{
  "SubscriberKey": "ABC-123",
  "Users": [
    {
      "ApplicationUserID": "43f4c9e1-00fe-4520-8311-929c5351a637",
      "DemographicFields": [
        {
          "Name": "EmailAddress",
          "Value": "chris.wilson@northwoodsoft.com"
        },
        {
          "Name": "PhoneNumber",
          "Value": ""
        }
      ],
      "Subscriptions": [
        {
          "SubscriptionKey": "Digital-All-Access",
          "ExpirationDate": "2016-01-09T16:27:11.7713801Z"
        }
      ]
    }
  ]
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

GET /api/Property/{apiKey}/CallbackResult/{ExternalSubscriberImportCompletedCallbackToken}

Retrieve information about the external subscriber import including any errors that occurred.

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
ExternalSubscriberImportCompletedCallbackToken path

This is the token retrieved from the callback of type ExternalSubscriberImportCompleted

String
Responses
200

A status object

Example
{
  "Status": "Completed successfully",
  "Errors": [],
  "SuccessCount": 2,
  "FailureCount": 0
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

GET /api/Property/{apiKey}/CallbackResult/{ExternalSubscriberExportCompletedCallbackToken}

Retrieve the external subscriber export.

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
ExternalSubscriberExportCompletedCallbackToken path

This is the token retrieved from the callback of type ExternalSubscriberExportCompleted

String
Responses
200

An array of external subscribers

Example
[
  {
    "SubscriberKey": "ABC-123",
    "Users": [
      {
        "ApplicationUserID": "43f4c9e1-00fe-4520-8311-929c5351a637",
        "DemographicFields": [
          {
            "Name": "EmailAddress",
            "Value": "john.doe@fake.com"
          },
          {
            "Name": "PhoneNumber",
            "Value": "555-555-5555"
          }
        ],
        "Subscriptions": [
          {
            "SubscriptionKey": "Digital-All-Access",
            "ExpirationDate": "2016-01-09T16:27:11.77"
          }
        ]
      }
    ]
  }
]
401

Authentication Failure

403

Not Authorized

404

Item Not found

GET /api/Property/{apiKey}/CallbackResult/{ExternalFulfillmentSubscriptionExportCallbackToken}

Retrieve the external fulfillment subscription export.

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
ExternalFulfillmentSubscriptionExportCallbackToken path

This is the token retrieved from the callback of type ExternalFulfillmentSubscriptionExport

String
Responses
200

An array of external fulfillment subscriptions

401

Authentication Failure

403

Not Authorized

404

Item Not found

GET /api/Property/{apiKey}/CallbackResult/{ExternalFulfillmentSubscriptionPurchasedCallbackToken}

Retrieve the external fulfillment information after a user has purchased one.

Parameters
Name Where Description Type
apiKey path

The Property ID for this request.

String
ExternalFulfillmentSubscriptionPurchasedCallbackToken path

This is the token retrieved from the callback of type ExternalFulfillmentSubscriptionPurchased

String
Responses
200

An object indicating the subscription data and demographic fields that the merchant has defined.

Example
{
  "SubscriptionID": "e445853c-bb3f-45df-8024-b46d8bf1d033",
  "ApplicationUserID": "1ad322c4-c9c3-4865-bd56-96f27f9a3002",
  "Subscription": {
    "SubscriptionKey": "print-daily",
    "ExpirationDate": "2016-01-07T20:44:00.3100111Z",
    "DemographicFields": null
  },
  "DemographicFields": [
    {
      "Name": "Address_Line1",
      "Value": "123 Main St."
    },
    {
      "Name": "Address_Line2",
      "Value": ""
    },
    {
      "Name": "Address_City",
      "Value": "Milwaukee"
    },
    {
      "Name": "Address_State",
      "Value": "AL"
    },
    {
      "Name": "Address_PostalCode",
      "Value": "53211"
    },
    {
      "Name": "Address_Country",
      "Value": "US"
    },
    {
      "Name": "Address",
      "Value": "Home"
    },
    {
      "Name": "EmailAddress",
      "Value": "405@fake.com"
    },
    {
      "Name": "PhoneNumber",
      "Value": "555-555-5555"
    },
    {
      "Name": "EmailPreference",
      "Value": "SharePublic"
    },
    {
      "Name": "Agree",
      "Value": "true"
    }
  ]
}
401

Authentication Failure

403

Not Authorized

404

Item Not found

API Special Notes

When executing a PUT request on a resource, it will either create or update the item. Any subsequent calls with that external ID will update only the parameters sent. For example, if the next request contains only the Title property, all other properties will remain the same, only the Title will be changed. The ExternalKey cannot be changed with this request.

To change the pricing group that a resource belongs to, the pricing group ID should be sent. All other data sent in a PricingGroup object will be ignored. For instance, the following would change the pricing group:

{
  "PricingGroup": {
    "PricingGroupID": "15bf02c5-d106-e411-acf1-bc305bd0d54e"
  }
}

Pricing tiers are stored as an array called ResourcePricingTiers. If that object is null or not-defined, pricing tiers are not updated; if that array is present, then all existing pricing tiers are replaced by the array. So if any pricing tiers are set, then all pricing tiers must be set. For example:

{
  "ExternalKey": "Article1",
  "ResourcePricingTiers": [
    {
      "Tier": 0,
      "Price": 0.00
    },
    {
      "Tier": 2,
      "Price": 0.18
    },
    {
      "Tier": 5,
      "Price": 0.50
    },
    {
      "Tier": 10,
      "Price": 0.72
    }
  ]
}

What’s Next?

Now that you know how to send and receive information on your own time, what about when we do things?

Callbacks and Webhooks →