Readers
API for managing app readers
List Readers
GET https://www.magloft.com/api/portal/v1/readers/:app_id
This endpoint returns a list of all readers that belong to the magazine
Path Parameters
app_id
String
App ID (Publication) to scope this request for.
Query Parameters
debug
Virtus::Attribute::Boolean
{
"id": 1234,
"email": "[email protected]",
"name": "John",
"lastname": "Doe",
"last_sign_in_at": "2018-01-24 10:55:35",
"created_at": "2018-01-24 10:55:35",
"devices": [
"android",
"apple"
],
"confirmed": true,
"authentication_token": "aabbccddeeff00112233445566778899",
"custom_data": {
},
"password": "",
"classification_ids": [
1,
2,
3
]
}Retrieve paginated list of readers
GET https://www.magloft.com/api/portal/v1/readers/:app_id/page/:page
This endpoint returns a page list of all readers that belong to the magazine
Path Parameters
app_id
String
App ID (Publication) to scope this request for.
page
Integer
The page number to list
Query Parameters
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
JSON
{
"total": 1,
"page": 1,
"records": [
{
"id": 1234,
"email": "[email protected]",
"name": "John",
"lastname": "Doe",
"last_sign_in_at": "2018-01-24 10:55:35",
"created_at": "2018-01-24 10:55:35",
"devices": [
"android",
"apple"
],
"confirmed": true,
"classification_ids": [
1,
2,
3
]
}
]
}Get Reader
GET https://www.magloft.com/api/portal/v1/readers/:app_id/(:email)(:id)
This endpoint returns a specific reader by id
Path Parameters
app_id
String
App ID (Publication) to scope this request for.
String
Reader Email Address
id
Integer
Reader ID
{
"id": 1234,
"email": "[email protected]",
"name": "John",
"lastname": "Doe",
"last_sign_in_at": "2018-01-24 10:55:35",
"created_at": "2018-01-24 10:55:35",
"devices": [
"android",
"apple"
],
"confirmed": true,
"authentication_token": "aabbccddeeff00112233445566778899",
"custom_data": {
},
"password": "",
"classification_ids": [
1,
2,
3
]
}Create a Reader
POST https://www.magloft.com/api/portal/v1/readers/:app_id
This endpoint creates a new reader and returns the saved reader
Path Parameters
app_id
String
App ID (Publication) to scope this request for.
Request Body
String
Reader Email Address
password
String
Reader Password
name
String
Reader First Name
lastname
String
Reader Last Name
custom_data
Hash
Custom key-value data stored for this reader
confirmation
Virtus::Attribute::Boolean
Send Confirmation Email
confirmed
Virtus::Attribute::Boolean
Whether this readers' Email was confirmed
classification_ids
Array
Reader Classification IDs
{
"id": 1234,
"email": "[email protected]",
"name": "John",
"lastname": "Doe",
"last_sign_in_at": "2018-01-24 10:55:35",
"created_at": "2018-01-24 10:55:35",
"devices": [
"android",
"apple"
],
"confirmed": true,
"authentication_token": "aabbccddeeff00112233445566778899",
"custom_data": {
},
"password": "",
"classification_ids": [
1,
2,
3
]
}Update a Reader
PUT https://www.magloft.com/api/portal/v1/readers/:app_id/:id
This endpoint updates a specific reader by id and returns the updated reader
Path Parameters
app_id
String
App ID (Publication) to scope this request for.
id
Integer
Reader ID
Request Body
name
String
Reader First Name
lastname
String
Reader Last Name
String
Reader Email Address
custom_data
Hash
Custom key-value data stored for this reader
password
String
Reader Password
confirmed
Virtus::Attribute::Boolean
Whether this readers' Email was confirmed
classification_ids
Array
Reader Classification IDs
{
"id": 1234,
"email": "[email protected]",
"name": "John",
"lastname": "Doe",
"last_sign_in_at": "2018-01-24 10:55:35",
"created_at": "2018-01-24 10:55:35",
"devices": [
"android",
"apple"
],
"confirmed": true,
"authentication_token": "aabbccddeeff00112233445566778899",
"custom_data": {
},
"password": "",
"classification_ids": [
1,
2,
3
]
}Delete Reader
DELETE https://www.magloft.com/api/portal/v1/readers/:app_id/:id
This endpoint deletes a specific reader by id and returns an empty response with status 204
Path Parameters
app_id
String
App ID (Publication) to scope this request for.
id
Integer
Reader ID
nullCreate Issue Purchases
POST https://www.magloft.com/api/portal/v1/readers/:app_id/:id/unlock
This endpoint creates one or many issue purchases by product_id and returns a list of issue purchases
Path Parameters
app_id
String
App ID (Publication) to scope this request for.
id
Integer
Reader ID
Request Body
product_ids
Array
Array containing Issue Product IDs to unlock
order_id
String
Subscription Order ID
{
}Unlock Issue By Coupon
POST https://www.magloft.com/api/portal/v1/readers/:app_id/:id/unlock/coupon
This endpoint unlock one issue by coupon and returns a list of issue purchases
Path Parameters
app_id
String
App ID (Publication) to scope this request for.
id
Integer
Reader ID
Request Body
issue_id
Integer
article_id
Integer
code
String
{
}Export readers
GET https://www.magloft.com/api/portal/v1/readers/:app_id/export.csv
Path Parameters
app_id
String
App ID (Publication) to scope this request for.
nullLast updated