# Mews

> Book, change, confirm, check in, check out and cancel reservations in Mews, manage guest profiles, companies, room status and staff tasks, check availability, read bills and payments, and follow new and changed reservations, arrivals, departures, guests, tasks, payments and room status.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/mews

## Actions

### Cancel reservation

Cancel a reservation, with or without the rate's cancellation fee.

**Inputs**

- Reservation ID (`reservation_id`, text, required): The reservation's ID, which List reservations and Create reservation return.
- Reason (`notes`, text, required): Why it's canceled. Mews keeps it with the reservation.
- Charge cancellation fee (`charge_cancellation_fee`, true/false): Charge the cancellation fee the rate sets. Leave empty for no fee.
- Send cancellation email (`send_email`, true/false): Whether Mews emails the guest that it's canceled. Leave empty to send it.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "ReservationIds": [
      "example"
    ]
  }
}
```

### Check in reservation

Check a guest in. The reservation must be confirmed, due today and have an inspected room assigned.

**Inputs**

- Reservation ID (`reservation_id`, text, required): The reservation's ID, which List reservations and Create reservation return.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {}
}
```

### Check out reservation

Check a guest out on the last day of their stay.

**Inputs**

- Reservation ID (`reservation_id`, text, required): The reservation's ID, which List reservations and Create reservation return.
- Close bills (`close_bills`, true/false): Close the guest's bills that can be closed.
- Allow an open balance (`allow_open_balance`, true/false): Check out even if the guest still owes money. Give the reason in Notes.
- Notes (`notes`, text): Why the guest leaves with a balance open.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {}
}
```

### Confirm reservation

Confirm an optional reservation.

**Inputs**

- Reservation ID (`reservation_id`, text, required): The reservation's ID, which List reservations and Create reservation return.
- Send confirmation email (`send_confirmation_email`, true/false): Whether Mews emails the guest a confirmation. Leave empty to send it.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "ReservationIds": [
      "example"
    ]
  }
}
```

### Create company

Add a company or travel agency.

**Inputs**

- Name (`name`, text, required): The company's name.
- Invoicing email (`invoicing_email`, text): The email address invoices go to.
- Website (`website_url`, text): The company's website.
- Phone (`telephone`, text): The phone number.
- Contact person (`contact_person`, text): The person to contact.
- Other contact details (`contact`, text): Other contact details.
- Tax ID (`tax_identifier`, text): The tax identification number, such as a VAT number.
- Company number (`identifier`, text): The fiscal or legal identifier, such as a company number.
- IATA code (`iata`, text): The IATA code, for a travel agency.
- Department (`department`, text): The department, such as sales.
- External ID (`external_identifier`, text): Your own ID for the company, from another system.
- Notes (`notes`, text): Notes about the company.
- Can be invoiced (`invoiceable`, true/false): Whether the company can be invoiced. Leave empty for no.
- Address (`address_line1`, text): The street address.
- Address line 2 (`address_line2`, text): The second line of the address.
- City (`city`, text): The city.
- Postal code (`postal_code`, text): The ZIP or postal code.
- Country (`country_code`, text): The country. One of: `AF` (Afghanistan), `AL` (Albania), `DZ` (Algeria), `AS` (American Samoa), `AD` (Andorra), `AO` (Angola), `AI` (Anguilla), `AQ` (Antarctica), `AG` (Antigua & Barbuda), `AR` (Argentina), and 240 more.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "AddressId": "example",
    "ChainId": "example",
    "Contact": "example",
    "ContactPerson": "example",
    "CreatedUtc": "example",
    "Department": "example",
    "ExternalIdentifier": "example",
    "Iata": "example",
    "Id": "example",
    "Identifier": "example",
    "InvoicingEmail": "example",
    "IsActive": true,
    "Name": "example",
    "Notes": "example",
    "Number": 1,
    "Options": {
      "Invoiceable": true
    },
    "TaxIdentifier": "example",
    "Telephone": "example",
    "UpdatedUtc": "example",
    "WebsiteUrl": "example"
  }
}
```

### Create customer

Add a customer (guest profile).

**Inputs**

- Last name (`last_name`, text, required): The last name.
- First name (`first_name`, text): The first name.
- Email (`email`, text): The email address.
- Phone (`phone`, text): The phone number, such as +442071234567.
- Title (`title`, text): The title. One of: `Mister` (Mr.), `Miss` (Ms.), `Misses` (Mrs.).
- Sex (`sex`, text): The sex, as the property records it. One of: `Male`, `Female`.
- Birth date (`birth_date`, date): The date of birth.
- Nationality (`nationality`, text): The nationality. One of: `AF` (Afghanistan), `AL` (Albania), `DZ` (Algeria), `AS` (American Samoa), `AD` (Andorra), `AO` (Angola), `AI` (Anguilla), `AQ` (Antarctica), `AG` (Antigua & Barbuda), `AR` (Argentina), and 240 more.
- Preferred language (`language`, text): The preferred language and culture code, such as en-GB or fr-FR.
- Loyalty code (`loyalty_code`, text): The loyalty program code.
- Notes (`notes`, text): Internal notes about the customer.
- Company (`company_id`, text): The company the customer belongs to.
- Classifications (`classifications`, list): How the property classifies the customer, such as VIP or returning guest. One or more of: `Important`, `VeryImportant` (Very important (VIP)), `Returning` (Returning guest), `LoyaltyProgram` (Loyalty program member), `Staff`, `FriendOrFamily` (Friend or family), `TopManagement` (Top management), `Media`, `Airline`, `Military`, and 9 more.
- Consents and options (`options`, list): What the customer agreed to, such as marketing emails. One or more of: `SendMarketingEmails` (Marketing emails), `SendMarketingPostalMail` (Marketing post), `SendPartnerMarketingEmails` (Partner marketing emails), `SendPartnerMarketingPostalMail` (Partner marketing post), `Invoiceable` (Can be invoiced), `BillAddressObjection` (Objects to an address on bills), `WithdrawCardConsent` (Card consent withdrawn), `GuestPhotoConsent` (Consents to guest photo), `IdPhotosConsent` (Consents to ID photos).
- Address (`address_line1`, text): The street address.
- Address line 2 (`address_line2`, text): The second line of the address.
- City (`city`, text): The city.
- Postal code (`postal_code`, text): The ZIP or postal code.
- Country (`country_code`, text): The country. One of: `AF` (Afghanistan), `AL` (Albania), `DZ` (Algeria), `AS` (American Samoa), `AD` (Andorra), `AO` (Angola), `AI` (Anguilla), `AQ` (Antarctica), `AG` (Antigua & Barbuda), `AR` (Argentina), and 240 more.
- Update an existing customer with this email (`overwrite_existing`, true/false): If a customer with this email already exists, update their profile instead of failing. Leave empty for no.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "AddressId": "example",
    "BirthDate": "example",
    "ChainId": "example",
    "Classifications": [
      "example"
    ],
    "CompanyId": "example",
    "CreatedUtc": "example",
    "Email": "example",
    "FirstName": "example",
    "Id": "example",
    "IsActive": true,
    "LastName": "example",
    "LoyaltyCode": "example",
    "NationalityCode": "example",
    "Notes": "example",
    "Number": "example",
    "Options": [
      "example"
    ],
    "Phone": "example",
    "PreferredLanguageCode": "example",
    "SecondLastName": "example",
    "Title": "example",
    "UpdatedUtc": "example"
  }
}
```

### Create reservation

Book a stay for a customer: a room type and rate for the nights between two dates.

**Inputs**

- Service (`service_id`, text, required): The service, such as accommodation.
- Customer ID (`customer_id`, text, required): The ID of the customer who owns the reservation, which List customers and Create customer return.
- Arrival (`arrival`, date, required): The arrival date. Mews uses the service's check-in time at the property.
- Departure (`departure`, date, required): The departure date. Mews uses the service's check-out time at the property.
- Room type (`room_category_id`, text, required): The room type (resource category).
- Rate (`rate_id`, text, required): The rate to price it with.
- Adults (`adults`, number, required): How many adults. From 1 to 50.
- Children (`children`, number): How many children. Leave empty for none. From 0 to 50.
- Room (`room_id`, text): A particular room (resource) to assign. Leave empty and Mews assigns one.
- Status (`state`, text): Confirmed books it, optional holds the room for the guest and inquired records an inquiry. Leave empty for confirmed. One of: `Confirmed`, `Optional` (Optional (held for the guest)), `Enquired` (Inquired (not yet confirmed by either side)).
- Company (`company_id`, text): The company the booking is made on behalf of.
- Booker ID (`booker_id`, text): The ID of the customer who made the booking for the guest, if someone else.
- Channel number (`channel_number`, text): The booking's number in another system, such as a booking site.
- Notes (`notes`, text): Notes for the reservation.
- Send confirmation email (`send_confirmation_email`, true/false): Whether Mews emails the guest a confirmation. Leave empty to send it.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "AssignedResourceId": "example",
    "BookerId": "example",
    "BusinessSegmentId": "example",
    "CancelledUtc": "example",
    "ChannelNumber": "example",
    "CompanyId": "example",
    "CreatedUtc": "example",
    "EndUtc": "example",
    "GroupId": "example",
    "Id": "example",
    "Number": "example",
    "Origin": "example",
    "OwnerId": "example",
    "PersonCounts": [
      {
        "AgeCategoryId": "example",
        "Count": 1
      }
    ],
    "Purpose": "example",
    "RateId": "example",
    "RequestedCategoryId": "example",
    "ServiceId": "example",
    "StartUtc": "example",
    "State": "example",
    "TravelAgencyId": "example",
    "UpdatedUtc": "example"
  }
}
```

### Create task

Give the property's staff a task, such as preparing a room, optionally for a department or a reservation.

**Inputs**

- Task (`name`, text, required): What to do.
- Deadline (`deadline`, date and time, required): When it's due.
- Description (`description`, text): More detail.
- Department (`department_id`, text): The department it's for, such as housekeeping.
- Reservation ID (`reservation_id`, text): The ID of the reservation it's about.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "TaskId": "example"
  }
}
```

### Delete company

Delete a company.

**Inputs**

- Company (`company_id`, text, required): The company.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {}
}
```

### Get availability

Get each room type's availability and occupancy for each night between two dates.

**Inputs**

- Service (`service_id`, text, required): The service, such as accommodation.
- First night (`first_date`, date, required): The first night.
- Last night (`last_date`, date, required): The last night, up to a year after the first.
- Measures (`metrics`, list): What to count. Leave empty for occupied rooms, confirmed and optional reservations, and sellable and active rooms. One or more of: `Occupied` (Rooms occupied), `ConfirmedReservations` (Confirmed reservations), `OptionalReservations` (Optional reservations), `UsableResources` (Rooms that can be sold), `ActiveResources` (Active rooms), `OutOfOrderBlocks` (Rooms out of order), `HouseUse` (House use), `BlockAvailability` (Availability in blocks), `AllocatedBlockAvailability` (Allocated block availability), `PublicAvailabilityAdjustment` (Availability adjustment), `OtherServiceReservationCount` (Reservations of other services).

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "ResourceCategoryAvailabilities": [
      {
        "Metrics": {},
        "ResourceCategoryId": "example"
      }
    ],
    "TimeUnitStartsUtc": [
      "example"
    ]
  }
}
```

### Get property details

Get the property's details: its name, time zone, language, currencies and contact details.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Enterprise": {
      "ChainId": "example",
      "ChainName": "example",
      "Currencies": [
        {
          "Currency": "example",
          "IsDefault": true,
          "IsEnabled": true
        }
      ],
      "DefaultLanguageCode": "example",
      "Email": "example",
      "Id": "example",
      "Name": "example",
      "Phone": "example",
      "Pricing": "example",
      "TimeZoneIdentifier": "example",
      "WebsiteUrl": "example"
    },
    "NowUtc": "example",
    "Service": {
      "Id": "example",
      "Name": "example"
    }
  }
}
```

### Get reservation

Get a reservation's details: its dates, status, guests, room type, room and rate.

**Inputs**

- Reservation ID (`reservation_id`, text, required): The reservation's ID, which List reservations and Create reservation return.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "AccountId": "example",
    "AccountType": "example",
    "ActualEndUtc": "example",
    "ActualStartUtc": "example",
    "AssignedResourceId": "example",
    "BookerId": "example",
    "BusinessSegmentId": "example",
    "CancellationReason": "example",
    "CancelledUtc": "example",
    "ChannelNumber": "example",
    "CreatedUtc": "example",
    "GroupId": "example",
    "Id": "example",
    "Number": "example",
    "Origin": "example",
    "PartnerCompanyId": "example",
    "PersonCounts": [
      {
        "AgeCategoryId": "example",
        "Count": 1
      }
    ],
    "Purpose": "example",
    "RateId": "example",
    "RequestedResourceCategoryId": "example",
    "ScheduledEndUtc": "example",
    "ScheduledStartUtc": "example",
    "ServiceId": "example",
    "State": "example",
    "TravelAgencyId": "example",
    "UpdatedUtc": "example"
  }
}
```

### List bills

List bills by customer, status, type or date. With no filter, lists those changed in the last 90 days.

**Inputs**

- Date (`date_filter`, text): Which date of the bill the range applies to. Leave empty for updated. One of: `UpdatedUtc` (Updated), `CreatedUtc` (Created), `IssuedUtc` (Issued), `PaidUtc` (Paid), `DueUtc` (Due).
- From (`date_from`, date and time): The start of the range.
- To (`date_to`, date and time): The end of the range. It can cover up to 90 days.
- Customer IDs (`customer_ids`, list): Only bills of these customers (their IDs).
- Bill IDs (`bill_ids`, list): Only these bills (their IDs).
- Status (`state`, text): Only open or only closed bills. One of: `Open`, `Closed`.
- Type (`type`, text): Only receipts or only invoices. One of: `Receipt`, `Invoice`.
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Bills": [
      {
        "AccountId": "example",
        "AccountType": "example",
        "CompanyId": "example",
        "CorrectionState": "example",
        "CreatedUtc": "example",
        "CustomerId": "example",
        "DueUtc": "example",
        "EnterpriseId": "example",
        "Id": "example",
        "IssuedUtc": "example",
        "Name": "example",
        "Notes": "example",
        "Number": "example",
        "PaidUtc": "example",
        "State": "example",
        "Type": "example",
        "UpdatedUtc": "example"
      }
    ],
    "Cursor": "example"
  }
}
```

### List companies

List the active companies and travel agencies, by name, ID or when they were added or changed.

**Inputs**

- Names (`names`, list): Only companies with these exact names.
- Company IDs (`company_ids`, list): Only these companies (their IDs).
- Added from (`created_from`, date and time): Only companies added on or after this time.
- Added to (`created_to`, date and time): Only companies added before this time. The range can cover up to 90 days.
- Changed from (`updated_from`, date and time): Only companies changed on or after this time.
- Changed to (`updated_to`, date and time): Only companies changed before this time. The range can cover up to 90 days.
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Companies": [
      {
        "AddressId": "example",
        "ChainId": "example",
        "Contact": "example",
        "ContactPerson": "example",
        "CreatedUtc": "example",
        "Department": "example",
        "ExternalIdentifier": "example",
        "Iata": "example",
        "Id": "example",
        "Identifier": "example",
        "InvoicingEmail": "example",
        "IsActive": true,
        "Name": "example",
        "Notes": "example",
        "Number": 1,
        "Options": {
          "Invoiceable": true
        },
        "TaxIdentifier": "example",
        "Telephone": "example",
        "UpdatedUtc": "example",
        "WebsiteUrl": "example"
      }
    ],
    "Cursor": "example"
  }
}
```

### List customers

Find customers (guest profiles) by email, name, loyalty code, ID or when they were added or changed. With no filter, lists those changed in the last 90 days.

**Inputs**

- Emails (`emails`, list): Only customers with these email addresses.
- Last names (`last_names`, list): Only customers with these last names.
- First names (`first_names`, list): Only customers with these first names.
- Loyalty codes (`loyalty_codes`, list): Only customers with these loyalty codes.
- Customer IDs (`customer_ids`, list): Only these customers (their IDs).
- Added from (`created_from`, date and time): Only customers added on or after this time.
- Added to (`created_to`, date and time): Only customers added before this time. The range can cover up to 90 days.
- Changed from (`updated_from`, date and time): Only customers changed on or after this time.
- Changed to (`updated_to`, date and time): Only customers changed before this time. The range can cover up to 90 days.
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Cursor": "example",
    "Customers": [
      {
        "AddressId": "example",
        "BirthDate": "example",
        "ChainId": "example",
        "Classifications": [
          "example"
        ],
        "CompanyId": "example",
        "CreatedUtc": "example",
        "Email": "example",
        "FirstName": "example",
        "Id": "example",
        "IsActive": true,
        "LastName": "example",
        "LoyaltyCode": "example",
        "NationalityCode": "example",
        "Notes": "example",
        "Number": "example",
        "Options": [
          "example"
        ],
        "Phone": "example",
        "PreferredLanguageCode": "example",
        "SecondLastName": "example",
        "Title": "example",
        "UpdatedUtc": "example"
      }
    ]
  }
}
```

### List payments

List payments by reservation, customer, bill, status, type or date. With no filter, lists those changed in the last 90 days.

**Inputs**

- Date (`date_filter`, text): Which date of the payment the range applies to. Leave empty for updated. One of: `UpdatedUtc` (Updated), `CreatedUtc` (Created), `ChargedUtc` (Charged), `ClosedUtc` (Closed).
- From (`date_from`, date and time): The start of the range.
- To (`date_to`, date and time): The end of the range. It can cover up to 90 days.
- Reservation IDs (`reservation_ids`, list): Only payments for these reservations (their IDs).
- Customer IDs (`customer_ids`, list): Only payments of these customers (their IDs).
- Bill IDs (`bill_ids`, list): Only payments on these bills (their IDs).
- Statuses (`states`, list): Only payments with these statuses. One or more of: `Charged`, `Pending`, `Verifying`, `Canceled`, `Failed`.
- Kind (`type`, text): Only payments of this kind. One of: `CreditCardPayment` (Card), `CashPayment` (Cash), `InvoicePayment` (Invoice), `ExternalPayment` (External), `AlternativePayment` (Alternative (such as a wallet)), `TaxDeductedPayment` (Tax deducted), `GhostPayment` (Ghost), `Payment` (Other).
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Cursor": "example",
    "Payments": [
      {
        "AccountId": "example",
        "AccountType": "example",
        "AccountingState": "example",
        "Amount": {
          "Currency": "example",
          "GrossValue": 1,
          "NetValue": 1
        },
        "BillId": "example",
        "ChargedUtc": "example",
        "ClosedUtc": "example",
        "CreatedUtc": "example",
        "EnterpriseId": "example",
        "Id": "example",
        "Identifier": "example",
        "Kind": "example",
        "Notes": "example",
        "OriginalAmount": {
          "Currency": "example",
          "GrossValue": 1,
          "NetValue": 1
        },
        "ReservationId": "example",
        "State": "example",
        "Type": "example",
        "UpdatedUtc": "example"
      }
    ]
  }
}
```

### List rates

List a service's active rates (pricing plans).

**Inputs**

- Service (`service_id`, text, required): The service, such as accommodation.
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Cursor": "example",
    "Rates": [
      {
        "BaseRateId": "example",
        "ExternalIdentifier": "example",
        "GroupId": "example",
        "Id": "example",
        "IsActive": true,
        "IsBaseRate": true,
        "IsEnabled": true,
        "IsPublic": true,
        "Name": "example",
        "ServiceId": "example",
        "ShortName": "example",
        "Type": "example",
        "UpdatedUtc": "example"
      }
    ]
  }
}
```

### List reservations

List reservations by arrival, departure, stay, check-in, check-out, creation or update date, status, confirmation number or customer.

**Inputs**

- Date (`date_filter`, text): Which date of the reservation the range applies to. Leave empty for arrival. One of: `ScheduledStartUtc` (Arrival), `ScheduledEndUtc` (Departure), `CollidingUtc` (Staying (any night in the range)), `ActualStartUtc` (Checked in), `ActualEndUtc` (Checked out), `CreatedUtc` (Created), `UpdatedUtc` (Updated).
- From (`date_from`, date and time): The start of the range.
- To (`date_to`, date and time): The end of the range. It can cover up to 90 days.
- Statuses (`states`, list): Only reservations with these statuses. One or more of: `Inquired` (Inquired (not yet confirmed by either side)), `Confirmed`, `Started` (Checked in), `Processed` (Checked out), `Canceled`, `Optional` (Optional (held for the guest)), `Requested` (Requested (waitlist)).
- Confirmation numbers (`numbers`, list): Only these confirmation numbers.
- Customer IDs (`customer_ids`, list): Only reservations of these customers (their IDs).
- Services (`service_ids`, list): Only reservations of these services. Leave empty for every bookable service.
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Cursor": "example",
    "Reservations": [
      {
        "AccountId": "example",
        "AccountType": "example",
        "ActualEndUtc": "example",
        "ActualStartUtc": "example",
        "AssignedResourceId": "example",
        "BookerId": "example",
        "BusinessSegmentId": "example",
        "CancellationReason": "example",
        "CancelledUtc": "example",
        "ChannelNumber": "example",
        "CreatedUtc": "example",
        "GroupId": "example",
        "Id": "example",
        "Number": "example",
        "Origin": "example",
        "PartnerCompanyId": "example",
        "PersonCounts": [
          {
            "AgeCategoryId": "example",
            "Count": 1
          }
        ],
        "Purpose": "example",
        "RateId": "example",
        "RequestedResourceCategoryId": "example",
        "ScheduledEndUtc": "example",
        "ScheduledStartUtc": "example",
        "ServiceId": "example",
        "State": "example",
        "TravelAgencyId": "example",
        "UpdatedUtc": "example"
      }
    ]
  }
}
```

### List room types

List a service's room types (resource categories), with their names and capacity.

**Inputs**

- Service (`service_id`, text, required): The service, such as accommodation.
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Cursor": "example",
    "ResourceCategories": [
      {
        "Capacity": 1,
        "Classification": "example",
        "EnterpriseId": "example",
        "ExternalIdentifier": "example",
        "ExtraCapacity": 1,
        "Id": "example",
        "IsActive": true,
        "Names": {},
        "Ordering": 1,
        "ServiceId": "example",
        "ShortNames": {},
        "Type": "example"
      }
    ]
  }
}
```

### List rooms

List the property's rooms and other resources, with each one's housekeeping status.

**Inputs**

- Room names (`names`, list): Only rooms with these names, such as 101.
- Include inactive rooms (`include_inactive`, true/false): Include rooms that are no longer in use.
- Updated from (`updated_from`, date and time): Only rooms changed on or after this time.
- Updated to (`updated_to`, date and time): Only rooms changed before this time. The range can cover up to 90 days.
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Cursor": "example",
    "Resources": [
      {
        "CreatedUtc": "example",
        "Data": {
          "Discriminator": "example",
          "Value": {}
        },
        "EnterpriseId": "example",
        "Id": "example",
        "IsActive": true,
        "Name": "example",
        "ParentResourceId": "example",
        "State": "example",
        "UpdatedUtc": "example"
      }
    ]
  }
}
```

### List services

List the property's services, such as accommodation, parking or breakfast.

**Inputs**

- Type (`service_type`, text): Only bookable services (stays and other reservations) or only additional ones (sold with a stay). Leave empty for both. One of: `Bookable` (Bookable (stays and other reservations)), `Additional` (Additional (sold with a stay)).
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Cursor": "example",
    "Services": [
      {
        "CreatedUtc": "example",
        "Data": {
          "Discriminator": "example",
          "Value": {}
        },
        "EnterpriseId": "example",
        "Id": "example",
        "IsActive": true,
        "Name": "example",
        "Ordering": 1,
        "Type": "example",
        "UpdatedUtc": "example"
      }
    ]
  }
}
```

### List tasks

List tasks for the property's staff, by when they were created, are due or were closed, or by reservation. With no filter, lists those created in the last 90 days.

**Inputs**

- Created from (`created_from`, date and time): Only tasks created on or after this time.
- Created to (`created_to`, date and time): Only tasks created before this time. The range can cover up to 90 days.
- Due from (`deadline_from`, date and time): Only tasks due on or after this time.
- Due to (`deadline_to`, date and time): Only tasks due before this time. The range can cover up to 90 days.
- Closed from (`closed_from`, date and time): Only tasks closed on or after this time.
- Closed to (`closed_to`, date and time): Only tasks closed before this time. The range can cover up to 90 days.
- Reservation IDs (`reservation_ids`, list): Only tasks for these reservations (their IDs).
- Task IDs (`task_ids`, list): Only these tasks (their IDs).
- How many (`limit`, number): How many to return, up to 1000. Leave empty for 100. From 1 to 1000.
- Next page (`cursor`, text): The Cursor the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Cursor": "example",
    "Tasks": [
      {
        "ClosedUtc": "example",
        "CreatedUtc": "example",
        "DeadlineUtc": "example",
        "DepartmentId": "example",
        "Description": "example",
        "EnterpriseId": "example",
        "Id": "example",
        "Name": "example",
        "ServiceOrderId": "example",
        "State": "example"
      }
    ]
  }
}
```

### Update customer

Change a customer's details. Fields left empty stay as they are.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, which List customers and Create customer return.
- Last name (`last_name`, text): The last name.
- First name (`first_name`, text): The first name.
- Email (`email`, text): The email address.
- Phone (`phone`, text): The phone number, such as +442071234567.
- Title (`title`, text): The title. One of: `Mister` (Mr.), `Miss` (Ms.), `Misses` (Mrs.).
- Sex (`sex`, text): The sex, as the property records it. One of: `Male`, `Female`.
- Birth date (`birth_date`, date): The date of birth.
- Nationality (`nationality`, text): The nationality. One of: `AF` (Afghanistan), `AL` (Albania), `DZ` (Algeria), `AS` (American Samoa), `AD` (Andorra), `AO` (Angola), `AI` (Anguilla), `AQ` (Antarctica), `AG` (Antigua & Barbuda), `AR` (Argentina), and 240 more.
- Preferred language (`language`, text): The preferred language and culture code, such as en-GB or fr-FR.
- Loyalty code (`loyalty_code`, text): The loyalty program code.
- Notes (`notes`, text): Internal notes about the customer.
- Company (`company_id`, text): The company the customer belongs to.
- Classifications (`classifications`, list): How the property classifies the customer, such as VIP or returning guest. One or more of: `Important`, `VeryImportant` (Very important (VIP)), `Returning` (Returning guest), `LoyaltyProgram` (Loyalty program member), `Staff`, `FriendOrFamily` (Friend or family), `TopManagement` (Top management), `Media`, `Airline`, `Military`, and 9 more.
- Consents and options (`options`, list): What the customer agreed to, such as marketing emails. One or more of: `SendMarketingEmails` (Marketing emails), `SendMarketingPostalMail` (Marketing post), `SendPartnerMarketingEmails` (Partner marketing emails), `SendPartnerMarketingPostalMail` (Partner marketing post), `Invoiceable` (Can be invoiced), `BillAddressObjection` (Objects to an address on bills), `WithdrawCardConsent` (Card consent withdrawn), `GuestPhotoConsent` (Consents to guest photo), `IdPhotosConsent` (Consents to ID photos).
- Address (`address_line1`, text): The street address.
- Address line 2 (`address_line2`, text): The second line of the address.
- City (`city`, text): The city.
- Postal code (`postal_code`, text): The ZIP or postal code.
- Country (`country_code`, text): The country. One of: `AF` (Afghanistan), `AL` (Albania), `DZ` (Algeria), `AS` (American Samoa), `AD` (Andorra), `AO` (Angola), `AI` (Anguilla), `AQ` (Antarctica), `AG` (Antigua & Barbuda), `AR` (Argentina), and 240 more.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "AddressId": "example",
    "BirthDate": "example",
    "ChainId": "example",
    "Classifications": [
      "example"
    ],
    "CompanyId": "example",
    "CreatedUtc": "example",
    "Email": "example",
    "FirstName": "example",
    "Id": "example",
    "IsActive": true,
    "LastName": "example",
    "LoyaltyCode": "example",
    "NationalityCode": "example",
    "Notes": "example",
    "Number": "example",
    "Options": [
      "example"
    ],
    "Phone": "example",
    "PreferredLanguageCode": "example",
    "SecondLastName": "example",
    "Title": "example",
    "UpdatedUtc": "example"
  }
}
```

### Update reservation

Change a reservation's dates, room type, room, rate, purpose, company or channel number. Fields left empty stay as they are.

**Inputs**

- Reservation ID (`reservation_id`, text, required): The reservation's ID, which List reservations and Create reservation return.
- Arrival (`arrival`, date): The arrival date. Mews uses the service's check-in time at the property.
- Departure (`departure`, date): The departure date. Mews uses the service's check-out time at the property.
- Room type (`room_category_id`, text): The room type (resource category).
- Room (`room_id`, text): A particular room (resource) to assign. Leave empty and Mews assigns one.
- Rate (`rate_id`, text): The rate to price it with.
- Purpose (`purpose`, text): Why the guest is staying. One of: `Leisure`, `Business`, `Student`.
- Company (`company_id`, text): The company the booking is made on behalf of.
- Channel number (`channel_number`, text): The booking's number in another system.
- Reprice (`reprice`, true/false): Whether to reprice the stay at the current price for its dates, rate and room type. Leave empty to reprice.
- Reason (`reason`, text): Why it changed. Mews needs one when the price changes.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {
    "Reservations": [
      {
        "AssignedResourceId": "example",
        "BookerId": "example",
        "BusinessSegmentId": "example",
        "CancelledUtc": "example",
        "ChannelNumber": "example",
        "CompanyId": "example",
        "CreatedUtc": "example",
        "EndUtc": "example",
        "GroupId": "example",
        "Id": "example",
        "Number": "example",
        "Origin": "example",
        "OwnerId": "example",
        "PersonCounts": [
          {
            "AgeCategoryId": "example",
            "Count": 1
          }
        ],
        "Purpose": "example",
        "RateId": "example",
        "RequestedCategoryId": "example",
        "ServiceId": "example",
        "StartUtc": "example",
        "State": "example",
        "TravelAgencyId": "example",
        "UpdatedUtc": "example"
      }
    ]
  }
}
```

### Update room status

Set a room's housekeeping status: dirty, clean, inspected or out of service.

**Inputs**

- Room (`room_id`, text, required): The room.
- Status (`state`, text, required): The new status. One of: `Dirty`, `Clean`, `Inspected`, `OutOfService` (Out of service).
- Reason (`reason`, text): Why, such as a broken shower.

**Outputs**

- `data` (object): The response from Mews.

**Example output**

```json
{
  "data": {}
}
```
