------------------------
Simple Content Transaction Protocol (SCTP) Version 0.4
------------------------
SCTP is a protocol specification for handling content transactions, including
user account setup and login, as well as content purchase, rental and preview.
SCTP requires the SRX method of sending and receiving messages via HTTP GET/POST
and XML response. The SRX protocol specification is located here. The
following is the specification of messages provided in SCTP.
An SCTP action is an HTTP GET or POST to a URL which is known by the client. The
URL is not required to conform to any specific format; it may be any URL which
is known to the client to be intended for a specific action. The XML response
contains one <sctp> element which contains one <response> element
and possible additional elements, depending on the action.
An SCTP response must include <sctp> as the first element with a version
attribute indicating the SCTP specification version used in the format #.#.
Example SCTP Response:
<sctp version=x.x>
<response>
<code>1</code>
<message>Succeeded</message>
<url>/go/here/now</url>
</response>
</sctp>
URLs may be included in the "success" responses as well as the "user not logged
in" responses, to tell the client where to redirect the browser.
SCTP Actions:
1) Login
Form elements:
email (string)
password (string)
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
INVALID_CREDENTIALS = [-13, 'The user name and password combination is incorrect.']
2) Purchase Content
Form elements:
type (string: "movie", "episode", "volume", "song" or "album")
id (string)
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
CONTENT_NOT_VALID = [-3, 'The item you are requesting is not valid.']
CONTENT_NOT_AVAILABLE = [-4, 'The item you are requesting is not available.']
ALREADY_PURCHASED = [-5, 'You have already purchased this item.']
USER_NOT_LOGGED_IN = [-8, 'Please log in first.']
Note: Success returns Download URL or URL to volume RSS feed. Type form element
may be extended by using "x-" at the beginning of the element value, indicating
an custom type.
3) Rent Content
Form elements:
type (string: "movie", "episode", "volume", "song" or "album")
id (string)
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
CONTENT_NOT_VALID = [-3, 'The item you are requesting is not valid.']
CONTENT_NOT_AVAILABLE = [-4, 'The item you are requesting is not available.']
USER_NOT_LOGGED_IN = [-8, 'Please log in first.']
ALREADY_RENTED = [-16, 'You are currently renting this item.']
Note: Success returns Download URL or URL to volume RSS feed. Type form element
may be extended by using "x-" at the beginning of the element value, indicating
an custom type.
4) Get Content
Form elements
type (string: "movie", "episode", "song" or "ad")
id (string)
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
CONTENT_NOT_VALID = [-3, 'The item you are requesting is not valid.']
USER_NOT_AUTHORIZED = [-7, 'Sorry, you are not subscribed to this channel or show,
or you have not purchased or rented this item. Please
do so first.']
USER_NOT_LOGGED_IN = [-8, 'Please log in first.']
Note: Success returns URL to content file and a DRM action token if required.
5) Allow Previews
Form elements: none
The device must be personalized with the DRM before calling this method. The
method returns XML with the proper DRM action token(s) to initiate a node and link
acquisition to the DRM preview node.
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
DEVICE_NOT_PERSONALIZED = [-14, 'This device is not yet registered with SyncTV. Please make
sure your Internet connection is working properly. Device
registration will happen automatically.']
6) Preview Content
Form elements
type (string: "movie", "episode", or "song")
id (string)
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
CONTENT_NOT_VALID = [-3, 'The item you are requesting is not valid.']
Note: Success returns URL to content preview file and a DRM action token if
required.
7) Authorize Device
Form elements:
fingerprint (string)
email (string)
password (string)
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
DEVICE_ALREADY_AUTHORIZED = [-9, 'This device is already authorized for your account.']
DEVICE_LIMIT_EXCEEDED = [-10, 'You have already reached the maximum number of 5 home
players for your account. You can de-authorize an
existing home player in order to authorize this device.']
INVALID_CREDENTIALS = [-13, 'The user name and password combination is incorrect.']
Note: Success returns one or more DRM action tokens if required as well as an
optional <displayName> element containing the display name of the user.
8) Deauthorize Device
Form elements:
email (string)
password (string)
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
DEVICE_NOT_AUTHORIZED = [-2, 'This device is not yet authorized for your account.']
INVALID_CREDENTIALS = [-13, 'The user name and password combination is incorrect.']
Note: Success returns one or more DRM action tokens if required.
Notice that (de)authorization gets the ID from the user agent string. The server
may enforce a maximum number of devices per account.
9) Create Account
Form elements (* is optional):
email (string)
password (string)
first_name (string)
last_name (string)
billing_address (string)
billing_address_line2 (string)*
billing_city (string)
billing_state_prov (string)
billing_postal_code (string)
billing_country (string)*
card_type (string)
card_number (string)
card_security_code (string)
card_expiration (string)
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
INVALID_CREDENTIALS = [-13, 'The user name and password combination is incorrect.']
INAPPROPRIATE_VALUE = [-23, 'One or more form elements contain an inappropriate value.']
MISSING_ELEMENT = [-24, 'One or more required form elements are missing.']
Note: Form element names are lower case with underscores.
10) Get Account Info
Form elements:
email (string)
password (string)
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
DEVICE_NOT_AUTHORIZED = [-2, 'This device is not yet authorized for your account.']
INVALID_CREDENTIALS = [-13, 'The user name and password combination is incorrect.']
Note: Success returns a full set of account fields (same as provided during create account).
Element names are camel case without underscores.
Example Response:
<sctp version=x.x>
<response>
<code>1</code>
<message>Succeeded</message>
<url>/go/here/now</url>
<email>user@domain.com</email>
<firstName>John</firstName>
<lastName>Doe</lastName>
<billingAddress>123 Street</billingAddress>
<billingAddress_line2></billingAddressLine2>
<billingCity>San Jose</billingCity>
<billingState_prov>California</billingStateProv>
<billingPostalCode>95100</billingPostalCode>
<billingCountry>USA</billingCountry>
<cardType>Visa</cardType>
<cardNumber>***0000</cardNumber>
<cardExpiration>12/2010</cardExpiration>
</response>
</sctp>
11) Update Account
Form elements (* is optional):
email (string)
password (string)
new_email (string)*
new_password (string)*
first_name (string)*
last_name (string)*
billing_address (string)*
billing_address_line2 (string)*
billing_city (string)*
billing_state_prov (string)*
billing_postal_code (string)*
billing_country (string)*
card_type (string)*
card_number (string)*
card_security_code (string)*
card_expiration (string)*
Allowed responses:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
INVALID_CREDENTIALS = [-13, 'The user name and password combination is incorrect.']
INAPPROPRIATE_VALUE = [-14, 'One or more fields contain an inappropriate value']
Note: Any error will cancel the update.
The <url> element is not always present, only if needed.
Error code glossary:
SUCCESS = [ 1, 'Your transaction has completed.']
UNKNOWN_ERROR = [-1, 'There was an unknown error.']
DEVICE_NOT_AUTHORIZED = [-2, 'This device is not yet authorized for your account.']
CONTENT_NOT_VALID = [-3, 'The item you are requesting is not valid.']
CONTENT_NOT_AVAILABLE = [-4, 'The item you are requesting is not available.']
ALREADY_PURCHASED = [-5, 'You have already purchased this item.']
ALREADY_SUBSCRIBED = [-6, 'You already have a subscription to this item.']
USER_NOT_AUTHORIZED = [-7, 'Sorry, you are not subscribed to this channel or show,
or you have not purchased or rented this item. Please
do so first.']
USER_NOT_LOGGED_IN = [-8, 'Please log in first.']
DEVICE_ALREADY_AUTHORIZED = [-9, 'This device is already authorized for your account.']
DEVICE_LIMIT_EXCEEDED = [-10, 'You have already reached the maximum number of 5 home
players for your account. You can de-authorize an
existing home player in order to authorize this device.']
USER_ALREADY_REGISTERED = [-11, 'You are already registered.']
EXTENDED_ERROR_INFO_AVAILABLE = [-12, 'More error information is available.']
INVALID_CREDENTIALS = [-13, 'The user name and password combination is incorrect.']
DEVICE_NOT_PERSONALIZED = [-14, 'This device is not yet registered with SyncTV. Please make
sure your Internet connection is working properly. Device
registration will happen automatically.']
NOT_SUBSCRIBED = [-15, 'You are not subscribed to this channel or show.']
ALREADY_RENTED = [-16, 'You are currently renting this item.']
INPUT_ABSENT = [-17, 'Please fill in all required information.']
GATEWAY_FAILURE = [-18, 'Payment gateway temporarily unavailable. Please try again.']
PAYMENT_FAILURE = [-19, 'Your payment failed. Please input a valid payment method.']
TRANSACTION_DENIED = [-20, 'Sorry, you can only purchase 5 individual episodes with this
press account.']
DEVICE_LOCATION_RESTRICTED = [-21, 'The device you are authorizing does not appear to be located
in the United States.']
INACTIVE_ACCOUNT_LOGIN = [-22, 'This account is not yet active. Please activate before
attempting to log in.']
INAPPROPRIATE_VALUE = [-23, 'One or more form elements contain an inappropriate value.']
MISSING_ELEMENT = [-24, 'One or more required form elements are missing.']
(Note: for extended error info there will be an element called "error", a
sibling to code and message, containing additional textual error data for the
client to display.)
This specifications provided here are licensed to the public under a Creative Commons Attribution 3.0 license.