OpenVibe.Coupons API

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Server https://openvibe.coupons. 10 routes performing 6 capabilities. OpenAPI 3.1 document.

GET /api/v1/coupons/{id}

Read a merchant's active codes (status, confidence, report aggregates, restrictions, expiry or unknown, evidence) or one code.

Capabilities
coupons.coupon.lookup
Visibility
first-party
Parameters
  • id (path, required)
Response
application/json coupons.lookup-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.coupon.lookup</strong> (first-party): Read a merchant&#39;s active codes (status, confidence, report aggregates, restrictions, expiry or unknown, evidence) or one code. Public data only, the same response for every caller; anonymous callers may use the routes with tighter rate limits. The charter&#39;s coupons.lookup.</p>

POST /api/v1/coupons/{id}/report

Report that a code worked or failed, on behalf of a person (X-OV-Subject).

Capabilities
coupons.report.create
Visibility
first-party
Parameters
  • id (path, required)
Request body
application/json coupons.report-request@1
Response
application/json coupons.report-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.report.create</strong> (first-party): Report that a code worked or failed, on behalf of a person (X-OV-Subject). One report per person, code and UTC day; only the latest per person counts; rate-limited per person; AI output (X-OV-Origin: ai) is refused. The response carries aggregates only, never a reporter. The charter&#39;s coupons.report.</p>

POST /api/v1/coupons/{id}/status

Moderate a code: disable it, mark it expired, or return it to active results (its status is then recomputed from people's reports and time).

Capabilities
coupons.status.update
Visibility
first-party
Parameters
  • id (path, required)
Request body
application/json coupons.status-request@1
Response
application/json coupons.status-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.status.update</strong> (first-party): Moderate a code: disable it, mark it expired, or return it to active results (its status is then recomputed from people&#39;s reports and time). reported_working and reported_failed cannot be set by anyone.</p>

POST /api/v1/coupons/submit

Submit a coupon code for a merchant (by merchant id, host or URL) on behalf of a person (X-OV-Subject) or as AI output (X-OV-Origin: ai, held for staff review).

Capabilities
coupons.coupon.submit
Visibility
first-party
Request body
application/json coupons.submit-request@1
Response
application/json coupons.submit-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.coupon.submit</strong> (first-party): Submit a coupon code for a merchant (by merchant id, host or URL) on behalf of a person (X-OV-Subject) or as AI output (X-OV-Origin: ai, held for staff review). The code starts with status unknown; a status, confidence or &#39;verified&#39; field is refused. A site no merchant covers becomes a pending merchant for staff review. The charter&#39;s coupons.submit.</p>

POST /api/v1/merchants

Create merchants with their domain rules (never on a public suffix), add domain rules, and approve or disable merchants.

Capabilities
coupons.merchant.manage
Visibility
first-party
Request body
application/json coupons.merchant-manage-request@1
Response
application/json coupons.merchant-manage-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.merchant.manage</strong> (first-party): Create merchants with their domain rules (never on a public suffix), add domain rules, and approve or disable merchants. Approving a pending merchant publishes the codes members submitted for it; disabling one takes its codes out of active results and Search.</p>

GET /api/v1/merchants/{id}

Read a merchant's active codes (status, confidence, report aggregates, restrictions, expiry or unknown, evidence) or one code.

Capabilities
coupons.coupon.lookup
Visibility
first-party
Parameters
  • id (path, required)
Response
application/json coupons.lookup-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.coupon.lookup</strong> (first-party): Read a merchant&#39;s active codes (status, confidence, report aggregates, restrictions, expiry or unknown, evidence) or one code. Public data only, the same response for every caller; anonymous callers may use the routes with tighter rate limits. The charter&#39;s coupons.lookup.</p>

GET /api/v1/merchants/{id}/coupons

Read a merchant's active codes (status, confidence, report aggregates, restrictions, expiry or unknown, evidence) or one code.

Capabilities
coupons.coupon.lookup
Visibility
first-party
Parameters
  • id (path, required)
Response
application/json coupons.lookup-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.coupon.lookup</strong> (first-party): Read a merchant&#39;s active codes (status, confidence, report aggregates, restrictions, expiry or unknown, evidence) or one code. Public data only, the same response for every caller; anonymous callers may use the routes with tighter rate limits. The charter&#39;s coupons.lookup.</p>

POST /api/v1/merchants/{id}/domains

Create merchants with their domain rules (never on a public suffix), add domain rules, and approve or disable merchants.

Capabilities
coupons.merchant.manage
Visibility
first-party
Parameters
  • id (path, required)
Request body
application/json coupons.merchant-manage-request@1
Response
application/json coupons.merchant-manage-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.merchant.manage</strong> (first-party): Create merchants with their domain rules (never on a public suffix), add domain rules, and approve or disable merchants. Approving a pending merchant publishes the codes members submitted for it; disabling one takes its codes out of active results and Search.</p>

POST /api/v1/merchants/{id}/status

Create merchants with their domain rules (never on a public suffix), add domain rules, and approve or disable merchants.

Capabilities
coupons.merchant.manage
Visibility
first-party
Parameters
  • id (path, required)
Request body
application/json coupons.merchant-manage-request@1
Response
application/json coupons.merchant-manage-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.merchant.manage</strong> (first-party): Create merchants with their domain rules (never on a public suffix), add domain rules, and approve or disable merchants. Approving a pending merchant publishes the codes members submitted for it; disabling one takes its codes out of active results and Search.</p>

GET /api/v1/merchants/resolve?host=

Resolve a hostname to an active merchant (normalized host, eTLD+1 from a bundled public-suffix subset, subdomain rules; path rules never match host-only lookups).

Capabilities
coupons.merchant.resolve
Visibility
first-party
Response
application/json coupons.resolve-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>coupons.merchant.resolve</strong> (first-party): Resolve a hostname to an active merchant (normalized host, eTLD+1 from a bundled public-suffix subset, subdomain rules; path rules never match host-only lookups). Public data only; anonymous callers may use the route with tighter rate limits.</p>