---
title: "inventory.instance@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/inventory.instance"
updated: null
---

# inventory.instance@1 · OpenVibe.Services

HTML: [inventory.instance@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/inventory.instance)

# InventoryInstance `inventory.instance@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: inventory
- Visibility: public
- Status: active
- Compatibility: backward
- Decision: [ADR-054](/docs/adr/ADR-054)
- Schema: [`https://openvibe.network/contracts/inventory/instance.v1.json`](/docs/contracts/inventory.instance.json)

One item a person owns (ADR-054 §2): a definition, its origin and state. bought and traded are reserved for the later money ADR (ADR-054 §5) and are refused until it is accepted.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  | - `pattern ^inv_[0-9A-HJKMNP-TV-Z]{26}$` |
| `definition_id` | string | yes |  | - `pattern ^itd_[0-9A-HJKMNP-TV-Z]{26}$` |
| `owner` | string | yes |  | - `pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$` |
| `origin` | enum | yes |  | - `one of "granted", "earned", "migrated", "bought", "traded"` |
| `state` | enum | yes |  | - `one of "owned", "consumed", "revoked"` |
| `attributes` | object |  | Per-instance values (a serial number, a wear value), valid against the kind. |  |
| `serial` | integer |  | The instance's number within a capped supply. | - `minimum 1` |
| `acquired_at` | string | yes |  | - `format date-time` |

## Examples

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

 Valid: migrated

~~~~
{
  "id": "inv_01JZ00000000000000000001NV",
  "definition_id": "itd_01JZ00000000000000000001TD",
  "owner": "usr_01JZ0000000000000000000AAA",
  "origin": "migrated",
  "state": "owned",
  "acquired_at": "2026-10-09T03:00:00Z"
}
~~~~

Valid: serial

~~~~
{
  "id": "inv_01JZ00000000000000000001N2",
  "definition_id": "itd_01JZ00000000000000000001T2",
  "owner": "usr_01JZ0000000000000000000AAA",
  "origin": "earned",
  "state": "owned",
  "acquired_at": "2026-10-09T03:00:00Z",
  "serial": 12,
  "attributes": {
    "wear": 0.1
  }
}
~~~~

Rejected: bad-owner

~~~~
{
  "id": "inv_01JZ00000000000000000001NV",
  "definition_id": "itd_01JZ00000000000000000001TD",
  "owner": "gst_01JZ0000000000000000000AAA",
  "origin": "migrated",
  "state": "owned",
  "acquired_at": "2026-10-09T03:00:00Z"
}
~~~~

Rejected: bad-state

~~~~
{
  "id": "inv_01JZ00000000000000000001NV",
  "definition_id": "itd_01JZ00000000000000000001TD",
  "owner": "usr_01JZ0000000000000000000AAA",
  "origin": "migrated",
  "state": "sold",
  "acquired_at": "2026-10-09T03:00:00Z"
}
~~~~

## Validate

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