Custom Subscriptions
API for managing Custom Subscription
List Custom Subscriptions
GET
https://www.magloft.com/api/portal/v1/custom_subscriptions/:app_id
This endpoint returns a list of all custom subscriptions
that belong to the magazine
Path Parameters
Name | Type | Description |
---|---|---|
app_id | String | App ID (Publication) to scope this request for. |
List Custom Subscriptions Page
GET
https://www.magloft.com/api/portal/v1/custom_subscriptions/:app_id/page/:page
This endpoint returns a page list of all custom subscriptions
that belong to the magazine
Path Parameters
Name | Type | Description |
---|---|---|
app_id | String | App ID (Publication) to scope this request for. |
page | Integer | The page number to list |
Query Parameters
Name | Type | Description |
---|---|---|
per_page | Integer | Number of items to show per page |
order_by | Symbol | Field to sort results by |
order_dir | Symbol | Direction (asc, desc) to sort results by |
filter | String | Text filter to search results by |
Get Custom Subscription
GET
https://www.magloft.com/api/portal/v1/custom_subscriptions/:app_id/(:email)(:id)
This endpoint returns a specific custom subscription
by id
Path Parameters
Name | Type | Description |
---|---|---|
app_id | String | App ID (Publication) to scope this request for. |
String | Email address of the reader account | |
id | Integer | Subscription ID |
Create Custom Subscription
POST
https://www.magloft.com/api/portal/v1/custom_subscriptions/:app_id
This endpoint creates a new custom subscription
and returns the saved custom subscription
Path Parameters
Name | Type | Description |
---|---|---|
app_id | String | App ID (Publication) to scope this request for. |
Request Body
Name | Type | Description |
---|---|---|
String | Email address of the reader account | |
password | String | Plain-text password of Reader account shown only when creating a new subscription without specifying a password |
start_date | Grape::ApiDate | Date from which the subscription should be valid (inclusive) |
end_date | Grape::ApiDate | Date until which the subscription should be valid (inclusive) |
active | Virtus::Attribute::Boolean | Boolean indicating whether the subscription is currently active |
custom_data | Hash | Hash containing custom data (string key, string value) of a reader |
firstname | String | First name of the Custom Subscription's reader |
lastname | String | Last name of the Custom Subscription's reader |
confirmation | Virtus::Attribute::Boolean | Boolean to indicate whether to send a confirmation email |
upsert | Virtus::Attribute::Boolean | Boolean to indicate whether to update existing custom subscription if the email is registered |
classification_ids | Array |
Update Custom Subscription
PUT
https://www.magloft.com/api/portal/v1/custom_subscriptions/:app_id/:id
This endpoint updates a specific custom subscription
by id
and returns the updated custom subscription
Path Parameters
Name | Type | Description |
---|---|---|
app_id | String | App ID (Publication) to scope this request for. |
id | Integer | Subscription ID |
Request Body
Name | Type | Description |
---|---|---|
start_date | Grape::ApiDate | Date from which the subscription should be valid (inclusive) |
end_date | Grape::ApiDate | Date until which the subscription should be valid (inclusive) |
active | Virtus::Attribute::Boolean | Boolean indicating whether the subscription is currently active |
custom_data | Hash | Hash containing custom data (string key, string value) of a reader |
Delete Custom Subscription
DELETE
https://www.magloft.com/api/portal/v1/custom_subscriptions/:app_id/:id
This endpoint deletes a specific custom subscription
by id
and returns an empty response
with status 204
Path Parameters
Name | Type | Description |
---|---|---|
app_id | String | App ID (Publication) to scope this request for. |
id | Integer | Subscription ID |
Export Custom Subscriptions
GET
https://www.magloft.com/api/portal/v1/custom_subscriptions/:app_id/export.csv
This endpoint returns a csv document that contains a spreadsheet of all custom subscriptions
Path Parameters
Name | Type | Description |
---|---|---|
app_id | String | App ID (Publication) to scope this request for. |
Last updated