GET
/
catalog
/
products
/
{product_id}
/
variants
/
{variant_id}
curl --request GET \
  --url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/catalog/products/{product_id}/variants/{variant_id} \
  --header 'Authorization: Bearer <token>'
{
  "message": "Products retrieved successfully.",
  "success": true,
  "content": {
    "variant": {
      "id": "<string>",
      "product_id": "<string>",
      "sku": "<string>",
      "slug": "<string>",
      "name": "<string>",
      "product_name": "<string>",
      "short_description": "<string>",
      "active": true,
      "stock_available": true,
      "on_offer": true,
      "on_promotion": true,
      "on_subscription": true,
      "is_default": true,
      "associated_options": {
        "background_color": {
          "name": "Background Color",
          "value": {
            "name": "Blue",
            "hexcode": "#0000FF"
          },
          "type": "color"
        },
        "size": {
          "name": "Size",
          "value": "Large",
          "type": "single-select"
        }
      },
      "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
      },
      "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
        }
      ],
      "promotion": {
        "id": "<string>",
        "starts_at": "2023-11-07T05:31:56Z",
        "expires_at": "2023-11-07T05:31:56Z",
        "details": {
          "promotion_type": "<any>",
          "discount_type": "percentage",
          "discount_percent": 123,
          "discount_fixed_amount": 123
        }
      },
      "product_type": "physical",
      "description": "<string>",
      "category_ids": [
        "<string>"
      ],
      "tags": [
        "<string>"
      ],
      "reviews_rating_sum": 123,
      "reviews_count": 123,
      "hsn_code": "<string>",
      "variant_options": [
        {
          "name": "<string>",
          "key": "<string>",
          "type": "single-select",
          "value": [
            "<string>"
          ]
        }
      ],
      "product_attributes": [
        {
          "id": "<string>",
          "name": "<string>",
          "key": "<string>",
          "type": "color",
          "value": [
            {
              "name": "<string>",
              "hexcode": "<string>"
            }
          ]
        }
      ],
      "variant_attributes": [
        {
          "id": "<string>",
          "name": "<string>",
          "key": "<string>",
          "type": "color",
          "value": [
            {
              "name": "<string>",
              "hexcode": "<string>"
            }
          ]
        }
      ],
      "videos": [
        {
          "title": "<string>",
          "alternate_text": "<string>",
          "sort_order": 123,
          "video_preview_url": "<string>",
          "video_stream_hls_url": "<string>",
          "video_stream_dash_url": "<string>",
          "image_thumbnail_url": "<string>",
          "video_duration": 123
        }
      ],
      "shipping": {
        "additional_cost": 123,
        "shipping_price_including_tax": true,
        "availability_description": "<string>",
        "ships_internationally": false,
        "mid_code": "<string>",
        "country_of_origin": "India",
        "tax_type": "<string>",
        "tax_rate": 123
      },
      "seo": {
        "slug": "<string>",
        "title": "<string>",
        "description": "<string>",
        "keywords": [
          "<string>"
        ]
      },
      "metadata": {}
    }
  }
}

Authorizations

Authorization
string
header
required

Access token

Path Parameters

product_id
string
required

product id

Example:

"01H7YK0C86V9PGT0HXRJVEZXJQ"

variant_id
string
required

variant id

Query Parameters

customer_group_id
string

use this param only if different pricing is configured as per customer group

Response

200
application/json
Success response
message
string
required
Example:

"Products retrieved successfully."

success
boolean
required
content
object
required