Isto Intents Offer
One concrete item on the market (spec section 5). Never carries a private seller's contact.
$id: https://istointents.org/schemas/0.1/offer.schema.json
Fields#
| field | type | required | description |
|---|---|---|---|
specVersion | common › version | yes | |
type | "offer" | yes | |
id | common › id | yes | |
created | common › timestamp | yes | |
source | object | yes | |
category | common › category | yes | |
country | common › country | yes | |
currency | common › currency | yes | |
price | common › amount | yes | |
item | object | yes | |
location | object | ||
seller | object | yes | |
observedAt | common › timestamp | yes | |
inReplyTo | common › id | ||
extensions | common › extensions |
Examples#
- offer-vehicle-listing-sk valid
- offer-vehicle-reply valid
- offer-private-seller-phone invalid
- offer-reply-without-intent invalid
Full schema#
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://istointents.org/schemas/0.1/offer.schema.json",
"title": "Isto Intents Offer",
"description": "One concrete item on the market (spec section 5). Never carries a private seller's contact.",
"type": "object",
"required": [
"specVersion",
"type",
"id",
"created",
"source",
"category",
"country",
"currency",
"price",
"item",
"seller",
"observedAt"
],
"properties": {
"specVersion": {
"$ref": "common.schema.json#/$defs/version"
},
"type": {
"const": "offer"
},
"id": {
"$ref": "common.schema.json#/$defs/id"
},
"created": {
"$ref": "common.schema.json#/$defs/timestamp"
},
"source": {
"type": "object",
"required": [
"operator",
"kind"
],
"properties": {
"operator": {
"$ref": "common.schema.json#/$defs/party"
},
"kind": {
"enum": [
"listing",
"feed",
"reply"
]
},
"url": {
"type": "string",
"format": "uri"
},
"feedFormat": {
"type": "string",
"description": "holder-defined identifier of the feed format the offer came from"
}
},
"additionalProperties": false
},
"category": {
"$ref": "common.schema.json#/$defs/category"
},
"country": {
"$ref": "common.schema.json#/$defs/country"
},
"currency": {
"$ref": "common.schema.json#/$defs/currency"
},
"price": {
"$ref": "common.schema.json#/$defs/amount"
},
"item": {
"type": "object",
"minProperties": 1
},
"location": {
"type": "object",
"properties": {
"geo": {
"$ref": "common.schema.json#/$defs/geo"
},
"region": {
"$ref": "common.schema.json#/$defs/region"
},
"locality": {
"type": "string"
}
},
"additionalProperties": false
},
"seller": {
"type": "object",
"required": [
"kind",
"pseudonym"
],
"properties": {
"kind": {
"enum": [
"dealer",
"private",
"agent"
]
},
"pseudonym": {
"type": "string",
"minLength": 4
}
},
"additionalProperties": false
},
"observedAt": {
"$ref": "common.schema.json#/$defs/timestamp"
},
"inReplyTo": {
"$ref": "common.schema.json#/$defs/id"
},
"extensions": {
"$ref": "common.schema.json#/$defs/extensions"
}
},
"allOf": [
{
"if": {
"properties": {
"category": {
"const": "vehicle"
}
}
},
"then": {
"properties": {
"item": {
"$ref": "criteria-vehicle.schema.json"
}
}
}
},
{
"if": {
"properties": {
"category": {
"const": "property"
}
}
},
"then": {
"properties": {
"item": {
"$ref": "criteria-property.schema.json"
}
}
}
},
{
"if": {
"properties": {
"source": {
"properties": {
"kind": {
"const": "reply"
}
}
}
}
},
"then": {
"required": [
"inReplyTo"
]
}
}
],
"additionalProperties": false
}