Subscription Report

The subscription report contains a snapshot of all subscriptions for a given Grantor ID, and can be used to reconcile subscriptions between CONNECT and grantors (i.e. Business units).

It is run every night, and is available as XML at the Analytics API. The filename of the report is GRANTOR_ID-reconciliation-DATE_BUCKET-CREATION_TIME.xml. DATE_BUCKET represents the time period of association for the report and will be on the form "YYYYMMDD" since this is a daily report. CREATION_TIME will be on the form "YYYYMMDDThhmmssZ" (that is an ISO 8601 datetime in basic format without milliseconds and always supplied in UTC). Example: TNN-reconciliation-20121218-20121218T032002Z.xml.

The report has a header and a body of subscriptions. The format of the header is:

<?xml version="1.0" encoding="UTF-8"?>
<ReconciliationReport version="v0">
  <reportHeader>
    <grantorId>"Grantor_ID"</grantorId>
    <runId>"Internal reference"</runId>
    <startTime>"Run time of the subscription report"</startTime>
  </reportHeader>

The format of subscriptions is as follows:

Since v0.

Parameter Description Type Mandatory API structure
subscriptionId The ID of the subscription string yes subscriptionId
href The reference to the subscription resource string yes href
rightsSpec[] The right(s) to be created in each recurring run, please see more information below rightsSpec yes rightsSpec
state The state of the subscription, e.g. ACTIVE or SUSPENDED string yes state
user_href A reference to the CONNECT user string no user_href
userid The ID of the CONNECT user string yes userId
grantorId The company which created the subscription on behalf of the user (e.g. TNN_MOBILE, CDK) - this is the grantor ID as defined in API Users and Grantor ID. The API user will only be able to retrieve subscription given by a grantor ID that is associated with the API user in the Global Backend configuration. string yes grantorId
grantorContext Additional information relevant for the grantor of the right - e.g. BU user id, order id, package id etc. string no grantorContext
origTimeSpec The timeSpec as specified when created, please see Create subscription for details. string yes origTimeSpec
effectiveTimeSpec The current timeSpec, according to ISO 8601, updated as rights creations iterates - specifying when the next right(s) will be created. string no effectiveTimeSpec

rightsSpec (relevant fields)

Note that for subscriptions that create several rights per recurring run (e.g. "5 movies included", "10 movies per month"), then the number of instances per service is repeated in the array (no "counter" parameter).

Parameter Description Type Mandatory API Structure
sku Stock-keeping unit. Identifying the service in the Global Backend service catalog string yes rightsSpec.sku
timeSpec The period of the right (ISO 8601), if not given, inherited from the subscriptions timeSpec, for details please see Create subscription. string no rightsSpec.timeSpec

Example

<?xml version="1.0" encoding="utf-8"?>
<reconciliationReport version="v0">
  <reportHeader>
    <grantorId>TNN_MOBILE</grantorId>
    <runId>4ec16207cbc00000</runId>
    <startTime>2012-11-15T19:25:05.212Z</startTime>
  </reportHeader>
  <subscriptions>
    <subscription href="http://api.staging.telenor.io/id/users/5479153570186006528/subs/4e3ecbe779c05000">
      <subscriptionId>4e3ecbe779c05000</subscriptionId>
      <state>ACTIVE</state>
      <userId>5479153570186006528</userId>
      <grantorId>TNN_MOBILE</grantorId>
      <grantorContext></grantorContext>
      <rightsSpec>
        <sku>COMOYO-MOVIE-STD</sku>
      </rightsSpec>
      <rightsSpec>
        <sku>COMOYO-MOVIE-STD</sku>
      </rightsSpec>
      <rightsSpec>
        <sku>COMOYO-MOVIE-STD</sku>
      </rightsSpec>
      <rightsSpec>
        <sku>COMOYO-MOVIE-STD</sku>
      </rightsSpec>
      <rightsSpec>
        <sku>COMOYO-MOVIE-STD</sku>
      </rightsSpec>
      <origTimeSpec>R1/2012-06-30/2013-01-01</origTimeSpec>
    </subscription>
    <subscription href="http://api.staging.telenor.io/id/users/5639233776849522688/subs/4e4295931a806000">
      <subscriptionId>4e4295931a806000</subscriptionId>
      <state>ACTIVE</state>
      <userId>5639233776849522688</userId>
      <grantorId>TNN_MOBILE</grantorId>
      <grantorContext></grantorContext>
      <rightsSpec>
        <sku>SE-FLM-TVOD-ALL</sku>
      </rightsSpec>
      <origTimeSpec>R1/2012-08-02/2012-12-01</origTimeSpec>
    </subscription>
  </subscriptions>
</reconciliationReport>