Admin 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:

  • Price rules

This document describes the API for reading ownership price rules.

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/price_rules.[xml|json]

Returns a list of all ownership policy price rules.

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 listing of ownership policies price rule.
https://service_name.synctv.com/api/v2/ownership_policies/price_rules.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.
  • (String) key_like — Filters response to include items that contain the specified value in the key field (e.g. key_like=lost).
Example Response
XML JSON

<response>
  <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:34:33Z</created_at>
      <updated_at>2014-05-01T21:34:33Z</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:34:33Z</created_at>
      <updated_at>2014-05-01T21:34:33Z</updated_at>
    </price_rule>
  </price_rules>
</response>
Response Fields:
  • (Integer) price_rule[id]
    The price rule's unique identifier.
  • (String) price_rule[name]
    The price rule's name.
  • (String) price_rule[type]
    The price rule's specific type, different types do different things.
  • (String) price_rule[key]
    The price rule's key; it is used as part of the associated ownership_policy's key generation.
  • (Hash) price_rule[options]
    Hash array of configurable options unique to each rule.
  • (Decimal) price_rule[price]
    The price rule's price (Price rules may have either a price or a percent and a percent will override a price).
  • (Integer) price_rule[percent]
    The price rule's percentage modifier (Price rules may have either a price or a percent, a percent will modifier the total price of any ownership. e.g. $10 price from price_rule 1 and 20% percent from price_rule 2 results in an $8 price.).
  • (String) price_rule[currency]
    Currency in which price is presented.
  • (Decimal) price_rule[tax]
    Tax that should be paid with this price.
  • (Integer) price_rule[status]
    The status of the price rule (0 - inactive, 1 - active)
  • (DateTime) price_rule[created_at]
    The date of the price rule's creation.
  • (DateTime) price_rule[updated_at]
    The date of the price rule's last update.

Url:

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

Returns detailed information for the specified price rule.

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 ownership policy price rule with ID =100.
https://service_name.synctv.com/api/v2/ownership_policies/price_rules/100.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Example Response
XML JSON

<response>
  <price_rule>
    <id>100</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:34:35Z</created_at>
    <updated_at>2014-05-01T21:34:35Z</updated_at>
  </price_rule>
</response>
Response Fields:
  • (Integer) price_rule[id]
    The price rule's unique identifier.
  • (String) price_rule[name]
    The price rule's name.
  • (String) price_rule[type]
    The price rule's specific type, different types do different things.
  • (String) price_rule[key]
    The price rule's key; it is used as part of the associated ownership_policy's key generation.
  • (Hash) price_rule[options]
    Hash array of configurable options unique to each rule.
  • (Decimal) price_rule[price]
    The price rule's price (Price rules may have either a price or a percent and a percent will override a price).
  • (String) price_rule[currency]
    Currency in which price is presented.
  • (Decimal) price_rule[tax]
    Tax that should be paid with this price.
  • (Integer) price_rule[percent]
    The price rule's percentage modifier (Price rules may have either a price or a percent, a percent will modifier the total price of any ownership. e.g. $10 price from price_rule 1 and 20% percent from price_rule 2 results in an $8 price.).
  • (Integer) price_rule[status]
    The status of the price rule (0 - inactive, 1 - active)
  • (DateTime) price_rule[created_at]
    The date of the price rule's creation.
  • (DateTime) price_rule[updated_at]
    The date of the price rule's last update.