Series

Items in the catalog may be organized into series, expressing an explicit, known ordering of items, if there is any. Typical examples of series may be consecutive TV show episodes, book titles, etc.

Each item may be added to zero or more series, and a series may also be added into another series, resulting in a "meta-series". This may be useful for modeling ordered seasons of a TV show that has the episodes in each season themselves ordered.

Methods for managing series - creating, listing, and deleting them.

put

Creates a new series in the database.

Copy
Initialization
client.send(new requests.AddSeries(seriesId, {
  // optional parameters:
  cascadeCreate: true,  // boolean
}));

String
Located in: path
Required: Yes

ID of your database.


String
Located in: path
Required: Yes

ID of the series to be created.


Boolean
Located in: body
Required: No

If set to true, the item will be created with the same ID as the series. Default is true.


Successful operation.


The seriesId does not match ^[a-zA-Z0-9_-:@.]+$.


Series of the given seriesId is already present in the database. In many cases, you may consider this code a success – it only tells you that nothing has been written to the database.


delete

Deletes the series of the given seriesId from the database.

Deleting a series will only delete assignment of items to it, not the items themselves!

Copy
Initialization
client.send(new requests.DeleteSeries(seriesId, {
  // optional parameters:
  cascadeDelete: false,  // boolean
}));

String
Located in: path
Required: Yes

ID of your database.


String
Located in: path
Required: Yes

ID of the series to be deleted.


Boolean
Located in: body
Required: No

If set to true, item with the same ID as seriesId will be also deleted. Default is false.


Successful operation.


The seriesId does not match ^[a-zA-Z0-9_-:@.]+$.


Series of the given seriesId is not present in the database. In many cases, you may consider this code a success – it only tells you that nothing has been deleted from the database since the series was already not present. If there is no additional info in the JSON response, you probably have an error in your URL.


get

Gets the list of all the series currently present in the database.

Copy
Initialization
const result = await client.send(new requests.ListSeries());

100

String
Located in: path
Required: Yes

ID of your database.


Successful operation.

[
  "series-1",
  "series-2",
  "series-3"
]

Invalid URL.


Methods for adding items (or even series themselves) to series.

get

Lists all the items present in the given series, sorted according to their time index values.

Copy
Initialization
const result = await client.send(new requests.ListSeriesItems(seriesId));

String
Located in: path
Required: Yes

ID of your database.


String
Located in: path
Required: Yes

ID of the series whose items are to be listed.


Successful operation.

[
  {
    "itemType": "item",
    "itemId": "item-x",
    "time": 1
  },
  {
    "itemType": "item",
    "itemId": "item-y",
    "time": 2
  },
  {
    "itemType": "item",
    "itemId": "item-z",
    "time": 3
  }
]

The seriesId does not match ^[a-zA-Z0-9_-:@.]+$.


Series of the given seriesId is not present in the database. If there is no additional info in the JSON response, you probably have an error in your URL.


post

Inserts an existing item/series into a series of the given seriesId at a position determined by time.

Copy
Initialization
client.send(new requests.InsertToSeries(seriesId, itemType, itemId, time, {
  // optional parameters:
  cascadeCreate: true,  // boolean
}));

String
Located in: path
Required: Yes

ID of your database.


String
Located in: path
Required: Yes

ID of the series to be inserted into.


String
Located in: body
Required: Yes

item iff the regular item from the catalog is to be inserted, series iff series is inserted as the item.


String
Located in: body
Required: Yes

ID of the item iff itemType is item. ID of the series iff itemType is series.


Number
Located in: body
Required: Yes

Time index used for sorting items in the series. According to time, items are sorted within series in ascending order. In the example of TV show episodes, the episode number is a natural choice to be passed as time.


Boolean
Located in: body
Required: No

Indicates that any non-existing entity specified within the request should be created (as if corresponding PUT requests were invoked). This concerns both the seriesId and the itemId. If cascadeCreate is set to true, the behavior also depends on the itemType. In case of item, an item is created, in case of series a series + corresponding item with the same ID is created.


Successful operation.


seriesId or itemId does not match ^[a-zA-Z0-9_-:@.]+$, or itemType∉{item,series}, or time is not a real number.


Series of the given seriesId is not present in the database. Item of the given itemId is not present in the database if itemType is item. Series of the given itemId is not present in the database if itemType is series. If there is no additional info in the JSON response, you probably have an error in your URL.


A series item of the exact same (itemType, itemId, time) is already present in the series of seriesId. In many cases, you may consider this code a success – it only tells you that nothing has been written to the database.


delete

Removes an existing series item from the series.

Copy
Initialization
client.send(new requests.RemoveFromSeries(seriesId, itemType, itemId));

String
Located in: path
Required: Yes

ID of your database.


String
Located in: path
Required: Yes

ID of the series from which a series item is to be removed.


String
Located in: body
Required: Yes

Type of the item to be removed.


String
Located in: body
Required: Yes

ID of the item iff itemType is item. ID of the series iff itemType is series.


Successful operation.


The seriesId or itemId does not match ^[a-zA-Z0-9_-:@.]+$ or itemType∉{item, series}.


Series of the given seriesId is not present in the database. Series item given by pair (itemType, itemId) is not present in series of seriesId. If there is no additional info in the JSON response, you probably have an error in your URL.


© Copyright 2026, Recombee s.r.o
docs.recombee.com