DealsOfferResult deals.offer-result@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- deals
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/deals/offer-result.v1.json
deals.offer-result@1: the answer of the deal writes on OpenVibe.Deals: { offer } (the canonical offer after the change). POST /api/v1/offers (201), PATCH /api/v1/offers/:id, POST …/expire, …/disable, …/enable and …/review answer exactly that; POST …/observations (201) adds the observation recorded; POST …/merge adds merged { id, slug } and the before/after of the change; POST …/unmerge adds from { id, slug } and before/after.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
offer | deals.offer | yes | ||
observation | object | |||
observation.id | string | yes | ||
observation.observed_at | string | null | yes |
| |
observation.recorded_at | string | null |
| ||
observation.price | string | null | |||
observation.currency | string | null | |||
observation.shipping | string | null | |||
observation.shipping_note | string | null | |||
observation.condition | enum |
| ||
observation.availability | enum |
| ||
observation.origin | string | yes | ||
observation.observed_by | string | null | |||
observation.listing | string | null | |||
observation.source | object | yes | ||
observation.source.id | string | null | |||
observation.source.kind | string | null | |||
observation.source.ref | object | null | |||
observation.source.key | string | null | |||
observation.source.url | string | null | |||
merged | object | |||
merged.id | string | |||
merged.slug | string | |||
from | object | |||
from.id | string | |||
from.slug | string | |||
before | any | |||
after | any |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: observed
{
"offer": {
"id": "dof_01JAB2C3D4E5F6G7H8J9K0MNPR",
"slug": "usb-c-capture-card-79",
"url": "https://openvibe.deals/d/usb-c-capture-card-79",
"title": "USB-C 4K capture card for $79.99",
"description": null,
"link": "https://shop.example.com/capture-card",
"status": "active",
"category": "streaming",
"origin": "community",
"submitted_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"text_origin": "human",
"review_state": null,
"ai_summary": null,
"expires_at": null,
"expired_at": null,
"expired_reason": null,
"disabled_reason": null,
"created_at": "2026-09-25T18:00:00.000Z",
"updated_at": "2026-09-25T18:00:00.000Z",
"store": {
"id": "dst_1",
"domain": "shop.example.com",
"name": "Example Shop",
"url": "https://openvibe.deals/s/shop.example.com"
},
"product": null,
"latest_observation": {
"id": "dob_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"observed_at": "2026-09-25T18:00:00.000Z",
"recorded_at": "2026-09-25T18:00:02.000Z",
"price": "79.99",
"currency": "USD",
"shipping": "0",
"shipping_note": null,
"condition": "new",
"availability": "in_stock",
"origin": "community",
"observed_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"listing": "dof_01JAB2C3D4E5F6G7H8J9K0MNPR",
"source": {
"id": "dsr_01JAB2C3D4E5F6G7H8J9K0MNPS",
"kind": "community",
"ref": null,
"key": null,
"url": null
}
},
"freshness": {
"state": "fresh"
},
"observations": [
{
"id": "dob_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"observed_at": "2026-09-25T18:00:00.000Z",
"recorded_at": "2026-09-25T18:00:02.000Z",
"price": "79.99",
"currency": "USD",
"shipping": "0",
"shipping_note": null,
"condition": "new",
"availability": "in_stock",
"origin": "community",
"observed_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"listing": "dof_01JAB2C3D4E5F6G7H8J9K0MNPR",
"source": {
"id": "dsr_01JAB2C3D4E5F6G7H8J9K0MNPS",
"kind": "community",
"ref": null,
"key": null,
"url": null
}
}
],
"sources": [],
"merged_from": [],
"votes": {
"up": 12,
"down": 1,
"up_weight": 11.5,
"down_weight": 1
},
"hotness": null,
"indexability": {
"indexable": true,
"robots": "index,follow",
"reasons": []
}
},
"observation": {
"id": "dob_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"observed_at": "2026-09-25T18:00:00.000Z",
"recorded_at": "2026-09-25T18:00:02.000Z",
"price": "79.99",
"currency": "USD",
"shipping": "0",
"shipping_note": null,
"condition": "new",
"availability": "in_stock",
"origin": "community",
"observed_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"listing": "dof_01JAB2C3D4E5F6G7H8J9K0MNPR",
"source": {
"id": "dsr_01JAB2C3D4E5F6G7H8J9K0MNPS",
"kind": "community",
"ref": null,
"key": null,
"url": null
}
}
}Rejected: no-offer
{
"observation": {}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('deals.offer-result@1', value); // { valid, errors: [{ path, message }] }