Items
The following methods allow you to maintain the set of items in the catalog. The items are specified using their ids, which are unique string identifiers matching ^[a-zA-Z0-9_-:@.]+$, i.e., they may consist of digits, Latin letters, underscores, colons, minus signs, at signs, and dots. Item ID undefined is forbidden.
Add Item
Adds a new item of the given itemId to the items catalog.
All the item properties for the newly created item are set to null.
Parameters
ID of your database.
ID of the item to be created.
Responses
Successful operation.
The itemId does not match ^[a-zA-Z0-9_-:@.]+$.
The itemId is already present in the item catalog. In many cases, you may consider this code a success – it only tells you that nothing has been written to the database.
Delete Item
Deletes an item of the given itemId from the catalog.
If there are any purchases, ratings, bookmarks, cart additions, or detail views of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some series, it will be removed from all the series where present.
If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and only exclude the item from recommendations. In such a case, use ReQL filter instead of deleting the item completely.
Parameters
ID of your database.
ID of the item to be deleted.
Responses
Successful operation.
The itemId does not match ^[a-zA-Z0-9_-:@.]+$.
The itemId is not present in the item catalog. In many cases, you may consider this code a success – it only tells you that nothing has been deleted from the database since the item was already not present. If there is no additional info in the JSON response, you probably have an error in your URL.
List Items
Gets a list of IDs of items currently present in the catalog.
Parameters
ID of your database.
Boolean-returning ReQL expression, which allows you to filter items to be listed. Only the items for which the expression is true will be returned.
The number of items to be listed.
Specifies the number of items to skip (ordered by itemId).
With returnProperties=true, property values of the listed items are returned along with their IDs in a JSON dictionary.
Example response:
[
{
"itemId": "tv-178",
"description": "4K TV with 3D feature",
"categories": ["Electronics", "Televisions"],
"price": 342,
"url": "myshop.com/tv-178"
},
{
"itemId": "mixer-42",
"description": "Stainless Steel Mixer",
"categories": ["Home & Kitchen"],
"price": 39,
"url": "myshop.com/mixer-42"
}
]Allows specifying which properties should be returned when returnProperties=true is set. The properties are given as a comma-separated list.
Example response for includedProperties=description,price:
[
{
"itemId": "tv-178",
"description": "4K TV with 3D feature",
"price": 342
},
{
"itemId": "mixer-42",
"description": "Stainless Steel Mixer",
"price": 39
}
]Responses
Successful operation.
If present, filter contains a non-existing item property.
Delete More Items
Deletes all the items that pass the filter.
If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful) and only exclude the item from recommendations. In such a case, use ReQL filter instead of deleting the item completely.
Parameters
ID of your database.
A ReQL expression, which returns true for the items that shall be updated.
Responses
Successful operation.
Invalid filter.