ποΈ Commerce
- Catalog
- Carts
- Coupons & Promotions
- Orders
- Shipping
- Payments
- Subscriptions
π Customers
- Auth
- Customers
- KYC
ποΈ Engagement & Retention
- Campaigns
- Analytics
π§° Utilities
- Common
Catalog
Retrieve similar products
Retrieves a list of products similar to a specified product based on their attributes and category. The similar products are returned sorted by relevance, with the most closely matching products appearing first. Useful for providing product recommendations to your customers.
GET
/
catalog
/
products
/
similar
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/catalog/products/similar \
--header 'Authorization: Bearer <token>'
{
"message": "<string>",
"success": true,
"content": {
"products": [
{
"product_id": "<string>",
"variant_id": "<string>",
"sku": "<string>",
"slug": "<string>",
"product_name": "<string>",
"variant_name": "<string>",
"product_type": "physical",
"short_description": "<string>",
"active": true,
"stock_available": true,
"backorder": true,
"on_offer": true,
"on_subscription": true,
"on_promotion": true,
"category_ids": [
"<string>"
],
"tags": [
"<string>"
],
"reviews_count": 123,
"reviews_rating_sum": 123,
"attributes": [
{
"id": "<string>",
"name": "<string>",
"key": "<string>",
"type": "color",
"value": [
{
"name": "<string>",
"hexcode": "<string>"
}
]
}
],
"images": [
{
"id": "<string>",
"title": "<string>",
"alternate_text": "<string>",
"sort_order": 123,
"url_tiny": "<string>",
"url_thumbnail": "<string>",
"url_standard": "<string>",
"url_zoom": "<string>"
}
],
"pricing": {
"currency": "<string>",
"tax_type": "GST",
"tax_rate": 123,
"price_including_tax": false,
"listing_price": 123,
"selling_price": 123,
"min_order_quantity": 1,
"max_order_quantity": 123,
"incremental_quantity": 1,
"selling_price_excluding_tax": 123
},
"promotion": {
"id": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"details": {
"promotion_type": "discount",
"discount_type": "percentage",
"discount_percent": 123,
"discount_fixed_amount": 123
}
},
"subscription": [
{
"id": "<string>",
"subscription_plan": "<string>",
"subscription_price": 123,
"billing_interval": 123,
"billing_frequency": "monthly",
"billing_limit": 123,
"fulfill_separately": false,
"order_interval": 123,
"order_frequency": "monthly",
"order_limit": 123,
"minimum_quantity": 123,
"billing_trial_days": 123
}
],
"associated_options": {
"background_color": {
"name": "Background Color",
"value": {
"name": "Blue",
"hexcode": "#0000FF"
},
"type": "color"
},
"size": {
"name": "Size",
"value": "Large",
"type": "single-select"
}
},
"shipping": {
"handling_charges_including_tax": 123,
"handling_charges_excluding_tax": 123,
"tax_type": "<string>",
"tax_rate": 123
}
}
],
"pagination": {
"total_records": 252,
"total_pages": 26,
"previous_page": null,
"next_page": 2,
"limit": 10
}
}
}
Authorizations
Access token
Query Parameters
to retrieve similar products of specified products
page number in pagination
no of rows per page
json to sort records
Response
200
application/json
Success response
The response is of type object
.
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/catalog/products/similar \
--header 'Authorization: Bearer <token>'
{
"message": "<string>",
"success": true,
"content": {
"products": [
{
"product_id": "<string>",
"variant_id": "<string>",
"sku": "<string>",
"slug": "<string>",
"product_name": "<string>",
"variant_name": "<string>",
"product_type": "physical",
"short_description": "<string>",
"active": true,
"stock_available": true,
"backorder": true,
"on_offer": true,
"on_subscription": true,
"on_promotion": true,
"category_ids": [
"<string>"
],
"tags": [
"<string>"
],
"reviews_count": 123,
"reviews_rating_sum": 123,
"attributes": [
{
"id": "<string>",
"name": "<string>",
"key": "<string>",
"type": "color",
"value": [
{
"name": "<string>",
"hexcode": "<string>"
}
]
}
],
"images": [
{
"id": "<string>",
"title": "<string>",
"alternate_text": "<string>",
"sort_order": 123,
"url_tiny": "<string>",
"url_thumbnail": "<string>",
"url_standard": "<string>",
"url_zoom": "<string>"
}
],
"pricing": {
"currency": "<string>",
"tax_type": "GST",
"tax_rate": 123,
"price_including_tax": false,
"listing_price": 123,
"selling_price": 123,
"min_order_quantity": 1,
"max_order_quantity": 123,
"incremental_quantity": 1,
"selling_price_excluding_tax": 123
},
"promotion": {
"id": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"details": {
"promotion_type": "discount",
"discount_type": "percentage",
"discount_percent": 123,
"discount_fixed_amount": 123
}
},
"subscription": [
{
"id": "<string>",
"subscription_plan": "<string>",
"subscription_price": 123,
"billing_interval": 123,
"billing_frequency": "monthly",
"billing_limit": 123,
"fulfill_separately": false,
"order_interval": 123,
"order_frequency": "monthly",
"order_limit": 123,
"minimum_quantity": 123,
"billing_trial_days": 123
}
],
"associated_options": {
"background_color": {
"name": "Background Color",
"value": {
"name": "Blue",
"hexcode": "#0000FF"
},
"type": "color"
},
"size": {
"name": "Size",
"value": "Large",
"type": "single-select"
}
},
"shipping": {
"handling_charges_including_tax": 123,
"handling_charges_excluding_tax": 123,
"tax_type": "<string>",
"tax_rate": 123
}
}
],
"pagination": {
"total_records": 252,
"total_pages": 26,
"previous_page": null,
"next_page": 2,
"limit": 10
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.