get
https://{subdomain}.myshoplaza.com/openapi/2025-06/products//variants/count
Count the number of variants for a specific product.
Requiresread_productaccess 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:
- Monitor the number of variants for inventory management.
- Analyze product configurations for reporting purposes.
Request Parameters
Public Request Parameters
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
product_id | string | Yes | Unique identifier of the product | "pr_123456789" |
Response Explanation
Public Response Parameters
Successful Response
| Parameter | Type | Example | Description |
|---|---|---|---|
code | string | "200" | HTTP status code |
message | string | "Success" | Operation result message |
data.count | int | - | count of the variants |
Error Response
| Field | Type | Example | Description |
|---|---|---|---|
code | string | InvalidParameter | Error http message |
message | string | `` | Error message |
