Skip to main content

Archive Product Variant

Permanently archive a product variant. There is no /unarchive.

Irreversible

Archiving sets status to archived. The variant is dropped from lists and is no longer sellable at checkout. There is no /unarchive — archive is final.

Hiding a variant (is_hidden: true) is reversible and is not a substitute. To charge a different amount, archive this variant and create a new one — see Immutable price fields.

The archived variant:

is_hidden is unchanged. Calling this endpoint on an already-archived variant is a no-op (returns 200 with the current state).

Archiving also clears the variant's upsells in both directions: the upsells it offered, and the entries on sibling variants that offered it. Those links are not restored if the variant is recreated.

When the product has has_draft: true, the call returns 409 and nothing is changed. Archive on the overlay with Archive Product Draft Variant, or discard the draft first. See Live writes while a draft exists.

Request

POST /product-variants/{id}/archive

Path Parameters

ParameterTypeRequiredDescription
idstringYesProduct variant UUID

Example Request

curl -X POST "https://cart.easy.tools/api/v1/product-variants/d91c65aa-b221-4aa4-b626-cf0d8a198749/archive" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response

Success Response (200)

Returns the archived variant.

{
"id": "d91c65aa-b221-4aa4-b626-cf0d8a198749",
"status": "archived",
"type": "one_time",
"recurring_options": null,
"name": "250g Package",
"amount": 1999,
"currency": "usd",
"checkout_url": "https://cart.easy.tools/checkout/premium-coffee?plan=price_123",
"custom_id": "SKU-250G",
"is_hidden": false,
"trial_period_days": null,
"active_cycles": null,
"cancel_early": false,
"keep_access_after_expiring": false,
"allow_multiple_subscriptions": false,
"active_days": 365,
"quantity": 100,
"has_quantity": true,
"old_price": 29,
"active_from": "2026-01-01T00:00:00+00:00",
"active_until": "2026-12-31T23:59:59+00:00",
"access_until": null,
"show_active_until_counter": true,
"tax_behavior": "exclusive",
"refund_days": 14,
"redirect_url": "https://mysite.com/thank-you",
"redirect_time": 5,
"file": {
"name": "Product Guide.pdf",
"url": "https://mysite.com/files/guide.pdf",
"download_url": "https://cart.easy.tools/api/v1/product-files/b8d4e6a2-51c7-4f39-9e0b-3a7c2d18f5e6/download?expires=1749384000&signature=abc123"
},
"files": [
{
"name": "Product Guide.pdf",
"url": "https://mysite.com/files/guide.pdf",
"download_url": "https://cart.easy.tools/api/v1/product-files/b8d4e6a2-51c7-4f39-9e0b-3a7c2d18f5e6/download?expires=1749384000&signature=abc123"
},
{
"name": "Quick Start.pdf",
"url": "https://mysite.com/files/quick-start.pdf",
"download_url": "https://cart.easy.tools/api/v1/product-files/2e9b5c71-8d40-4a6f-b312-7f5a9c04d8e3/download?expires=1749384000&signature=abc123"
}
],
"invoice_remarks": "Thank you for your purchase!",
"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
}

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

Error Responses

Bad Request (400)

{
"message": "Invalid variant ID"
}

Product Variant Not Found (404)

{
"message": "Product variant with ID d91c65aa-b221-4aa4-b626-cf0d8a198749 not found"
}

Conflict Error (409 — Unpublished Draft)

Returned when an unpublished overlay exists. Nothing is changed. Archive on the overlay, or discard the draft first.

{
"message": "This product has an unpublished draft. Publish, unpublish, or delete the draft before making live changes."
}