Skip to main content

Get Product Draft Variant

Retrieve one variant from a product's unpublished overlay, including unpublished overlay variants that do not appear on Get Product Variant.

A live overlay variant that has been archived returns 200 with status: archived. An overlay-only variant that was archived (removed from the overlay) returns 404. The list at Get Product Draft Variants omits archived variants in both cases. See Status.

The body uses the live Product Variant shape — there is no draft_version or preview_url on the item. Unpublished overlay variants have checkout_url: null.

Request

GET /products/{productId}/draft/variants/{id}

Path Parameters

ParameterTypeRequiredDescription
productIdstringYesProduct UUID
idstringYesProduct variant UUID

Query Parameters

ParameterTypeRequiredDefaultDescription
includestringNocustom_fields expands the stored overlay override array. Unknown tokens are ignored. See Custom Fields.

Example Request

curl -X GET "https://cart.easy.tools/api/v1/products/0632bef5-c308-42cd-9cba-89a7a4f722bb/draft/variants/5272bfcf-4e92-458d-b513-80ca474a16e4" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response

Success Response (200)

Returns a single overlay variant.

{
"id": "5272bfcf-4e92-458d-b513-80ca474a16e4",
"status": "published",
"type": "one_time",
"recurring_options": null,
"name": "100g Sample",
"amount": 999,
"currency": "usd",
"checkout_url": null,
"custom_id": null,
"is_hidden": false,
"trial_period_days": null,
"active_cycles": null,
"cancel_early": false,
"keep_access_after_expiring": false,
"allow_multiple_subscriptions": false,
"active_days": null,
"quantity": null,
"has_quantity": false,
"old_price": null,
"active_from": null,
"active_until": null,
"access_until": null,
"show_active_until_counter": null,
"tax_behavior": "exclusive",
"refund_days": null,
"redirect_url": null,
"redirect_time": null,
"file": null,
"files": [],
"invoice_remarks": null,
"has_shipping": false,
"delivery_enabled": false,
"delivery_service": null,
"delivery_address_optional": true,
"delivery_options": null,
"shipping_phone_required": false,
"phone_tooltip": null,
"mandatory_consent": null,
"optional_consent": null,
"digital_consent": null,
"newsletter_consent": null,
"newsletter_consent_required": false,
"newsletter_discount": null,
"vat_rate": null,
"gtu_code": null,
"flat_rate": null,
"exempt_tax_kind": null,
"tax_category": null,
"dashboard_header": null,
"long_description": null,
"cta_text": null,
"cta_url": null,
"credits": null,
"show_net_price": false,
"pay_what_you_want": null,
"purchase_button_text": null,
"upsells": [],
"custom_fields": null
}

Response Fields

See Get Product Variant for a complete list of response fields.

Error Responses

Bad Request (400)

Returned when the product UUID or the variant UUID is malformed.

{
"message": "Invalid product ID"
}
{
"message": "Invalid product variant ID"
}

Not Found (404)

Two cases share this status, told apart by the message. The product UUID does not exist, belongs to another store, or points at an archived product:

{
"message": "Product with ID 0632bef5-c308-42cd-9cba-89a7a4f722bb not found"
}

Or the product resolves but the variant is not on its overlay:

{
"message": "Product variant with ID 5272bfcf-4e92-458d-b513-80ca474a16e4 not found"
}