Skip to main content
Skip table of contents

Adding a product entitlement to an account – deployments without SSP

Request

To add an entitlement to an account, the CRM should send a POST request to:

CODE
https://<host>:<port>/rmg/v1/operator/entitlements

Headers

  • x-correlation-id – identifier for logging, to correlate messages across a call flow

  • Authorization – bearer token obtained in Getting an access token.

  • nv-tenant-id – the tenant ID

  • Content-Type: application/json

Mandatory arguments

  • 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

Optional arguments

  • _id – the ID of the entitlement. If not specified, this is generated automatically.

  • deviceId – the ID of the device that the entitlement is for. If specified, the product may only be consumed on the device. If not specified, the product may be consumed on any of the account’s devices.

  • sharedProductContentId – if this is a transactional product that defines the price (and other terms) for multiple contents (a “shared product”), the ID of the content that this entitlement is for

  • userId – the user ID associated with the entitlement.

  • lastBilledDate – date of last billing

  • purchasedOffer – purchased offer

  • firstView – first view date/time

  • isArchivable – whether the entitlement should be archived (true) or not (false) when it becomes invalid (expired or unsubscribed)

  • capabilityType – for capability products, the capability type

  • isFreemium – whether the product is a freemium product (true or false)

  • purchasedByDeviceId – the ID of the device that was used to purchase the entitlement. If used, this must be the public ID of the device from ADM.
    Note that this is only used for reporting. It is NOT used for authentication/authorisation.

  • playoutDeviceClass – the playout device class of devices that the entitlement can be used on. Only relevant for device-specific products (which can only be consumed on devices of the specified class).

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.