---
title: "deals.vote-result@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/deals.vote-result"
updated: null
---

# deals.vote-result@1 · OpenVibe.Services

HTML: [deals.vote-result@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/deals.vote-result)

# DealsVoteResult `deals.vote-result@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: deals
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/deals/vote-result.v1.json`](/docs/contracts/deals.vote-result.json)

deals.vote-result@1: the answer of PUT and DELETE /api/v1/offers/:id/vote on OpenVibe.Deals: { offer\_id, value (0 after a removal), previous, changed, votes } — the vote lands on the canonical offer of a merge group.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `offer_id` | string | yes |  |  |
| `value` | enum | yes |  | - `one of 1, -1, 0` |
| `previous` | enum | yes |  | - `one of 1, -1, 0, null` |
| `changed` | boolean | yes |  |  |
| `votes` | object | yes |  |  |
| `votes.up` | integer | yes |  | - `minimum 0` |
| `votes.down` | integer | yes |  | - `minimum 0` |
| `votes.up_weight` | number | yes |  |  |
| `votes.down_weight` | number | yes |  |  |

## Examples

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

 Valid: up

~~~~
{
  "offer_id": "dof_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "value": 1,
  "previous": 0,
  "changed": true,
  "votes": {
    "up": 13,
    "down": 1,
    "up_weight": 12.5,
    "down_weight": 1
  }
}
~~~~

Rejected: bad-value

~~~~
{
  "offer_id": "d",
  "value": 5,
  "previous": 0,
  "changed": true,
  "votes": {
    "up": 0,
    "down": 0,
    "up_weight": 0,
    "down_weight": 0
  }
}
~~~~

## Validate

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