cancel
Showing results for 
Search instead for 
Did you mean: 
1WSCGomez
Moderator
Moderator

The Content Availability API allows you to check for available content for a given product. This is useful if you need to add logic to your website to display a dynamic tab or set a flag at the product level to call the ContentCast Script. Availability API is supported for the following types of content: Inline, DS, Logo, Logo Inline, EU Energy Product Fiche

URL Structure

  • SKey – subscriber key
  • ZoneID – script (hook) ID

Skey and ZoneID can be found in the Get Code section when configuring your Product Page Script.

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 the API are:

  • cpn – Customer Part Number which will be your internal part number for the sku as defined in your catalog. Valid only if you upload product requests to your account or it will be the SKUID if the data is pushed to you without product requests in your account
  • mf – The Manufacturer name. Example: “Lenovo”, “Cisco”, “Microsoft+Corp”. Must be URL encoded.
  • pn – The Manufacturer part number. Must be URL encoded. Example: 12345#ABA would need to be passed as 12345%23ABA.
  • upcean – The UPC or EAN Code. Please note that UPC or EAN data may not be available for many products.
  • lang – the 2 letter ISO 639.1 language code or two letter language code plus two letter country code separated by a hyphen. Examples: en, fr, de, en-US, de-DE
  • mode – format of the response. Accepts “xml” or “json”. Defaults to xml when not specified.

Example URL

Example provided for demo purposes only – you will need to substitute your SKey and ZoneID:

https://ws.cs.1worldsync.com/abc1234/contentcheck/test123?mf=Sony&pn=srsx7&lang=en-US&mode=json

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

API Response

For JSON:

When sending &mode=json, you will receive the response in JSON format.

    {
 "result": 0,
 "time": 4412,
 "data": {
   "ccs-tiled-gallery": {
     "available": true
   },
   "ccs-gallery": {
     "available": true
   },
   "ccs-standard-image": {
     "available": true
   },
   "ccs-inline-content": {
     "available": false
   },
   "ccs-logos": {
     "available": false
   },
   "ccs-product-fiche": {
     "available": false
   }
 }
    }
   

For XML:When sending mode=xml, you will receive the response in XML format.

    <response>
 <result>0</result>
 <time>11</time>
 <data>
   <ccs-tiled-gallery>
     <available>true</available>
   </ccs-tiled-gallery>
   <ccs-gallery>
     <available>true</available>
   </ccs-gallery>
   <ccs-standard-image>
     <available>true</available>
   </ccs-standard-image>
   <ccs-inline-content>
     <available>false</available>
   </ccs-inline-content>
   <ccs-logos>
     <available>false</available>
   </ccs-logos>
   <ccs-product-fiche>
     <available>false</available>
   </ccs-product-fiche>
 </data>
    </response>

‘available = true’ means that the content block exists for the given product.

If there is no accessible content for any of the blocks or the block was disabled in your product page settings then the response will contain ‘false’ for each of the blocks:

 {
 "result": 0,
 "time": 4412,
 "data": {
   "ccs-tiled-gallery": {
     "available": false
   },
   "ccs-gallery": {
     "available": false
   },
   "ccs-standard-image": {
     "available": false
   },
   "ccs-inline-content": {
     "available": false
   },
   "ccs-logos": {
     "available": false
   },
   "ccs-product-fiche": {
     "available": false
   }
 }
    }

Logo Type Reference Table

The below table provides the list of ‘logo type’ values you need to look for in the API response for the respective logo programs:

Logo Response
   
Dell Recommends dell
Duracell duracell
Energy Guide energyGuide
Energy Star energyStar
EPEAT epeat
EPSON Recommends epson
EU Energy euEnergy
GameSpot gamespot
HP Recommends hpRecommends
HP Up Sells hpUpSells
Intel vPro intelvpro
Lenovo Recommends lenovo
Office 2019 office2019
Office 365 ms365
Sony Recommends sonyRecommends
Windows Server 2019 winServer2019
Windows Server 2019 CAL winServer2019
Windows Server 2019 COEM winServer2019
Xbox Recommends xbox2019
Xerox Recommends xerox

 

Version history
Revision #:
3 of 3
Last update:
‎10-24-2024 10:12 AM
Updated by:
 
Contributors