Skip to content

Demand

A Demand is a request to buy or have something done: a quote request such as paint three rooms. It says what is sought (itemOffered, a Product or Service), how many, the prices it accepts (UnitPriceSpecifications), where (areaServed) and until when; seller is, in Schema.org's words for a Demand, the party asking. Providers answer with Offers.

Modeled on schema.org/Demand · JSON Schema · ABAC object type Demand

Example

Create one with POST /demands:

{
  "name": [
    {
      "at_language": "en",
      "at_value": "Paint three rooms"
    }
  ],
  "itemOffered": {
    "at_id": "https://apis.objectsgrid.com/services/6f7a8b9c-0d1e-4f2a-b3c4-d5e6f7a8b9c0"
  },
  "priceSpecification": [
    {
      "price": 1500,
      "priceCurrency": "EUR"
    }
  ],
  "areaServed": [
    "Berlin"
  ],
  "availabilityEnds": "2027-02-28T00:00:00+01:00"
}

Fields

Required: name.

Field Type Required Description
at_context https://schema.org JSON-LD @context, always https://schema.org.
at_type Demand JSON-LD @type, the object's type name.
at_id URL The object's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>, its JSON-LD @id: what References to it hold. Assigned by ObjectsGrid.
id string The object's id. Assigned by ObjectsGrid when the object is created.
identifier string The object's id, as Schema.org identifier. Assigned by ObjectsGrid.
name list of LanguageTaggedString Yes The Demand name. See schema.org/name.
description list of LanguageTaggedString The Demand description. See schema.org/description.
url URL The object's own URL, https://apis.objectsgrid.com/<path>/<id>. Assigned by ObjectsGrid.
itemOffered Reference to Product or ProductGroup or ProductModel or Service What is sought
businessFunction BusinessFunction What is to be done with it: Buy, LeaseOut, Repair, ...
eligibleQuantity QuantitativeValue How many
priceSpecification list of UnitPriceSpecification The prices it accepts, e.g. at most 500 EUR
availabilityStarts date-time From when it is needed
availabilityEnds date-time Until when it is open
areaServed list of any 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.
seller Reference to Organization or Person Who seeks it: Schema.org's seller of a Demand is the party asking
tags list of Tag Tags your ABAC policy decides on. Created empty when not sent, kept by a PUT that leaves them out, cleared by null or [].
meta ObjectMeta Read-only metadata: version, type, creation and last update.

REST API

Base URL https://apis.objectsgrid.com. Every request sends the X-ObjectsGrid-AccessPoint and Authorization: Bearer <access token> headers; see the REST API guide.

Operation Request
Create POST /demands
List and search GET /demands
Create up to 100 at once POST /demands/batch
Retrieve GET /demands/{id}
Retrieve as a JSON-LD document for your pages GET /demands/{id} with Accept: application/ld+json; see JSON-LD for your pages
Replace PUT /demands/{id}
Update some fields PATCH /demands/{id}
Delete DELETE /demands/{id}

The OpenAPI contract, with every parameter and response: Demands (JSON).

GraphQL

Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.

Operation Field
Query demand(id: ID!, version: String): Demand
Query demands(where: DemandWhereInput, orderBy: [DemandOrderByInput!], first: Int, after: String): DemandConnection!
Query demandsGroupBy(by: [DemandGroupByField!]!, where: DemandWhereInput, having: DemandHavingInput, orderBy: [DemandGroupByOrderByInput!], first: Int, after: String): DemandGroupByConnection!
Mutation createDemand(input: CreateDemandInput!): Demand!
Mutation updateDemand(input: UpdateDemandInput!, expectedVersion: String): Demand!
Mutation deleteDemand(id: ID!, expectedVersion: String): Boolean!

Webhook events

Subscribe to these events in your webhook configuration to be called when a Demand changes:

DemandCreated, DemandUpdated, DemandPatched, DemandDeleted.