1.0 stable for the consent-link profile — MCP binding profile, registry and forwarding. Other profiles and the core objects are draft. What is stable

Isto Intents interest

interest.schema.json · raw JSON · JSON Schema 2020-12

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#

fieldtyperequireddescription
specVersion"0.4"yes
type"interest"yes
foundboolean
status"awaiting_buyer_confirmation" | "sent_to_seller" | "contact_shared" | "seller_declined" | "no_response" | "offer_gone" | "withdrawn" | "expired" | "not_available"
interestCodestring (pattern ^[A-Za-z0-9_-]{22,}$)
confirmUrlstring (uri, pattern ^https://)on the holder's host or below it; never contains the interestCode
confirmExpiresAtcommon › timestamp
offerobject
reason"seller-not-reachable" | "offer-gone" | "already-expressed" | "rate-limited"
updatedAtcommon › timestamp
respondBycommon › timestamp

Examples#

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"
        ]
      }
    }
  ]
}