04-09-2024 09:40 AM - edited 10-24-2024 10:12 AM
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
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:
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.
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 } } }
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 |