Private Products API
-
Get products
Get products
HTTP method: GET
Authentication: Business user OAuth Token
URL: https://api.trustpilot.com/v1/private/business-units/{businessUnitId}/products
Parameters
-
businessUnitId, Required string
The BusinessUnitId that owns the products.
Example: .../v1/private/business-units/{businessUnitId}/products
-
skus, Optional array
Optional sku filter for products.
Example: ?skus={skus}
-
groupId, Optional string
Optional group id filter for products. When sku filter is given, the group id filter is ignored.
Example: ?groupId={groupId}
-
page, Optional integer
The page to retrieve.
Example: ?page={page}
-
perPage, Optional integer
The number of products to retrieve per page.
Example: ?perPage={perPage}
-
locale, Optional string
The language in which the attributes attached to the products, if any, are returned
Example: ?locale={locale}
curl -X GET "https://api.trustpilot.com/v1/private/business-units/{businessUnitId}/products" \-H "Authorization: Bearer YOUR-ACCESS-TOKEN"Response
{"products": [{"id": "507f191e810c19729de860ea","sku": "Prod123","googleMerchantCenterProductId": "Product_DK_1007653571_2874605123","title": "Toy car","link": "http://myshop.com/products/toy-car","imageLink": "http://myshop.com/products/images/toy-car.jpg","processedImages": [{"type": "100pxWide","url": "https://product-reviews-images.trustpilot.com/5837640412df3f0aabf9989a_100pxWide.png"}],"businessUnitId": "507f191e810c19729de860ea","price": "99.95","gtin": "3200000003774","mpn": "HSC0424PP","brand": "ToyProducer","currency": "EUR","description": "A metal toy car","productCategory": {"id": "507f191e810c19729de860ea","name": "Clothing"},"attributes": [{"id": "attributes-default-comfort","name": "Comfort","type": "range_1to5","options": [null]}],"groupId": "123456","variationAttributes": {"color": "blue","pattern": "striped","material": "suede","ageGroup": "adult","gender": "female","size": "XS","customVariationAttributes": [{"key": null,"value": null}]}}],"isLastPage": false} -
-
Batch upsert products
Insert or update (if they already exist) a batch of products
HTTP method: POST
Authentication: Business user OAuth Token
URL: https://api.trustpilot.com/v1/private/business-units/{businessUnitId}/products
Parameters
-
businessUnitId, Required string
The BusinessUnitId that owns the products.
Example: .../v1/private/business-units/{businessUnitId}/products
curl -X POST "https://api.trustpilot.com/v1/private/business-units/{businessUnitId}/products" \-H "Content-Type: application/json" \-d '{"products": [{"sku": "Prod123","googleMerchantCenterProductId": "Product_DK_1007653571_2874605123","title": "Toy car","link": "http://myshop.com/products/toy-car","imageLink": "http://myshop.com/products/images/toy-car.jpg","price": "99.95","currency": "USD","gtin": "3200000003774","mpn": "HSC0424PP","brand": "ToyProducer","categoryTags": ["example"],"tags": ["example"],"additionalImageLinks": ["example"],"videoLink": "example","productMetaItems": [{"key": "example","value": "example"}],"description": "A very soft shoe built for walking long distances.","manufacturer": "Company Name","productCategoryGoogleId": "1267","groupId": "123456","variationAttributes": {"color": "blue","pattern": "striped","material": "suede","ageGroup": "adult","gender": "female","size": "XS","customVariationAttributes": [{"key": "example","value": "example"}]}}],"skuSameAsGoogleMerchantCenterProductId": true}' \-H "Authorization: Bearer YOUR-ACCESS-TOKEN"Request Body
{"products": [{"sku": "Prod123","googleMerchantCenterProductId": "Product_DK_1007653571_2874605123","title": "Toy car","link": "http://myshop.com/products/toy-car","imageLink": "http://myshop.com/products/images/toy-car.jpg","price": "99.95","currency": "USD","gtin": "3200000003774","mpn": "HSC0424PP","brand": "ToyProducer","categoryTags": [null],"tags": [null],"additionalImageLinks": [null],"videoLink": null,"productMetaItems": [{"key": null,"value": null}],"description": "A very soft shoe built for walking long distances.","manufacturer": "Company Name","productCategoryGoogleId": "1267","groupId": "123456","variationAttributes": {"color": "blue","pattern": "striped","material": "suede","ageGroup": "adult","gender": "female","size": "XS","customVariationAttributes": [{"key": null,"value": null}]}}],"skuSameAsGoogleMerchantCenterProductId": true}Response
{"products": [{"id": "507f191e810c19729de860ea","sku": "Prod123","googleMerchantCenterProductId": "Product_DK_1007653571_2874605123","title": "Toy car","description": "A metal toy car","link": "http://myshop.com/products/toy-car","imageLink": "http://myshop.com/products/images/toy-car.jpg","processedImages": [{"type": "100pxWide","url": "https://product-reviews-images.trustpilot.com/5837640412df3f0aabf9989a_100pxWide.png"}],"price": "99.95","currency": "EUR","gtin": "3200000003774","mpn": "HSC0424PP","brand": "ToyProducer","groupId": "123456","variationAttributes": {"color": "blue","pattern": "striped","material": "suede","ageGroup": "adult","gender": "female","size": "XS","customVariationAttributes": [{"key": null,"value": null}]}}]} -