younifyd
Menu

Delete items from a collection

Delete items from a collection

DELETE/v1/collections/{collection_id}/items

Use it in a workflow

  1. Add a step and choose the Constructor connector.
  2. Pick the Delete items from a collection action (under Collections).
  3. Fill in the fields below, then reference the result from later steps as {{deleteItemsFromACollection.response.data}}.

Request

Path parameters

collection_idstringrequired

Query parameters

sectionstring

The section of the index to use. Defaults to `Products`.

cstring

The ID of the client and version that the request is coming from, such as `cio-js-2.90`.

Request body

Enter the body as JSON in the step's Body field.

itemsarray<object>required

A list of item ids to delete from the collection. Warning: If no body or an empty body is provided, all items in the collection will be deleted.

idstringrequired

The ID of the item, must be unique.

sourcestring

Arbitrary identifier of the source of the item manually added to the collection.

variation_idsarray<string>

List of variation IDs to include in this collection for the item. If not provided, all variations of the item are included.

json
{
  "items": [
    {
      "id": "string",
      "source": "string",
      "variation_ids": [
        "string"
      ]
    }
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{deleteItemsFromACollection.response.data.<field>}}.

itemsarray<object>
idstringrequired

The ID of the item, added to the collection.

sourcestring

Arbitrary identifier of the source of the item manually added to the collection.

variation_idsarray<string>

List of variation IDs to include in this collection for the item. If not provided, all variations of the item are included.

created_atstring (date-time)

Collection Item creation date in ISO 8601 format. Present only for manually added items.

updated_atstring (date-time)

Collection Item update date in ISO 8601 format. Present only for manually added items.

typeany

Describes the method of addition for the item - `manual` if it was manually added to the collection, dynamic if it matches collection's filter expression.

Default "manual"

json
{
  "items": [
    {
      "id": "string",
      "source": "string",
      "variation_ids": [
        "string"
      ],
      "created_at": "2025-01-01T00:00:00Z",
      "updated_at": "2025-01-01T00:00:00Z",
      "type": "manual"
    }
  ]
}

Need more? See the Constructor guide for connection setup and behaviour shared by every action.