API Documentation

All of the publicly-accessible API’s are documented on this page. If you have any questions, have feedback or corrections, please contact us.


Resource Access API

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

https://accessapi.imoneza.com

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

GET

Returns access data about a resource based on its resource key

Parameters

Name Located in 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
{
  "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

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

GET

Returns resource access data based on a temporary user token.

Parameters

Name Located in 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
{
  "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.imoneza.com

/api/Property/{propertyID}

GET

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

Parameters

Name Located in Description Type
propertyID path

The Property ID for this request.

String

Responses

200 A property object
{
  "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

/api/Property/{propertyID}/Resource

GET

Returns all the resources belonging to a property.

Parameters

Name Located in Description Type
propertyID path

The Property ID for this request.

String

Responses

200 An array of resource objects
[
  {
    "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

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

PUT

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

Parameters

Name Located in 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

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

PUT

Adds or updates a single external subscriber.

Parameters

Name Located in 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
{
  "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

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

GET

Retrieves a single external subscriber and linked iMoneza users.

Parameters

Name Located in Description Type
apiKey path

The Property ID for this request.

String
subscriberKey path

The subscriber key

String

Responses

200 A subscriber element
{
  "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

/api/Property/{apiKey}/ExternalSubscriberImport

POST

Add or update multiple external subscribers.

Parameters

Name Located in 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
{
  "ID": "e63f94b4-247f-405d-9222-af01507271ec|0635781205603107443",
  "NotificationEmailAddress": null,
  "Status": "Queued"
}
401 Authentication Failure
403 Not Authorized
404 Item Not found

/api/Property/{apiKey}/ExternalSubscriberExport

POST

Begins an external subscriber export.

Parameters

Name Located in 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
{
  "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

/api/Property/{apiKey}/ExternalFulfillmentSubscriptionExport

POST

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

Parameters

Name Located in 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
{
  "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

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

GET

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

Parameters

Name Located in 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)
{
  "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

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

GET

Retrieve data about a subscription purchase

Parameters

Name Located in 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
{
  "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

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

GET

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

Parameters

Name Located in 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
{
  "Status": "Completed successfully",
  "Errors": [],
  "SuccessCount": 2,
  "FailureCount": 0
}
401 Authentication Failure
403 Not Authorized
404 Item Not found

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

GET

Retrieve the external subscriber export.

Parameters

Name Located in 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
[
  {
    "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

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

GET

Retrieve the external fulfillment subscription export.

Parameters

Name Located in 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

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

GET

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

Parameters

Name Located in 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.
{
  "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

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
    }
  ]
}