Products variants

List all product variants

GET
/v1/variants

Authorization

selectkey<token>

API key para requisições autenticadas. Envie sua chave no cabeçalho selectkey (sandbox sk_test_…, produção sk_live_…).

In: header

Query Parameters

limit?integer
offset?integer
sort?string
daterange?|
daterangegt?string
daterangegte?string
daterangelt?string
daterangelte?string
id?string

Public identifier (var_/prv_…)

sku?string
currency?string

ISO 4217 currency code

enabled?boolean
productId?string

Public identifier (prd_/pro_…)

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/variants"
[
  {
    "id": "var_0a1b2c3d4e5f60718293",
    "productId": "prd_0a1b2c3d4e5f60718293",
    "name": "Acme Ltda",
    "slug": "string",
    "description": "string",
    "sku": "string",
    "primary": true,
    "enabled": true,
    "pricing": {
      "oldPrice": 5000,
      "unitPrice": 5000,
      "costPerItem": 0,
      "currency": "BRL",
      "schema": "unit",
      "type": "oneTime",
      "daysTrial": 0,
      "billingType": "string",
      "billingFrequency": "string",
      "billingFrequencyCount": 0,
      "billingExactDay": 0,
      "cycles": 0,
      "trialInterval": "string",
      "trialIntervalCount": 0,
      "tiersMode": "string",
      "usageType": "string",
      "usageAggregation": "string",
      "meterEventName": "string"
    },
    "images": [
      "string"
    ],
    "metadata": {},
    "attributes": {},
    "externalReference": "string",
    "checkoutUrl": "string",
    "createdAt": "string",
    "updatedAt": "string"
  }
]
{
  "error": {
    "status": "Unauthorized",
    "statusCode": 401,
    "category": "authentication",
    "code": "unauthorized",
    "message": "Authentication is required to access this resource.",
    "resource": "server"
  }
}
{
  "error": {
    "status": "Forbidden",
    "statusCode": 403,
    "category": "authorization",
    "code": "forbidden",
    "message": "You do not have permission to perform this action.",
    "resource": "server"
  }
}
{
  "error": {
    "status": "Internal Server Error",
    "statusCode": 500,
    "category": "server",
    "code": "serverError",
    "message": "An unexpected error occurred. Please try again later.",
    "resource": "server",
    "details": "If the problem persists, contact support with the correlationId from the response headers."
  }
}