Paywall API¶
Our Paywall API provides access to subscription management.
All access to paid content is managed through subscriptions and attached email qualifiers.
Access to requested pages is granted when a subscription with a matching email qualifier exists.
Email qualifier¶
Email Qualifier |
Description |
---|---|
|
Personal email qualifier |
|
Group email qualifier |
Data¶
Subscription¶
Name |
Type |
Description |
---|---|---|
|
Integer |
Subscription ID |
|
Object |
Account object |
|
String |
Subscription name |
|
Integer |
Type of subscription (see below) |
|
String |
Activation date |
|
String |
Expiration date |
|
Integer |
Maximum number of members of group subscription |
|
Boolean |
Activation status |
|
Integer |
Current number of all members |
|
Integer |
Current number of inactive members |
|
Integer |
Current number of active members |
|
Integer |
Number of login via subscription |
|
String |
Company name of group subscription |
|
List |
List of email qualifiers |
Note
Subscription types are individual and group
Note
Date format is %Y%m%dT%H%M%S
Account¶
Name |
Type |
Description |
---|---|---|
|
Integer |
Account ID (matches Roar ID) |
|
String |
Account name |
|
String |
Account type |
Read subscription¶
Get detailed information about subscription.
Endpoint:
GET /core/paywall/subscriptions/<subscription_id>
Response example:
{
"account": 1,
"name": "RebelMouse",
"subscription_type": 1,
"status_active": true,
"status_count_of_member": 100,
"email_domain": [
"@rebelmouse.com"
],
"id": 1,
"company_name": "RebelMouse"
}
Note
account
field is Integer and refers to Account.id
Update subscription¶
Update existing subscription.
Endpoint:
PUT /core/paywall/subscriptions/<subscription_id>
Payload example:
{
"account": 1,
"name": "RebelMouse",
"subscription_type": 2,
"status_active": true,
"status_count_of_member": 100,
"email_domain": [
"@rebelmouse.com"
],
"id": 1,
"company_name": "RebelMouse"
}
Response example:
{
"account": 1,
"name": "RebelMouse",
"subscription_type": 2,
"status_active": true,
"status_count_of_member": 100,
"email_domain": [
"@rebelmouse.com"
],
"id": 1,
"company_name": "RebelMouse"
}
Create subscription¶
Create new subscription.
Endpoint:
POST /core/paywall/subscriptions/
Payload example:
{
"account": 1,
"company_name": "RebelMouse",
"email_domain": [
"@rebelmouse.com"
],
"name": "RebelMouse",
"status_active": true,
"subscription_type": 2
}
Response example:
{
"account": 1,
"name": "RebelMouse",
"subscription_type": 2,
"status_active": true,
"company_name": "RebelMouse",
"email_domain": [
"@rebelmouse.com"
],
"id": 2
}
List subscriptions¶
Get all available subscriptions.
Endpoint:
GET /core/paywall/subscriptions/
Parameters are:
Name |
Type |
Description |
---|---|---|
|
Integer |
Number of items in response (max. 100) |
|
Integer |
Skip first N results in response |
|
String |
Filter subscriptions where date_start greater than param |
|
String |
Filter subscriptions where date_expire less than param |
|
String |
Filter by subscription name |
Response example:
{
"total_count": 1,
"account": {
"id": 1
},
"subscriptions": [
{
"account": 1,
"name": "RebelMouse",
"subscription_type": 1,
"status_active": true,
"status_count_of_member": 100,
"email_domain": [
"@rebelmouse.com"
],
"id": 1,
"company_name": "RebelMouse"
}
]
}