Add items to a collection

šŸ” This endpoint requires HTTP authentication (either Basic or Bearer). For authenticating with Bearer token, required scopes are: collections(w).

Add items to a collection, or update existing items. Items already in the collection are updated, others are added. Note that the total number of items per collection is limited, and the request will fail if adding items would exceed this limit.

Path Params
string
required
Query Params
string
required
length between 1 and 100

The key of the index to use.

string
length between 1 and 100

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

string
length between 1 and 100

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

string
enum
Defaults to FAIL

The strategy for handling items or variations that do not exist in the catalog. FAIL (default) returns an error if any items or variations are missing. IGNORE silently skips missing items and missing variations from the request. CREATE adds items to the collection even if they or their variations don't exist in the catalog yet (allows future item/variation IDs).

Allowed:
Body Params
items
array of objects
required
length ≤ 100

A list of item IDs to add to the collection.

Items*
Responses

400

Validation Error

401

Credentials are not passed or action is forbidden.

403

The supplied token does not have the required permissions.

404

Not Found

429

Rate limit breached

Language
Credentials
:
LoadingLoading…
Response
Choose an example:
application/json