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

# coupons.submit-request@1 · OpenVibe.Services

HTML: [coupons.submit-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/coupons.submit-request)

# CouponsSubmitRequest `coupons.submit-request@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/coupons/submit-request.v1.json`](/docs/contracts/coupons.submit-request.json)

coupons.submit-request@1: the body of POST /api/v1/coupons/submit on OpenVibe.Coupons (coupons.coupon.submit; a signed-in person, or a service acting for one or as AI; installs cannot submit): a code and the merchant it is for (merchant\_id, or the host or url of the shop: an unknown shop becomes a pending merchant). code is 1-64 printable characters without spaces; title (at least 3 characters: what the code gives) is required. status, confidence, verified, working, valid and validity are refused (422 coupon.status\_not\_accepted): a code's status comes only from people's reports. expires is a date (YYYY-MM-DD) or ISO time; expiry\_basis evidence needs evidence\_url. A duplicate answers the existing code (200).

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `code` | string | yes |  | - `pattern ^\s*[\x21-\x7E]{1,64}\s*$` |
| `title` | string | yes |  | - `minLength 3` |
| `description` | string \| null |  |  |  |
| `merchant_id` | string |  |  |  |
| `host` | string |  |  |  |
| `url` | string |  |  | - `pattern ^https?://` |
| `expires` | string \| null |  |  |  |
| `expiry_basis` | enum |  |  | - `one of "submitter", "evidence"` |
| `evidence_url` | string |  |  | - `pattern ^https?://`<br>- `maxLength 2048` |
| `restrictions` | object |  |  |  |
| `restrictions.min_spend` | object |  |  |  |
| `restrictions.min_spend.amount` | number \| string |  |  |  |
| `restrictions.min_spend.currency` | string |  | ISO 4217. |  |
| `restrictions.categories` | array \| string |  | At most 10. |  |
| `restrictions.new_customers_only` | boolean \| string |  |  |  |
| `restrictions.regions` | array \| string |  | ISO 3166-1 alpha-2 codes, at most 50. |  |
| `restrictions.other` | string |  |  | - `maxLength 300` |
| `hint` | string \| null |  |  | - `maxLength 300` |
| `ai_run_id` | string \| null |  |  |  |

## Examples

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

 Valid: with-evidence

~~~~
{
  "code": "FALL15",
  "title": "15% off sneakers",
  "url": "https://shoes.example.com/sneakers",
  "expires": "2026-10-31",
  "expiry_basis": "evidence",
  "evidence_url": "https://shoes.example.com/fall-sale",
  "restrictions": {
    "min_spend": {
      "amount": 50,
      "currency": "USD"
    },
    "new_customers_only": true
  }
}
~~~~

Rejected: claims-status

~~~~
{
  "code": "FALL15",
  "title": "15% off sneakers",
  "host": "shoes.example.com",
  "status": "reported_working"
}
~~~~

## Validate

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