You can deliver your content to CBS Interactive using either a web interface, or programmatically using HTTP. If you are delivering a small amount of content and you don't want to write the code needed to deliver via HTTP, you should use the web interface. If you are delivering a large amount of content or updating your content regularly, it will be more efficient to deliver it via the HTTP interface.
Creating a content app
Before you can deliver your content, you must set up a content app. You only have to do this once. To set up a content app:
Preparing your content for delivery to CBS Interactive
Whether you deliver your content via the web interface or programmatically via HTTP, you must prepare your content in the appropriate form. You must submit your content as either XML or CSV, depending on the required format for the content you are submitting. The exact format of the XML or CSV documents to submit are described below.
Preparing player outlooks data
The fields for player outlooks are as follows:
You must format your content as an XML file, as in the following example:
Preparing player updates data
The fields for player updates are as follows:
If submitting your updates using HTTP, you would format your content as an XML file, as in the following example:
The fields for each projection record are as follows:
The format of a projections submission is a CSV file, as in the following example, where the first row contains the field names, as described above, and the following rows contain the values, one record per row.
Baseball Pitching Categories that are Calculated (you can not upload these categories):
Baseball Batting Categories that are Calculated (you can not upload these categories):
Football Defensive Categories that are Calculated (you can not upload these categories):
Football Offensive Categories that are Calculated (you can not upload these categories):
Rankings (coming soon)
The ability to create Content Applications for Rankings will not be available for the launch of the Fantasy Platform, but will be coming soon.
OBTAINING CBS INTERACTVE ID CODES
To obtain the official CBS Interactive ID codes to identify players, sports, positions, and stats categories you must request the appropriate resources using the Fantasy Platform API. For more information on the Fantasy Platform API and the resources available from it, see the Fantasy Platform API documentation.
Obtaining an access token
To obtain an access token make an HTTP POST request to the following URL:
JSON response format:
Possible Error Messages:
URLs for obtaining the ID codes
The URLs for the Players, Sports, Positions, and Stats Categories are as follows. See the Fantasy Platform API documentation for details on how to call each of these URLs.
Keeping up to date
With the exception of the player data, you should not need to retrieve the ID codes more than once per season. Due to player trades and other changes in status, the Players resource may change at any time during the season. To ensure that you are working with the most up-to-date information, you should request a new copy of the Players resource before preparing your content to submit to CBS Interactive.
Delivering your content using the web interface
To deliver your content using the web interface:
Delivering your content using HTTP
To deliver your content using HTTP, create an application to submit your content using the HTTP POST method. The POST method is supported by most programming and scripting languages, either natively or through a library. You must use the content type multipart/form-data.
The data you submit will be validated by the server when received. If the content is not valid, an error response code will be returned, along with a message detailing the validation errors.
Example POST message
If validate_only parameter is false and extra saved_records node is added to the summary specifying how many records were saved.:
A 200 response will always be returned with the exception of a 500 for missing parameters and a 404 response will be returned if your access_token refers to an invalid application.