Skip to main content
Skip table of contents

Subscribe an account to a product

Request

To subscribe an account to a product, send a POST request to:

http://<host>:<port>/rmg/v1/operator/entitlements

Mandatory fields

  • accountID – the ID of the account to subscribe to the product
  • productID – the ID of the product
  • validityType – the validity type:
    • ABSOLUTE – rental duration and consumption window start at the time of purchase.
    • RELATIVE – the consumption window starts at the time of purchase, but the rental duration starts when the content is first viewed.
  • productType – TRANSACTIONAL, SUBSCRIPTION, FREE, or CAPABILITY
  • validFrom – the start date/time of the product entitlement's validity
  • expiryDate – the end date/time of the product entitlement's validity

Example

A request with this payload subscribes the specified account to the specified product:

CODE
{
   "accountId": "5b34af949f0cd1000106f4fe",
   "productId": "PROVIDER_ID_001_PROVIDER_RESOURCE_ID_001",
   "validityType": "ABSOLUTE",
   "productType": "SUBSCRIPTION",
   "validFrom": "2016-04-06T13:47:59.228Z",
   "expiryDate": "2020-04-06T13:47:59.228Z"
}

Response

A successful request returns an HTTP 201 status. The response includes the ID of the entitlement.

The calling system should keep a record of the entitlement ID and associate it with the account. If you need to unsubscribe the account from the product (that is, to remove the entitlement), you will need the entitlement ID.


See the  Rights Manager (RMG) API documentation for details of the failure error codes.

Example

CODE
{
   "_id": "5b3a31c3a601cf0001cf671e"
}

See also

For full details of this API, see the Rights Manager (RMG) API documentation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.