API Documentation
Authentication APIs
- Login & Register
- Create & Manage Users
Catalog APIs
- GETList all products
- GETList all skus
- GETRetrieve a product
- GETRetrieve product variants
- GETRetrieve variant detail
- GETList all categories
- GETRetrieve product reviews
- POSTCreate product review
- GETRetrieve similar products
- GETRetrieve up sell products
- GETRetrieve cross sell products
- GETRetrieve recommended products
- POSTDatocms webhook
Cart & Checkout APIs
- Cart
- Checkout
Coupons & promotions API
Customers API
Orders APIs
Shipping APIs
Analytics
Campaigns API
Retrieve variant detail
curl --request GET \
--url https://services.commercengine.dev/api/v1/x2yh61zw4k/storefront/catalog/products/{product_id}/variants/{variant_id} \
--header 'Authorization: Bearer <token>'
{
"message": "Products retrieved successfully.",
"success": true,
"content": {
"variant": {
"id": "<string>",
"name": "<string>",
"short_description": "<string>",
"description": "<string>",
"stock_available": true,
"associated_options": {},
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
],
"sku": "<string>",
"pricing": {
"currency": "<string>",
"tax_region": "<string>",
"tax_type": "GST",
"tax_rate": 123,
"price_including_tax": false,
"listing_price": 123,
"selling_price": 123,
"min_order_quantity": 123,
"max_order_quantity": 123
},
"images": [
{
"title": "<string>",
"alternate_text": "<string>",
"sort_order": 123,
"url_tiny": "<string>",
"url_thumbnail": "<string>",
"url_standard": "<string>",
"url_zoom": "<string>"
}
],
"shipping": {
"is_free_shipping": false,
"is_fixed_cost_shipping": false,
"fixed_cost_shipping_price": 123,
"shipping_price_including_tax": true,
"availability_description": "<string>",
"ships_internationally": true,
"mid_code": "<string>",
"country_of_origin": "India",
"tax_region": "<string>",
"tax_type": "<string>",
"tax_rate": 123
},
"packaging": {
"pack_width": 123,
"pack_height": 123,
"pack_length": 123,
"pack_dry_weight": 123,
"calculated_weight": 123,
"units_per_pack": 123,
"volume_of_packsize": 123,
"vertical_rotation": true,
"shipper_width": 123,
"shipper_height": 123,
"shipper_length": 123,
"shipper_dry_weight": 123,
"units_per_shipper": 123
},
"promotion": [
{
"type": "discount",
"details": {
"discount_type": "percent",
"discount_percent": 10,
"discount_amount": 150.65,
"max_amount": 2500
}
}
],
"subscription": [
{
"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,
"quantity": 123,
"billing_trial_days": 123
}
],
"seo": {
"meta_title": "<string>",
"meta_description": "<string>",
"meta_keywords": [
"<string>"
],
"slug": "<string>"
}
}
}
}
Authorizations
Access token
Query Parameters
use this param only if different pricing is configured as per customer group
Response
variant id
variant name
variant sku
GST
in cm
in cm
in cm
in kg
in kg
discount
, free_goods
, volume_based
percentage
, fixed-amount
required if discount_type = percentage
required if discount_type = fixed-amount
required for B2B flow only.
Billing interval determines the frequency for which the customer is charged for the subscription itself.
weekly
, monthly
, annually
Optionally limit the number of times this subscription will invoice the customer.
order interval defines the frequency of when the subscription sends customers the product
weekly
, monthly
, annully
By default this is set to unlimited, meaning the subscription will fulfill indefinitely. Changing the Limit to 10 would force the subscription to end after the tenth interval had been fulfilled.
The quantity of the plan to which the customer should be subscribed
Use in digital product only for trial period
curl --request GET \
--url https://services.commercengine.dev/api/v1/x2yh61zw4k/storefront/catalog/products/{product_id}/variants/{variant_id} \
--header 'Authorization: Bearer <token>'
{
"message": "Products retrieved successfully.",
"success": true,
"content": {
"variant": {
"id": "<string>",
"name": "<string>",
"short_description": "<string>",
"description": "<string>",
"stock_available": true,
"associated_options": {},
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
],
"sku": "<string>",
"pricing": {
"currency": "<string>",
"tax_region": "<string>",
"tax_type": "GST",
"tax_rate": 123,
"price_including_tax": false,
"listing_price": 123,
"selling_price": 123,
"min_order_quantity": 123,
"max_order_quantity": 123
},
"images": [
{
"title": "<string>",
"alternate_text": "<string>",
"sort_order": 123,
"url_tiny": "<string>",
"url_thumbnail": "<string>",
"url_standard": "<string>",
"url_zoom": "<string>"
}
],
"shipping": {
"is_free_shipping": false,
"is_fixed_cost_shipping": false,
"fixed_cost_shipping_price": 123,
"shipping_price_including_tax": true,
"availability_description": "<string>",
"ships_internationally": true,
"mid_code": "<string>",
"country_of_origin": "India",
"tax_region": "<string>",
"tax_type": "<string>",
"tax_rate": 123
},
"packaging": {
"pack_width": 123,
"pack_height": 123,
"pack_length": 123,
"pack_dry_weight": 123,
"calculated_weight": 123,
"units_per_pack": 123,
"volume_of_packsize": 123,
"vertical_rotation": true,
"shipper_width": 123,
"shipper_height": 123,
"shipper_length": 123,
"shipper_dry_weight": 123,
"units_per_shipper": 123
},
"promotion": [
{
"type": "discount",
"details": {
"discount_type": "percent",
"discount_percent": 10,
"discount_amount": 150.65,
"max_amount": 2500
}
}
],
"subscription": [
{
"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,
"quantity": 123,
"billing_trial_days": 123
}
],
"seo": {
"meta_title": "<string>",
"meta_description": "<string>",
"meta_keywords": [
"<string>"
],
"slug": "<string>"
}
}
}
}