Mews ACTION
Update Reservation
- 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)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "mews-update-reservation",
"configured_props": {
"mews": { "authProvisionId": "apn_xxxxxxx" },
"reason": "Reason",
"reprice": true
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "mews",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "mews-update-reservation",
arguments: {
reason: "Reason",
reprice: true,
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| 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:
Pass an array of person counts or null if the person counts should not be updated. Example: 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:
Pass an array of price units or null if the unit amounts should not be updated. Example: 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
- Source
- View on GitHub ↗