### Example Response for Get Configuration Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/getting-started/README.md An example of a successful response from the Mews Connector API's Get Configuration endpoint. It includes the current UTC time, enterprise details such as ID, name, timezone, and payment card storage information. ```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" } } ``` -------------------------------- ### GET /configuration/get Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/getting-started/README.md Retrieves configuration details for the test property. This is a useful endpoint to verify your API setup. ```APIDOC ## GET /configuration/get ### Description Retrieves configuration details for the test property. This is a useful endpoint to verify your API setup. ### Method GET ### Endpoint https://api.mews-demo.com/api/connector/v1/configuration/get ### Parameters #### Query Parameters None #### Request Body - **ClientToken** (string) - Required - Your Mews-issued Client Token. - **AccessToken** (string) - Required - The Access Token for the property you are connecting to. - **Client** (string) - Required - A short string naming your application. ### Request Example ```json { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "7059D2C25BF64EA681ACAB3A00B859CC-D91BFF2B1E3047A3E0DEC1D57BE1382", "Client": "NameOfYourCompanyOrApplication" } ``` ### Response #### Success Response (200) - **NowUtc** (string) - The current UTC time. - **Enterprise** (object) - Details about the enterprise. - **Id** (string) - The unique identifier for the enterprise. - **Name** (string) - The name of the enterprise. - **TimeZoneIdentifier** (string) - The time zone identifier for the enterprise. - **LegalEnvironmentCode** (string) - The legal environment code. - **AccommodationEnvironmentCode** (string) - The accommodation environment code. - **PaymentCardStorage** (object) - Information about payment card storage. - **PublicKey** (string) - The public key for payment card storage. #### Response Example ```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" } } ``` ``` -------------------------------- ### Make First API Call to Get Configuration Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/getting-started/README.md Demonstrates how to make a GET request to the /configuration/get endpoint of the Mews Connector API. This call requires authentication tokens and a client identifier. It returns details about the test property, including its ID, name, and timezone. ```HTTP GET https://api.mews-demo.com/api/connector/v1/configuration/get Content-Type: application/json { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "7059D2C25BF64EA681ACAB3A00B859CC-D91BFF2B1E3047A3E0DEC1D57BE1382", "Client": "NameOfYourCompanyOrApplication" } ``` -------------------------------- ### API Pagination Example (Bash) Source: https://context7.com/mewssystems/gitbook-connector-api/llms.txt This example illustrates cursor-based pagination for Mews Connector API's 'getAll' operations. It shows how to make an initial request to get a page of data and then use the returned 'Cursor' in subsequent requests to fetch older or newer data sets. ```bash # First request - get latest 100 items curl -X POST "https://api.mews-demo.com/api/connector/v1/reservations/getAll/2023-06-06" \ -H "Content-Type: application/json" \ -d '{ "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "MyApp 1.0.0", "UpdatedUtc": { "StartUtc": "2024-01-01T00:00:00Z", "EndUtc": "2024-01-31T00:00:00Z" }, "Limitation": { "Count": 100 } }' # Response includes Cursor # { "Reservations": [...], "Cursor": "abc123-def456-ghi789" } # Subsequent request - get next 100 older items using Cursor curl -X POST "https://api.mews-demo.com/api/connector/v1/reservations/getAll/2023-06-06" \ -H "Content-Type: application/json" \ -d '{ "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "MyApp 1.0.0", "UpdatedUtc": { "StartUtc": "2024-01-01T00:00:00Z", "EndUtc": "2024-01-31T00:00:00Z" }, "Limitation": { "Cursor": "abc123-def456-ghi789", "Count": 100 } }' ``` -------------------------------- ### Get Rate Pricing Request Example (JavaScript) Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/operations/rates.md An example JSON request payload for the getPricing API endpoint. It includes necessary client and access tokens, rate ID, and the time interval for which pricing is requested. Ensure timestamps are in UTC ISO 8601 format and align with the start of time units. ```javascript { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda", "FirstTimeUnitStartUtc": "2022-01-01T23:00:00.000Z", "LastTimeUnitStartUtc": "2022-01-03T23:00:00.000Z" } ``` -------------------------------- ### Fetching Reservations Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/use-cases/revenue-management.md This section details how to fetch reservations in time-limited batches using the 'Get all reservations' endpoint. It recommends weekly batches for initial setup and provides strategies for optimizing batch sizes for future reservations. ```APIDOC ## GET /operations/reservations.md#get-all-reservations-ver-2023-06-06 ### Description Fetches reservations within a specified time frame. This is crucial for initial data pulls and ongoing updates for revenue management systems. ### Method GET ### Endpoint /operations/reservations.md#get-all-reservations-ver-2023-06-06 ### Parameters #### Query Parameters - **TimeFilter** (string) - Required - Specifies the time filter for reservations (e.g., 'Start'). - **Start** (string) - Required - The start date/time for the time filter. - **End** (string) - Required - The end date/time for the time filter. ### Request Example ``` GET /operations/reservations.md?TimeFilter=Start&Start=2023-01-01T00:00:00Z&End=2023-01-08T00:00:00Z ``` ### Response #### Success Response (200) - **reservations** (array) - A list of reservation objects. - **RateId** (string) - The ID of the rate associated with the reservation. #### Response Example ```json { "reservations": [ { "id": "res_123", "arrival": "2023-01-05T14:00:00Z", "departure": "2023-01-07T11:00:00Z", "RateId": "rate_abc" } ] } ``` ``` -------------------------------- ### Get Product Pricing Request Example (JavaScript) Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/operations/products.md This snippet demonstrates the structure of a request payload for the 'Get product pricing' API endpoint. It includes required fields like authentication tokens, client information, product ID, and time interval boundaries. Optional fields like EnterpriseIds can also be included. ```javascript { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "ProductId": "6b97a38b-0043-41e0-afbd-3f083bdbc0d2", "FirstTimeUnitStartUtc": "2024-03-01T23:00:00.000Z", "LastTimeUnitStartUtc": "2024-03-03T23:00:00.000Z", "EnterpriseIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "4d0201db-36f5-428b-8d11-4f0a65e960cc" ] } ``` -------------------------------- ### Retrieve Reservations (API v2023-06-06) Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/deprecations/migration-guide-get-reservations.md This example shows the first step in retrieving data using the Get all reservations (ver 2023-06-06) API. It retrieves reservation details including AccountId and AssignedResourceIds. The response includes a list of reservations and a cursor for pagination. ```txt [PlatformAddress]/api/connector/v1/reservations/getAll/2023-06-06 ``` ```json { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "UpdatedUtc": { "StartUtc": "2023-04-01T00:00:00Z", "EndUtc": "2023-05-05T00:00:00Z" }, "Limitation": { "Count": 2 } } ``` ```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" } ``` -------------------------------- ### Retrieve Reservations, Customers, and Resources with Extents (API v2017-04-12) Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/deprecations/migration-guide-get-reservations.md This example demonstrates how to use the 'Extent' parameter in the Get all reservations (ver 2017-04-12) API call to retrieve reservations, customers, and resources in a single request. It requires valid ClientToken and AccessToken, and specifies a date range for the query. ```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": "Updated", "Extent": { "Reservations": true, "Customers": true, "Resources": true } } ``` -------------------------------- ### Retrieve Resources by ResourceIds (API v2023-06-06) Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/deprecations/migration-guide-get-reservations.md This example shows how to retrieve resource details using the Get all resources API. The 'ResourceIds' filter is populated with 'AssignedResourceId' values from previously retrieved reservations. This allows for targeted retrieval of specific resources. A 'Limitation' can be applied to control the number of results. ```txt [PlatformAddress]/api/connector/v1/resources/getAll ``` ```json { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "ResourceIds": [ "20e00c32-d561-4008-8609-82d8aa525714", "ed705d9e-ec6d-4ba7-9ffb-a25de7fbfb52" ], "Limitation": { "Count": 10 } } ``` -------------------------------- ### Get All Credit Cards Request Example (JavaScript) Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/operations/creditcards.md This JavaScript code snippet demonstrates the structure of a request to the 'getAll' credit cards endpoint. It includes essential parameters like ClientToken, AccessToken, and optional filters such as EnterpriseIds, CreditCardIds, CustomerIds, UpdatedUtc, and Limitation for pagination. ```javascript { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "EnterpriseIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "4d0201db-36f5-428b-8d11-4f0a65e960cc" ], "CreditCardIds": [ "f1d94a32-b4be-479b-9e47-a9fcb03d5196" ], "CustomerIds": [ "5cbbd97d-5f19-4010-9abf-ab0400a3366a" ], "UpdatedUtc": { "StartUtc": "2023-10-01T00:00:00Z", "EndUtc": "2023-10-31T00:00:00Z" }, "Limitation": { "Count": 10 } } ``` -------------------------------- ### Setup - Services and Accounting Categories Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/use-cases/guest-technology.md Retrieve a list of all configured services and accounting categories for a property to facilitate charge posting and reporting. ```APIDOC ## GET /services ### Description Retrieves a list of all services configured for the property. ### Method GET ### Endpoint /services ### Parameters #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **services** (array) - A list of service objects. - **id** (string) - The unique identifier for the service. - **name** (string) - The name of the service. #### Response Example ```json { "services": [ { "id": "srv_12345", "name": "Room Service" }, { "id": "srv_67890", "name": "Telephone" } ] } ``` ## GET /accounting-categories ### Description Retrieves a list of all configured accounting categories. ### Method GET ### Endpoint /accounting-categories ### Parameters #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **accountingCategories** (array) - A list of accounting category objects. - **id** (string) - The unique identifier for the accounting category. - **name** (string) - The name of the accounting category. #### Response Example ```json { "accountingCategories": [ { "id": "acc_cat_abcde", "name": "Domestic Calls" }, { "id": "acc_cat_fghij", "name": "International Calls" } ] } ``` ``` -------------------------------- ### Time Interval Serialization Example (UTC) Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/guidelines/serialization.md Shows how time intervals are represented using start and end datetimes in UTC. Intervals are inclusive of both start and end points. ```text StartUtc 2023-03-19T16:00:00Z EndUtc 2023-03-22T16:00:00Z ``` -------------------------------- ### Pagination Example Source: https://context7.com/mewssystems/gitbook-connector-api/llms.txt Demonstrates cursor-based pagination for getAll operations, allowing retrieval of data in pages. ```APIDOC ## Pagination Example ### Description All getAll operations support cursor-based pagination. Request pages of data by specifying Count and using the returned Cursor for subsequent requests. ### Method POST ### Endpoint /api/connector/v1/reservations/getAll/{date} ### Parameters #### Path Parameters - **date** (string) - Required - The date for which to retrieve reservations, in YYYY-MM-DD format. #### Request Body - **ClientToken** (string) - Required - Token for client authentication. - **AccessToken** (string) - Required - Token for API access. - **Client** (string) - Required - Name and version of the client application. - **UpdatedUtc** (object) - Optional - Filters items updated within a specific date range. - **StartUtc** (string) - Required - The start date and time in ISO 8601 format. - **EndUtc** (string) - Required - The end date and time in ISO 8601 format. - **Limitation** (object) - Required - Specifies the number of items to retrieve and the cursor for pagination. - **Count** (integer) - Required - The maximum number of items to return. - **Cursor** (string) - Required - A token for retrieving the next page of results. ### Request Example #### First Request (Get latest items) ```bash curl -X POST "https://api.mews-demo.com/api/connector/v1/reservations/getAll/2023-06-06" \ -H "Content-Type: application/json" \ -d '{ "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "MyApp 1.0.0", "UpdatedUtc": { "StartUtc": "2024-01-01T00:00:00Z", "EndUtc": "2024-01-31T00:00:00Z" }, "Limitation": { "Count": 100 } }' ``` #### Subsequent Request (Get next page using Cursor) ```bash curl -X POST "https://api.mews-demo.com/api/connector/v1/reservations/getAll/2023-06-06" \ -H "Content-Type: application/json" \ -d '{ "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "MyApp 1.0.0", "UpdatedUtc": { "StartUtc": "2024-01-01T00:00:00Z", "EndUtc": "2024-01-31T00:00:00Z" }, "Limitation": { "Cursor": "abc123-def456-ghi789", "Count": 100 } }' ``` ### Response #### Success Response (200) - **[ResourceName]** (array) - A list of resource objects (e.g., Reservations). - **Cursor** (string) - A token for retrieving the next page of results. #### Response Example ```json { "Reservations": [...], "Cursor": "abc123-def456-ghi789" } ``` ``` -------------------------------- ### Deprecated Get Customers Open Items Request Example Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/operations/customers.md An example JSON request payload for the deprecated `getOpenItems` endpoint. This request includes client and access tokens, client information, and a list of customer IDs. ```javascript { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "CustomerIds": [ "2a1a4315-7e6f-4131-af21-402cec59b8b9" ] } ``` -------------------------------- ### GET /api/connector/v1/rates/getAll Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/operations/rates.md Retrieves all rates (pricing setups) for the default service provided by the enterprise. This endpoint supports pagination and Portfolio Access Tokens. ```APIDOC ## GET /api/connector/v1/rates/getAll ### Description Returns all rates (pricing setups) of the default service provided by the enterprise. This operation uses Pagination and supports Portfolio Access Tokens. ### Method GET ### Endpoint `[PlatformAddress]/api/connector/v1/rates/getAll` ### Parameters #### Query Parameters - **ClientToken** (string) - Required - Token identifying the client application. - **AccessToken** (string) - Required - Access token of the client application. - **Client** (string) - Required - Name and version of the client application. - **EnterpriseIds** (array of string) - Optional, max 1000 items - Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token. - **ServiceIds** (array of string) - Required, max 1000 items - Unique identifiers of the [Services](services.md#service) from which the rates are requested. - **RateIds** (array of string) - Optional, max 1000 items - Unique identifiers of the requested [Rates](rates.md#rate). - **ExternalIdentifiers** (array of string) - Optional, max 1000 items - Identifiers of [Rate](rates.md#rate) from external systems. - **ActivityStates** (array of [Activity state](_objects.md#activity-state)) - Optional - Whether to return only active, only deleted, or both types of record. If not specified, both active and deleted will be returned. - **UpdatedUtc** ([Time interval](_objects.md#time-interval)) - Optional, max length 3 months - Interval in which `Rate` was updated. - **Extent** ([Rate extent](rates.md#rate-extent)) - Optional - Extent of data to be returned. If not specified, both `Rates` and `RateGroups` will be included. - **Limitation** ([Limitation](../guidelines/pagination.md#limitation)) - Required - Limitation on the quantity of data returned and optional Cursor for the starting point of data. #### Request Body This endpoint does not use a request body. ### Request Example ```json { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "EnterpriseIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "4d0201db-36f5-428b-8d11-4f0a65e960cc" ], "ServiceIds": [ "bd26d8db-86da-4f96-9efc-e5a4654a4a94" ], "RateIds": [ "ed4b660b-19d0-434b-9360-a4de2ea42eda" ], "UpdatedUtc": { "StartUtc": "2022-10-15T00:00:00Z", "EndUtc": "2022-10-20T00:00:00Z" }, "ExternalIdentifiers": [ "Rate-001", "Rate-002" ], "ActivityStates": [ "Active" ], "Extent": { "Rates": true, "RateGroups": true, "AvailabilityBlockAssignments": true }, "Limitation": { "Count": 10 } } ``` ### Response #### Success Response (200) - **Rates** (array of [Rate](rates.md#rate)) - Description of rates. - **RateGroups** (array of [RateGroup](rates.md#rate-group)) - Description of rate groups. - **AvailabilityBlockAssignments** (array of [AvailabilityBlockAssignment](rates.md#availability-block-assignment)) - Description of availability block assignments. #### Response Example ```json { "rates": [ { "rateId": "string", "enterpriseId": "string", "serviceId": "string", "externalIdentifier": "string", "name": "string", "description": "string", "currency": "string", "price": 0.0, "validFromUtc": "2023-10-27T10:00:00Z", "validToUtc": "2023-10-27T10:00:00Z", "activityState": "Active", "createdUtc": "2023-10-27T10:00:00Z", "updatedUtc": "2023-10-27T10:00:00Z" } ], "rateGroups": [ { "rateGroupId": "string", "enterpriseId": "string", "name": "string", "description": "string", "createdUtc": "2023-10-27T10:00:00Z", "updatedUtc": "2023-10-27T10:00:00Z" } ], "availabilityBlockAssignments": [ { "availabilityBlockAssignmentId": "string", "rateId": "string", "availabilityBlockId": "string", "createdUtc": "2023-10-27T10:00:00Z", "updatedUtc": "2023-10-27T10:00:00Z" } ], "next": "string" } ``` ### Rate extent Extent of data to be returned. | Property | Type | Contract | Description | | :-- | :-- | :-- | :-- | | `Rates` | boolean | optional | Whether the response should contain rates. | | `AvailabilityBlockAssignments` | boolean | required | Whether the response should contain availability block assignments. | | ~~`RateGroups`~~ | ~~boolean~~ | ~~optional~~ | ~~Whether the response should contain rate groups.~~ **Deprecated!** Use `rateGroups/getAll`| ``` -------------------------------- ### Start Reservation using Connector API Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/operations/reservations.md Marks a reservation as 'Started', effectively checking the guest in. This operation requires client and access tokens, reservation ID, and optionally enterprise ID. It ensures the reservation meets all starting conditions. ```javascript { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ReservationId": "e6ea708c-2a2a-412f-a152-b6c76ffad49b" } ``` -------------------------------- ### Start Reservation API Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/operations/reservations.md Marks a reservation as 'Started', effectively performing a check-in. This operation requires the reservation to be in a 'Confirmed' state and have an assigned room. ```APIDOC ## POST /api/connector/v1/reservations/start ### Description Marks a reservation as `Started` (= checked in). Succeeds only if all starting conditions are met (the reservation has the `Confirmed` state, does not have start set to future, has an inspected room assigned etc). Note this operation supports [Portfolio Access Tokens](../concepts/multi-property.md). ### Method POST ### Endpoint `[PlatformAddress]/api/connector/v1/reservations/start` ### Parameters #### Request Body - **ClientToken** (string) - required - Token identifying the client application. - **AccessToken** (string) - required - Access token of the client application. - **Client** (string) - required - Name and version of the client application. - **EnterpriseId** (string) - optional - Unique identifier of the enterprise. Required when using [Portfolio Access Tokens](../concepts/multi-property.md), ignored otherwise. - **ReservationId** (string) - required - Unique identifier of the reservation to start. ### Request Example ```json { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ReservationId": "e6ea708c-2a2a-412f-a152-b6c76ffad49b" } ``` ### Response #### Success Response (200) An empty JSON object `{}` is returned upon successful start. #### Response Example ```json {} ``` ``` -------------------------------- ### JavaScript Response Example Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/operations/configuration.md This JavaScript code snippet demonstrates a typical JSON response from the Mews Systems Gitbook Connector API. It includes details about the enterprise, such as currencies, accounting configuration, and address, as well as information about the associated service. ```javascript { "NowUtc": "2018-01-01T14:58:02Z", "Enterprise": { "Currencies": [ { "Currency": "GBP", "IsDefault": true, "IsEnabled": true }, { "Currency": "USD", "IsDefault": false, "IsEnabled": true } ], "AccountingConfiguration": { "AdditionalTaxIdentifier": null, "CompanyName": "Connector API Hotel", "BankAccountNumber": "1234", "BankName": "Random bank", "Iban": "CZ7250517882393618329719", "Bic": "GIBACZPY", "SurchargeConfiguration": { "SurchargeFees": { "Amex": 3, "DinersClub": 4 }, "SurchargeServiceId": "2b9b0143-3135-485b-8064-76c90d1be69e", "SurchargeTaxCode": "US-HI-KA" }, "EnabledExternalPaymentTypes": [ "Invoice", "Cash", "GiftCard" ], "Options": [ "ReceivableTrackingEnabled", "GroupTaxesOnBill" ] }, "IsPortfolio": false, "Id": "851df8c8-90f2-4c4a-8e01-a4fc46b25178", "ExternalIdentifier": null, "HoldingKey": "CA123", "ChainId": "8ddea57b-6a5c-4eec-8c4c-24467dce118e", "ChainName": "Connector API Chain", "CreatedUtc": "2015-07-07T13:33:17Z", "UpdatedUtc": "2015-07-07T13:33:17Z", "Name": "Connector API Hotel", "TimeZoneIdentifier": "Europe/Budapest", "LegalEnvironmentCode": "UK", "AccommodationEnvironmentCode": null, "AccountingEnvironmentCode": null, "TaxEnvironmentCode": null, "DefaultLanguageCode": "en-US", "EditableHistoryInterval": "P0M7DT0H0M0S", "AccountingEditableHistoryInterval": "P0M7DT0H0M0S", "OperationalEditableHistoryInterval": "P0M5DT0H0M0S", "BusinessDayClosingOffset": null, "WebsiteUrl": "https://en.wikipedia.org/wiki/St._Vitus_Cathedral", "Email": "charging-api@mews.li", "Phone": "00000 123 456 789", "LogoImageId": null, "CoverImageId": null, "Pricing": "Gross", "TaxPrecision": null, "AddressId": "c556f56e-713e-4102-9de5-0e853b5a8586", "Address": { "Id": "8c2c4371-5d42-40a9-b551-ab0b00d75076", "Line1": "I.P. Pavlova 5", "Line2": null, "City": "Prague", "PostalCode": "1200", "CountryCode": "CZ", "CountrySubdivisionCode": null, "Latitude": 14.429645, "Longitude": 50.075181 }, "GroupNames": [ "Connector API Group" ], "Subscription": { "TaxIdentifier": "123456789 RC 0001" } }, "Service": { "Id": "bd26d8db-86da-4f96-9efc-e5a4654a4a94", "EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "IsActive": true, "Name": "Accommodation", "Names": { "en-GB": "Accommodation" }, "StartTime": "PT14H", "EndTime": "PT12H", "Options": { "BillAsPackage": false }, "Promotions": { "BeforeCheckIn": false, "AfterCheckIn": false, "DuringStay": false, "BeforeCheckOut": false, "AfterCheckOut": false, "DuringCheckOut": false }, "Type": "Reservable", "Ordering": 0, "Data": null, "ExternalIdentifier": null, "CreatedUtc": "2023-10-01T11:48:57Z", "UpdatedUtc": "2023-10-28T11:48:57Z" }, "PaymentCardStorage": null, "IsIdentityDocumentNumberRequired": true } ``` -------------------------------- ### Get Configuration Source: https://context7.com/mewssystems/gitbook-connector-api/llms.txt Retrieves enterprise configuration, including property details, currencies, accounting settings, and service information. Useful for verifying connectivity and understanding property setup. ```APIDOC ## POST /api/connector/v1/configuration/get ### Description Returns enterprise configuration including property details, currencies, accounting settings, and service information. This is typically the first API call to verify connectivity and understand the property setup. ### Method POST ### Endpoint https://api.mews-demo.com/api/connector/v1/configuration/get ### Parameters #### Request Body - **ClientToken** (string) - Required - Identifies your application. - **AccessToken** (string) - Required - Identifies the enterprise/property. - **Client** (string) - Required - Name and version of the client application. ### Request Example ```json { "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "MyApp 1.0.0" } ``` ### Response #### Success Response (200) - **NowUtc** (string) - The current time in UTC. - **Enterprise** (object) - Details about the enterprise. - **Id** (string) - The unique identifier for the enterprise. - **Name** (string) - The name of the enterprise. - **TimeZoneIdentifier** (string) - The time zone identifier for the enterprise. - **LegalEnvironmentCode** (string) - The legal environment code. - **DefaultLanguageCode** (string) - The default language code. - **Pricing** (string) - The pricing model (e.g., "Gross"). - **Currencies** (array) - List of available currencies. - **Currency** (string) - The currency code. - **IsDefault** (boolean) - Indicates if this is the default currency. - **IsEnabled** (boolean) - Indicates if the currency is enabled. - **Address** (object) - The enterprise address. - **Line1** (string) - The first line of the address. - **City** (string) - The city. - **PostalCode** (string) - The postal code. - **CountryCode** (string) - The country code. - **Service** (object) - Details about the service. - **Id** (string) - The unique identifier for the service. - **Name** (string) - The name of the service. - **Type** (string) - The type of the service (e.g., "Reservable"). #### Response Example ```json { "NowUtc": "2024-01-15T14:58:02Z", "Enterprise": { "Id": "851df8c8-90f2-4c4a-8e01-a4fc46b25178", "Name": "Connector API Hotel", "TimeZoneIdentifier": "Europe/Budapest", "LegalEnvironmentCode": "UK", "DefaultLanguageCode": "en-US", "Pricing": "Gross", "Currencies": [ { "Currency": "GBP", "IsDefault": true, "IsEnabled": true }, { "Currency": "EUR", "IsDefault": false, "IsEnabled": true } ], "Address": { "Line1": "I.P. Pavlova 5", "City": "Prague", "PostalCode": "1200", "CountryCode": "CZ" } }, "Service": { "Id": "bd26d8db-86da-4f96-9efc-e5a4654a4a94", "Name": "Accommodation", "Type": "Reservable" } } ``` ``` -------------------------------- ### Configuration API Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/changelog/README.md Retrieve system configuration settings. ```APIDOC ## GET /operations/configuration.md#get-configuration ### Description Retrieves the system configuration. ### Method GET ### Endpoint /configuration ### Response #### Success Response (200) - **configuration** (object) - The system configuration details. ``` -------------------------------- ### Initial Configuration API Operations Source: https://github.com/mewssystems/gitbook-connector-api/blob/master/use-cases/kiosk.md Retrieve essential configuration data for kiosks, such as supported currencies, languages, and services/products offered by properties. ```APIDOC ## Initial Configuration ### Description Operations to fetch initial configuration data required for setting up a kiosk for a specific property. This includes retrieving supported currencies, languages, and lists of services and products. ### Method GET ### Endpoint `/configuration` (for property configuration) `/languages` (for supported languages) `/services` (for services and products) ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example ```json { "example": "GET /configuration" } ``` ### Response #### Success Response (200) - **currency_list** (array) - List of supported currencies. - **language_list** (array) - List of supported languages. - **service_list** (array) - List of available services and their associated products. #### Response Example ```json { "example": "{\"currency_list\": [\"EUR\", \"USD\"], \"language_list\": [{\"code\": \"en\", \"name\": \"English\"}], \"service_list\": [{\"id\": \"srv_123\", \"name\": \"Stay\", \"products\": [{\"id\": \"prod_456\", \"name\": \"Standard Room\"}]}] }" } ``` ```