Skip to main content

Bulk Delete SKU Orders for Target Plus Orders

POST 

/api/target-plus/:integrationInstance/orders/bulk-delete-sku-orders

Deletes the SKU.io sales orders linked to the chosen Target Plus orders and keeps the Target Plus orders, now unlinked. Orders without a linked sales order are ignored, and nothing changes on Target. A sales order that may not be deleted (for example it has received returns, PayPal payments or credits) is skipped and reported; the rest are still deleted.

Required scope: integrations:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Unlinked orders that are still eligible are turned into SKU.io sales orders again by the automatic order creation; send archive_target_plus_orders: true to archive the Target Plus orders as well, so that does not happen.

One linked order is handled right away (tracked_job_log_id is null; 422 with the reason when its sales order may not be deleted). Two or more run as a background job: the response returns the tracked job ID and the number of sales orders queued. count is 0 when none of the chosen orders has a linked sales order.

Body: mode (optional, selected (default) or all), ids (array of order IDs, required unless mode is all, max 5000), filters (optional object, used when mode is all: the same filter keys List Target Plus Orders accepts, without the filter[...] wrapper, e.g. {"needs_action": "unmapped_product"}), archive_target_plus_orders (optional boolean, default false). IDs that belong to another integration are ignored. Archived orders are excluded from mode: all unless filters includes an archived filter.

Request​

Responses​

OK

Response Headers
    Content-Type