Closed beta · run Worlds on your machineBrowse worlds →
Docs menu · Mews API

Worlds / Travel

Mews API

A local Mews property with spaces, reservations, rates, bills and housekeeping states. Test the front desk agent that checks guests in and out, assigns rooms and updates room status.

Base path
/api/connector/v1
Auth
ClientToken and AccessToken in the request body, the world key
Endpoints
19
Status
Active today

This reference previews the surface the Mews world serves in the closed beta. Paths mirror the public Mews API; the exact subset is confirmed when your workflow is scoped.

Connect

The run gives your agent these bindings. Keep your SDK; change only where it sends requests.

bindingmeaning
WORLDS_MEWS_URLThis world's origin followed by /api/connector/v1
WORLDS_API_KEYThe world key, accepted wherever Mews expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · fetch
const base = process.env.WORLDS_MEWS_URL + "/api/connector/v1";

const res = await fetch(base + "/reservations/getAll/2023-06-06", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    ClientToken: process.env.WORLDS_API_KEY,
    AccessToken: process.env.WORLDS_API_KEY,
    Client: "Sparta Agent 1.0",
    States: ["Confirmed"],
  }),
});

const { Reservations } = await res.json();

API reference

Reservations

Stays booked at the property.

  • POST/api/connector/v1/reservations/getAll/2023-06-06List reservations
  • POST/api/connector/v1/reservations/addCreate reservations
  • POST/api/connector/v1/reservations/updateUpdate reservations
  • POST/api/connector/v1/reservations/cancelCancel reservations
  • POST/api/connector/v1/reservations/startCheck in a reservation
Fields · 6
IdstringReservation id
StatestringConfirmed, Started, Processed, Canceled
StartUtcdatetimeArrival
EndUtcdatetimeDeparture
RequestedCategoryIdstringRoom category
AccountIdstringCustomer or company

Customers

Guest profiles.

  • POST/api/connector/v1/customers/getAllList customers
  • POST/api/connector/v1/customers/searchSearch customers
  • POST/api/connector/v1/customers/addCreate a customer
  • POST/api/connector/v1/customers/updateUpdate a customer
Fields · 5
IdstringCustomer id
FirstNamestringGiven name
LastNamestringFamily name
EmailstringEmail
NationalityCodestringCountry code

Resources

Rooms and their housekeeping state.

  • POST/api/connector/v1/resources/getAllList resources
  • POST/api/connector/v1/resources/updateUpdate resources
  • POST/api/connector/v1/resourceCategories/getAllList room categories
Fields · 5
IdstringResource id
NamestringRoom number
StatestringDirty, Clean, Inspected, OutOfOrder
ParentResourceIdstringParent resource
FloorNumberstringFloor

Bills

Charges and payments on a guest account.

  • POST/api/connector/v1/bills/getAllList bills
  • POST/api/connector/v1/bills/closeClose a bill
  • POST/api/connector/v1/orderItems/getAllList order items
  • POST/api/connector/v1/payments/getAllList payments
Fields · 5
IdstringBill id
StatestringOpen or Closed
AccountIdstringAccount id
NumberstringBill number
Itemsobject[]Line items

Availability

Room availability and rates.

  • POST/api/connector/v1/services/getAvailabilityGet service availability
  • POST/api/connector/v1/rates/getAllList rates
  • POST/api/connector/v1/rates/getPricingGet rate pricing
Fields · 4
ServiceIdstringService id
CategoryAvailabilitiesobject[]Availability per category
TimeUnitStartsUtcdatetime[]Day starts
RateIdstringRate id

Test workflow

  1. Prepare. Select the Mews setup for your workflow and review its starting records, including reservations, customers, resources.
  2. Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
  3. Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
  4. Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.

What to verify

  • Room 204 moved from dirty to clean
  • Room 207 still dirty while its guest is in house
  • Room 210 inspected before any arrival is assigned to it
  • No guest checked into a room that is not inspected
  • No bill closed with an open balance

Test file

A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.

yaml · worlds/tasks.yaml
# worlds/tasks.yaml · Mews
version: 2
connector: mews
seed: mews-starter
mode: isolated
policy: >
  Prepare floor 2 for today's arrivals. Move rooms to clean or inspected only
  after the guest has checked out, check arrivals into inspected rooms of
  their booked category, and close bills only when paid.
tasks:
  - id: check-in-arrivals-into-clean-inspected-rooms
    prompt: "Check in arrivals into clean, inspected rooms"
  - id: check-out-departures-and-close-their-bills
    prompt: Check out departures and close their bills
  - id: update-housekeeping-states-after-cleaning
    prompt: Update housekeeping states after cleaning
expected:
  - Room 204 moved from dirty to clean
  - Room 207 still dirty while its guest is in house
  - Room 210 inspected before any arrival is assigned to it
  - No guest checked into a room that is not inspected
  - No bill closed with an open balance
scenarios:
  - rate-limited
  - token-revoked
  - state-conflict

See Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.

Failure conditions

Each one fires before the handler, at the same step on every run.

conditionwhat the agent sees
rate-limitedConnector API calls return 429
token-revokedThe access token is disabled and returns 401
state-conflictStarting a reservation fails because the room is not clean
bill-not-balancedClosing a bill with an open balance is rejected

Starting data

Start each run from the same records and relationships. The overview below describes the Mews starter; use the setup supplied for your workflow when preparing your own snapshot.

RecordsStarting setup
spaces60 rooms across 4 categories
reservations75 across confirmed, started, processed and canceled
bills40 open bills, a few with unpaid items
ratesFlexible, non refundable and corporate rates
housekeepingRooms across dirty, clean, inspected and out of service

The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.

Reservations records

Reservations

Stays booked at the property.

FieldTypeMeaning / relationship
IdstringReservation id
StatestringConfirmed, Started, Processed, Canceled
StartUtcdatetimeArrival
EndUtcdatetimeDeparture
RequestedCategoryIdstringRoom category
AccountIdstringCustomer or company
json · illustrative record shape
{
  "Id": "<Reservation id>",
  "State": "<Confirmed, Started, Processed, Canceled>",
  "StartUtc": "<Arrival>",
  "EndUtc": "<Departure>",
  "RequestedCategoryId": "<Room category>",
  "AccountId": "<Customer or company>"
}

See reservations operations

Customers records

Customers

Guest profiles.

FieldTypeMeaning / relationship
IdstringCustomer id
FirstNamestringGiven name
LastNamestringFamily name
EmailstringEmail
NationalityCodestringCountry code
json · illustrative record shape
{
  "Id": "<Customer id>",
  "FirstName": "<Given name>",
  "LastName": "<Family name>",
  "Email": "person@example.test",
  "NationalityCode": "<Country code>"
}

See customers operations

Resources records

Resources

Rooms and their housekeeping state.

FieldTypeMeaning / relationship
IdstringResource id
NamestringRoom number
StatestringDirty, Clean, Inspected, OutOfOrder
ParentResourceIdstringParent resource
FloorNumberstringFloor
json · illustrative record shape
{
  "Id": "<Resource id>",
  "Name": "<Room number>",
  "State": "<Dirty, Clean, Inspected, OutOfOrder>",
  "ParentResourceId": "<Parent resource>",
  "FloorNumber": "<Floor>"
}

See resources operations

Bills records

Bills

Charges and payments on a guest account.

FieldTypeMeaning / relationship
IdstringBill id
StatestringOpen or Closed
AccountIdstringAccount id
NumberstringBill number
Itemsobject[]Line items
json · illustrative record shape
{
  "Id": "<Bill id>",
  "State": "<Open or Closed>",
  "AccountId": "<Account id>",
  "Number": "<Bill number>",
  "Items": []
}

See bills operations

Availability records

Availability

Room availability and rates.

FieldTypeMeaning / relationship
ServiceIdstringService id
CategoryAvailabilitiesobject[]Availability per category
TimeUnitStartsUtcdatetime[]Day starts
RateIdstringRate id
json · illustrative record shape
{
  "ServiceId": "<Service id>",
  "CategoryAvailabilities": [],
  "TimeUnitStartsUtc": [],
  "RateId": "<Rate id>"
}

See availability operations

See the Mews world in the catalog