Isto Intents interest
The structuredContent of intent_express_interest, intent_get_interest and intent_withdraw_interest (offer profile, draft 0.4). It carries a status only: never a contact, a price or the message.
$id: https://istointents.org/schemas/0.4/interest.schema.json
Fields#
| field | type | required | description |
|---|---|---|---|
specVersion | "0.4" | yes | |
type | "interest" | yes | |
found | boolean | ||
status | "awaiting_buyer_confirmation" | "sent_to_seller" | "contact_shared" | "seller_declined" | "no_response" | "offer_gone" | "withdrawn" | "expired" | "not_available" | ||
interestCode | string (pattern ^[A-Za-z0-9_-]{22,}$) | ||
confirmUrl | string (uri, pattern ^https://) | on the holder's host or below it; never contains the interestCode | |
confirmExpiresAt | common › timestamp | ||
offer | object | ||
reason | "seller-not-reachable" | "offer-gone" | "already-expressed" | "rate-limited" | ||
updatedAt | common › timestamp | ||
respondBy | common › timestamp |
Examples#
- interest-contact-shared valid
- interest-created valid
- interest-not-available valid
- interest-not-available-with-code invalid
- interest-with-price invalid
- interest-with-seller-email invalid
Full schema#
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://istointents.org/schemas/0.4/interest.schema.json",
"title": "Isto Intents interest",
"description": "The structuredContent of intent_express_interest, intent_get_interest and intent_withdraw_interest (offer profile, draft 0.4). It carries a status only: never a contact, a price or the message.",
"type": "object",
"required": [
"specVersion",
"type"
],
"properties": {
"specVersion": {
"const": "0.4"
},
"type": {
"const": "interest"
},
"found": {
"type": "boolean"
},
"status": {
"enum": [
"awaiting_buyer_confirmation",
"sent_to_seller",
"contact_shared",
"seller_declined",
"no_response",
"offer_gone",
"withdrawn",
"expired",
"not_available"
]
},
"interestCode": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{22,}$"
},
"confirmUrl": {
"type": "string",
"format": "uri",
"pattern": "^https://",
"maxLength": 2048,
"description": "on the holder's host or below it; never contains the interestCode"
},
"confirmExpiresAt": {
"$ref": "https://istointents.org/schemas/0.1/common.schema.json#/$defs/timestamp"
},
"offer": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"format": "uri",
"pattern": "^https://",
"maxLength": 2048
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"additionalProperties": false
},
"reason": {
"enum": [
"seller-not-reachable",
"offer-gone",
"already-expressed",
"rate-limited"
]
},
"updatedAt": {
"$ref": "https://istointents.org/schemas/0.1/common.schema.json#/$defs/timestamp"
},
"respondBy": {
"$ref": "https://istointents.org/schemas/0.1/common.schema.json#/$defs/timestamp"
}
},
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"found": {
"const": false
}
},
"required": [
"found"
]
},
"then": {
"not": {
"anyOf": [
{
"required": [
"status"
]
},
{
"required": [
"offer"
]
},
{
"required": [
"interestCode"
]
},
{
"required": [
"confirmUrl"
]
},
{
"required": [
"updatedAt"
]
},
{
"required": [
"respondBy"
]
},
{
"required": [
"reason"
]
}
]
}
}
},
{
"if": {
"not": {
"properties": {
"found": {
"const": false
}
},
"required": [
"found"
]
}
},
"then": {
"required": [
"status",
"offer"
]
}
},
{
"if": {
"properties": {
"status": {
"const": "not_available"
}
},
"required": [
"status"
]
},
"then": {
"required": [
"reason"
],
"not": {
"anyOf": [
{
"required": [
"interestCode"
]
},
{
"required": [
"confirmUrl"
]
}
]
}
}
},
{
"if": {
"required": [
"interestCode"
]
},
"then": {
"required": [
"confirmUrl",
"confirmExpiresAt"
]
}
},
{
"if": {
"properties": {
"status": {
"const": "sent_to_seller"
}
},
"required": [
"status"
]
},
"then": {
"required": [
"respondBy"
]
}
}
]
}