Publishing products
Request example
Obtain a PAT before sending requests.
For the initial upload, send products using update in batches of up to 10,000 events. Then send updates whenever product data changes.
Send a POST request to https://catalog.retailrocket.net/productCatalog/s2s/{partnerId}/events:publish.
Replace <PARTNER_ID> with your store identifier and <PAT> with your token. Replace the product and image URLs with URLs from your store.
curl --include --request POST \
'https://catalog.retailrocket.net/productCatalog/s2s/<PARTNER_ID>/events:publish' \
--header 'Authorization: Bearer <PAT>' \
--header 'Content-Type: application/json' \
--data-raw '{
"events": [
{
"update": {
"id": "100001",
"name": "Blue T-shirt",
"isAvailable": true,
"price": 1990,
"oldPrice": 2490,
"url": "https://shop.example.com/products/100001",
"pictureUrl": "https://shop.example.com/images/100001.jpg",
"stockId": "main",
"categories": [
{
"id": 120,
"name": "T-shirts",
"parent": {
"id": 100,
"name": "Clothing"
}
}
],
"params": [
{
"name": "Material",
"value": "Cotton"
}
]
}
}
]
}'
Every update must include the complete product record with all required fields. The operation replaces previously stored values. Do not use it to send only a changed price or availability flag.
Product fields
Required fields of the update object:
| Parameter | Type | Description |
|---|---|---|
id | string | Product identifier in your system. Must be a nonempty string. |
name | string | Product name. Must be a nonempty string. |
isAvailable | boolean | Availability: true for available, false for unavailable. |
price | number | Product price. |
url | string | URL of the product page. |
pictureUrl | string | URL of the product image. |
categories | array | Product categories. |
params | array | Additional product attributes. |
Optional fields:
| Parameter | Type | Description |
|---|---|---|
stockId | string | Stock or region identifier. Must be nonempty if provided. Learn more. |
oldPrice | number | Price before discount. |
description | string | Product description, up to 500 characters. |
vendor | string | Manufacturer or brand. |
groupId | string | Product group identifier. Learn more. |
barcode | string | Barcode. |
color | string | Color. |
size | string | Size. |
Categories
Pass the categories a product belongs to in categories. Each category contains an integer id (int64) and a name. Specify its parent in parent, using the same fields. For multiple levels, provide a chain of parent categories.
Retail Rocket builds the store category tree from product data, so specify the hierarchy accurately in parent.
Example categories field in an update object:
{
"categories": [
{
"id": 120,
"name": "T-shirts",
"parent": {
"id": 110,
"name": "Menswear",
"parent": {
"id": 100,
"name": "Clothing"
}
}
}
]
}
This product belongs to T-shirts in the hierarchy Clothing → Menswear → T-shirts. All three levels are sent as one categories element with nested parent objects. If a product belongs to several categories, send them as separate array elements.
Additional attributes
Pass product attributes in params. Each element contains a name and a value.
| Parameter | Type | Description |
|---|---|---|
name | string | Attribute name, from 1 to 300 characters. |
value | string | Attribute value, up to 500 characters. |
Example params field in an update object:
{
"params": [
{
"name": "Material",
"value": "Cotton"
},
{
"name": "Season",
"value": "Summer"
}
]
}
See Managing availability to mark a product as unavailable or restore it to stock. See Statuses and responses for HTTP statuses and error handling.