storlaunch.variant.archived.v1
Fires when a variant is archived via DELETE /v1/inventory/variants/:id. Storlaunch refuses to archive the default variant of a product (409 INVALID_STATE); you'll only see this event for non-default variants.
When it fires
Once per successful DELETE. As with product archives, the payload is slim — just id and productId. Your mirror has the rest from prior events.
Payload
{
"id": "evt_01HX...",
"type": "storlaunch.variant.archived.v1",
"createdAt": "2026-05-13T11:15:00Z",
"accountId": "acc_01HX...",
"data": {
"id": "var_01HX...",
"productId": "prod_01HX..."
}
}
Handler examples
// Node
if (event.type === 'storlaunch.variant.archived.v1') {
const { id } = event.data;
await mirror.variants.update({ id }, { archived: true });
await searchIndex.removeVariant(id);
}
# Python
if event["type"] == "storlaunch.variant.archived.v1":
vid = event["data"]["id"]
mirror.variants.update(id=vid, archived=True)
search_index.remove_variant(vid)
// Go
if event.Type == "storlaunch.variant.archived.v1" {
var d struct{ ID string `json:"id"` }
_ = json.Unmarshal(event.Data, &d)
mirror.MarkArchived(ctx, d.ID)
}
What to do
- Mark the variant archived in your mirror.
- Hide it from the storefront's variant picker.
- Invalidate any cart that still references the archived variant (or surface a "this option is no longer available" message to the buyer).
Common pitfalls
- Hard-deleting the row. The variant still exists in Storlaunch — orders that include it still reference it. Keep the row in your mirror with an
archived: trueflag. - Missing the
variant.updatedthat arrives alongside. Storlaunch may fire both on archive (anupdatedcarrying the newarchived: truestate, plus this dedicatedarchivedevent). Treat them as duplicates of the same intent; dedupe viaevent.id. - Ignoring carts. Stale carts pointing at an archived variant are a checkout-failure trap. Run a sweep when you receive this event.
Related events
storlaunch.variant.updated.v1— emitted alongside on archive in the current build.storlaunch.product.archived.v1— if the whole parent is archived (variants are NOT cascade-archived — they remain as-is on the parent's now-archived row).