Get Product Variant
Retrieve a specific product variant from your easycart store.
Request
GET /product-variants/{id}
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | Product 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
Field | Type | Nullable | Description |
---|---|---|---|
id | string | No | Unique identifier for the product variant (UUID) |
type | string | No | Variant type ("one_time" or "recurring") |
recurring_options | object | Yes | Recurring options (null for one-time variants) |
recurring_options.interval | string | No | Recurring interval ("day", "week", "month", "year") |
recurring_options.interval_count | integer | No | Number of intervals between charges |
name | string | Yes | Variant name |
amount | integer | No | Price in cents |
Error Responses
Product Variant Not Found (404)
{
"message": "Product variant with ID <UUID> not found"
}