API.addSubscriberDRMPeriod
This action allows you to create an access to publications within a period of time.
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. |
| from[required] | date | Start date of the period (YYYY-MM-DD). |
| to[required] | date | End date of the period (YYYY-MM-DD). |
| 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. |
| From | date | Start date of the period (YYYY-MM-DD). |
| To | date | End date of the period (YYYY-MM-DD). |
| 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>
<From>...</From>
<To>...</To>
<Date>...</Date>
<Extras>...</Extras>
</content>
</response>
{
"response": {
"requestid": ...,
"requests": ...,
"status": "ok",
"content": {
"ID": ...,
"SubscriptionID": ...,
"SubscriberLogin": ...,
"From": ...,
"To": ...,
"Date": ...,
"Extras": ...
}
}
}
[
"response" => [
"requestid" => ...,
"requests" => ...,
"status" => "ok",
"content" => [
"ID" => ...,
"SubscriptionID" => ...,
"SubscriberLogin" => ...,
"From" => ...,
"To" => ...,
"Date" => ...,
"Extras" => ...
]
]
]
Error codes
See the error code section.
