Items
Create items
Create catalog items for recommendation.
POST
Description
Creates one or more catalog items. UsePOST /v1/items/{item_id} to update an existing item.
Request
id is optional. If omitted, NeuronSearchLab generates an opaque ID. The aliases item_id and itemId are also accepted, but only one ID field should be present.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | no | Item ID such as 7f3a2c9e. |
name | string | yes | Human-readable item name. |
description | string | no | Text used for embeddings and debugging. |
metadata | object | no | JSON object with filterable catalog attributes. |
Response
object: "list") whose data array contains every created item. A single-item request returns the item resource directly.
Errors
| Status | Scenario |
|---|---|
400 | Missing body, invalid JSON, missing name, or malformed id |
401 | Missing or invalid Bearer token |
403 | Token does not include neuronsearchlab-api/write |
409 | An item with the requested ID already exists |
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
- object
- object[]
Minimum string length:
1Example:
"Wireless Headphones"
Optional public item ID. If omitted, the API generates one.
Pattern:
^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$Example:
"7f3a2c9e"
Snake-case alias for id.
Pattern:
^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$CamelCase alias for id.
Pattern:
^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$Example:
"Noise-cancelling Bluetooth headphones."
Arbitrary JSON object used for filtering, ranking, and debugging.
Example:
{
"category": "electronics",
"brand": "Acme",
"price": 10999,
"currency": "usd"
}
Response
Created item or created item list
- Option 1
- Option 2
Pattern:
^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$Example:
"7f3a2c9e"
Available options:
item Example:
"Wireless Headphones"
Example:
"Noise-cancelling Bluetooth headphones."
Arbitrary JSON object used for filtering, ranking, and debugging.
Example:
{
"category": "electronics",
"brand": "Acme",
"price": 10999,
"currency": "usd"
}
Example:
true
Unix timestamp in seconds.
Example:
1777478400
Unix timestamp in seconds.
Example:
1777478500

