API.addSubscriberDRMSingle
This action allows you to allow a subscriber to access a specific publication.
Request
The API key must have the subscribers_write access right.
| Name | Type | Description |
|---|---|---|
| apikey[required] | string | API public key |
| signature[required] | string | Signature of the request. See how to sign your requests. |
| expires | timestamp | UNIX timestamp for request expiration. |
| output | string | Format of the response. Either XML (default), JSON or PHP. |
| subscription_id[required] | integer | ID of the subscription. |
| login[required] | string | Login of the subscriber. |
| book_id[required] | string | Unqiue ID of the publication. Publication must be private and authorize access to subscribers. |
| extras | string | Free field of up to 255 characters |
Response
| Name | Type | Description |
|---|---|---|
| ID | integer | ID of the DRM. |
| SubscriptionID | integer | Signature of the request. See how to sign your requests. |
| SubscriberLogin | string | UNIX timestamp for request expiration. |
| Book | publication | Publication. |
| Extras | string | Free field up to 255 characters. |
Example responses
<response>
<requestid>...</requestid>
<requests>...</requests>
<status>ok</status>
<content>
<ID>...</ID>
<SubscriptionID>...</SubscriptionID>
<SubscriberLogin>...</SubscriberLogin>
<Book>
<ID>...</ID>
<AccountID>...</AccountID>
<SubscriptionID>...</SubscriptionID>
<Name>...</Name>
<Description>...</Description>
<Status>...</Status>
<IsPublished>...</IsPublished>
<IsPrivate>...</IsPrivate>
<AuthID>...</AuthID>
<AllowMini>...</AllowMini>
<Date>...</Date>
<Pages>...</Pages>
<Width>...</Width>
<Height>...</Height>
<Views>...</Views>
<Downloads>...</Downloads>
<Comments>...</Comments>
<Favorites>...</Favorites>
<Creation>...</Creation>
<Modification>...</Modification>
<PictureUrl>...</PictureUrl>
<ThumbUrl>...</ThumbUrl>
<PublicUrl>...</PublicUrl>
<ViewUrl>...</ViewUrl>
</Book>
<Date>...</Date>
<Extras>...</Extras>
</content>
</response>
{
"response": {
"requestid": ...,
"requests": ...,
"status": "ok",
"content": {
"ID": ...,
"SubscriptionID": ...,
"SubscriberLogin": ...,
"Book": {
"ID": ...,
"AccountID": ...,
"SubscriptionID": ...,
"Name": ...,
"Description": ...,
"Status": ...,
"IsPublished": ...,
"IsPrivate": ...,
"AuthID": ...,
"AllowMini": ...,
"Date": ...,
"Pages": ...,
"Width": ...,
"Height": ...,
"Views": ...,
"Downloads": ...,
"Comments": ...,
"Favorites": ...,
"Creation": ...,
"Modification": ...,
"PictureUrl": ...,
"ThumbUrl": ...,
"PublicUrl": ...,
"ViewUrl": ...
},
"Date": ...,
"Extras": ...
}
}
}
[
"response" => [
"requestid" => ...,
"requests" => ...,
"status" => "ok",
"content" => [
"ID" => ...,
"SubscriptionID" => ...,
"SubscriberLogin" => ...,
"Book" => {
"ID" => ...,
"AccountID" => ...,
"SubscriptionID" => ...,
"Name" => ...,
"Description" => ...,
"Status" => ...,
"IsPublished" => ...,
"IsPrivate" => ...,
"AuthID" => ...,
"AllowMini" => ...,
"Date" => ...,
"Pages" => ...,
"Width" => ...,
"Height" => ...,
"Views" => ...,
"Downloads" => ...,
"Comments" => ...,
"Favorites" => ...,
"Creation" => ...,
"Modification" => ...,
"PictureUrl" => ...,
"ThumbUrl" => ...,
"PublicUrl" => ...,
"ViewUrl" => ...
},
"Date" => ...,
"Extras" => ...
]
]
]
Error codes
See the error code section.
