The above commands return a 204 Success response on success.
An add or update operation (also known as an
UPSERT) updates an item in your index if it already exists, or adds the item to your index if it does not yet exist.
To add or update an item in your index, use the
PUT /item call, with
?force=1. Options are the same as for the standard
Add an Item call:
section are required and all other parameters are optional.
We determine whether an item already exists based on the optional
id set for the item, or if not present, the
PUT https://ac.cnstrc.com/v1/item?force=1&key=[your API key]
|item_name||Yes||The name of the item, as it will appear in the results|
|section||Yes||Your autosuggest and search results can have multiple sections like "Products" and "Search Suggestions". This indicates which section this item is for. See your dashboard for the section names to use.|
|suggested_score||No||A number between 1 and 100 million that will influence the item's initial ranking relative to other item scores (the higher the score, the higher in the list of suggestions the item will appear)|
|keywords||No||An array of keywords for this item. Keywords are useful if you want a product name to appear when a user enters a searchterm that isn't in the product name itself.|
|url||No||A URL to directly send the user after selecting the item|
|image_url||No||A URL that points to an image you'd like displayed next to some item (only applicable when url is supplied)|
|description||No||A description for some item (only applicable when url is supplied)|
|id||No||An arbitrary ID you would like associated with this item. You can use this field to store your own IDs of the items to more easily access them in other API calls.|
|metadata||No||You can associate schema-less data with items by passing in an array of keys and values. To configure search and display of this data reach out to firstname.lastname@example.org.|
|facets||No||key/value pairs that can be associated with an item and used to filter them during a search. You can associate multiple values with the same key, by making values a list. Facets can be used as filters in search, autosuggest, and browse requests.|
|group_ids||No||You can associate each item with one or more groups (i.e. categories). To set up a group hierarchy please contact email@example.com.|