DataSource API Quick Start Guide

1. DataSource API

1.1 Summary

DataSource API is a RESTful JSON API that supports delivery of product page content components including product description, marketing text, key selling points, main and extended specifications, what’s in the box, and product PDFs.

1.2 API Scope

DataSource API does not fully replace data feeds, but rather complements them. Data related to Product Page display can be dynamically served by DataSource API, while data related to search and navigation (e.g. categorization or parametric search attributes) is available via data feeds (Download.zip).

DataSource API is an alternative to DataSource Cloud integration mode. Just like DataSource Cloud it simplifies content integration, providing higher level of flexibility around content display format.

  DataSource API DataSource Cloud Download.zip Feed
Delivery Mode Real-time on-demand Real-time on-demand Daily feed downloads
Batch Mode Support Single SKU only Single SKU only Multiple SKU delivery
Delivery Format JSON object HTML widget Database feed
Product Pages      
Product Images Yes Yes Yes
Marketing Texts, KSP Yes Yes Yes
Standard Descriptions Yes Yes Yes
Main & Extended Specs Yes Yes Yes
PDF User Manuals Yes Yes Yes
Inline Rich Content Yes
Website Navigation      
Categorization Yes
Keyword Search Yes
Parametric Search Yes
Product Comparison Yes
Related Product Links Yes
EAN/UPC, UNSPSC Yes

2. Account Activation

2.1 Activation Request

Please contact our Customer Support team if you have more questions or would like to schedule an online demo of DataSource API.

Please contact our Customer Support team if you do not have your CCS Client Portal account activated yet.

2.2 Accept Invitation

When you receive your email invitation to CCS Client Portal (https://portal.cnetcontent.com), click ACCEPT INVITATION to begin creating your profile.


2.3 Create Profile

Fill in the profile with your name, title, email address, phone number, and desired password.Check the box at the bottom, indicating that you agree to the terms and conditions.Click REGISTER to continue to the main page.


2.4 Register Domains

For security purposes, the product page script will only run on domains that have been registered in the portal.

If you have a separate domain (perhaps used for staging) that is not a subdomain, you will need to register it.Go to ADMIN > INTEGRATION SETTINGS, and click EDIT to add a domain.


Subdomains, such as “stage.mycompany.com” or “qatest.mycompany.com” do not need to be registered, as they belong to the root domain.

After you have registered all necessary domains, click SAVE.

3. Product Page Configuration

3.1 Create New Product Page Script

From the main My Services page, select CONFIGURE PRODUCT PAGE.


Choose a name for your page.For this demo, we have selected “Main Product Page” as our page name.



3.2 Configure Page

On the left side of the Configure Product Page screen, you'll see a number of different content elements.


Please note that the following elements are not available for DataSource API service:

  • Product Details
  • Inline Content
  • Logo Service

Once you choose the content elements click Save and then click Publish to push the changes live.

3.3 Configure API URL

The URL template is http://ws.cnetcontent.com/<SKey>/api/<ZoneID>?<arguments>

  • SKey – subscriber key
  • ZoneID – script (hook) ID
  • arguments – call arguments, specifying the product, language and other call parameters

Skey and ZoneID can be found in the Get Code section.

Click on Get Code at the bottom right side of the Product Page and you will get a pop-up window where you can find Skey and ZoneID.


The arguments for DataSource API are:

  • cpn – Customer Part Number which will be your internal part number for the sku as defined in your catalog if you upload product requests to your DataSource account or it will be CNET SKUID if the data is pushed to you without product requests in your DataSource account
  • mf – The Manufacturer name. Example: Lenovo, Cisco, Microsoft Corp.
  • pn – The Manufacturer part number. Example: VM617A8#ABA.
  • lang – 2 letters language code enabled for your DataSource account. Examples: en, fr, de.

Example:

http://ws.cnetcontent.com/bd748cb3/api/ce5ccab50b?cpn=S13150684&lang=en

The arguments should be updated with the dynamic values from your website.

3.3.1 Optional Arguments

  • echo argument

It can be used for dealing with browser cache, or for making many different requests from the same page and being able to recognize the corresponding responses.

Example:

http://ws.cnetcontent.com/bd748cb3/api/ce5ccab50b?cpn=S13150684&lang=en&echo=myRequestNumber158

  • jsonp or callback argument

It can be specified to support JSONP technique and turn API response into JavaScript function call rather than being JSON object.

Both parameters are synonyms and have the same effect.

Examples:

http://ws.cnetcontent.com/bd748cb3/api/ce5ccab50b?cpn=S13150684&lang=en&callback=callMeBackPlease

http://ws.cnetcontent.com/bd748cb3/api/ce5ccab50b?cpn=S13150684&lang=en&jsonp=callMeBackPlease

3.4 API Response

The API response looks as following:

{

"result": <result code>,

"time": <server time>,

"echo": <echo value>,

"data": {

<block #1 ID>: <block #1 data>,

<block #2 ID>: <block #2 data>,

<block #3 ID>: <block #3 data>

}

}

  • result code – the syndication result code
  • server time – the time in milliseconds spend at server while generating the output
  • echo value – optional echo value from the client
  • block #X ID – the container ID as configured in Product Page:


  • block #X data – the JSON data for the block, the inner format may vary for each content block

Example:

{

"result": 0,

"time": 29,

"echo": "myRequestNumber158",

"data": {

"ccs-mkt-desc": {

"lines": [

"Xbox One is a state-of-the-art gaming console, a generation TV and movie system and a whole lot more. Gone are the days of switching inputs on your TV to play a game or watch a movie. With Xbox One, you can quickly jump from TV to movies to music to a game. Just with the sound of your voice. With Xbox One, games are so lifelike, you'll swear they're real. Immerse yourself in cinematic worlds with characters that are more human than ever. And reach into television, sports, music, and even the web in ways you never imagined possible.",

"Xbox One gets to know you. It learns what you like and what you don't. Say goodbye to the days of one-size-fits-all entertainment. Xbox One brings you closer to the entertainment you love and the people you care about. You can chat with your friends on Skype while watching football on TV. Or show off your best game highlights instantly with game DVR. And because Xbox One is powered by the cloud, you won't have to wait around for game updates. It looks like the living room can finally start living up to its name."

]

},

"ccs-ksp": {

"lines": [

"Simple, instant, complete",

"Be immersed",

"Be recognized",

"Be connected",

"The best controller, even better"

]

}

}

}

3.4.1 Image / Tiled Gallery Response

The response contains information about all gallery images, providing the following details for each image:

  • the “full resolution” URL
  • full resolution width and height
  • the “standard resolution” URL, which is always 200 x 150
  • the “thumbnail resolution” URL, which is always 75 x 75
  • the optional image text (if enabled in hook settings)

The images are sorted according to their weights.

http://ws.cnetcontent.com/bd748cb3/api/ce5ccab50b?cpn=S13150684&lang=en

"data": {

"ccs-gallery": {
"images": [
{
"full": "http://cdn.cnetcontent.com/16/dd/16dd45f6-3323-490f-b8b0-b7b37ff1fdd1.jpg",
"w": 1024,
"h": 768,
"s200": "http://cdn.cnetcontent.com/dd/72/dd722682-1c59-4dce-ba94-e9a2aa4f12ea.jpg",
"p75": "http://cdn.cnetcontent.com/5f/59/5f59dda8-2e47-4092-b1e2-4e9c005e79fc.jpg",
"txt": "Right-angle"
},
{
"full": "http://cdn.cnetcontent.com/1c/76/1c76d93e-f550-4cc2-987a-c1ff9bffd5a2.jpg",
"w": 1200,
"h": 900,
"s200": "http://cdn.cnetcontent.com/5c/bd/5cbd7f31-d2b6-4382-af6e-a08d57ff0583.jpg",
"p75": "http://cdn.cnetcontent.com/78/84/78847554-4add-4d64-b53b-c6271270a5ed.jpg",
"txt": "Front"
},
{
"full": "http://cdn.cnetcontent.com/ff/80/ff803db1-ae1c-4c5a-92e0-bfd2b4921954.jpg",
"w": 2400,
"h": 1800,
"s200": "http://cdn.cnetcontent.com/2d/f4/2df462e1-3d37-4cb0-a7f2-d0af1747264e.jpg",
"p75": "http://cdn.cnetcontent.com/63/d0/63d048cd-a768-4fa1-af84-e55096f91a6e.jpg",
"txt": "Front"
},
...
]
},
...

3.4.2 Primary Image

The response contains single image information, similar to gallery entries.

http://ws.cnetcontent.com/bd748cb3/api/ce5ccab50b?cpn=S13150684&lang=en

"data": {

"ccs-standard-image": {

"full": "http://cdn.cnetcontent.com/0f/45/0f45f93b-2852-4375-a69b-d1a932cb042a.jpg",

"w": 800,

"h": 600,

"s200": "http://cdn.cnetcontent.com/dd/72/dd722682-1c59-4dce-ba94-e9a2aa4f12ea.jpg",

"p75": "http://cdn.cnetcontent.com/5f/59/5f59dda8-2e47-4092-b1e2-4e9c005e79fc.jpg"

},

...

3.4.3 Product Brochures & Manuals

The response contains the basic documents data, including the file URL and the name to display.

http://ws.cnetcontent.com/bd748cb3/api/ce5ccab50b?mf=Dell&pn=AAR41428BK&lang=en

"data": {

"ccs-documents": {

"docs": [

{

"name": "Product Data Sheet / Brochure",

"url": "http://cdn.cnetcontent.com/35/e1/35e104d1-1c01-4491-b87b-de6df97bf6d5.pdf"

},

{

"name": "User Manual",

"url": "http://cdn.cnetcontent.com/ba/cc/bacc51c5-a3af-467d-97ec-cad39a654365.pdf"

}

]

},

...

4. Contacting Customer Support

If you experience any issues or have additional questions about the DataSource API service or the Client Portal, please contact our Customer Support team at https://extranet.cnetcontentsolutions.com/support.aspx