View as Markdown
Mews icon

Mews ACTION

Update Reservation

Update an existing reservation in Mews. See the documentation
  • Action
  • Writes data
  • Destructive
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Mews account once, then configure and run Update Reservation from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "mews-update-reservation",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mews: { authProvisionId: "apn_xxxxxxx" },
    reason: "Reason",
    reprice: true,
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Update Reservation inputs
Property Type Description
reason Reason string
Reason for updating the reservation. Required when updating the price of the reservation.
Optional
reprice Reprice boolean
Whether the price should be updated to latest value for date/rate/category combination set in Mews. If not specified, the reservation price is updated.
Optional
applyCancellationFee Apply Cancellation Fee boolean
Whether the cancellation fees should be applied according to rate cancellation policies. If not specified, the cancellation fees are applied.
Optional
reservationId Reservation ID string
Unique identifier of the reservation.
Required Dynamic
channelNumber Channel Number string
Number of the reservation within the Channel (i.e. OTA, GDS, CRS, etc) in case the reservation group originates there (e.g. Booking.com confirmation number)
Optional
startUtc Start UTC string
Reservation start in UTC timezone in ISO 8601 format
Optional
endUtc End UTC string
Reservation end in UTC timezone in ISO 8601 format
Optional
releasedUtc Released UTC string
Date when the optional reservation is released in UTC timezone in ISO 8601 format
Optional
personCounts Person Counts string[]

Number of people per age category the reservation is for. If supplied, the person counts will be replaced. Each item should contain:

  • AgeCategoryId (string, required): Unique identifier of the Age category
  • Count (integer, required): Number of people of a given age category. Only positive value is accepted

Pass an array of person counts or null if the person counts should not be updated.

Example:

[
  {
    "AgeCategoryId": "12345678-1234-1234-1234-123456789012",
    "Count": 2
  },
  {
    "AgeCategoryId": "87654321-4321-4321-4321-210987654321",
    "Count": 1
  }
]
Optional
assignedResourceId Assigned Resource ID string
Identifier of the assigned Resource. If the assigned resource is locked, see AssignedResourceLocked for updating the assigned resource.
Optional
requestedCategoryId Requested Category ID string
Identifier of the requested ResourceCategory
Optional
travelAgencyId Travel Agency ID string
Identifier of the Travel Agency. (Company with a TravelAgencyContract)
Optional Dynamic
companyId Company ID string
Unique identifier of Company.
Optional Dynamic
businessSegmentId Business Segment ID string
Unique identifier of BusinessSegment.
Optional Dynamic
purpose Purpose string
Purpose of the reservation
Optional
rateId Rate ID string
Identifier of the Rate. See the documentation
Optional Dynamic
creditCardId Credit Card ID string
Identifier of CreditCard belonging to Customer who owns the reservation
Optional Dynamic
timeUnitPrices Time Unit Prices string[]

Prices for time units of the reservation. Each unit should contain:

  • Index (integer, required): Index of the unit starting with 0 (e.g., first night has index 0)
  • Amount (object, optional): Amount parameters including:
    • GrossValue (decimal, optional): Amount including tax (required for Gross Pricing environments)
    • NetValue (decimal, optional): Amount excluding tax (required for Net Pricing environments)
    • Currency (string, required): ISO-4217 code of the currency
    • TaxCodes (array of strings, required): Codes of tax rates to be applied (note: only one tax when using GrossValue, multiple taxes with NetValue)

Pass an array of price units or null if the unit amounts should not be updated.

Example:

[
  {
    "Index": 0,
    "Amount": {
      "GrossValue": 100.00,
      "Currency": "EUR",
      "TaxCodes": ["VAT"]
    }
  },
  {
    "Index": 1,
    "Amount": {
      "NetValue": 85.00,
      "Currency": "EUR",
      "TaxCodes": ["VAT", "CityTax"]
    }
  }
]
Optional
bookerId Booker ID string
Identifier of the Customer on whose behalf the reservation was made.
Required Dynamic
assignedResourceLocked Assigned Resource Locked boolean
Whether the reservation should be locked to the assigned Resource. To reassign the reservation to a new Resource, first set AssignedResourceLocked to false to unlock the resource. Then, assign the reservation to a new Resource by setting AssignedResourceId to the new resource ID.
Optional
availabilityBlockId Availability Block ID string
Unique identifier of the AvailabilityBlock the reservation is assigned to.
Optional Dynamic
optionsOwnerCheckedIn Options Owner Checked In boolean
Whether the owner of the reservation has checked in.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
mews-update-reservation
Version
0.0.4
App
Mews
Authentication
API key
Read-only
No
Destructive
Yes
Open world
Yes