Mews · Arazzo Workflow

Mews Service Availability to Reservation

Version 1.0.0

Resolve a service, check category availability, then book if space exists.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub HospitalityHotelPMSProperty ManagementTravelBookingReservationsCloudSoftware-as-a-ServiceArazzoWorkflows

Provider

mews-com

Workflows

service-availability-to-reservation
Check service availability and book a reservation when space is open.
Loads the service, reads per-category availability for the stay window, and creates a reservation only when at least one category reports availability.
3 steps inputs: accessToken, client, clientToken, customerId, endUtc, firstTimeUnitStartUtc, lastTimeUnitStartUtc, rateId, requestedCategoryId, serviceId, startUtc outputs: reservationId
1
getService
Resolve the bookable service so availability can be queried against it.
2
getAvailability
Read per-category availability across the requested time units to decide whether the stay can be booked.
3
bookReservation
Create the reservation now that the service reported availability for the requested window.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Mews Service Availability to Reservation
  summary: Resolve a service, check category availability, then book if space exists.
  description: >-
    An availability-aware booking pattern. The Connector API services/getAll
    action resolves the bookable service, services/getAvailability returns the
    free counts per resource category across the requested time units, and the
    flow branches: when availability exists a reservation is created with
    reservations/add. Each step inlines its action-style POST body with the
    ClientToken, AccessToken, and Client authentication fields Mews requires so
    the flow reads and runs without opening the OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-4020
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-4020
      capability_name: Reservation & Booking Management
      spec: mews-com-reservations-api-openapi.yml
      confidence: 0.95
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: reservationsApi
  url: ../openapi/mews-com-reservations-api-openapi.yml
  type: openapi
- name: servicesApi
  url: ../openapi/mews-com-services-api-openapi.yml
  type: openapi
workflows:
- workflowId: service-availability-to-reservation
  summary: Check service availability and book a reservation when space is open.
  description: >-
    Loads the service, reads per-category availability for the stay window, and
    creates a reservation only when at least one category reports availability.
  inputs:
    type: object
    required:
    - clientToken
    - accessToken
    - client
    - serviceId
    - rateId
    - requestedCategoryId
    - customerId
    - firstTimeUnitStartUtc
    - lastTimeUnitStartUtc
    - startUtc
    - endUtc
    properties:
      clientToken:
        type: string
        description: The Mews ClientToken identifying the integration.
      accessToken:
        type: string
        description: The Mews AccessToken identifying the enterprise.
      client:
        type: string
        description: The client application name and version.
      serviceId:
        type: string
        description: The bookable service to check and book against.
      rateId:
        type: string
        description: The rate applied to the reservation.
      requestedCategoryId:
        type: string
        description: The requested resource (room) category.
      customerId:
        type: string
        description: The guest the reservation is for.
      firstTimeUnitStartUtc:
        type: string
        description: Start of the first time unit to check availability for, in UTC.
      lastTimeUnitStartUtc:
        type: string
        description: Start of the last time unit to check availability for, in UTC.
      startUtc:
        type: string
        description: The reservation start in UTC.
      endUtc:
        type: string
        description: The reservation end in UTC.
  steps:
  - stepId: getService
    description: >-
      Resolve the bookable service so availability can be queried against it.
    operationId: services_getAll
    requestBody:
      contentType: application/json
      payload:
        ClientToken: $inputs.clientToken
        AccessToken: $inputs.accessToken
        Client: $inputs.client
        ServiceIds:
        - $inputs.serviceId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      resolvedServiceId: $response.body#/Services/0/Id
  - stepId: getAvailability
    description: >-
      Read per-category availability across the requested time units to decide
      whether the stay can be booked.
    operationId: services_getAvailability
    requestBody:
      contentType: application/json
      payload:
        ClientToken: $inputs.clientToken
        AccessToken: $inputs.accessToken
        Client: $inputs.client
        ServiceId: $steps.getService.outputs.resolvedServiceId
        FirstTimeUnitStartUtc: $inputs.firstTimeUnitStartUtc
        LastTimeUnitStartUtc: $inputs.lastTimeUnitStartUtc
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      categoryAvailabilities: $response.body#/CategoryAvailabilities
    onSuccess:
    - name: hasAvailability
      type: goto
      stepId: bookReservation
      criteria:
      - context: $response.body
        condition: $.CategoryAvailabilities.length > 0
        type: jsonpath
    - name: noAvailability
      type: end
      criteria:
      - context: $response.body
        condition: $.CategoryAvailabilities.length == 0
        type: jsonpath
  - stepId: bookReservation
    description: >-
      Create the reservation now that the service reported availability for the
      requested window.
    operationId: reservations_add
    requestBody:
      contentType: application/json
      payload:
        ClientToken: $inputs.clientToken
        AccessToken: $inputs.accessToken
        Client: $inputs.client
        ServiceId: $steps.getService.outputs.resolvedServiceId
        SendConfirmationEmail: true
        Reservations:
        - State: Confirmed
          StartUtc: $inputs.startUtc
          EndUtc: $inputs.endUtc
          CustomerId: $inputs.customerId
          RequestedCategoryId: $inputs.requestedCategoryId
          RateId: $inputs.rateId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      reservationId: $response.body#/Reservations/0/Reservation/Id
  outputs:
    reservationId: $steps.bookReservation.outputs.reservationId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/mews-com-service-availability-to-reservation-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.