OpenTV ENTera & OpenTV Platform Documentation

Subscribe a device to DTH products

Request

To subscribe a device to one or more direct-to-home (DTH) products, send a POST request to:

http://<host>:<port>/cag/v1/{casInstanceName}/devices/{deviceId}/entitlements

Headers

The following headers are mandatory:

  • nv-tenant-id

  • operator

Mandatory fields

  • URL parameters:casInstanceNamedeviceId

  • deviceSpecification

    • deviceType (CardLess or CardBased)

  • smartCardSpecification:smartCardId (if deviceType is CardBased)

  • entitlements:productId

Example

A request with this payload subscribes the specified device to the specified products:

{
  "deviceSpecification": {
    "deviceId": "245098240",
    "deviceType": "CardBased"
  },
  "smartCardSpecification": {
    "smartCardId": "145098240"
  },
  "settopBoxSpecification": {
    "chipsetSerialNumber": "23456"
  },
  "entitlements" : [
    {
      "productId": "product-001"
    },
    {
      "productId": "product-002"
    }
  ],
  "metadataSet": [
    {
      "fieldName": "nationality",
      "fieldValue": "NL"
    },
    {
      "fieldName": "regionTag",
      "fieldValue": "AM"
    },
    {
      "fieldName": "attributeList",
      "fieldValue": "type 01,type 02 "
    }
  ]
}

Response

A successful request returns an HTTP 200 status.

An unsuccessful request returns an HTTP 400 status if there was a problem with the request.

Example

{
  "status":"Success",
  "commandCount":2,
  "commandResults":[
    {
      "commandName": "overwriteSector",
      "id": "000100978",
      "responseCode": "1028",
      "responseText":"OK"
    },
    {
      "commandName": "createTmsAttributes",
      "id": "000100978",
      "responseCode": "1028",
      "responseText":"OK"
    }
  ]
}

See also

For full details of this API, see CAS Gateway (CAG) API Documentation.