### Query Documentation Example Source: https://docs.mews.com/connector-api/operations/resourceaccesstokens Example of how to query the documentation dynamically using an HTTP GET request with the 'ask' query parameter. ```http GET https://docs.mews.com/connector-api/operations/resourceaccesstokens.md?ask= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.mews.com/pos-api/guidelines/environments Example of how to query the documentation dynamically using an HTTP GET request with the 'ask' query parameter. ```http GET https://docs.mews.com/pos-api/guidelines/environments.md?ask= ``` -------------------------------- ### HTTP GET Request Example with 'ask' Parameter Source: https://docs.mews.com/connector-api/guidelines/pagination Demonstrates how to query the documentation dynamically by appending an 'ask' parameter to the GET request URL. This is useful for asking specific questions about the documentation content. ```http GET https://docs.mews.com/connector-api/guidelines/pagination.md?ask= ``` -------------------------------- ### Dynamic Documentation Query Example Source: https://docs.mews.com/booking-engine-guide/booking-engine-api/guidelines/responses To get specific information not readily available, make an HTTP GET request to the documentation URL with an 'ask' query parameter. The question should be clear and self-contained. ```HTTP GET https://docs.mews.com/booking-engine-guide/booking-engine-api/guidelines/responses.md?ask= ``` -------------------------------- ### Query Documentation Example Source: https://docs.mews.com/connector-api/operations/rates To get more information not present on the page, you can query the documentation dynamically. Perform an HTTP GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://docs.mews.com/connector-api/operations/rates.md?ask= ``` -------------------------------- ### Get Reservations Response Example Source: https://docs.mews.com/connector-api/deprecations/migration-guide-get-reservations Example response from the 'Get all reservations (ver 2023-06-06)' request, showing reservation details and a cursor for pagination. ```jsonc { "Reservations": [ { "Id": "0f515589-99b4-423d-b83a-b237009f0509", "AccountId": "fadd5bb6-b428-45d5-94f8-fd0d89fece6d", "AccountType": "Customer", "AssignedResourceId": "20e00c32-d561-4008-8609-82d8aa525714", "// other properties removed for clarity" }, { "Id": "bdf1138f-6d47-4f30-9d5a-02c65344f396", "AccountId": "06ab4938-9675-4f3b-a198-012ed8abc1a6", "AccountType": "Customer", "AssignedResourceId": "ed705d9e-ec6d-4ba7-9ffb-a25de7fbfb52", "// other properties removed for clarity" } ], "Cursor": "bdf1138f-6d47-4f30-9d5a-02c65344f396" } ``` -------------------------------- ### Example GET Request with Include Parameter Source: https://docs.mews.com/pos-api/guidelines/relationships Demonstrates how to request related resources (invoiceItems, user, register) in the response from the /invoices endpoint. ```http GET [PlatformAddress]/v1/invoices?include=invoiceItems,user,register ``` -------------------------------- ### Full Booking Engine Widget Configuration Example Source: https://docs.mews.com/booking-engine-guide/booking-engine-widget/advanced-guide This script demonstrates a full example of the Mews Distributor configuration with all optional parameters and available API calls. It is recommended to use Mews Operations for configuration instead of direct options, with only `configurationIds` and `openElements` currently supported. ```html ``` -------------------------------- ### Get Channels Response Body Source: https://docs.mews.com/channel-manager-api/mews-operations/configuration This is an example of the response body for the Get Channels API endpoint, listing available channels with their codes and names. ```javascript { "channels": [ { "code": 1, "name": "Booking.com" }, { "code": 2, "name": "Expedia" }, ... ] } ``` -------------------------------- ### Mews Connector API Successful Response Example Source: https://docs.mews.com/connector-api/getting-started An example of a successful response from the Get configuration API call, including property details and timestamps. ```json { "NowUtc": "2021-05-05T11:39:29Z", "Enterprise": { "Id": "c65ea6e9-2340-42f4-9136-ab3a00b6da22", "Name": "Connector API Hotel (Net Pricing) TEST", "TimeZoneIdentifier": "America/New_York", "LegalEnvironmentCode": "US-DC", "AccommodationEnvironmentCode": "US", ... }, "PaymentCardStorage": { "PublicKey": "1100016827" } } ``` -------------------------------- ### Original Request for Get All Reservations (ver 2017-04-12) Source: https://docs.mews.com/connector-api/deprecations/migration-guide-get-reservations This is an example of an original request to the Get all reservations API (ver 2017-04-12) using the 'TimeFilter' property. ```txt [PlatformAddress]/api/connector/v1/reservations/getAll ``` ```json { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "StartUtc": "2023-04-01T00:00:00Z", "EndUtc": "2023-05-05T00:00:00Z", "TimeFilter": "Colliding" } ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.mews.com/loyalty-partner/workflows/list-memberships Use this GET request to ask questions about the documentation. Include your question as the 'ask' query parameter. ```HTTP GET https://docs.mews.com/loyalty-partner/workflows/list-memberships.md?ask= ``` -------------------------------- ### Migrated Request for Get All Reservations (ver 2023-06-06) Source: https://docs.mews.com/connector-api/deprecations/migration-guide-get-reservations This is an example of a migrated request to the Get all reservations API (ver 2023-06-06), utilizing the new 'CollidingUtc' property for time filtering. ```txt [PlatformAddress]/api/connector/v1/reservations/getAll/2023-06-06 ``` ```json { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "CollidingUtc": { "StartUtc": "2023-04-01T00:00:00Z", "EndUtc": "2023-05-05T00:00:00Z" } } ``` -------------------------------- ### Get all rates Source: https://docs.mews.com/connector-api/operations Returns all rates (pricing setups) of the default service provided by the enterprise. ```APIDOC ## GET /rates ### Description Returns all rates (pricing setups) of the default service provided by the enterprise. ### Method GET ### Endpoint /rates ### Parameters None specified. ### Request Example None specified. ### Response #### Success Response (200) Details about all rates. #### Response Example None specified. ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.mews.com/booking-engine-guide/booking-engine-api/operations/configuration Use this GET request to ask questions about the documentation. The response will provide direct answers and relevant excerpts. ```HTTP GET https://docs.mews.com/booking-engine-guide/booking-engine-api/operations/configuration.md?ask= ``` -------------------------------- ### Get All Exports Response Example Source: https://docs.mews.com/connector-api/operations/exports This is an example of a successful response when retrieving exports. It includes details about each export's status, entity type, scope, associated files, expiration, and filters. ```javascript { "Exports": [ { "Id": "3fa85f64-5717-4562-b3fd-2c963f66afa6", "Status": "Success", "EntityType": "OrderItem", "Scope": { "EnterpriseIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "4d0201db-36f5-428b-8d11-4f0a65e960cc" ], "ChainIds": null }, "Files": [ { "Url": "https://example.com/exports/3fa85f64-5717-4562-b3fd-2c963f66afa6-1.jsonl?example=signature", "SizeInBytes": 1215279 }, { "Url": "https://example.com/exports/3fa85f64-5717-4562-b3fd-2c963f66afa6-2.jsonl?example=signature", "SizeInBytes": 1398362 } ], "ExpiresUtc": "2023-10-26T11:42:28Z", "Filters": { "UpdatedUtc": { "StartUtc": "2020-11-04T00:00:00Z", "EndUtc": "2020-11-05T00:00:00Z" }, "LedgerEntryFilters": null } }, { "Id": "5f51c9ef-fc1d-4438-90ad-6b925ab7d7a9", "Status": "Pending", "EntityType": "LedgerEntry", "Scope": { "EnterpriseIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6" ], "ChainIds": null }, "Files": [], "ExpiresUtc": null, "Filters": { "UpdatedUtc": null, "LedgerEntryFilters": { "Posting": { "Start": "2024-01-01", "End": "2024-01-31" } } } }, { "Id": "706dc6d5-9511-4751-825e-538ce99da2ce", "Status": "Processing", "EntityType": "Company", "Scope": { "EnterpriseIds": null, "ChainIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6" ] }, "Files": [], "ExpiresUtc": null, "Filters": null }, { "Id": "f776f20a-6f1a-4ddf-93f4-9dae95261415", "Status": "Expired", "EntityType": "OrderItem", "Scope": { "EnterpriseIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6" ], "ChainIds": null }, "Files": [], "ExpiresUtc": "2023-10-24T14:12:30Z", "Filters": null } ] } ``` -------------------------------- ### Querying Documentation Dynamically Source: https://docs.mews.com/loyalty-partner/guidelines/errors Shows how to perform an HTTP GET request with an 'ask' query parameter to dynamically query the documentation. Use this for clarification or additional context. ```http GET https://docs.mews.com/loyalty-partner/guidelines/errors.md?ask= ``` -------------------------------- ### Sample Client Name for Demo Environment Source: https://docs.mews.com/booking-engine-guide/booking-engine-api/guidelines/authentication Use this sample client name for initial testing in the Demo environment before your application is officially registered. Remember to replace it with your actual registered client name. ```json { "Client": "My Client 1.0.0" } ``` -------------------------------- ### Create Order Request Example Source: https://docs.mews.com/pos-api/operations/orders Example of a request body to create a new order. Ensure all required fields are populated. ```json { "orderType": "reservation", "customer": { "id": "c4ca45ef-31d1-41a8-a91c-000000000001" }, "reservations": [ { "roomId": "r4ca45ef-31d1-41a8-a91c-000000000001", "start": "2023-01-01T12:00:00Z", "end": "2023-01-01T14:00:00Z" } ] } ``` -------------------------------- ### Query Documentation with 'ask' Parameter Source: https://docs.mews.com/channel-manager-api/guidelines/compliance Use this GET request to ask questions about the documentation. The response includes direct answers and relevant excerpts. ```http GET https://docs.mews.com/channel-manager-api/guidelines/compliance.md?ask= ``` -------------------------------- ### Get All Messages Response Body Source: https://docs.mews.com/connector-api/operations/messages This is an example of the response when retrieving messages. It includes a list of messages and a cursor for pagination. ```javascript { "Messages": [ { "Id": "4bfe4675-98a9-4428-9ea9-ae5300dbaa93", "MessageThreadId": "7f9325f6-ef44-4911-89a8-ae51010a5aa4", "Text": "Text of the message", "Sender": { "Discriminator": "Application", "Value": null }, "CreatedUtc": "2022-03-09T13:19:46Z" } ], "Cursor": "7f9325f6-ef44-4911-89a8-ae51010a5aa4" } ``` -------------------------------- ### Initialize Booking Engine Widget with Demo Environment URL Source: https://docs.mews.com/booking-engine-guide/booking-engine-widget/use-cases/testing-in-demo-environment Use this snippet to point the Booking Engine Widget to the Demo environment by setting the `dataBaseUrl` option. Ensure your `configurationIds` are valid for the demo environment. ```javascript Mews.Distributor( { configurationIds: ['aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'] }, function (api) { api.open(); }, { dataBaseUrl: 'https://api.mews-demo.com' } ); ``` -------------------------------- ### Get Space Code Example Source: https://docs.mews.com/pos-api/operations/spacecodes This snippet demonstrates how to retrieve a space code. It includes handling a service unavailable error. ```javascript const service_unavailable = { "error": { "code": "service_unavailable", "message": "The service is unavailable." } }; console.log(service_unavailable); ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.mews.com/staying-up-to-date Use an HTTP GET request with the 'ask' query parameter to retrieve specific information or clarifications from the documentation. Ensure your question is specific and self-contained. ```HTTP GET https://docs.mews.com/staying-up-to-date.md?ask= ``` -------------------------------- ### ISO 8601 Time Interval Example Source: https://docs.mews.com/connector-api/guidelines/serialization Defines a time interval using inclusive start and end datetimes in UTC. ```text StartUtc 2023-03-19T16:00:00Z EndUtc 2023-03-22T16:00:00Z ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.mews.com/booking-engine-guide/booking-engine-widget/use-cases/disable-widget-caching Perform an HTTP GET request with the 'ask' query parameter to get dynamic answers from the documentation. ```http GET https://docs.mews.com/booking-engine-guide/booking-engine-widget/use-cases/disable-widget-caching.md?ask= ``` -------------------------------- ### Get All Accounting Items Request Source: https://docs.mews.com/connector-api/operations/accountingitems This is a request example for the deprecated 'Get all accounting items' operation. It shows how to specify filters like date ranges, item IDs, and the extent of data to retrieve. Use alternative endpoints for current needs. ```javascript { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "ConsumedUtc": { "StartUtc": "2020-01-05T00:00:00Z", "EndUtc": "2020-01-10T00:00:00Z" }, "ClosedUtc": { "StartUtc": "2020-01-05T00:00:00Z", "EndUtc": "2020-01-10T00:00:00Z" }, "UpdatedUtc": { "StartUtc": "2020-01-05T00:00:00Z", "EndUtc": "2020-01-10T00:00:00Z" }, "ItemIds": [ "cb643cb7-8b6e-48a6-b67e-ad4c0041f550", "44ca12b8-f009-455e-be91-ad4c013fcbc5" ], "Extent": { "OrderItems": true, "PaymentItems": true, "CreditCardTransactions": false }, "States": [ "Open" ] } ``` -------------------------------- ### Get All Routing Rules Request Example Source: https://docs.mews.com/connector-api/operations/routingrules This snippet shows an example request payload for retrieving all routing rules. It includes parameters for client and access tokens, company and routing rule IDs, update time intervals, enterprise IDs, and limitations on the number of results. ```javascript { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "CompanyIds": [ "c6f5c82d-621a-4c8a-903b-1b0a9a23b71f", "956aa0f0-a090-42c8-bee2-991972d32f80" ], "RoutingRuleIds": [ "ff785b22-5422-4d1d-87f4-af2e00b3dfda", "d98c9611-0006-4691-a835-af2e00b170c4" ], "UpdatedUtc": { "StartUtc": "2023-10-01T00:00:00Z", "EndUtc": "2023-10-31T00:00:00Z" }, "EnterpriseIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "4d0201db-36f5-428b-8d11-4f0a65e960cc" ], "Limitation": { "Count": 100 } } ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.mews.com/booking-engine-guide/integrations/gtm-skeleton Use this method to ask questions about the documentation dynamically. Replace '' with your specific query. ```HTTP GET https://docs.mews.com/booking-engine-guide/integrations/gtm-skeleton.md?ask= ```