Count Variants

Count the number of variants for a specific product.

🔒

Requires read_product access scope. More access scope

The Variant Total Count API allows you to retrieve the total number of variants associated with a specific product. This is particularly useful for analytics, reporting, or managing product inventories where the number of variants per product needs to be tracked. By specifying the product_id, this endpoint returns the count of all variants linked to the product.This API is especially useful for:

  1. Monitor the number of variants for inventory management.
  2. Analyze product configurations for reporting purposes.

Request Parameters

Public Request Parameters

📘

Path Parameters

ParameterTypeRequiredDescriptionExample
product_idstringYesUnique identifier of the product"pr_123456789"

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring"200"HTTP status code
messagestring"Success"Operation result message
data.countint-count of the variants

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!