For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Bookings

Bookings object

Update booking

patch
/v1/bookings/{id}

This operation updates a booking.

Note: This operation needs Authentication.

Authorizations
AuthorizationstringRequired

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Path parameters
idstring · uuid · min: 36 · max: 36Required

Universally unique ID UUID4.

Example: 83f93e1c-b6e1-4040-90cf-3274b6f3c82d
Body
Responses
200

The booking was successfully updated.

application/vnd.api+json
patch/v1/bookings/{id}
PATCH /pos/v1/bookings/{id} HTTP/1.1
Host: api.mews.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 352

{
  "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"
          }
        ]
      }
    }
  }
}
{
  "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"
          }
        ]
      }
    }
  }
}

Get bookings

get
/v1/bookings

This operation returns a list of bookings.

Note: This operation needs Authentication and supports the following JSON:API features:

  • Relationships - customer, orders, tables using include query parameter.

  • Filters - createdAtGt, createdAtGteq, createdAtLt, createdAtLteq, updatedAtGt, updatedAtGteq, updatedAtLt, updatedAtLteq, bookingDatetimeGt, bookingDatetimeGteq, bookingDatetimeLt, bookingDatetimeLteq

  • Sparse fieldsets - supports all fields of booking query parameter.

Authorizations
AuthorizationstringRequired

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Query parameters
page[size]integer · int32 · min: 1 · max: 1000Optional

The number of resources to return in a single response.

page[before]string · min: 1 · max: 36Optional

Unique identifier.

Pattern: ^[a-zA-Z0-9-]+$
page[after]string · min: 1 · max: 36Optional

Unique identifier.

Pattern: ^[a-zA-Z0-9-]+$
filter[createdAtGt]any ofOptional

Filters the objects that were created after a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-16T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-16
filter[createdAtGteq]any ofOptional

Filters the objects that were created after or on a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-16T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-16
filter[createdAtLt]any ofOptional

Filters the objects that were created before a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-17T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-17
filter[createdAtLteq]any ofOptional

Filters the objects that were created before or on a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-17T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-17
filter[updatedAtGt]any ofOptional

Filters the objects that were updated after a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-16T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-16
filter[updatedAtGteq]any ofOptional

Filters the objects that were updated after or on a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-16T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-16
filter[updatedAtLt]any ofOptional

Filters the objects that were updated before a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-17T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-17
filter[updatedAtLteq]any ofOptional

Filters the objects that were updated before or on a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-17T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-17
filter[bookingDatetimeGt]any ofOptional

Filters the bookings that were booked after a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-17T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-17
filter[bookingDatetimeGteq]any ofOptional

Filters the bookings that were booked after or on a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-17T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-17
filter[bookingDatetimeLt]any ofOptional

Filters the bookings that were updated before a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-17T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-17
filter[bookingDatetimeLteq]any ofOptional

Filters the bookings that were updated before or on a specified datetime.

string · date-time · max: 25Optional

Timestamp in RFC 3339 format.

Example: 2023-10-17T14:30:00Z
or
string · date · max: 10Optional

Date in RFC 3339 format.

Example: 2023-10-17
Responses
200

Successful response with bookings data in JSON:API format.

application/vnd.api+json
get/v1/bookings
GET /pos/v1/bookings HTTP/1.1
Host: api.mews.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "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"
  }
}

Create booking

post
/v1/bookings

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.

Authorizations
AuthorizationstringRequired

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Body
Responses
201

The booking was successfully created.

application/vnd.api+json
post/v1/bookings
POST /pos/v1/bookings HTTP/1.1
Host: api.mews.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 308

{
  "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"
          }
        ]
      }
    }
  }
}
{
  "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"
          }
        ]
      }
    }
  }
}

Last updated

Was this helpful?