Deletes images.

If an image with the specified hash was not found, a code 271 error occurs. If the image is associated with an ad or has been shown at least once, a code 80 error occurs.

Attention. An error deleting an image causes the entire operation to be canceled, and none of the images will be deleted.

Input data

The input data structure in JSON is shown below.

   "method": "AdImage",
   "param": {
      /* AdImageRequest */
      "Action": (string),
      "SelectionCriteria": {
         /* AdImageSelectionCriteria */
         "Logins": [
         "AdImageHashes": [

Parameters are described below.

Parameter Description Required
AdImageRequest object
Action Action: Delete. Yes
SelectionCriteria The AdImageSelectionCriteria object, which contains criteria for selecting the images to delete. Yes
AdImageSelectionCriteria object

For agencies, an array containing a single element: the username of the client to perform the operation for.

For advertisers, this parameter is ignored.

For agencies
AdImageHashes Array containing the hashes of images (no more than 10,000). Yes

For agencies, it deletes images that match both criteria simultaneously: the image hash is specified in the AdImageHashes array, and the username of the image's owner is specified in the usernames array.

Output data

For a successful operation, an empty structure is returned:

{ }

Examples of input data


   'Action': 'Delete',
   'SelectionCriteria': {
      'Logins': ['agrom'],
      'AdImageHashes': ['c6da811f75221196dd5b1a8ca703344b','549c741215d67644e93ca8ef446df1fc']


   'Action' => 'Delete',
   'SelectionCriteria' => array(
      'Logins' => array('agrom'),
      'AdImageHashes' => array('c6da811f75221196dd5b1a8ca703344b','549c741215d67644e93ca8ef446df1fc')


   'Action' => 'Delete',
   'SelectionCriteria' => {
      'Logins' => ['agrom'],
      'AdImageHashes' => ['c6da811f75221196dd5b1a8ca703344b','549c741215d67644e93ca8ef446df1fc']