Create or update products
- Path
/products- Auth
- Secret key · server only
const url = 'https://releva.ai/api/v0/products';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"products":[{"id":"DEMO-1001","name":"Linen Summer Shirt","locale":"en","currency":"EUR","listPrice":39.9,"categories":["Men/Shirts"],"available":true,"url":"https://demo-store.example.com/products/linen-summer-shirt","imageUrl":"https://demo-store.example.com/images/linen-summer-shirt.jpg"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://releva.ai/api/v0/products \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "products": [ { "id": "DEMO-1001", "name": "Linen Summer Shirt", "locale": "en", "currency": "EUR", "listPrice": 39.9, "categories": [ "Men/Shirts" ], "available": true, "url": "https://demo-store.example.com/products/linen-summer-shirt", "imageUrl": "https://demo-store.example.com/images/linen-summer-shirt.jpg" } ] }'Creates or updates products in the catalog of the domain that owns the secret key.
A product is identified by its id within the domain only (locale and market are not part of the key),
so each language or market version needs its own id.
Processing is asynchronous: a 202 means the products were queued. They are usually searchable within
about 10 seconds. Omitted optional fields keep their stored value, except discountPrice (cleared),
custom and variants (replaced), and locale/currency (reset to the domain default).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Unique within the domain across all locales and markets.
ISO-4217 currency code. Defaults to the domain currency.
Sale price. Omit when not on sale; omitting it clears a stored value. Should be lower than listPrice (not enforced).
Category paths separated by /, e.g. Men/Shirts. May be empty.
ISO-8601 date-time with seconds and timezone offset, optional milliseconds (max 3 digits).
ISO-639-1 two-letter language code. Defaults to the domain locale.
Your identifier for the market this product document belongs to.
ISO-3166-1 alpha-2 country codes, upper case.
Arbitrary non-searchable data returned with recommendations.
object
Canonical URL without locale or market prefix. Falls back to url.
Defaults to the domain’s default product image.
object
object
Shared id of all documents of one product. Only used together with a non-empty variants array.
Replaced on every write. When omitted, one variant is created from the product fields.
object
object
Replaced on every write. Category levels (category_level_N) are added automatically.
object
object
object
object
Accepted for backwards compatibility. Has no effect.
Example
{ "products": [ { "id": "DEMO-1001", "name": "Linen Summer Shirt", "locale": "en", "currency": "EUR", "listPrice": 39.9, "categories": [ "Men/Shirts" ], "available": true, "url": "https://demo-store.example.com/products/linen-summer-shirt", "imageUrl": "https://demo-store.example.com/images/linen-summer-shirt.jpg" } ]}Responses
Section titled “Responses”Accepted for asynchronous processing.
object
Example
{}Authentication or validation error.
object
Human-readable error. Several validation errors are joined with a space.
Examples
{ "message": "Authorization header is missing."}{ "message": "Domain with the provided secret key cannot be found."}{ "message": "The object 'products[0]' contains forbidden keys: 'color'."}{ "message": "The 'products[0].stockQuantity' field must be an integer."}{ "message": "products[0].locale must be a valid ISO-639-1 code! Got en-US instead."}{ "message": "The '' field is required."}The domain is disabled.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "Domain is disabled. Please reach out to support@releva.ai to enable it."}Request body larger than 800 KB.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "request entity too large"}Unexpected server error.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "An internal error occurred."}