---
updatedAt: 2026-06-19T16:07:00.000Z
---

# Get variants of a product (Yampi)

Retrieves all variants of a product.

The productId must exist.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Yampi"
  },
  "servers": [
    {
      "url": "https://api.ecartapi.com/api/v2"
    }
  ],
  "paths": {
    "/products/{productId}/variants": {
      "get": {
        "summary": "Get variants of a product (Yampi)",
        "description": "Retrieves all variants of a product.\n\nThe productId must exist.",
        "operationId": "get_all_products_variants_yampi",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "variants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "134288148"
                          },
                          "productId": {
                            "type": "string",
                            "example": "19721631"
                          },
                          "name": {
                            "type": "string",
                            "example": "Product test update EcartApi update test 2 v2 Azul S"
                          },
                          "upc": {
                            "type": "string",
                            "nullable": true
                          },
                          "price": {
                            "type": "string",
                            "example": "20.00"
                          },
                          "currency": {
                            "type": "string",
                            "nullable": true
                          },
                          "sku": {
                            "type": "string",
                            "example": "SKU-TEST-ECART-API1"
                          },
                          "imageId": {
                            "type": "string",
                            "nullable": true
                          },
                          "fulfillmentService": {
                            "type": "string",
                            "nullable": true
                          },
                          "option1": {
                            "type": "string",
                            "example": "Azul"
                          },
                          "option2": {
                            "type": "string",
                            "example": "S"
                          },
                          "option3": {
                            "type": "string",
                            "nullable": true
                          },
                          "dimensions": {
                            "type": "object",
                            "properties": {
                              "width": {
                                "type": "string",
                                "example": "1"
                              },
                              "height": {
                                "type": "string",
                                "example": "3"
                              },
                              "length": {
                                "type": "string",
                                "example": "1"
                              },
                              "weight": {
                                "type": "string",
                                "example": "2"
                              }
                            }
                          },
                          "inventory": {
                            "type": "object",
                            "properties": {
                              "itemId": {
                                "type": "string",
                                "nullable": true
                              },
                              "quantity": {
                                "type": "string",
                                "example": "15"
                              }
                            }
                          },
                          "dates": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "type": "string",
                                "example": "2023-07-06T00:34:27.000Z"
                              },
                              "updatedAt": {
                                "type": "string",
                                "example": "2023-07-13T01:57:47.000Z"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "OK": {
                    "summary": "OK",
                    "value": {
                      "success": true,
                      "variants": [
                        {
                          "id": "134288148",
                          "productId": "19721631",
                          "name": "Product test update EcartApi update test 2 v2 Azul S",
                          "upc": null,
                          "price": "20.00",
                          "currency": null,
                          "sku": "SKU-TEST-ECART-API1",
                          "imageId": null,
                          "fulfillmentService": null,
                          "option1": "Azul",
                          "option2": "S",
                          "option3": null,
                          "dimensions": {
                            "width": "1",
                            "height": "3",
                            "length": "1",
                            "weight": "2"
                          },
                          "units": {
                            "width": null,
                            "height": null,
                            "length": null,
                            "weight": null
                          },
                          "inventory": {
                            "itemId": null,
                            "quantity": "15"
                          },
                          "requireShipping": null,
                          "bundled": null,
                          "dates": {
                            "createdAt": "2023-07-06T00:34:27.000Z",
                            "updatedAt": "2023-07-13T01:57:47.000Z"
                          }
                        },
                        {
                          "id": "134288149",
                          "productId": "19721631",
                          "name": "Product test update EcartApi update test 2 v2 Azul XL",
                          "upc": null,
                          "price": "20.00",
                          "currency": null,
                          "sku": "SKU-TEST-ECART-API1",
                          "imageId": null,
                          "fulfillmentService": null,
                          "option1": "Azul",
                          "option2": "XL",
                          "option3": null,
                          "dimensions": {
                            "width": "1",
                            "height": "3",
                            "length": "1",
                            "weight": "2"
                          },
                          "units": {
                            "width": null,
                            "height": null,
                            "length": null,
                            "weight": null
                          },
                          "inventory": {
                            "itemId": null,
                            "quantity": "50"
                          },
                          "requireShipping": null,
                          "bundled": null,
                          "dates": {
                            "createdAt": "2023-07-06T00:34:27.000Z",
                            "updatedAt": "2023-07-13T01:34:24.000Z"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The unique identifier of the product."
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "string"
            },
            "description": "Current page"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "string"
            },
            "description": "Results per page"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Authorization": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Used to authenticate API requests after completing the store authorization or integration process. The access_token is generated once the e-commerce store grants access and must be included in every request header to validate the authorized connection."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "security": [
    {
      "Authorization": []
    }
  ]
}
```