Skip to main content

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"
}
]
}
}
]
}'
Complete product update

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:

ParameterTypeDescription
idstringProduct identifier in your system. Must be a nonempty string.
namestringProduct name. Must be a nonempty string.
isAvailablebooleanAvailability: true for available, false for unavailable.
pricenumberProduct price.
urlstringURL of the product page.
pictureUrlstringURL of the product image.
categoriesarrayProduct categories.
paramsarrayAdditional product attributes.

Optional fields:

ParameterTypeDescription
stockIdstringStock or region identifier. Must be nonempty if provided. Learn more.
oldPricenumberPrice before discount.
descriptionstringProduct description, up to 500 characters.
vendorstringManufacturer or brand.
groupIdstringProduct group identifier. Learn more.
barcodestringBarcode.
colorstringColor.
sizestringSize.

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.

ParameterTypeDescription
namestringAttribute name, from 1 to 300 characters.
valuestringAttribute 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.