Reservation¶
A Reservation books something for someone: reservationFor is the Event,
Place, Service, Product or Organization reserved, and
underName the Person or Organization it is for. An appointment, such as a haircut at 10:00, is a
Reservation of a Service with no kind, its provider the staff member, and startTime and endTime the slot; a
staff member's day is one list, where provider and startTime. additionalType names a kind, and some fields belong to
one kind, refused on the others:
additionalType |
Its own fields | startTime, endTime |
|---|---|---|
| none (an appointment) | none | yes |
FoodEstablishmentReservation |
partySize |
yes |
EventReservation |
none | yes |
LodgingReservation |
checkinTime, checkoutTime, numAdults, numChildren |
no: refused |
An appointment holds its provider for its time: another appointment of the same provider that overlaps it is refused
with 409, also when both are made at the same moment; a cancelled or deleted one frees the time. Tables, rooms and
tickets aren't checked. A booking's tickets, with their seats, are in reservedTicket (Ticket), and the
membership it was made with in programMembershipUsed (ProgramMembership).
A Reservation is a private record of a customer: it has no JSON-LD document.
Modeled on schema.org/Reservation · JSON Schema · ABAC object type Reservation
Example¶
Create one with POST /reservations:
{
"additionalType": "FoodEstablishmentReservation",
"reservationFor": {
"at_id": "https://apis.objectsgrid.com/places/4d5e6f7a-8b9c-4d0e-9f1a-2b3c4d5e6f7a"
},
"underName": {
"at_id": "https://apis.objectsgrid.com/persons/8e9f0a1b-2c3d-4e5f-8a6b-7c8d9e0f1a2b"
},
"reservationStatus": "https://schema.org/ReservationConfirmed",
"startTime": "2026-12-24T19:00:00+01:00",
"partySize": 4
}
Fields¶
Required: reservationFor, underName.
| Field | Type | Required | Description |
|---|---|---|---|
at_context |
https://schema.org |
JSON-LD @context, always https://schema.org. |
|
at_type |
Reservation |
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. |
|
additionalType |
one of FoodEstablishmentReservation, LodgingReservation, EventReservation |
The kind of reservation, a Schema.org subtype of Reservation: FoodEstablishmentReservation takes partySize, LodgingReservation checkinTime, checkoutTime, numAdults and numChildren and no startTime or endTime; EventReservation and a Reservation of no kind (an appointment, such as a Service at a time) take startTime and endTime. None for a Reservation. | |
url |
URL | The object's own URL, https://apis.objectsgrid.com/<path>/<id>. Assigned by ObjectsGrid. |
|
reservationId |
string | The identifier of the reservation, e.g. a booking reference | |
reservationStatus |
ReservationStatusType | The status of the reservation | |
bookingTime |
date-time | When the reservation was made | |
modifiedTime |
date-time | When the reservation was last changed | |
totalPrice |
number | The total price of the reservation | |
priceCurrency |
CurrencyCodeEnumeration | The currency of totalPrice, ISO 4217 | |
startTime |
date-time | When the booking starts: a table, an appointment, a slot. Every kind but LodgingReservation, which has checkinTime. An appointment (no kind) with a provider, startTime and endTime holds the provider for that time: another one overlapping it is refused with 409 | |
endTime |
date-time | When the booking ends, if it has an end. Every kind but LodgingReservation, which has checkoutTime | |
partySize |
integer | FoodEstablishmentReservation: the number of people | |
checkinTime |
date-time | LodgingReservation: the earliest check-in | |
checkoutTime |
date-time | LodgingReservation: the latest check-out | |
numAdults |
integer | LodgingReservation: the number of adults | |
numChildren |
integer | LodgingReservation: the number of children | |
reservationFor |
Reference to Event or Place or Service or Product or Organization or Accommodation | Yes | What is reserved: an Event, a Place such as a restaurant or hotel, an Accommodation (a room or unit: two LodgingReservations of one Accommodation can't overlap), a Service, a Product or an Organization |
underName |
Reference to Person or Organization | Yes | The person or organization the reservation is for |
provider |
Reference to Organization or Person | The party providing what is reserved | |
broker |
Reference to Organization or Person | An entity that arranged the reservation | |
reservedTicket |
list of Ticket | The tickets of the reservation, with their seats | |
programMembershipUsed |
Reference to ProgramMembership | The membership the reservation was made with, e.g. for a member price | |
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. | |
lodgingUnitType |
string | LodgingReservation: the category booked when the stay is of the hotel (reservationFor a Place), not of one Accommodation, e.g. 'Deluxe double' | |
lodgingUnitDescription |
string | LodgingReservation: a description of the unit booked | |
checkIns |
computed: list of CheckInAction | Its check-ins. Computed, read-only: the objects whose CheckInAction.object points to this object, listed from that type; never stored or written. ObjectsGrid's, beyond Schema.org: attendance as a list; left out of JSON-LD documents. |
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 /reservations |
| List and search | GET /reservations |
| Create up to 100 at once | POST /reservations/batch |
| Retrieve | GET /reservations/{id} |
| Replace | PUT /reservations/{id} |
| Update some fields | PATCH /reservations/{id} |
| Delete | DELETE /reservations/{id} |
Reservation objects have no JSON-LD document: asked for one (Accept: application/ld+json), GET answers 406.
The OpenAPI contract, with every parameter and response: Reservations (JSON).
GraphQL¶
Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.
| Operation | Field |
|---|---|
| Query | reservation(id: ID!, version: String): Reservation |
| Query | reservations(where: ReservationWhereInput, orderBy: [ReservationOrderByInput!], first: Int, after: String): ReservationConnection! |
| Query | reservationsGroupBy(by: [ReservationGroupByField!]!, where: ReservationWhereInput, having: ReservationHavingInput, orderBy: [ReservationGroupByOrderByInput!], first: Int, after: String): ReservationGroupByConnection! |
| Mutation | createReservation(input: CreateReservationInput!): Reservation! |
| Mutation | updateReservation(input: UpdateReservationInput!, expectedVersion: String): Reservation! |
| Mutation | deleteReservation(id: ID!, expectedVersion: String): Boolean! |
Webhook events¶
Subscribe to these events in your webhook configuration to be called when a Reservation changes:
ReservationCreated, ReservationUpdated, ReservationPatched, ReservationDeleted.