Skip to content

Change many products at once

POST
/api/v1/workspaces/{workspaceId}/product-bulk-actions
curl --request POST \
--url https://api.crossmart.io/api/v1/workspaces/example/product-bulk-actions \
--header 'Content-Type: application/json' \
--data '{ "productIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "action": "set_status", "status": "DRAFT", "tags": [ "example" ], "percent": 1 }'

Set a status, add or remove tags, move every variant price by a percentage, or delete. Each action runs as one statement, scoped to the workspace.

workspaceId
required
string
Media typeapplication/json
object
productIds
required
Array<string>
<= 250 items
action
required
string
Allowed values: set_status add_tags remove_tags adjust_prices delete
status

Required for set_status

string
Allowed values: DRAFT ACTIVE ARCHIVED
tags

Required for add_tags and remove_tags

Array<string>
percent

Required for adjust_prices. 10 raises every price by 10%, -15 lowers it by 15%.

number
>= -90 <= 500
Media typeapplication/json
object
affected
required

Products changed. Ids from other workspaces are not counted.

number

Example generated

{
"affected": 1
}