RightsTokenCreate()

This API is used to add a new RightsToken entry for a given AccountID. This API will automatically convert a RightsToken with a season ContentID into a collection of episodic RightsTokens. Although this functionality is available, Retailers should use the RightsTokenListCreate() API to achieve bulk RightsToken creation. Creating RightsTokens for series ContentID’s is not permitted.

API URL:

[BaseURL]/Account/{AccountID}/RightsToken

Request Method:

POST

Request Parameters:

Request Format

XML type:

Required information:

Optional information:

Headers:

Response Format

Status Code:

Headers:

Errors

Example

Create a RightsToken

The following example creates a RightsToken with sd, hd, and uhd profiles.

Sample Request:

POST /rest/2015/02/Account/urn:dece:accountid:org:dece:16EBFA93BAC64DBD875336ED4B6D3CC9/RightsToken HTTP/1.1
Host: api.uvvu.com
Content-type: application/xml
Authorization: SAML2 assertion=[Assertion]

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RightsTokenData xmlns:md="http://www.movielabs.com/md" xmlns="http://www.decellc.org/schema/2015/03/coordinator" ALID="urn:dece:alid:org:dece:test:alid_with_sd_hd_uhd" ContentID="urn:dece:cid:org:dece:test:cid_with_en_de">
  <RightsProfiles>
    <PurchaseProfile MediaProfile="urn:dece:type:mediaprofile:uhd">
      <CanDownload>true</CanDownload>
      <CanStream>true</CanStream>
    </PurchaseProfile>
    <PurchaseProfile MediaProfile="urn:dece:type:mediaprofile:hd">
      <CanDownload>true</CanDownload>
      <CanStream>true</CanStream>
    </PurchaseProfile>
    <PurchaseProfile MediaProfile="urn:dece:type:MediaProfile:sd">
      <CanDownload>true</CanDownload>
      <CanStream>true</CanStream>
    </PurchaseProfile>
  </RightsProfiles>
  <StreamWebLoc>
    <Location>https://example.com/p/streaminglink</Location>
  </StreamWebLoc>
  <PurchaseInfo>
    <NodeID>urn:dece:org:org:dece:falcon:retailer</NodeID>
    <PurchaseAccount>urn:dece:accountid:org:dece:16EBFA93BAC64DBD875336ED4B6D3CC9</PurchaseAccount>
    <PurchaseUser>urn:dece:userid:org:dece:37BB117899CA4B1C90EB3EA262438D51</PurchaseUser>
    <PurchaseTime>2017-05-21T15:12:03.000</PurchaseTime>
  </PurchaseInfo>
</RightsTokenData>

Sample Response:

HTTP/1.1 201
Date: [Date]
Location: https://api.uvvu.com/rest/2015/02/Account/urn:dece:accountid:org:dece:16EBFA93BAC64DBD875336ED4B6D3CC9/RightsToken/urn:dece:rightstokenid:org:dece:22F5178A987D4710AFFB8EA28895A174
X-transaction-info: [TransactionInfo]

See Also