Return all reservations for given guest for specific business
GET/api/v1/businesses/:id/guests/:guest_id/reservations
Return all reservations for given guest for specific business
Request
Path Parameters
id int32required
guest_id int32required
Query Parameters
page int32
Default value: 1
Page offset to fetch.
per_page int32
Default value: 10
Number of results to return per page.
Responses
- 200
Return all reservations for given guest for specific business
- application/vnd.api+json
- Schema
- Example (from schema)
- Example
Schema
Array [
Array [
]
]
data
object[]
required
id stringrequired
type stringrequired
Possible values: [reservations
]
links
object
required
self stringrequired
attributes
object
required
comment stringnullablerequired
date stringrequired
email stringnullablerequired
from numberrequired
marketing-agreement boolean
name stringrequired
other-rejection-reason stringnullablerequired
party-size numberrequired
phone stringnullablerequired
phone-country-code stringnullablerequired
phone-country-prefix stringnullablerequired
reject-reason stringnullablerequired
state string
status string
table
object
nullable
required
id numberrequired
business_id stringrequired
floor_plan_id string
number stringrequired
number_of_seats numberrequired
uuid stringrequired
shape stringrequired
rotation numberrequired
position_x numberrequired
position_y numberrequired
guest-id string
to numberrequired
created-at stringrequired
relationships
object
required
bookings
object
required
data
object[]
required
type stringrequired
Possible values: [bookings
]
id stringrequired
tables
object
required
links
object
required
self stringrequired
related stringrequired
business
object
required
links
object
required
self stringrequired
related stringrequired
user
object
required
links
object
required
self stringrequired
related stringrequired
meta
object
required
total-count numberrequired
total-pages numberrequired
{
"data": [
{
"id": "string",
"type": "reservations",
"links": {
"self": "string"
},
"attributes": {
"comment": "string",
"date": "string",
"email": "string",
"from": 0,
"marketing-agreement": true,
"name": "string",
"other-rejection-reason": "string",
"party-size": 0,
"phone": "string",
"phone-country-code": "string",
"phone-country-prefix": "string",
"reject-reason": "string",
"state": "string",
"status": "string",
"table": {
"id": 0,
"business_id": "string",
"floor_plan_id": "string",
"number": "string",
"number_of_seats": 0,
"uuid": "string",
"shape": "string",
"rotation": 0,
"position_x": 0,
"position_y": 0
},
"guest-id": "string",
"to": 0,
"created-at": "string"
},
"relationships": {
"bookings": {
"data": [
{
"type": "bookings",
"id": "string"
}
]
},
"tables": {
"links": {
"self": "string",
"related": "string"
}
},
"business": {
"links": {
"self": "string",
"related": "string"
}
},
"user": {
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"meta": {
"total-count": 0,
"total-pages": 0
}
}
{
"data": [
{
"id": "e35ed9c8-756f-45a2-8c28-b02c76d73ffa",
"type": "reservations",
"links": {
"self": "/reservations/e35ed9c8-756f-45a2-8c28-b02c76d73ffa"
},
"attributes": {
"comment": null,
"date": "2023-09-21T00:00:00.000Z",
"email": "john@smith.com",
"from": 43200,
"marketing-agreement": false,
"name": "John Smith",
"other-rejection-reason": null,
"party-size": 4,
"phone": "782345678",
"phone-country-code": "CH",
"phone-country-prefix": "41",
"reject-reason": null,
"state": "booked",
"table": {
"id": 1194,
"business_id": 4656,
"number": "2",
"number_of_seats": 4,
"uuid": "5f6f03f2-d776-4af6-b387-70312759e1d9",
"shape": "round",
"rotation": 0,
"position_x": 210,
"position_y": 0
},
"guest-id": "fb15a9de-3903-43ce-9155-6a063b186c17",
"to": 45900,
"created-at": "2023-09-20T10:07:32.873Z"
},
"relationships": {
"bookings": {
"links": {
"self": "/reservations/e35ed9c8-756f-45a2-8c28-b02c76d73ffa/relationships/bookings",
"related": "/reservations/e35ed9c8-756f-45a2-8c28-b02c76d73ffa/bookings"
}
},
"tables": {
"links": {
"self": "/reservations/e35ed9c8-756f-45a2-8c28-b02c76d73ffa/relationships/tables",
"related": "/reservations/e35ed9c8-756f-45a2-8c28-b02c76d73ffa/tables"
}
},
"business": {
"links": {
"self": "/reservations/e35ed9c8-756f-45a2-8c28-b02c76d73ffa/relationships/business",
"related": "/reservations/e35ed9c8-756f-45a2-8c28-b02c76d73ffa/business"
}
},
"user": {
"links": {
"self": "/reservations/e35ed9c8-756f-45a2-8c28-b02c76d73ffa/relationships/user",
"related": "/reservations/e35ed9c8-756f-45a2-8c28-b02c76d73ffa/user"
}
}
}
}
],
"meta": {
"total-count": 1,
"total-pages": 1
}
}
Loading...