REST APIeasy-svg-pro/v1/bulk/copy

easy-svg-pro/v1/bulk/copy

Copies chosen icons into an icon set without overwriting names already there.

REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/bulk/bulk.php

Internal: not part of the promised public surface. It may change without notice.

Usage

POST /wp-json/easy-svg-pro/v1/bulk/copy

Example

curl -X POST "https://example.com/wp-json/easy-svg-pro/v1/bulk/copy" \
	-H "X-WP-Nonce: $NONCE" -b "$COOKIES" \
	-H "Content-Type: application/json" \
	-d '{"icons": ["easy-svg/arrow"], "set_id": 42}'

Description

Reads the markup of every chosen icon from the inventory and merges it into the target set additively, the same write the set editor uses. An icon whose slug already exists in the target is reported as exists and left alone. At most 500 icons per call.

Permission: manage_options and an active licence with the Bulk editing feature switched on under Icons, Features.

Parameters

body
iconsstring[]
Required

The icon references to act on, as collection/slug.

body
set_idinteger
Required

The icon set to copy or move into. Minimum 1.

Return value

returnobject

{report: [{icon, state}]} with state copied, exists or no_markup. 404 easy_svg_pro_no_set when set_id is not an icon set.

Response

{report: [{icon, state}]} with state copied, exists or no_markup. 404 easy_svg_pro_no_set when set_id is not an icon set.

{
  "report": [
    {
      "icon": "arrow",
      "state": "copied"
    }
  ]
}