POST /v2/indices/{index public key}/recommendations-datasets/{dataset name}/events:batch
Send data to index about items viewed together.
Parameter | Description | Type | Notes |
---|---|---|---|
Public key | The public site key | string | A site key is an identifier of your AddSearch account that can be found in the dashboard |
Dataset name | The name of the dataset | string | Dataset name is a name chosen to represent the type of data being sent, e.g. "shopping-cart". |
{ "events": [ { "transaction": "tx1", "item": "DKO-PROF1", "time": "2022-02-26" }, { "transaction": "tx1", "item": "HEP-91331", "time": "2022-02-26" }, { "transaction": "tx1", "item": "BCO-2208", "time": "2022-02-26" }, { "transaction": "tx2", "item": "HEP-91331", "time": "2022-02-26" }, { "transaction": "tx2", "item": "BCO-2208", "time": "2022-02-26" } ] }
Field | Description | Type | Notes |
---|---|---|---|
transaction | Unique id for the group where the item appears | string | E.g. an unique identifier for the shopping cart where the item was added to. |
item | Item's id | string | E.g. product id. |
time | Date of the event | string | ISO 8601 date time string. E.g. "2023-12-31", and "2023-12-31T12:30−02:00" |
Successful request returns HTTP/1.1 200 OK.
We’re always happy to help with code or other questions you might have. Search our documentation, contact support, or connect with our sales team.