# Bookings

Bookings object

## Update booking

> This operation updates a booking.\
> \
> \*\*Note:\*\* This operation needs \[Authentication]\(../essential-guide/authentication.md).<br>

```json
{"openapi":"3.1.0","info":{"title":"POS API","version":"1.0.0"},"tags":[{"name":"Bookings","description":"Bookings object"}],"servers":[{"url":"https://api.mews.com/pos","description":"Production"},{"url":"https://api.mews-demo.com/pos","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"auth-scheme","description":"Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>"}},"schemas":{"bookings":{"booking_update_request":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bookings/booking_update","description":"The document's \"primary data\"."}},"required":["data"]},"booking_update":{"type":"object","properties":{"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"bookings"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","allOf":[{"$ref":"#/components/schemas/bookings/booking_attributes"},{"type":"object","properties":{"isWalkIn":{"type":["boolean","null"],"description":"Indicates if the booking is a walk-in."}}}]},"relationships":{"type":"object","description":"An [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) representing associations with other resources.","properties":{"customer":{"type":"object","description":"Represents the customer associated with the booking.","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"customers"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}}}}},"tables":{"type":"object","description":"Represents the table associated with the booking.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":1000,"items":{"type":"object","properties":{"type":{"type":"string","const":"tables"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}}}}}}}}},"required":["type"]},"booking_attributes":{"type":"object","properties":{"status":{"type":["string","null"],"enum":["confirmed","seated","completed","cancelled","no_show"],"description":"The initial status of the booking. Possible values are \"confirmed\", \"seated\", \"completed\", \"cancelled\", and \"no_show\"."},"partySize":{"type":"integer","description":"Represents the number of people included in the booking.","format":"int32","minimum":1,"maximum":1000},"bookingDatetime":{"type":"string","maxLength":25,"format":"date-time","description":"The booking's date."},"duration":{"type":["integer","null"],"description":"Represents the length of the booking in minutes.","format":"int32","minimum":1,"maximum":10000},"notes":{"type":["string","null"],"maxLength":10000,"pattern":"^[^<>&]+$","description":"Additional notes for the booking."},"roomNumber":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The room number of the booking's customer."},"promotions":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The promotions of the booking."},"bookingReference":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"A reference code or identifier associated with the booking."},"depositAmount":{"type":["string","null"],"description":"The amount of the deposit.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"}}},"booking_payload":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bookings/booking","description":"The document's \"primary data\"."}},"required":["data"]},"booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"bookings"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","allOf":[{"$ref":"#/components/schemas/bookings/booking_attributes"},{"type":"object","properties":{"isWalkIn":{"type":"boolean","description":"Indicates if the booking is a walk-in."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["status","partySize","bookingDatetime"]}]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"tables":{"type":"object","description":"Details of the tables associated with the booking.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"}},"required":["id","type"]}}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the booking.","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"customers"}}},{"type":"null"}]}}},"orders":{"type":"object","description":"Details of the orders associated with the booking.","properties":{"data":{"type":"array","description":"A list of related order objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type"]}},"error":{"type":"object","description":"A JSON:API error object.\n\nAdditional properties specific to the problem type may be present.    \n","properties":{"errors":{"type":"array","description":"An array of error details to accompany a problem details response.","maxItems":1000,"items":{"type":"object","description":"An object to provide explicit details on a problem towards an API consumer.","properties":{"id":{"type":"string","maxLength":16,"description":"A unique identifier for this particular occurrence of the problem.","pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","maxLength":3,"description":"The HTTP status code applicable to this problem, expressed as a string value.","pattern":"^[1-5][0-9]{2}$"},"code":{"type":"string","maxLength":50,"description":"An application-specific error code, expressed as a string value.","pattern":"^[A-Za-z0-9_-]+$"},"title":{"type":"string","description":"A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.","maxLength":256,"pattern":"^.{1,255}$"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized.","maxLength":1024,"pattern":"^.{1,1023}$"},"source":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer to a specific request body property that is the source of error.","maxLength":1024,"pattern":"^$|^/([A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+$"},"parameter":{"type":"string","description":"A string indicating which URI query parameter caused the error.","maxLength":1024,"pattern":"^[A-Za-z0-9_]+$"},"header":{"type":"string","description":"The name of the header that is the source of error.","maxLength":1024,"pattern":"^[A-Za-z-]+$"}}},"meta":{"type":"object","description":"Additional information about the error.","additionalProperties":true}},"required":["title"]}}},"required":["errors"]}},"headers":{"x_rate_limit_limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_reset":{"description":"The time at which the rate limit resets, in UTC epoch seconds.","schema":{"type":"integer","format":"int64","minimum":1633036800,"maximum":2147483647}},"access_control_allow_origin":{"description":"Specifies which origins are allowed to access the resource.","schema":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[A-Za-z /*]+$"}},"retry_after":{"description":"The time the client should wait before making a new request.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":3600}},"x_signature":{"description":"HMAC signature (SHA-256, Base64 encoded) to verify the authenticity of the webhook request.","required":true,"schema":{"type":"string","maxLength":1024,"pattern":"^[A-Za-z0-9+/=]+$"}}},"responses":{"bad_request":{"description":"Bad request.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unauthorized":{"description":"Unauthorized.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"too_many_requests":{"description":"Too many requests.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Retry-After":{"$ref":"#/components/headers/retry_after"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"internal_server_error":{"description":"Internal Server Error.","content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"service_unavailable":{"description":"Service is unavailable.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}}}},"paths":{"/v1/bookings/{id}":{"patch":{"operationId":"updateBooking","summary":"Update booking","description":"This operation updates a booking.\n\n**Note:** This operation needs [Authentication](../essential-guide/authentication.md).\n","parameters":[{"in":"path","name":"id","description":"The id of the resource.","required":true,"schema":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID UUID4.","minLength":36,"maxLength":36}}],"requestBody":{"required":true,"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/bookings/booking_update_request"}}}},"tags":["Bookings"],"responses":{"200":{"description":"The booking was successfully updated.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/bookings/booking_payload"}}}},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/unauthorized"},"429":{"$ref":"#/components/responses/too_many_requests"},"500":{"$ref":"#/components/responses/internal_server_error"},"503":{"$ref":"#/components/responses/service_unavailable"}},"callbacks":{"bookingStatusUpdated":{"{$customerProvidedUrl}":{"post":{"summary":"Notify the system of the booking status update","description":"This webhook sends a notification when a booking status is updated.\nThe request will be sent to the **target URL provided by the customer** in their system settings.\nEnsure that your system is ready to receive and verify these requests.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the updated booking.","format":"uuid","minLength":36,"maxLength":36},"type":{"type":"string","enum":["bookings"],"description":"The type of the resource being updated."},"attributes":{"type":"object","properties":{"status":{"type":"string","description":"The new status of the booking.","enum":["confirmed","seated","cancelled","no_show","completed"]},"updated_at":{"type":"string","format":"date-time","description":"Timestamp of when the booking was updated.","maxLength":25}}}}},"meta":{"type":"object","properties":{"event_type":{"type":"string","description":"The event type that triggered the webhook.","enum":["booking.status.updated"]}}}}}}}},"responses":{"200":{"description":"The callback was successfully executed.","headers":{"X-Signature":{"$ref":"#/components/headers/x_signature"},"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}}},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/unauthorized"},"429":{"$ref":"#/components/responses/too_many_requests"},"500":{"$ref":"#/components/responses/internal_server_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}}}}}}}}}
```

## Get bookings

> This operation returns a list of bookings.\
> \
> \*\*Note\*\*: This operation needs \[Authentication]\(../guidelines/authentication.md) and supports the following JSON:API features:\
> \
> \- \[Relationships]\(../guidelines/relationships.md) - \`customer\`, \`orders\`, \`tables\` using \`include\` query parameter.\
> \- \[Filters]\(../guidelines/filtering.md) - \`createdAtGt\`, \`createdAtGteq\`, \`createdAtLt\`, \`createdAtLteq\`, \`updatedAtGt\`, \`updatedAtGteq\`, \`updatedAtLt\`, \`updatedAtLteq\`, \`bookingDatetimeGt\`, \`bookingDatetimeGteq\`, \`bookingDatetimeLt\`, \`bookingDatetimeLteq\`\
> \- \[Sparse fieldsets]\(../guidelines/sparse-fieldsets.md) - supports all fields of \`booking\` query parameter.<br>

```json
{"openapi":"3.1.0","info":{"title":"POS API","version":"1.0.0"},"tags":[{"name":"Bookings","description":"Bookings object"}],"servers":[{"url":"https://api.mews.com/pos","description":"Production"},{"url":"https://api.mews-demo.com/pos","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"auth-scheme","description":"Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>"}},"parameters":{"page_size":{"in":"query","name":"page[size]","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000},"description":"The number of resources to return in a single response.","required":false},"page_before":{"in":"query","name":"page[before]","schema":{"type":"string","title":"Resource identifier","description":"Unique identifier.","pattern":"^[a-zA-Z0-9-]+$","minLength":1,"maxLength":36},"description":"The cursor for the previous page of resources.","required":false},"page_after":{"in":"query","name":"page[after]","schema":{"type":"string","title":"Resource identifier","description":"Unique identifier.","pattern":"^[a-zA-Z0-9-]+$","minLength":1,"maxLength":36},"description":"The cursor for the next page of resources.","required":false},"filter_created_at_gt":{"in":"query","name":"filter[createdAtGt]","description":"Filters the objects that were created after a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_created_at_gteq":{"in":"query","name":"filter[createdAtGteq]","description":"Filters the objects that were created after or on a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_created_at_lt":{"in":"query","name":"filter[createdAtLt]","description":"Filters the objects that were created before a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_created_at_lteq":{"in":"query","name":"filter[createdAtLteq]","description":"Filters the objects that were created before or on a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_updated_at_gt":{"in":"query","name":"filter[updatedAtGt]","description":"Filters the objects that were updated after a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_updated_at_gteq":{"in":"query","name":"filter[updatedAtGteq]","description":"Filters the objects that were updated after or on a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_updated_at_lt":{"in":"query","name":"filter[updatedAtLt]","description":"Filters the objects that were updated before a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_updated_at_lteq":{"in":"query","name":"filter[updatedAtLteq]","description":"Filters the objects that were updated before or on a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"fields_bookings":{"in":"query","name":"fields[bookings]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["status","promotions","bookingReference","roomNumber","notes","depositAmount","duration","partySize","bookingDatetime","createdAt","updatedAt","isWalkIn","customer","orders","tables"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_customers":{"in":"query","name":"fields[customers]","schema":{"type":"array","maxItems":17,"items":{"type":"string","enum":["fullName","companyName","email","taxNumber","notes","phone","mobile","dateOfBirth","createdAt","updatedAt","countrySpecificCode","address1","address2","city","state","postalCode","country"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_orders":{"in":"query","name":"fields[orders]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["covers","tableStatus","status","state","notes","depositAmount","createdAt","updatedAt","promoCode","invoice","customer","booking","tables","outlet","revenueCenter","taxes"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_tables":{"in":"query","name":"fields[tables]","schema":{"type":"array","maxItems":5,"items":{"type":"string","enum":["name","numberOfSeats","createdAt","updatedAt","area"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false}},"headers":{"x_rate_limit_limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_reset":{"description":"The time at which the rate limit resets, in UTC epoch seconds.","schema":{"type":"integer","format":"int64","minimum":1633036800,"maximum":2147483647}},"access_control_allow_origin":{"description":"Specifies which origins are allowed to access the resource.","schema":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[A-Za-z /*]+$"}},"retry_after":{"description":"The time the client should wait before making a new request.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":3600}}},"schemas":{"bookings":{"bookings_response":{"type":"object","properties":{"data":{"type":"array","description":"The document's \"primary data\".","maxItems":1000,"items":{"$ref":"#/components/schemas/bookings/booking"}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/profiles/ethanresnick/cursor-pagination/#auto-id-links) describing cursor pagination links.","properties":{"prev":{"type":["string","null"],"format":"uri","maxLength":1024,"description":"The link to the previous page of results."},"next":{"type":["string","null"],"format":"uri","maxLength":1024,"description":"The link to the next page of results."}},"required":["next","prev"]}},"required":["data","links"]},"booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"bookings"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","allOf":[{"$ref":"#/components/schemas/bookings/booking_attributes"},{"type":"object","properties":{"isWalkIn":{"type":"boolean","description":"Indicates if the booking is a walk-in."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["status","partySize","bookingDatetime"]}]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"tables":{"type":"object","description":"Details of the tables associated with the booking.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"}},"required":["id","type"]}}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the booking.","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"customers"}}},{"type":"null"}]}}},"orders":{"type":"object","description":"Details of the orders associated with the booking.","properties":{"data":{"type":"array","description":"A list of related order objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type"]},"booking_attributes":{"type":"object","properties":{"status":{"type":["string","null"],"enum":["confirmed","seated","completed","cancelled","no_show"],"description":"The initial status of the booking. Possible values are \"confirmed\", \"seated\", \"completed\", \"cancelled\", and \"no_show\"."},"partySize":{"type":"integer","description":"Represents the number of people included in the booking.","format":"int32","minimum":1,"maximum":1000},"bookingDatetime":{"type":"string","maxLength":25,"format":"date-time","description":"The booking's date."},"duration":{"type":["integer","null"],"description":"Represents the length of the booking in minutes.","format":"int32","minimum":1,"maximum":10000},"notes":{"type":["string","null"],"maxLength":10000,"pattern":"^[^<>&]+$","description":"Additional notes for the booking."},"roomNumber":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The room number of the booking's customer."},"promotions":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The promotions of the booking."},"bookingReference":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"A reference code or identifier associated with the booking."},"depositAmount":{"type":["string","null"],"description":"The amount of the deposit.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"}}}},"error":{"type":"object","description":"A JSON:API error object.\n\nAdditional properties specific to the problem type may be present.    \n","properties":{"errors":{"type":"array","description":"An array of error details to accompany a problem details response.","maxItems":1000,"items":{"type":"object","description":"An object to provide explicit details on a problem towards an API consumer.","properties":{"id":{"type":"string","maxLength":16,"description":"A unique identifier for this particular occurrence of the problem.","pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","maxLength":3,"description":"The HTTP status code applicable to this problem, expressed as a string value.","pattern":"^[1-5][0-9]{2}$"},"code":{"type":"string","maxLength":50,"description":"An application-specific error code, expressed as a string value.","pattern":"^[A-Za-z0-9_-]+$"},"title":{"type":"string","description":"A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.","maxLength":256,"pattern":"^.{1,255}$"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized.","maxLength":1024,"pattern":"^.{1,1023}$"},"source":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer to a specific request body property that is the source of error.","maxLength":1024,"pattern":"^$|^/([A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+$"},"parameter":{"type":"string","description":"A string indicating which URI query parameter caused the error.","maxLength":1024,"pattern":"^[A-Za-z0-9_]+$"},"header":{"type":"string","description":"The name of the header that is the source of error.","maxLength":1024,"pattern":"^[A-Za-z-]+$"}}},"meta":{"type":"object","description":"Additional information about the error.","additionalProperties":true}},"required":["title"]}}},"required":["errors"]}},"responses":{"bad_request":{"description":"Bad request.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unauthorized":{"description":"Unauthorized.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"too_many_requests":{"description":"Too many requests.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Retry-After":{"$ref":"#/components/headers/retry_after"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"internal_server_error":{"description":"Internal Server Error.","content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"service_unavailable":{"description":"Service is unavailable.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}}}},"paths":{"/v1/bookings":{"get":{"operationId":"getBookings","summary":"Get bookings","description":"This operation returns a list of bookings.\n\n**Note**: This operation needs [Authentication](../guidelines/authentication.md) and supports the following JSON:API features:\n\n- [Relationships](../guidelines/relationships.md) - `customer`, `orders`, `tables` using `include` query parameter.\n- [Filters](../guidelines/filtering.md) - `createdAtGt`, `createdAtGteq`, `createdAtLt`, `createdAtLteq`, `updatedAtGt`, `updatedAtGteq`, `updatedAtLt`, `updatedAtLteq`, `bookingDatetimeGt`, `bookingDatetimeGteq`, `bookingDatetimeLt`, `bookingDatetimeLteq`\n- [Sparse fieldsets](../guidelines/sparse-fieldsets.md) - supports all fields of `booking` query parameter.\n","parameters":[{"$ref":"#/components/parameters/page_size"},{"$ref":"#/components/parameters/page_before"},{"$ref":"#/components/parameters/page_after"},{"$ref":"#/components/parameters/filter_created_at_gt"},{"$ref":"#/components/parameters/filter_created_at_gteq"},{"$ref":"#/components/parameters/filter_created_at_lt"},{"$ref":"#/components/parameters/filter_created_at_lteq"},{"$ref":"#/components/parameters/filter_updated_at_gt"},{"$ref":"#/components/parameters/filter_updated_at_gteq"},{"$ref":"#/components/parameters/filter_updated_at_lt"},{"$ref":"#/components/parameters/filter_updated_at_lteq"},{"$ref":"#/components/parameters/fields_bookings"},{"$ref":"#/components/parameters/fields_customers"},{"$ref":"#/components/parameters/fields_orders"},{"$ref":"#/components/parameters/fields_tables"},{"in":"query","name":"filter[bookingDatetimeGt]","description":"Filters the bookings that were booked after a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},{"in":"query","name":"filter[bookingDatetimeGteq]","description":"Filters the bookings that were booked after or on a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},{"in":"query","name":"filter[bookingDatetimeLt]","description":"Filters the bookings that were updated before a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},{"in":"query","name":"filter[bookingDatetimeLteq]","description":"Filters the bookings that were updated before or on a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},{"in":"query","name":"include","schema":{"type":"array","maxItems":3,"items":{"type":"string","enum":["customer","orders","tables"]}},"description":"include query parameter to allow the client to customize which related resource should be returned.","required":false}],"tags":["Bookings"],"responses":{"200":{"description":"Successful response with bookings data in JSON:API format.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/bookings/bookings_response"}}}},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/unauthorized"},"429":{"$ref":"#/components/responses/too_many_requests"},"500":{"$ref":"#/components/responses/internal_server_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}}}}}
```

## 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]\(../essential-guide/authentication.md).<br>

```json
{"openapi":"3.1.0","info":{"title":"POS API","version":"1.0.0"},"tags":[{"name":"Bookings","description":"Bookings object"}],"servers":[{"url":"https://api.mews.com/pos","description":"Production"},{"url":"https://api.mews-demo.com/pos","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"auth-scheme","description":"Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>"}},"schemas":{"bookings":{"booking_create_request":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bookings/booking_create","description":"The document's \"primary data\"."}},"required":["data"]},"booking_create":{"type":"object","properties":{"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"bookings"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","allOf":[{"$ref":"#/components/schemas/bookings/booking_attributes"},{"type":"object","properties":{"isWalkIn":{"type":["boolean","null"],"description":"Indicates if the booking is a walk-in. Defaults to `false`."}},"required":["partySize","bookingDatetime"]}]},"relationships":{"type":"object","description":"An [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) representing associations with other resources.","properties":{"customer":{"type":"object","description":"Represents the customer associated with the booking.","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"customers"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}}}}},"tables":{"type":"object","description":"Represents the table associated with the booking.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":1000,"items":{"type":"object","properties":{"type":{"type":"string","const":"tables"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}}}}}}}}},"required":["type","attributes"]},"booking_attributes":{"type":"object","properties":{"status":{"type":["string","null"],"enum":["confirmed","seated","completed","cancelled","no_show"],"description":"The initial status of the booking. Possible values are \"confirmed\", \"seated\", \"completed\", \"cancelled\", and \"no_show\"."},"partySize":{"type":"integer","description":"Represents the number of people included in the booking.","format":"int32","minimum":1,"maximum":1000},"bookingDatetime":{"type":"string","maxLength":25,"format":"date-time","description":"The booking's date."},"duration":{"type":["integer","null"],"description":"Represents the length of the booking in minutes.","format":"int32","minimum":1,"maximum":10000},"notes":{"type":["string","null"],"maxLength":10000,"pattern":"^[^<>&]+$","description":"Additional notes for the booking."},"roomNumber":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The room number of the booking's customer."},"promotions":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The promotions of the booking."},"bookingReference":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"A reference code or identifier associated with the booking."},"depositAmount":{"type":["string","null"],"description":"The amount of the deposit.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"}}},"booking_payload":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bookings/booking","description":"The document's \"primary data\"."}},"required":["data"]},"booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"bookings"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","allOf":[{"$ref":"#/components/schemas/bookings/booking_attributes"},{"type":"object","properties":{"isWalkIn":{"type":"boolean","description":"Indicates if the booking is a walk-in."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["status","partySize","bookingDatetime"]}]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"tables":{"type":"object","description":"Details of the tables associated with the booking.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"}},"required":["id","type"]}}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the booking.","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"customers"}}},{"type":"null"}]}}},"orders":{"type":"object","description":"Details of the orders associated with the booking.","properties":{"data":{"type":"array","description":"A list of related order objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type"]}},"error":{"type":"object","description":"A JSON:API error object.\n\nAdditional properties specific to the problem type may be present.    \n","properties":{"errors":{"type":"array","description":"An array of error details to accompany a problem details response.","maxItems":1000,"items":{"type":"object","description":"An object to provide explicit details on a problem towards an API consumer.","properties":{"id":{"type":"string","maxLength":16,"description":"A unique identifier for this particular occurrence of the problem.","pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","maxLength":3,"description":"The HTTP status code applicable to this problem, expressed as a string value.","pattern":"^[1-5][0-9]{2}$"},"code":{"type":"string","maxLength":50,"description":"An application-specific error code, expressed as a string value.","pattern":"^[A-Za-z0-9_-]+$"},"title":{"type":"string","description":"A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.","maxLength":256,"pattern":"^.{1,255}$"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized.","maxLength":1024,"pattern":"^.{1,1023}$"},"source":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer to a specific request body property that is the source of error.","maxLength":1024,"pattern":"^$|^/([A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+$"},"parameter":{"type":"string","description":"A string indicating which URI query parameter caused the error.","maxLength":1024,"pattern":"^[A-Za-z0-9_]+$"},"header":{"type":"string","description":"The name of the header that is the source of error.","maxLength":1024,"pattern":"^[A-Za-z-]+$"}}},"meta":{"type":"object","description":"Additional information about the error.","additionalProperties":true}},"required":["title"]}}},"required":["errors"]}},"headers":{"x_rate_limit_limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_reset":{"description":"The time at which the rate limit resets, in UTC epoch seconds.","schema":{"type":"integer","format":"int64","minimum":1633036800,"maximum":2147483647}},"access_control_allow_origin":{"description":"Specifies which origins are allowed to access the resource.","schema":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[A-Za-z /*]+$"}},"retry_after":{"description":"The time the client should wait before making a new request.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":3600}}},"responses":{"bad_request":{"description":"Bad request.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unauthorized":{"description":"Unauthorized.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unprocessable_entity":{"description":"Unprocessable entity.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"too_many_requests":{"description":"Too many requests.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Retry-After":{"$ref":"#/components/headers/retry_after"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"internal_server_error":{"description":"Internal Server Error.","content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"service_unavailable":{"description":"Service is unavailable.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}}}},"paths":{"/v1/bookings":{"post":{"operationId":"createBooking","summary":"Create booking","description":"A booking represents a reservation made by a booking for goods or services, such as a table at a restaurant.\n\n**Note:** This operation needs [Authentication](../essential-guide/authentication.md).\n","requestBody":{"required":true,"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/bookings/booking_create_request"}}}},"tags":["Bookings"],"responses":{"201":{"description":"The booking was successfully created.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/bookings/booking_payload"}}}},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/unauthorized"},"422":{"$ref":"#/components/responses/unprocessable_entity"},"429":{"$ref":"#/components/responses/too_many_requests"},"500":{"$ref":"#/components/responses/internal_server_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mews.com/pos-api/operations/bookings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
