> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.recurrente.com/referencia-api/api-reference/products/list-product-variants/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.recurrente.com/_mcp/server. # Listar variantes GET https://app.recurrente.com/api/product_variants Las combinaciones activas de la cuenta. Se escriben a través de su producto — son sus opciones cruzadas, no registros sueltos — pero se leen aquí, porque una integración tiene a mano un SKU y no un producto más un par de valores de opción. Cada una trae su `price_id`: úsalo en `items[].price_id` al crear un checkout para vender esa combinación. Reference: https://docs.recurrente.com/referencia-api/api-reference/products/list-product-variants ## Authentication - `X-SECRET-KEY` header (required) — Tu clave secreta de API. Una llave de cuenta (`sk_live_...`, `sk_test_...`) opera sobre su propia cuenta y, con `X-ACCOUNT-ID`, sobre sus cuentas conectadas. La llave también fija el ambiente: una `sk_test_` solo lista y resuelve objetos de prueba (`live_mode: false`) y una `sk_live_` solo objetos reales. Un ID del otro ambiente responde `404` (`401` en `/customers`). Una llave de organización (`sk_org_live_...`, `sk_org_test_...`) alcanza todas las cuentas de una organización y solo sirve para leer: saldos, movimientos y reportes. Para operar sobre una cuenta debe nombrarla con `X-ACCOUNT-ID`; omitirlo en una lectura devuelve todas las cuentas de la organización. Cualquier otro endpoint responde `403` con `code: organization_key_unsupported`. ## Request ### Query parameters - `page` (integer, optional, default: 1) - `limit` (integer, optional) ## Response ### 200 Una página de variantes - `list of ProductVariant` ## Types ### ProductVariant Una combinación vendible de las opciones del producto (el modelo de variantes de Shopify). Su precio es un `Price` del producto; la línea del checkout apunta a ese `price_id` y el webhook trae la variante en `items[].variant`. - `id` (string, optional) - `product_id` (string, optional) — El producto al que pertenece esta combinación. El SKU es único por producto, no por cuenta, así que es lo que permite resolver una fila de la lista. - `status` (enum, optional) - Allowed values: `active`, `archived` - `title` (string, optional) — Los valores unidos por " / ". - `option_values` (list of string, optional) - `sku` (string, optional, nullable) - `price_id` (string, optional) — El precio de esta variante. - `amount_in_cents` (integer, optional) - `currency` (string, optional) - `inventory_quantity` (integer, optional, nullable) — Existencias de esta variante. `null` es ilimitado. Baja con cada venta pagada de esta variante y puede quedar en negativo si se vendió más de lo que había; un número escrito aquí es cero o más. - `low_stock_threshold` (integer, optional, nullable) — Desde qué cantidad se considera baja esta variante. `null` usa el valor por defecto de la cuenta. ## Examples **Response** ```json [ { "id": "var_9lstwgbr", "product_id": "prod_9lstwgbr", "status": "active", "title": "M / Rojo", "option_values": [ "M", "Rojo" ], "sku": "string", "price_id": "price_3kd9sla2", "amount_in_cents": 12500, "currency": "GTQ", "inventory_quantity": 1, "low_stock_threshold": 3 } ] ``` **SDK Code** ```python import requests url = "https://app.recurrente.com/api/product_variants" headers = {"X-SECRET-KEY": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.recurrente.com/api/product_variants'; const options = {method: 'GET', headers: {'X-SECRET-KEY': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.recurrente.com/api/product_variants" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-SECRET-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.recurrente.com/api/product_variants") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-SECRET-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.recurrente.com/api/product_variants") .header("X-SECRET-KEY", "") .asString(); ``` ```php request('GET', 'https://app.recurrente.com/api/product_variants', [ 'headers' => [ 'X-SECRET-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.recurrente.com/api/product_variants"); var request = new RestRequest(Method.GET); request.AddHeader("X-SECRET-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["X-SECRET-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://app.recurrente.com/api/product_variants")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```