Skip to main content

addSubscriberDRMPeriod

This action allows you to create an access to publications within a period of time.

info

The API key must have access rights to subscribers_write.

Request​

NameTypeDefaultDescription
apikeyRequired
stringAPI public key
signatureRequired
stringSignature of the request. See how to sign your requests
expires
timestampUNIX timestamp for request expiration (GMT)
output
stringFormat of the response. Either XML (default), JSON or PHP
subscription_idRequired
integerID of the folder
loginRequired
stringLogin of the subscriber
fromRequired
dateStart date of the period (YYYY-MM-DD)
toRequired
dateEnd date of the period (YYYY-MM-DD)
extras
stringFree field up to 255 characters

Response​

This method returns a period DRM.

NameTypeDefaultDescription
IDintegerID of the DRM
SubscriptionIDintegerID of the folder
SubscriberLoginstringLogin of the subscriber
FromdateStart date of the period (YYYY-MM-DD)
TodateEnd date of the period (YYYY-MM-DD)
ExtrasstringFree field up to 255 characters

Example response​

JSON
{
"response": {
"status": "ok",
"version": 2,
"requestid": "Oui7af",
"requests": 168,
"content": {
"ID": 77859,
"SubscriptionID": 4540112,
"SubscriberLogin": "leia",
"From": "2015-09-01",
"To": "2016-09-01",
"Date": "2015-10-16 11:31:05",
"Extras": ""
}
}
}