div-patch
Edits the element.
Parameters
| Parameters | Description | 
|---|---|
| changes | array Required parameter. Element changes. An array must not be empty. | 
| mode | string Procedure for applying changes: transactional— if an error occurs during application of at least one element, the changes aren't applied.partial— all possible changes are applied. If there are errors, they are reported.Possible values:  Default value:  Available platforms: Android, iOS, web. | 
| on_applied_actions | array Actions to perform after changes are applied. Available platforms: Android, iOS, web. | 
| on_failed_actions | array Actions to perform if there’s an error when applying changes in transaction mode. Available platforms: Android, iOS, web. | 
change
| Parameters | Description | 
|---|---|
| id | string Required parameter. ID of an element to be replaced or removed. | 
| items | array Elements to be inserted. If the parameter isn't specified, the element will be removed. List of possible values: | 
JSON
{
  changes*: [
    {
      id*: "string",
      items: [ div, ... ]
    },
    ...
  ],
  mode: "string",
  on_applied_actions: [
    {
      download_callbacks: {
        on_fail_actions: [ div-action, ... ],
        on_success_actions: [ div-action, ... ]
      },
      is_enabled: "bool_int",
      log_id*: "string",
      log_url: "string",
      menu_items: [
        {
          action: div-action,
          actions: [ div-action, ... ],
          text*: "string"
        },
        ...
      ],
      payload: "object",
      referer: "string",
      scope_id: "string",
      target: "string",
      typed: div-action-typed,
      url: "string"
    },
    ...
  ],
  on_failed_actions: [
    {
      download_callbacks: {
        on_fail_actions: [ div-action, ... ],
        on_success_actions: [ div-action, ... ]
      },
      is_enabled: "bool_int",
      log_id*: "string",
      log_url: "string",
      menu_items: [
        {
          action: div-action,
          actions: [ div-action, ... ],
          text*: "string"
        },
        ...
      ],
      payload: "object",
      referer: "string",
      scope_id: "string",
      target: "string",
      typed: div-action-typed,
      url: "string"
    },
    ...
  ]
}
Was the article helpful?
Previous
Next