Skip to main content

Get Product Variant

Retrieve a specific product variant from your easycart store.

Request

GET /product-variants/{id}

Path Parameters

ParameterTypeRequiredDescription
idstringYesProduct variant UUID

Example Request

curl -X GET "https://cart.easy.tools/api/v1/product-variants/550e8400-e29b-41d4-a716-446655440002" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response

Success Response (200)

Returns a single product variant.

{
"id": "550e8400-e29b-41d4-a716-446655440002",
"type": "one_time",
"recurring_options": null,
"name": "250g Package",
"amount": 1999
}
{
"id": "550e8400-e29b-41d4-a716-446655440003",
"type": "recurring",
"recurring_options": {
"interval": "month",
"interval_count": 1
},
"name": "Monthly Subscription - 250g",
"amount": 1799
}

Response Fields

FieldTypeNullableDescription
idstringNoUnique identifier for the product variant (UUID)
typestringNoVariant type ("one_time" or "recurring")
recurring_optionsobjectYesRecurring options (null for one-time variants)
recurring_options.intervalstringNoRecurring interval ("day", "week", "month", "year")
recurring_options.interval_countintegerNoNumber of intervals between charges
namestringYesVariant name
amountintegerNoPrice in cents

Error Responses

Product Variant Not Found (404)

{
"message": "Product variant with ID <UUID> not found"
}