This service can be implemented by an external platform so to override standard editions accessibility checks of VNP using custom ones. VNP will contact an external webservice to retrieve the accessibility for the logged user or anonymous Apple device
Every time an edition is open, both from Web and Apps VNP will query the has_access end point in HTTP GET providing proper parameters descbied below. The end point will respond in JSON. In case the user has no access the service will provide the type of paywall to be prompted so to inform the user the reason he can't access the edition.
In some cases, describe below, VNP will perform POST request to scale credit or change the workstation
Warning:
Parameters will be url encoded
NEEDS
In order to be used this service requires that all users are synchronized between the VNP and the external platform and all the subscriptions are available in the external platform.
Check the Webservices page for this integration
THE FLOW
User tries to open edition VNP performs HTTP GET request to: [yoururl]/verify_access
parameters:
NAME |
Description |
Example |
| user | In case of logged user will be the external platform user Id. In case of anonymous user will be the device UDID | 1515 |
| publication_date | The date of the published issue the user is trying to open | 20170427 |
| publication_title | the edition is being opened by the user. | dailynews |
| publication_main_title | the parent edition of the edition is being opened by the user. This can be the same as publication_title in case the user is opening the main title | worldnews |
| device | the device is being used to open an edition can be even smartphone/tablet/web | smartphone |
| udid | unique identifier of the app. It's reliable on the apps but stored in cookies for the web | d0GGd344 |
The response can even be positive or negative. In anycase the response JSON must contain
NAME |
Description |
Example |
| has_access | true/false if the user can read or not | 1515 |
| type_paywall | in case the user cannot read is used to inform why and eventually perform an action | 20170427 |
| message | Message to be prompted to the user | dailynews |
| in case the user can read true/false so to allow the PDF download | worldnews | |
| custom_value | a JSON that can contain whatever you like. It will be returned "as it is" in the after-fail-action describe below | {} |
The user has a valid subscription. The informations in the request /verify_access can be used to store the access for devices controls and statistics
{
has_access: true,
type_paywall: "",
message: "",
pdf: true/false
}
May exist several reasons a user cannot access:
1. Not a valid subscription
The user needs to purchase a subscription in order to read the edition
{
has_access: false,
type_paywall: "pay",
message: "Your text message",
pdf: false
}
The editions is free for all registered users
{
has_access: false,
type_paywall: "registerUser",
message: "Your text message",
pdf: false
}
The subscription is valid but the devices limit has been reached. The user can disable oldest device and enable the current
{
has_access: false,
type_paywall: "stationchange",
message: "Your text message",
pdf: false
}
The subscription is valid but the devices limit has been reached. No more changes available
{
has_access: false,
type_paywall: "stationlock",
message: "Your text message",
pdf: false
}
There is no valid subscriptions but the user has credits to be spent.
{
has_access: false,
type_paywall: "spendcredit",
message: "Your text message",
pdf: false
}
6. Custom
To be discussed.
In the cases 3.This workstation is not enabled but can be enabled and 5.There are credits that can be spent if the users choose the change station action or the spend credit action a post request will be executed. After one of these events a new request to /verify_access will be executed so to ensure the result of the request.
3. This workstation is not enabled but can be enabled
The user chooses to enable the current workstation. VNP will perform a HTTP POST request to the endpoint: [yoururl]/change_workstation with following parameters:
NAME |
Description |
Example |
| user | In case of logged user will be the external platform user Id. In case of anonymous user will be the device UDID | 1515 |
| device | the device is being used to open an edition can be even smartphone/tablet/web | smartphone |
| udid | unique identifier of the app. It's reliable on the apps but stored in cookies for the web | d0GGd344 |
| custom_value | a JSON that can contain whatever you like. It will be returned "as it is" in the after-fail-action | {} |
5. There are credits that can be spent
The user chooses to spend one of his credits to access the current edition. VNP will perform a HTTP POST request to the endpoint: [yoururl]/burn_credit with following parameters:
NAME |
Description |
Example |
| user | In case of logged user will be the external platform user Id. In case of anonymous user will be the device UDID | 1515 |
| publication_date | The date of the published issue the user is trying to open | 20170427 |
| publication_title | the edition is being opened by the user. | dailynews |
| publication_main_title | the parent edition of the edition is being opened by the user. This can be the same as publication_title in case the user is opening the main title | worldnews |
| device | the device is being used to open an edition can be even smartphone/tablet/web | smartphone |
| udid | unique identifier of the app. It's reliable on the apps but stored in cookies for the web | d0GGd344 |
| custom_value | a JSON that can contain whatever you like. It will be returned "as it is" in the after-fail-action | {} |