Client APIs
At its core, SyncTV is an API driven service. The APIs themselves are easy enough for developers to understand, but understanding the ecosystem is a little trickier. We've created the following tutorials to help you get your head around it.

Topics:

  • Ownership policies

This document describes the API for creating, reading, updating and deleting ownership_policies.

Note:
Each call to the SyncTV V2 API described in this section requires an MD5 hash signature.
See the Authorization (User) API for details on generating the MD5 hash signature.
Actions

Url:

  • [GET] /api/v2/ownership_policies.[xml|json]

Returns a list of all ownership policies.

Required Arguments:
  • (Integer) access_id
    Access id returned from Authorization (User) client_authorize.
  • (String) signature
    MD5 hash encoded string of query parameters.
Example Request

The following example returns a list of all ownership policies.
[GET] https://service_name.synctv.com/api/v2/ownership_policies.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Request Field:
  • (Integer) offset — Used for pagination of response data (default: 25 items per response). Specifies the offset of the next block of data to receive.
  • (Array) bundle_ids — Filter ownership policies by bundle ids associated with it(E.g. bundle_ids[]=1&bundle_ids[]=3)
  • (Array) status — Filter ownership policies by status(E.g. status[]=1&status[]=-1)
  • (DateTime) begin_at_greater — Filter ownership policies by begin_at >= specified timestamp (E.g. begin_at_greater=2012-02-15T02:06:56Z)
  • (DateTime) begin_at_less — Filter ownership policies by begin_at <= specified timestamp (E.g. begin_at_greater=2012-02-15T02:06:56Z)
  • (DateTime) end_at_greater — Filter ownership policies by end_at >= specified timestamp (E.g. end_at_greater=2012-02-15T02:06:56Z)
  • (DateTime) end_at_less — Filter ownership policies by end_at <= specified timestamp (E.g. end_at_greater=2012-02-15T02:06:56Z)
  • (Array) any_of_view_rule_ids — Filter ownership policies by any of the given view rule ids associated with it (E.g. any_of_view_rule_ids[]=1&any_of_view_rule_ids[]=3)
  • (Array) all_of_view_rule_ids — Filter ownership policies by all of the given view rule ids associated with it (E.g. all_of_view_rule_ids[]=1&all_of_view_rule_ids[]=3)
  • (Array) none_of_view_rule_ids — Filter ownership policies by none of the given view rule ids associated with it (E.g. none_of_view_rule_ids[]=1&none_of_view_rule_ids[]=3)
  • (Array) any_of_price_rule_ids — Filter ownership policies by any of the given price rule ids associated with it (E.g. any_of_price_rule_ids[]=1&any_of_price_rule_ids[]=3)
  • (Array) all_of_price_rule_ids — Filter ownership policies by all of the given price rule ids associated with it (E.g. all_of_price_rule_ids[]=1&all_of_price_rule_ids[]=3)
  • (Array) none_of_price_rule_ids — Filter ownership policies by none of the given price rule ids associated with it (E.g. none_of_price_rule_ids[]=1&none_of_price_rule_ids[]=3)
  • (Array) any_of_ownership_factory_ids — Filter ownership policies by any of the given ownership factory ids associated with it (E.g. any_of_ownership_factory_ids[]=1&any_of_ownership_factory_ids[]=3)
  • (Array) all_of_ownership_factory_ids — Filter ownership policies by all of the given ownership factory ids associated with it (E.g. all_of_ownership_factory_ids[]=1&all_of_ownership_factory_ids[]=3)
  • (Array) none_of_ownership_factory_ids — Filter ownership policies by none of the given ownership factory ids associated with it (E.g. none_of_ownership_factory_ids[]=1&none_of_ownership_factory_ids[]=3)
  • (Array) any_of_available_platform_ids — Filter ownership policies by any of the given platform ids associated through platform view rules to ownership policies, this also includes ownership policies with no platform view rules as they belong to all active platforms. (E.g. any_of_available_platform_ids[]=1&any_of_available_platform_ids[]=3)
  • (Array) any_of_available_platform_type_ids — Filter ownership policies by any of the given platform type ids associated through platform view rules to ownership policies, this also includes ownership policies with no platform view rules as they belong to all active platforms. (E.g. any_of_available_platform_type_ids[]=1&any_of_available_platform_type_ids[]=3)
  • (Array) any_of_platform_ids — Filter ownership policies by any of the given platform ids associated through platform view rule to ownership policies (E.g. any_of_platform_ids[]=1&any_of_platform_ids[]=3)
  • (Array) all_of_platform_ids — Filter ownership policies by all of the given platform ids associated through platform view rules to ownership policies (E.g. all_of_platform_ids[]=1&all_of_platform_ids[]=3)
  • (Array) none_of_platform_ids — Filter ownership policies by none of the given platform ids associated through platform view rules to ownership policies (E.g. none_of_platform_ids[]=1&none_of_platform_ids[]=3)
  • (Float) available_price_greater — Filter ownership policies with price >= specified price (E.g. available_price_greater=1.99)
  • (Float) available_price_less — Filter ownership policies with price <= specified price (E.g. available_price_less=1.99)
  • (Array) any_of_available_price_currencies — Filter ownership policies with any of price currencies specified symbols (E.g. any_of_available_price_currencies[]=USD)
Example Response
XML JSON

<response>
  <ownership_policies>
    <ownership_policy>
      <id>1</id>
      <name>MyString</name>
      <description>Some description</description>
      <status>1</status>
      <begin_at nil="true"/>
      <end_at nil="true"/>
      <updated_at>2014-05-01T21:26:29Z</updated_at>
      <created_at>2014-05-01T21:26:29Z</created_at>
      <price>
        <amount>0</amount>
        <currency>USD</currency>
        <tax>0</tax>
      </price>
    </ownership_policy>
    <ownership_policy>
      <id>2</id>
      <name>MyString</name>
      <description>Some description</description>
      <status>1</status>
      <begin_at nil="true"/>
      <end_at nil="true"/>
      <updated_at>2014-05-01T21:26:29Z</updated_at>
      <created_at>2014-05-01T21:26:29Z</created_at>
      <price>
        <amount>0</amount>
        <currency>USD</currency>
        <tax>0</tax>
      </price>
    </ownership_policy>
  </ownership_policies>
</response>
Response Fields:
  • (Integer) ownership_policy[id]
    The ownership policy's unique identifier.
  • (Integer) ownership_policy[status]
    The status of the ownership policy (-1 - Deleted, 0 - Inactive, 1 - Active).
  • (String) ownership_policy[name]
    The ownership policy's name.
  • (String) ownership_policy[description]
    The ownership policy's description.
  • (DateTime) ownership_policy[begin_at]
    The ownership policy's avilability date begin_at.
  • (DateTime) ownership_policy[end_at]
    The ownership policy's avilability date end_at.
  • (DateTime) ownership_policy[created_at]
    Timestamp of when the ownership policy was created.
  • (DateTime) ownership_policy[updated_at]
    Timestamp of when the ownership policy was last updated.
  • (Array) ownership_policy[platform_ids]
    The list of platform ids for the media.

Url:

  • [GET] /api/v2/ownership_policies/:id.[xml|json]

Returns information for the specified ownership policy.

Required Arguments:
  • (Integer) access_id
    Access id returned from Authorization (User) client_authorize.
  • (String) signature
    MD5 hash encoded string of query parameters.
Example Request

The following URL returns information for ownership policy 100.
[GET] https://service_name.synctv.com/api/v2/ownership_policies/100.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Example Response
XML JSON

<response>
  <ownership_policy>
    <id>100</id>
    <name>MyString</name>
    <description>Some description</description>
    <status>1</status>
    <begin_at nil="true"/>
    <end_at nil="true"/>
    <updated_at>2014-05-01T21:26:31Z</updated_at>
    <created_at>2014-05-01T21:26:31Z</created_at>
    <price>
      <amount>0</amount>
      <currency>USD</currency>
      <tax>0</tax>
    </price>
  </ownership_policy>
  <price_rules>
    <price_rule>
      <id>1</id>
      <name>MyString</name>
      <type>OwnershipPolicy::PriceRule</type>
      <key>HD</key>
      <options>
      </options>
      <price>1.5</price>
      <percent nil="true"/>
      <currency>USD</currency>
      <tax>0.0</tax>
      <status>1</status>
      <created_at>2014-05-01T21:26:31Z</created_at>
      <updated_at>2014-05-01T21:26:31Z</updated_at>
    </price_rule>
    <price_rule>
      <id>2</id>
      <name>MyString</name>
      <type>OwnershipPolicy::PriceRule</type>
      <key>HD</key>
      <options>
      </options>
      <price>1.5</price>
      <percent nil="true"/>
      <currency>USD</currency>
      <tax>0.0</tax>
      <status>1</status>
      <created_at>2014-05-01T21:26:31Z</created_at>
      <updated_at>2014-05-01T21:26:31Z</updated_at>
    </price_rule>
  </price_rules>
  <view_rules>
    <view_rule>
      <id>1</id>
      <name>MyString</name>
      <type>OwnershipPolicy::ViewRule</type>
      <key>HD</key>
      <options>
      </options>
      <status>1</status>
      <created_at>2014-05-01T21:26:31Z</created_at>
      <updated_at>2014-05-01T21:26:31Z</updated_at>
    </view_rule>
    <view_rule>
      <id>2</id>
      <name>MyString</name>
      <type>OwnershipPolicy::ViewRule</type>
      <key>HD</key>
      <options>
      </options>
      <status>1</status>
      <created_at>2014-05-01T21:26:31Z</created_at>
      <updated_at>2014-05-01T21:26:31Z</updated_at>
    </view_rule>
  </view_rules>
  <ownership_factories>
    <ownership_factory>
      <id>1</id>
      <name>MyString</name>
      <type>OwnershipPolicy::OwnershipFactory</type>
      <key>HD</key>
      <options>
      </options>
      <status>0</status>
      <created_at>2014-05-01T21:26:31Z</created_at>
      <updated_at>2014-05-01T21:26:31Z</updated_at>
      <timeline_duration nil="true"/>
    </ownership_factory>
    <ownership_factory>
      <id>2</id>
      <name>MyString</name>
      <type>OwnershipPolicy::OwnershipFactory</type>
      <key>HD</key>
      <options>
      </options>
      <status>0</status>
      <created_at>2014-05-01T21:26:31Z</created_at>
      <updated_at>2014-05-01T21:26:31Z</updated_at>
      <timeline_duration nil="true"/>
    </ownership_factory>
  </ownership_factories>
  <bundle_ids>
    <bundle_id>1</bundle_id>
    <bundle_id>2</bundle_id>
  </bundle_ids>
</response>
Response Fields:
  • (Integer) ownership_policy[id]
    The ownership policy's unique identifier.
  • (Integer) ownership_policy[status]
    The status of the ownership policy (-1 - Deleted, 0 - Inactive, 1 - Active).
  • (String) ownership_policy[name]
    The ownership policy's name.
  • (String) ownership_policy[description]
    The ownership policy's description.
  • (DateTime) ownership_policy[begin_at]
    The ownership policy's avilability date begin_at.
  • (DateTime) ownership_policy[end_at]
    The ownership policy's avilability date end_at.
  • (DateTime) ownership_policy[created_at]
    Timestamp of when the ownership policy was created.
  • (DateTime) ownership_policy[updated_at]
    Timestamp of when the ownership policy was last updated.
  • (Array) ownership_policy[platform_ids]
    The list of platform ids for the media.
  • (Array) price_rules
    The price rules associated with this ownership policy. See the Ownership Policy (Price Rules) API for a description of the response fields.
  • (Array) view_rules
    The view rules associated with this ownership policy. See the Ownership Policy (View Rules) API for a description of the response fields.
  • (Array) ownership_factories
    The ownership factory(s) associated with this ownership policy. See the Ownership Policy (Ownership Factories) API for a description of the response fields.
  • (Array) bundle_ids
    The ids of bundle(s) associated with this ownership policy. See the Bundles API for a description of the response fields.