{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/Demand/v1/schema.json",
  "title": "Demand",
  "description": "Objects Grid Demand Object. A request to buy or have something done, such as a quote request: what is sought, how many, at most at what price, where and until when. Providers answer with Offers. Modeled in compliance with https://schema.org/Demand.",
  "type": "object",
  "properties": {
    "at_context": {
      "description": "Schema context",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "https://schema.org"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_type": {
      "description": "The object type",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Demand"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_id": {
      "description": "This Demand's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>: its JSON-LD @id, which References point to. Set by the service.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "readOnly": true
    },
    "id": {
      "description": "The unique identifier for Demand. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "identifier": {
      "description": "The unique identifier for Demand. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "name": {
      "description": "The Demand name",
      "type": "array",
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      },
      "minItems": 1
    },
    "description": {
      "description": "The Demand description",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      }
    },
    "url": {
      "description": "This Demand URL. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "minLength": 1,
      "readOnly": true
    },
    "itemOffered": {
      "description": "What is sought",
      "x-objectsgrid-rangeIncludes": [
        "Product",
        "ProductGroup",
        "ProductModel",
        "Service"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "businessFunction": {
      "description": "What is to be done with it: Buy, LeaseOut, Repair, ...",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/BusinessFunction/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "eligibleQuantity": {
      "description": "How many",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/QuantitativeValue/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "priceSpecification": {
      "description": "The prices it accepts, e.g. at most 500 EUR",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/UnitPriceSpecification/v1/schema.json"
      },
      "maxItems": 20
    },
    "availabilityStarts": {
      "description": "From when it is needed",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "availabilityEnds": {
      "description": "Until when it is open",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "areaServed": {
      "description": "Where it is needed: a name (text, e.g. 'Berlin'), a GeoCircle (a radius around a point) or a GeoShape, each with its at_type. Stored and returned, not searchable.",
      "type": [
        "array",
        "null"
      ],
      "maxItems": 50,
      "items": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          {
            "$ref": "https://objectsgrid.com/.well-known/objects-catalog/GeoCircle/v1/schema.json"
          },
          {
            "$ref": "https://objectsgrid.com/.well-known/objects-catalog/GeoShape/v1/schema.json"
          }
        ]
      }
    },
    "seller": {
      "x-objectsgrid-erasure": "keep",
      "description": "Who seeks it: Schema.org's seller of a Demand is the party asking",
      "x-objectsgrid-rangeIncludes": [
        "Organization",
        "Person"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "tags": {
      "description": "Tags an ABAC policy can decide on. A name may repeat; the same name and value appear once. Every stored object has them: created empty when not sent, kept by a replacement (PUT) that does not mention them, unchanged by a patch that does not mention them, cleared by null or [].",
      "type": "array",
      "default": [],
      "uniqueItems": true,
      "maxItems": 50,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Tag/v1/schema.json"
      }
    },
    "meta": {
      "description": "System-managed metadata for the object (version, audit fields). Assigned by the server.",
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/ObjectMeta/v1/schema.json",
      "readOnly": true
    }
  },
  "required": [
    "name"
  ],
  "unevaluatedProperties": false
}
