Meride API - Bulk - Update

This page explains how to update Bulk elements.

Entity name: bulk.

PUT http://API_DOMAIN/rest/v2/bulk/{resource-id}.{format}

{resource-id}: the object ID

Attributes

Attribute Value Mandatory Default
title A non-empty string NO  
label A non-empty string. Specify a configuration ID label in this field. This field will be used for a possible parameterization of the embed code.

Adding the data-bulk-label='mylabel' attribute to the div tag of the embed code will force the embed to take the configuration properties regardless of the page it is delivering it

The label must be uniquely chosen for all the configurations entered
NO  
context_rules Array of configuration context rules separated by character.
Below is an example in json format
[
    "http://domain1.com/*",
    "http://domain2.com/*"
]
			        	
By context rule we mean a rule on domains where the configuration will take effect.
Specifying the * character as the context rule means that the configuration will take effect in any domain. Each context rule, with the exception of the * rule, must start with the http or https protocol, followed by the domain name and ending with the * character indicating that the configuration takes effect on every page of the specified domain.

Ex:
- http://domain.com*
the configuration will take effect in all the URL's in the domain "domain.com"

- *
The configuration always takes effect

It is not possible to differentiate the context rules within the same domain
NO  
responsive 1 if you want the player to be responsive. 0 otherwise NO 0
background_color The background color of the player in HEX code. NO 000000
background_image URL of the player's background image. NO
player_color The color of the player in HEX code. NO FFCE3E
autoplay 1 if you want the video of the player to start in autoplay. 0 otherwise NO 0
mute 1 if you want the video start mute. 0 otherwise NO 0
controlbar_visible 0 if you want to hide the control bar in the player. 1 otherwise NO 1
controlbar_auto_hide 1 if you want the control bar of the player to be hidden automatically. 0 otherwise NO 1
seekable 0 if you want to disable the player scrolling forward. 1 otherwise NO 1
preload 0 if you want video preload. 1 otherwise NO 1
pip 1 if you want to enable Picture in Picture mode. 0 otherwise NO 0
wmode The wmode property of the object / embed element on Flash player. Possible values:direct, window, opaque, transparent, gpu NO direct
skip_preroll 1 and if you want to bring up the link to skip the preroll. 0 otherwise NO 0
skip_time Integer. Specify the number of seconds after which the link appears to skip the preroll NO 5
setting_volume Google DART volume.
-1 Predefined. none No check. defaultOn Volume active. defaultOff Volume disabled
NO -1
desktop_player Indicates the type of player to be used for desktop users. Possible values: flash,html5 NO html5
scrollmode_enabled 1 to activate the "scroll mode" on the player. 0 otherwise NO 0
scrollmode_mute_on_mouse_over 1 to mute the player with the mouse in "scroll mode”. 0 otherwise NO 1
scrollmode_destroy_on Indicates the list of events for which to predict the destruction of the player in "scroll mode". Array format. Possible values: AD_ERROR,ENDED,AD_ENDED,ROLLVIDEO_ENDED Below is an example in json format
[
    "AD_ERROR",
    "ENDED"
]
			        	
NO []
preroll List of prerolls to be associated with the embed
Below is an example in json format
[
	{
		"adv_type":"dart", 
		"id":"1"
	}, 
	{
		"adv_type":"dart", 
		"id":"2"
	}
]
			        	
Specify the type of advertising for each preroll dart (linear) or video and the ID of the same

Pass an empty string to delete any associated advertising
NO  
midroll List of midrolls to be associated with the embed
Below is an example in json format
[
	{
		"block": {
			"time_setting": "00:00:20",
			"mode": "time"
		},
		"roll": [
			{
				"adv_type": "dart",
				"id": "69",
			},
			{
				"adv_type": "dart",
				"id": "39",
			}
		]
	},
	{
		"block": {
			"time_setting": "00:00:40",
			"mode": "time"
		},
		"roll": [
			{
				"adv_type": "dart",
				"id": "150",
			},
			{
				"adv_type": "dart",
				"id": "32",
			}
		]
	}
	....
]
			        	
Each midroll block will play at the time set in time_setting and will display the specified roll list

Pass an empty string to delete any associated advertising
NO  
postroll The postroll to associate with the embed
Below is an example in json format
{
	"adv_type":"dart", 
	"id":"1"
}
			        	
Only one postroll can be specified.

Pass an empty string to delete any associated advertising
NO  
overlay_initial The initial overlay to be associated with the embed
Below is an example in json format
{
	"adv_type":"dart", 
	"id":"1", 
	"after_time":0, 
	"stay_time":15
}
			        	
Only one initial overlay can be specified. Only ads like dart (non-linear) can be used as an overlay.

after_time: expresses the entry delay of the initial overlay in seconds.

stay_time: expresses the dwell time of the initial overlay in seconds. The dwell time must be at least 15 seconds.



Pass an empty string to delete any associated advertising
NO  
overlay_main The main overlay to be associated with the embed
Below is an example in json format
{
	"adv_type":"dart", 
	"id":"1", 
	"fixed":0, 
	"after_time":0, 
	"stay_time":15, 
	"delay_time":10, 
	"dimension":"300x250"
}
			        	
Only one initial overlay can be specified. Only ads like dart (non-linear) can be used as an overlay

after_time: expresses the entry delay of the main overlay in seconds.

fixed: 1 If you want the main overlay to remain fixed throughout the duration of the embed. 0 If you want to schedule calls to the main overlay. If the timed mode is chosen, a value must also be specified for the stay_time and delay_time fields.

stay_time: expresses the dwell time of the single call to the main overlay in seconds. The dwell time must be at least 15 seconds. The value for this field must be specified only if the overlay is not fixed.

delay_time: expresses the time interval between one call and the other to the main overlay in seconds. The value for this field must be specified only if the overlay is not fixed.

dimension: size of the main overlay. Leave the field empty for free dimensions. Other accepted values: 300x250,180x150,160x600,728x90,300x600,550x480



Pass an empty string to delete any associated advertising
NO  
mobile_preroll Ad fields with prefix mobile_ indicate the advertising that will be rendered in the player in a mobile environment.

List of prerolls to be associated with the embed.
Below is an example in json format
[
	{
		"adv_type":"dart", 
		"id":"1"
	}, 
	{
		"adv_type":"dart", 
		"id":"2"
	}
]
			        	
Specify the type of advertising for each preroll dart (linear) and the ID of the same. Ads like video not supported

Pass an empty string to delete any associated advertising
NO  
mobile_midroll Ad fields with prefix mobile_ indicate the advertising that will be rendered in the player in a mobile environment.

List of midrolls to be associated with the embed.
Below is an example in json format
[
	{
		"block": {
			"time_setting": "00:00:20",
			"mode": "time"
		},
		"roll": [
			{
				"adv_type": "dart",
				"id": "69",
			},
			{
				"adv_type": "dart",
				"id": "39",
			}
		]
	},
	{
		"block": {
			"time_setting": "00:00:40",
			"mode": "time"
		},
		"roll": [
			{
				"adv_type": "dart",
				"id": "150",
			},
			{
				"adv_type": "dart",
				"id": "32",
			}
		]
	}
	....
]
			        	
Each midroll block will play at the time set in time_setting and will display the specified roll list. Ads like video not supported

Pass an empty string to delete any associated advertising
NO  
mobile_postroll Ad fields with prefix mobile_ indicate the advertising that will be rendered in the player in a mobile environment.

The postroll to associate with the embed.
Below is an example in json format
{
	"adv_type":"dart", 
	"id":"1"
}
			        	
Only one postroll can be specified. Ads like video not supported

Pass an empty string to delete any associated advertising
NO  
mobile_overlay_initial Ad fields with prefix mobile_ indicate the advertising that will be rendered in the player in a mobile environment.

The initial overlay to be associated with the embed.
Below is an example in json format
{
	"adv_type":"dart", 
	"id":"1", 
	"after_time":0, 
	"stay_time":15
}
			        	
Only one initial overlay can be specified. Only ads like dart (non-linear) can be used as an overlay.

after_time: expresses the entry delay of the initial overlay in seconds.

stay_time: expresses the dwell time of the initial overlay in seconds. The dwell time must be at least 15 seconds.



Pass an empty string to delete any associated advertising
NO  
mobile_overlay_main Ad fields with prefix mobile_ indicate the advertising that will be rendered in the player in a mobile environment.

The main overlay to be associated with the embed.
Below is an example in json format
{
	"adv_type":"dart", 
	"id":"1", 
	"fixed":0, 
	"after_time":0, 
	"stay_time":15, 
	"delay_time":10, 
	"dimension":"300x250"
}
			        	
Only one initial overlay can be specified. Only ads like dart (non-linear) can be used as an overlay

after_time: expresses the entry delay of the main overlay in seconds.

fixed: 1 If you want the main overlay to remain fixed throughout the duration of the embed. 0 If you want to schedule calls to the main overlay. If the timed mode is chosen, a value must also be specified for the stay_time and delay_time fields.

stay_time: expresses the dwell time of the single call to the main overlay in seconds. The dwell time must be at least 15 seconds. The value for this field must be specified only if the overlay is not fixed.

delay_time: expresses the time interval between one call and the other to the main overlay in seconds. The value for this field must be specified only if the overlay is not fixed.

dimension: size of the main overlay. Leave the field empty for free dimensions. Other accepted values: 300x250,180x150,160x600,728x90,300x600,550x480



Pass an empty string to delete any associated advertising
NO  
player_adv_manager Indicates the player's ad manager. Possible values: default,ima NO ima
ima_vpaid_mode Possible values: ENABLED,INSECURE,DISABLED NO ENABLED
watermark A reference to the image file path of the watermark you want to apply. Allowed extensions:jpg,png,gif

Pass an empty string to delete any associated watermark
NO  
watermark_width Width of the watermark in pixels for resize NO  
watermark_height Height of the watermark in pixels for resize NO  
watermark_opacity Watermark transparency level. Allowed values0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1 NO  
watermark_displaytime If specified, indicate the dwell time of the watermark in seconds NO  
watermark_hide 1 If you want the watermark to disappear along with the player control bar. 0 otherwise. NO  
watermark_link If specified, it makes the watermark clickable by redirecting the user to the specified URL NO  
watermark_[position] It is possible to use two of these fieldswatermark_bottom, watermark_right, watermark_top, watermark_left to specify the placement of the watermark inside the player. Values can be expressed in px or in %. For example, to place the watermark at the bottom right, pass the parameters watermark_bottom=5px, watermark_right=5px NO  
webtrekk_account_id The Meride ID of the Webtrekk account to use. If not specified, the default Webtrekk account is automatically associated if it exists. Pass an empty string if you do not want to associate an account. Only one account can be associated per embed

Pass an empty string to delete any associated account
NO  
ama_configuration_id The Meride ID of the Akamai Media Analytics configuration to use. If not specified, the default configuration is automatically associated if it exists. Pass an empty string if you do not want to associate any configuration. Only one account can be associated per embed

Pass an empty string to delete any associated account
NO  
comscore_account_id The Meride ID of the Comscore account to use. If not specified, the default Comscore account is automatically associated if it exists. Pass an empty string if you do not want to associate an account. Only one account can be associated per embed

Pass an empty string to delete any associated account
NO  
nielsen_account_id The Meride ID of the Nielsen account to use. If not specified, the default Nielsen account is automatically associated if it exists. Pass an empty string if you do not want to associate an account. Only one account can be associated per embed

Pass an empty string to delete any associated account
NO  

Note The advertisements associated with a single configuration must all be of the same type

Response

A collection / array of elements

Field Value Description
id string Object ID
title string The title of the video
label string The label field associated with the configuration
context_rules array Set of context rules
skin string The skin of the player chosen during create
created_at string The create date that follows the format Y-m-d H:i:s
Y(year) m(month) d(day) H(hours) i(minutes) s(seconds)
responsive boolean 1 if autoplay is responsive. 0 otherwise
background_color string The background color of the player in HEX code.
background_image string URL of the player's background image.
player_color string The color of the player in HEX code.
autoplay boolean 1 if the video is published in autoplay. 0 otherwise
mute boolean 1 if the video is published in mute mode. 0 otherwise
controlbar_visible boolean 0 if the player's control bar is hidden. 1 otherwise
controlbar_auto_hide boolean 1 if the player’s control bar becomes hidden automatically. 0 otherwise
seekable boolean 0 if the player's scroll bar is disabled. 0 otherwise
preload boolean 1 if preload video is active. 0 otherwise
pip boolean 1 if Picture in Picture mode is active. 0 otherwise
wmode string The wmode property of the object/embed element on Flash player
skip_preroll boolean 1 if the user has the option to skip the preroll. 0 otherwise
skip_time integer The number of seconds after which the link to skip the preroll appears
setting_volume string Google DART volume.
-1 Predefined. none No check. defaultOn Volume active. defaultOff Volume disabled
desktop_player string Player type for desktop users
scrollmode_enabled boolean 1 If "Scroll Mode" is active. 0 otherwise
scrollmode_mute_on_mouse_over boolean 1 If within "Scroll Mode" the video becomes mute on mouse over. 0 otherwise
scrollmode_destroy_on json array List of events where the player is expected to be destroyed
preroll advideo | addart Object that describes all the desktop prerolls associated with the embed and its configurations
midroll addart Object that describes all the desktop midrolls associated with the embed and its configurations
postroll advideo | addart Object describing the desktop postroll associated with the embed
overlay_initial addart Object that describes the initial desktop overlay associated with the embed
overlay_main addart Object that describes the main desktop overlay associated with the embed and its configuration
mobile_preroll advideo | addart Object that describes all the mobile prerolls associated with the embed and its configurations
mobile_midroll addart Object that describes all the mobile midrolls associated with the embed and its configurations
mobile_postroll advideo | addart Object describing the mobile postroll associated with the embed
mobile_overlay_initial addart Object describing the initial mobile overlay associated with the embed
mobile_overlay_main addart Object that describes the main mobile overlay associated with the embed and its configuration
player_adv_manager string Player Ad Manager
ima_vpaid_mode string IMA Vpaid Mode
watermark string URL to the image of the watermark
watermark_width int Watermark resize width
watermark_height int Watermark height resize
watermark_opacity float Watermark transparency level
watermark_displaytime int Watermark dwell time in seconds
watermark_hide boolean 1 If the watermark disappears together with the player controls. 0 otherwise
watermark_link string URL to redirect by clicking on the watermark.
watermark_bottom string Placement of the watermark from the bottom
watermark_right string Placement of the watermark from the right
watermark_top string Placement of the watermark from the top
watermark_left string Placement of the watermark from the left
webtrekk_account webtrekk The associated Webtrekk object
ama_configuration ama The associated Akamai Media Analytics object
comscore_account comscore The associated Comscore object
nielsen_account nielsen The associated Nielsen object

Example of a request

curl -i -H "Accept: application/json" -H "Content-Type:application/json" -H "access-token: [your-access-token]" -H "X-HTTP-Method-Override: PUT" -X POST http://API_DOMAIN/rest/v2/bulk/2.json -d '
{
    "title": "New title"
}'
            

Example of a JSON response

{
    "id": "2",
    "title": "New title",
    "label": "bulk_label",
    "context_rules": [
        "*"
    ],
    "skin": "default",
    "created_at": "2018-05-03 18:41:34",
    "responsive": "1",
    "background_color":"000000",
    "background_image":"",	
    "player_color":"FFCE3E",
    "autoplay": "0",
    "mute": "0",
    "controlbar_visible": "1",
    "controlbar_auto_hide": "1",
    "seekable": "1",
    "preload": "1",
    "pip": "0",
    "wmode": "direct",
    "skip_preroll": "0",
    "skip_time": "5",
    "setting_volume": "-1",
    "desktop_player": "html5",
    "scrollmode_enabled": "0",
    "scrollmode_mute_on_mouse_over": "1",
    "scrollmode_destroy_on": [],
    "preroll": [
        {
	    "adv_type": "dart",
	    "id": "2",
	    "type": "linear",
	    "title": "DART title",
	    "source_url": "http://tag_dart.com",
	    "replace_rules": [
	        {
	            "subject": "[random-number]",
	            "value": "random-number"
	        },
	        {
	            "subject": "[url]",
	            "value": "url-video"
	        }
	    ],
	    "description": "description",
	    "created_at": "2018-06-11 15:51:54"
	},
        {
	    "adv_type": "dart",
	    "id": "2",
	    "type": "linear",
	    "title": "DART title",
	    "source_url": "http://tag_dart.com",
	    "replace_rules": [
	        {
	            "subject": "[random-number]",
	            "value": "random-number"
	        },
	        {
	            "subject": "[url]",
	            "value": "url-video"
	        }
	    ],
	    "description": "description",
	    "created_at": "2018-06-11 15:51:54"
	},
    ],
    "midroll": null,
    "postroll": null,
    "overlay_initial": {
        "adv_type": "dart",
        "id": "3",
        "type": "non-linear",
        "title": "Google example non-linear",
        "source_url": "http://pubads.g.doubleclick.net/gampad/ads?sz=400x300&iu=%2F6062%2Fiab_vast_samples&ciu_szs=300x250%2C728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&correlator=[timestamp]&cust_params=iab_vast_samples%3Dimageoverlay&adtest=on",
        "replace_rules": [],
        "description": "",
        "created_at": "2017-08-02 18:31:10",
        "after_time": 60,
        "stay_time": 30
    },
    "overlay_main": {
        "adv_type": "dart",
        "id": "3",
        "type": "non-linear",
        "title": "Google example non-linear",
        "source_url": "http://pubads.g.doubleclick.net/gampad/ads?sz=400x300&iu=%2F6062%2Fiab_vast_samples&ciu_szs=300x250%2C728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&correlator=[timestamp]&cust_params=iab_vast_samples%3Dimageoverlay&adtest=on",
        "replace_rules": [],
        "description": "",
        "created_at": "2017-08-02 18:31:10",
        "fixed": 0,
        "after_time": 10,
        "stay_time": 20,
        "delay_time": 60,
        "max_width": "300",
        "max_height": "250"
    },
    "mobile_preroll": [
        {
	    "adv_type": "dart",
	    "id": "2",
	    "type": "linear",
	    "title": "DART title",
	    "source_url": "http://tag_dart.com",
	    "replace_rules": [
	        {
	            "subject": "[random-number]",
	            "value": "random-number"
	        },
	        {
	            "subject": "[url]",
	            "value": "url-video"
	        }
	    ],
	    "description": "description",
	    "created_at": "2018-06-11 15:51:54"
	},
        {
	    "adv_type": "dart",
	    "id": "2",
	    "type": "linear",
	    "title": "DART title",
	    "source_url": "http://tag_dart.com",
	    "replace_rules": [
	        {
	            "subject": "[random-number]",
	            "value": "random-number"
	        },
	        {
	            "subject": "[url]",
	            "value": "url-video"
	        }
	    ],
	    "description": "description",
	    "created_at": "2018-06-11 15:51:54"
	},
    ],
    "mobile_midroll": null,
    "mobile_postroll": null,
    "mobile_overlay_initial": {
        "adv_type": "dart",
        "id": "3",
        "type": "non-linear",
        "title": "Google example non-linear",
        "source_url": "http://pubads.g.doubleclick.net/gampad/ads?sz=400x300&iu=%2F6062%2Fiab_vast_samples&ciu_szs=300x250%2C728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&correlator=[timestamp]&cust_params=iab_vast_samples%3Dimageoverlay&adtest=on",
        "replace_rules": [],
        "description": "",
        "created_at": "2017-08-02 18:31:10",
        "after_time": 60,
        "stay_time": 30
    },
    "mobile_overlay_main": {
        "adv_type": "dart",
        "id": "3",
        "type": "non-linear",
        "title": "Google example non-linear",
        "source_url": "http://pubads.g.doubleclick.net/gampad/ads?sz=400x300&iu=%2F6062%2Fiab_vast_samples&ciu_szs=300x250%2C728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&correlator=[timestamp]&cust_params=iab_vast_samples%3Dimageoverlay&adtest=on",
        "replace_rules": [],
        "description": "",
        "created_at": "2017-08-02 18:31:10",
        "fixed": 0,
        "after_time": 10,
        "stay_time": 20,
        "delay_time": 60,
        "max_width": "300",
        "max_height": "250"
    },

    "player_adv_manager": "ima",
    "ima_vpaid_mode": "ENABLED",
    "watermark": null,
    "watermark_width": null,
    "watermark_height": null,
    "watermark_opacity": null,
    "watermark_displaytime": null,
    "watermark_hide": "0",
    "watermark_link": null,
    "watermark_bottom": null,
    "watermark_right": null,
    "watermark_top": null,
    "watermark_left": null,
    "webtrekk_account": {
	    "id":"2",
	    "title":"Webtrekk title",
	    "track_id":"track_id",
	    "track_domain":"track_domain",
	    "mg":null,
	    "description":null,
	    "default":"1",
	    "created_at":"2013-02-06 18:12:03"
	},
    "ama_configuration": {
	    "id":"2",
	    "title":"Ama title",
	    "default":"1",
	    "description":null,
	    "url_beacon":"http://example.com/beacon.xml",
	    "created_at":"2013-05-18 17:00:37"
	},
    "comscore_account": {
		"id":"2",
		"title":"Comscore title",
		"clientid":"14267511",
		"adtrack_start":"",
		"adtrack_complete":"",
		"adtrack_standard":"",
		"default":"1",
		"description":null,
		"created_at":"2013-02-06 17:11:03",
	},
    "nielsen_account": {
	    "id":"2",
	    "title":"Nielsen title",
	    "clientid":"clientid",
	    "vcid":"vcid",
	    "cisuffix":"",
	    "sfcode":"it",
	    "prod":"prod",
	    "description":null,
	    "default":"1",
	    "created_at":"2013-02-06 18:12:03"
	}}            

Note The updated object will be returned as a response

Note The PUT method is not supported by all systems. In case of problems, add the parameter to the Header of the callX-HTTP-Method-Override: PUT and use the method POST as default

PHP SDK documentation
$merideApi = new Meride\Api('[your-auth-code]', 'http://API_DOMAIN/', 'v2');
$response = $merideApi->update('bulk', '2', array (
  'title' => 'New title',
));