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.
[BaseURL]/Account/{AccountID}/RightsToken
POST
dece:RightsTokenData-type
@MediaProfile
At least urn:dece:type:mediaprofile:sd
is required
/RightsTokenData/SoldAs
Optional metadata for Retailer usage
/RightsTokenData/PurchaseInfo/RetailerTransaction
Optional metadata for Retailer usage
/RightsTokenData/PurchaseInfo/TransactionType
If not provided, the value is set to urn:dece:type:transaction:category1:e
Authorization: SAML2 assertion=[Assertion]
HTTP 201 Accepted
Location: [BaseURL]/Account/{AccountID}/RightsToken/{RightsTokenID}
The following example creates a RightsToken with sd, hd, and uhd profiles.
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>
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]