Isto Intents Intent
A standing purchase intent (spec section 4).
$id: https://istointents.org/schemas/0.1/intent.schema.json
Fields#
| field | type | required | description |
|---|---|---|---|
specVersion | common › version | yes | |
type | "intent" | yes | |
id | common › id | yes | |
created | common › timestamp | yes | |
updated | common › timestamp | ||
holder | common › party | yes | |
category | common › category | yes | |
country | common › country | yes | |
currency | common › currency | yes | |
language | common › language | yes | |
statement | string | yes | |
parser | string | Identifier and version of the procedure that derived criteria from the statement, if any (spec §4, rule 2). | |
criteria | object | yes | |
area | common › area | ||
budget | object | ||
hiddenLimit | common › sealed | The buyer's private price cap, sealed by the holder (spec §4.2). | |
buyBy | common › date | ||
validUntil | common › timestamp | yes | |
status | "active" | "paused" | "fulfilled" | "withdrawn" | "expired" | yes | |
buyer | object | yes | |
consent | common › id | yes | |
visibility | "private" | "aggregate" | "pseudonymous" | yes | |
allowedSellers | array of common › id | ||
extensions | common › extensions |
Examples#
- intent-property-cz valid
- intent-vehicle-sk valid
- intent-empty-must invalid
- intent-plain-hidden-limit invalid
- intent-property-protected-characteristic invalid
Full schema#
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://istointents.org/schemas/0.1/intent.schema.json",
"title": "Isto Intents Intent",
"description": "A standing purchase intent (spec section 4).",
"type": "object",
"required": [
"specVersion",
"type",
"id",
"created",
"holder",
"category",
"country",
"currency",
"language",
"statement",
"criteria",
"validUntil",
"status",
"buyer",
"consent",
"visibility"
],
"properties": {
"specVersion": {
"$ref": "common.schema.json#/$defs/version"
},
"type": {
"const": "intent"
},
"id": {
"$ref": "common.schema.json#/$defs/id"
},
"created": {
"$ref": "common.schema.json#/$defs/timestamp"
},
"updated": {
"$ref": "common.schema.json#/$defs/timestamp"
},
"holder": {
"$ref": "common.schema.json#/$defs/party"
},
"category": {
"$ref": "common.schema.json#/$defs/category"
},
"country": {
"$ref": "common.schema.json#/$defs/country"
},
"currency": {
"$ref": "common.schema.json#/$defs/currency"
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"statement": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"parser": {
"type": "string",
"description": "Identifier and version of the procedure that derived criteria from the statement, if any (spec §4, rule 2)."
},
"criteria": {
"type": "object",
"required": [
"must"
],
"properties": {
"must": {
"type": "object",
"minProperties": 1
},
"nice": {
"type": "object"
}
},
"additionalProperties": false
},
"area": {
"$ref": "common.schema.json#/$defs/area"
},
"budget": {
"type": "object",
"properties": {
"min": {
"$ref": "common.schema.json#/$defs/amount"
},
"max": {
"$ref": "common.schema.json#/$defs/amount"
}
},
"additionalProperties": false
},
"hiddenLimit": {
"$ref": "common.schema.json#/$defs/sealed",
"description": "The buyer's private price cap, sealed by the holder (spec §4.2)."
},
"buyBy": {
"$ref": "common.schema.json#/$defs/date"
},
"validUntil": {
"$ref": "common.schema.json#/$defs/timestamp"
},
"status": {
"enum": [
"active",
"paused",
"fulfilled",
"withdrawn",
"expired"
]
},
"buyer": {
"type": "object",
"required": [
"pseudonym"
],
"properties": {
"pseudonym": {
"type": "string",
"minLength": 8
}
},
"additionalProperties": false
},
"consent": {
"$ref": "common.schema.json#/$defs/id"
},
"visibility": {
"enum": [
"private",
"aggregate",
"pseudonymous"
]
},
"allowedSellers": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/id"
}
},
"extensions": {
"$ref": "common.schema.json#/$defs/extensions"
}
},
"allOf": [
{
"if": {
"properties": {
"category": {
"const": "vehicle"
}
}
},
"then": {
"properties": {
"criteria": {
"properties": {
"must": {
"$ref": "criteria-vehicle.schema.json"
},
"nice": {
"$ref": "criteria-vehicle.schema.json"
}
}
}
}
}
},
{
"if": {
"properties": {
"category": {
"const": "property"
}
}
},
"then": {
"properties": {
"criteria": {
"properties": {
"must": {
"$ref": "criteria-property.schema.json"
},
"nice": {
"$ref": "criteria-property.schema.json"
}
}
}
}
}
}
],
"additionalProperties": false
}