HomeGuidesChangelog
Log In
Guides

API response structure

📘

Commerce Video is in Beta

The documentation and features are likely to change, and the product might contain bugs.
Please report any issues and check back for updates.

Response elements

All formats share the same API response structure, which is described below:

Status

Type: string

Values: OK(for successful responses) or an error type.

In case of an error, an array will be added to the response with the list of applicable error message(s), such as: Missing required parameter x


Placements

Type: array of placement objects

Each placement name is used as a key, like for example: viewCategory_API_desktop-Video.

The value of each key is an array of ads. Each ad has the below properties:

  • format: indicates which format is returned.

  • products: is a list of SKUs that are included in the ad format, along with additional metadata about each SKU (image, product URL, parent SKU ID, etc.)

  • products_order: some real time product substitutions are allowed based on availability of SKUs:

    • products: an array of product IDs. The order of products returned by Criteo should match the order of SKUs displayed on the site, unless a SKU is unavailable or out of stock.
    • isMandatory: If true, the overall ad unit should notbe displayed if this product is not available. If false, the ad can be shown, but the button/product tile should be removed from the unit.

Rendering

  • rendering: format-specific properties to use when rendering the ad, including image assets, colors, and custom labels.

⚠️

All video parameters in the rendering section must not be used to render the video format. Please refer to the table below for more details.

Criteo reserves the right to delete these video values at any time in the future.

📘

Video formats

Please refer to the format specifications (in the Ad rendering section) for more information on the rendering capability. You will also find in this section the Commerce Video Spotlight specification..

Please refer to the TagVideoVAST field described below.


TAGVideoVAST

  • TagVideoVASTor XmlVideoVAST:

    • TagVideoVAST (by default) : a URL to load a VAST XML via a video player that supports VAST;
    • XmlVideoVAST (if retailer opt-out of doing an extra API call to retrieve the VAST definition): The VAST XML to provide a video player that supports the VAST standard.
  • OnViewBeacon, OnLoadBeacon, OnClickBeacon, etc.: the beacons to trigger/fire back to Criteo when specific actions take place. See the section for further information.


Example

View of the API response structure

View of the API response structure


Product beacons

"OnViewBeacon": "//b.us5.us.criteo.com/rm?rm_e=s8ly6TMLiDfPTKFfXm_9jzkwZuAATAS9FwGwUZ5NvnDY6LnNvBC-8AFQtntlkS50apl_jVhQvRg0-u3hWpur4RF0HikgBSOlggUUkzoK6gg9E7yC-eas9rFlwoxTuvObWpo4Yv0uedvzqBKR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QvKrdTbGiEX&ev=4",
"OnWishlistBeacon": "//b.us5.us.criteo.com/rm?rm_e=F--9mZ6kqtpHdJjjowDoZJixm4BjF12sLm6qFd0fCcnunZ1oT-owxZowTezzt4Je3Q7MQiLTAyZNVlB7v-feDJHnczt4q-f43SEE67RxRFL-PWGl4jCW7F7CKBZ5WNMxBmU0eC4d88xec7diCgp-Ifhgs-Qp135jF8-BrQ7kVj9RlRan2QTtLKxCXTytdydHRhwaAsdCyOA-VStX4ZNRI297WGRTXfRepsCLAr6E5DTDdoccag4lx5v_LSUNO82i0D11y5O3xqs1QSKCIANY802UBDPdV89lEqbofgL1Gp7CYd0OSxM_545fzsFVA2RWG4ufFDIF71aXrbKhZuRencstNQ8xMWH0KMKACEk7DQWE9WObogGMEaoSf8t664O&ev=4"

Placement / Format beacon

Placement and format beacons will typically be right under the TagVideoVAST:

"OnLoadBeacon": "//b.us5.us.criteo.com/rm?rm_e=OvODs4ECUFFfQHTXDM5FiIOKZruyseTgpUr_Xt4DVTUPBoNNtG8VsH3Jo21jPK_hMV6-9I89Az0ZP2H8yslVjFaeW_HqR0Tee4gUCZ-aJMGxpkz2bjGguRcAv-jd9ocPs2HOgk24DtDHJ_D4MJJ1b0I2bILdRCp2AyfGmrj1acfyvMqngJeS4eWiDOYOkNTaYmd0uIo3bAcGObFt4DALVQE-AJXUhBjo3lyY6Kcn7n6xS1bAkK_kqT6sBtSk2KRmX_dPNKucLowpkgsRwpr-XgfcmV1VVvkCH8uXbmYbEPTQVE103_4r7zHgvpZaiU8qbROlMwCHVqvx-aY1tNuDKa0uwoqyCm6JHC2yTo06XfnqZhJphbc50hjGbPZHa24ZAdMq7bBr3G9YpxycnMQ_B-7zyNFQeSNH_M_pYAgIvo6eXjgAYA376LoJostZTGhmEEKUvgrY-7hbU_ezG5D2_BCA7Yh2xkDQHmERLd4FgWyUxcSlkksvUmIlpd1S5-b&ev=4",
"OnViewBeacon": "//b.us5.us.criteo.com/rm?rm_e=qjke4FNkDL1z46Eu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9LS45SVZ_tZQh7-SPz2MLF4hoJGteus6hkWyfsVbgTym2gpu7JobVmaFLGrc8CyymYkfH5Xf1JKiGeNa2ZPsQtZxpnt1Dzl4Bm_BAfKYjQZnOCyWt6peHIN-azNeYwe34M9H85x1SWn5y_PKpIQZYiB_1YvdBac2VSrkBqO6SO1OgB2NiveM923Ew4Npm2rgUYUZ5bjvgL3KufQJK4FucRbvjAxEQJS&ev=4",
"OnBundleBasketChangeBeacon": "//b.us5.us.criteo.com/rm?rm_e=FSx1IlEiuPZ8UZ6-SLMpMc_icIPoxT57Ozjvievjn-9la70L5yC5VtSagxSUpBlat4BEQLu8hrqXDcNY8kUTLylv7fdvT2B7x-NkYCfYEGZZj1lJdRLhQxckVsgIk-PyjILwpnwEODcV1wvMmXnFH5ttrA5iSp847tgW-2fvZxS1w7YX30tbLYvAmZTvJxPnOXKPcmwnJz3BJ6d8CMLgdVoJN67AtgRKTpkb1s0eYk-ANM_gv7cgtEME2142W8vlv6-NayvCwGvw_CtH-OWVZoEJ52TJMMbj3Aa6jPHBRgw9P-LVsFWY3f_kxauVNl7mHTAyVvajrcPeYl7_8ygq6hFtqm9IBryXB8iMctEXDronoGT-VHfrAqet9nVvPYMyATWjm-X21M88YLAGoaDuQ&ev=4",

Rendering Fields

Below is an example of rendering fields in the API response:

"rendering": {
  	"background_video": "{\n  \"url\": \"https://static.criteo.net/design/dt/commerce_max/retailer_06/d97eb13b8e3d496eaddef7b4c998d286_video.mp4\",\n  \"width\": 720,\n  \"height\": 1280,\n  \"duration\": \"00:00:06\"\n}",
  	"video_caption_file": "https://static.criteo.net/video/onsite_cc/laptop_vertical.vtt",
  	"video_alt_text": "Laptop",
  	"border_color": "#712329",
  	"video_optional_redirect_url": "https://www.retailer.com/shop/search-results.html?q=laptop",
  	"video_optional_redirect_url_app": "",
  	"video_media_files": "[\"background_video\"]"
},

Below is the description of the API response fields for format rendering within the page.

⚠️

These fields are subject to change based on the video format.

FieldDescription
video_background (including all information within this field)Do not use this field. It is reserved for Criteo purposes only. All video-related information, assets and tracking must be used from the VAST XML only.
video_caption_fileThe video caption file (WebVTT)
video_optional_redirect_url video_optional_redirect_url_appDo not use these fields. It is reserved for Criteo purposes only. The optional redirection link to a landing page if the user clicks on the video player is available in the VAST definition (cf. <ClickThrough> node). As only one redirection link is supported in VAST, Criteo will automatically return the right URL based on the page requesting ads.
alternative_text / background_video_alt_text (or equivalent naming)Text to display in an alt_text div attribute for WCAG compliancy purposes.
video_media_files video_firework_id video_caption_file video_captionsDo not use these fields. It is reserved for Criteo purposes only.