---
title: "coupons.index_document.deleted@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/coupons.index_document.deleted"
updated: null
---

# coupons.index\_document.deleted@1 · OpenVibe.Services

HTML: [coupons.index\_document.deleted@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/coupons.index_document.deleted)

# CouponsIndexDocumentDeletedPayload `coupons.index_document.deleted@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: coupons
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/events/payloads/coupons.index_document.deleted.v1.json`](/docs/contracts/coupons.index_document.deleted.json)

coupons.index\_document.deleted v1 (OpenVibe.Coupons server/domain/publication.js sendDocument, via openvibe-publishing/index-hooks indexEvent). A Search tombstone: the code left active results (expired, disabled, its merchant disabled) or the merchant is no longer active, so Search drops it at this revision or older. Only sent for a resource Search was sent before: a code or merchant that was never indexed gets no tombstone. Consumed by OpenVibe.Search ('\*.index\_document.\*'). Envelope: subject { type: coupon | merchant, id, revision }, visibility internal, priority important, actor service:coupons.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `type` | enum | yes |  | - `one of "coupon", "merchant"` |
| `id` | string | yes |  | - `pattern ^(cpn\|mer)_[0-9A-HJKMNP-TV-Z]{26}$` |
| `revision` | integer | yes | Index revision of the tombstone; wins over any document at the same or an older revision. | - `minimum 1`<br>- `maximum 9007199254740991` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: coupon

~~~~
{
  "type": "coupon",
  "id": "cpn_01K5R8Z3Q4M2N7P9T1V6W8X0YA",
  "revision": 3
}
~~~~

Valid: merchant

~~~~
{
  "type": "merchant",
  "id": "mer_01K5R7A1B2C3D4E5F6G7H8J9KM",
  "revision": 5
}
~~~~

Rejected: bad-id

~~~~
{
  "type": "coupon",
  "id": "TRAIL15",
  "revision": 3
}
~~~~

Rejected: full-document

~~~~
{
  "owner": "coupons",
  "type": "coupon",
  "id": "cpn_01K5R8Z3Q4M2N7P9T1V6W8X0YA",
  "revision": 3,
  "deleted": true
}
~~~~

Rejected: revision-zero

~~~~
{
  "type": "merchant",
  "id": "mer_01K5R7A1B2C3D4E5F6G7H8J9KM",
  "revision": 0
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('coupons.index_document.deleted@1', value);   // { valid, errors: [{ path, message }] }
~~~~
