Bookings
Update booking
This operation updates a booking.
Note: This operation needs Authentication.
Request
PATCH
[PlatformAddress]/v1/bookings/{id}
{
"data": {
"type": "bookings",
"id": "83f93e1c-b6e1-4040-90cf-3274b6f3c82d",
"attributes": {
"status": "confirmed",
"partySize": 6,
"bookingDatetime": "2024-10-24T08:44:45.409Z"
},
"relationships": {
"customer": {
"data": {
"type": "customers",
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e65"
}
},
"tables": {
"data": [
{
"type": "tables",
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e78"
}
]
}
}
}
}
booking_update
type
string
required
The type member is used to describe resource objects that share common attributes and relationships.
booking_update_attributes
isWalkIn
boolean,null
optional
Indicates if the booking is a walk-in.
status
string,null
optional
The initial status of the booking. Possible values are "confirmed", "seated", "completed", "cancelled", and "noShow".
partySize
integer
required
Represents the number of people included in the booking.
bookingDatetime
string
required, max length 25 characters
The booking's date.
duration
integer,null
optional
Represents the length of the booking in minutes.
notes
string,null
optional, max length 10000 characters
Additional notes for the booking.
roomNumber
string,null
optional, max length 100 characters
The room number of the booking's customer.
promotions
string,null
optional, max length 100 characters
The promotions of the booking.
bookingReference
string,null
optional, max length 255 characters
A reference code or identifier associated with the booking.
depositAmount
string,null
optional, max length 255 characters
The amount of the deposit.
Response
{
"data": {
"id": "83f93e1c-b6e1-4040-90cf-3274b6f3c82d",
"type": "bookings",
"attributes": {
"status": "confirmed",
"bookingDatetime": "2024-10-24T08:44:45.409Z",
"duration": 90,
"partySize": 6,
"notes": "Vegetarian",
"promotions": "Dinner - 4 courses INC",
"roomNumber": "11",
"bookingReference": "R43RdhQ",
"isWalkIn": false,
"createdAt": "2024-10-24T08:44:45.409Z",
"updatedAt": "2024-10-24T08:44:45.409Z"
},
"relationships": {
"orders": {
"data": [
{
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e65",
"type": "orders"
}
]
},
"customer": {
"data": {
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e65",
"type": "customers"
}
},
"tables": {
"data": [
{
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e78",
"type": "tables"
}
]
}
}
}
}
Below is a list of all possible fields this endpoint can return including relationships fields fetched with include query parameter.
booking
id
string
required, max length 36 characters
Universally unique ID (UUID) that identifies the related object.
type
string
required
The type member is used to describe resource objects that share common attributes and relationships.
relationships
required
A relationships object describing relationships between the resource and other JSON:API resources.
booking_attributes
isWalkIn
boolean
required
Indicates if the booking is a walk-in.
createdAt
string
required, max length 25 characters
Created at timestamp in RFC 3339 format.
updatedAt
string
required, max length 25 characters
Updated at timestamp in RFC 3339 format.
status
string,null
optional
The initial status of the booking. Possible values are "confirmed", "seated", "completed", "cancelled", and "noShow".
partySize
integer
required
Represents the number of people included in the booking.
bookingDatetime
string
required, max length 25 characters
The booking's date.
duration
integer,null
optional
Represents the length of the booking in minutes.
notes
string,null
optional, max length 10000 characters
Additional notes for the booking.
roomNumber
string,null
optional, max length 100 characters
The room number of the booking's customer.
promotions
string,null
optional, max length 100 characters
The promotions of the booking.
bookingReference
string,null
optional, max length 255 characters
A reference code or identifier associated with the booking.
depositAmount
string,null
optional, max length 255 characters
The amount of the deposit.
booking_relationships
tables
object
required
Details of the tables associated with the booking.
customer
object
required
Details of the customer associated with the booking.
orders
object
required
Details of the orders associated with the booking.
Get bookings
This operation returns a list of bookings.
Note: This operation needs Authentication and supports the following JSON:API features:
Relationships -
customer
,orders
,tables
usinginclude
query parameter.Filters -
createdAtGt
,createdAtGteq
,createdAtLt
,createdAtLteq
,updatedAtGt
,updatedAtGteq
,updatedAtLt
,updatedAtLteq
,bookingDatetimeGt
,bookingDatetimeGteq
,bookingDatetimeLt
,bookingDatetimeLteq
Sparse fieldsets - supports all fields of
booking
query parameter.
Request
GET
[PlatformAddress]/v1/bookings
Response
{
"data": [
{
"id": "31b14937-2524-491f-b0a0-dc0a7393ff33",
"type": "bookings",
"attributes": {
"status": "confirmed",
"bookingDatetime": "2024-10-24T08:44:45.409Z",
"duration": 60,
"partySize": 2,
"notes": "Vegetarian",
"promotions": "Dinner - 4 courses INC",
"roomNumber": "11",
"bookingReference": "R43RdhQ",
"isWalkIn": false,
"createdAt": "2024-10-24T08:44:45.409Z",
"updatedAt": "2024-10-24T08:44:45.409Z"
},
"relationships": {
"orders": {
"data": [
{
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e65",
"type": "orders"
}
]
},
"customer": {
"data": {
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e65",
"type": "customers"
}
},
"tables": {
"data": [
{
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e78",
"type": "tables"
}
]
}
}
}
],
"links": {
"prev": "https://api.mews-demo.com/pos/v1/bookings?page%5Bbefore%5D=NA&page%5Bsize%5D=1",
"next": "https://api.mews-demo.com/pos/v1/bookings?page%5Bafter%5D=NA&page%5Bsize%5D=1"
}
}
Below is a list of all possible fields this endpoint can return including relationships fields fetched with include query parameter.
booking_pagination_links
prev
string
required, max length 1024 characters
The link to the previous page of results.
next
string
required, max length 1024 characters
The link to the next page of results.
Create booking
A booking represents a reservation made by a booking for goods or services, such as a table at a restaurant.
Note: This operation needs Authentication.
Request
POST
[PlatformAddress]/v1/bookings
{
"data": {
"type": "bookings",
"attributes": {
"status": "confirmed",
"partySize": 5,
"bookingDatetime": "2024-10-24T08:44:45.409Z"
},
"relationships": {
"customer": {
"data": {
"type": "customers",
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e65"
}
},
"tables": {
"data": [
{
"type": "tables",
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e78"
}
]
}
}
}
}
booking_create
type
string
required
The type member is used to describe resource objects that share common attributes and relationships.
booking_create_attributes
isWalkIn
boolean,null
optional
Indicates if the booking is a walk-in. Defaults to false
.
status
string,null
optional
The initial status of the booking. Possible values are "confirmed", "seated", "completed", "cancelled", and "noShow".
partySize
integer
required
Represents the number of people included in the booking.
bookingDatetime
string
required, max length 25 characters
The booking's date.
duration
integer,null
optional
Represents the length of the booking in minutes.
notes
string,null
optional, max length 10000 characters
Additional notes for the booking.
roomNumber
string,null
optional, max length 100 characters
The room number of the booking's customer.
promotions
string,null
optional, max length 100 characters
The promotions of the booking.
bookingReference
string,null
optional, max length 255 characters
A reference code or identifier associated with the booking.
depositAmount
string,null
optional, max length 255 characters
The amount of the deposit.
Response
{
"data": {
"id": "83f93e1c-b6e1-4040-90cf-3274b6f3c82d",
"type": "bookings",
"attributes": {
"status": "confirmed",
"bookingDatetime": "2024-10-24T08:44:45.409Z",
"duration": 60,
"partySize": 2,
"notes": "Vegetarian",
"promotions": "Dinner - 4 courses INC",
"roomNumber": "11",
"bookingReference": "R43RdhQ",
"isWalkIn": false,
"createdAt": "2024-10-24T08:44:45.409Z",
"updatedAt": "2024-10-24T08:44:45.409Z"
},
"relationships": {
"customer": {
"data": {
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e65",
"type": "customers"
}
},
"tables": {
"data": [
{
"id": "5efa8b3c-b930-4b31-918d-95ab0e212e78",
"type": "tables"
}
]
}
}
}
}
Below is a list of all possible fields this endpoint can return including relationships fields fetched with include query parameter.
Last updated