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.
| binding | meaning |
|---|---|
WORLDS_MEWS_URL | This world's origin followed by /api/connector/v1 |
WORLDS_API_KEY | The world key, accepted wherever Mews expects a credential |
WORLDS_WORLD_ID | The isolated world's identity |
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
Id | string | Reservation id |
State | string | Confirmed, Started, Processed, Canceled |
StartUtc | datetime | Arrival |
EndUtc | datetime | Departure |
RequestedCategoryId | string | Room category |
AccountId | string | Customer 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
Id | string | Customer id |
FirstName | string | Given name |
LastName | string | Family name |
Email | string | |
NationalityCode | string | Country 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
Id | string | Resource id |
Name | string | Room number |
State | string | Dirty, Clean, Inspected, OutOfOrder |
ParentResourceId | string | Parent resource |
FloorNumber | string | Floor |
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
Id | string | Bill id |
State | string | Open or Closed |
AccountId | string | Account id |
Number | string | Bill number |
Items | object[] | 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
ServiceId | string | Service id |
CategoryAvailabilities | object[] | Availability per category |
TimeUnitStartsUtc | datetime[] | Day starts |
RateId | string | Rate id |
Test workflow
- Prepare. Select the Mews setup for your workflow and review its starting records, including reservations, customers, resources.
- 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.
- Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
- 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.
# 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-conflictSee 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.
| condition | what the agent sees |
|---|---|
rate-limited | Connector API calls return 429 |
token-revoked | The access token is disabled and returns 401 |
state-conflict | Starting a reservation fails because the room is not clean |
bill-not-balanced | Closing 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.
| Records | Starting setup |
|---|---|
| spaces | 60 rooms across 4 categories |
| reservations | 75 across confirmed, started, processed and canceled |
| bills | 40 open bills, a few with unpaid items |
| rates | Flexible, non refundable and corporate rates |
| housekeeping | Rooms 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.
| Field | Type | Meaning / relationship |
|---|---|---|
Id | string | Reservation id |
State | string | Confirmed, Started, Processed, Canceled |
StartUtc | datetime | Arrival |
EndUtc | datetime | Departure |
RequestedCategoryId | string | Room category |
AccountId | string | Customer or company |
{
"Id": "<Reservation id>",
"State": "<Confirmed, Started, Processed, Canceled>",
"StartUtc": "<Arrival>",
"EndUtc": "<Departure>",
"RequestedCategoryId": "<Room category>",
"AccountId": "<Customer or company>"
}Customers records
Customers
Guest profiles.
| Field | Type | Meaning / relationship |
|---|---|---|
Id | string | Customer id |
FirstName | string | Given name |
LastName | string | Family name |
Email | string | |
NationalityCode | string | Country code |
{
"Id": "<Customer id>",
"FirstName": "<Given name>",
"LastName": "<Family name>",
"Email": "person@example.test",
"NationalityCode": "<Country code>"
}Resources records
Resources
Rooms and their housekeeping state.
| Field | Type | Meaning / relationship |
|---|---|---|
Id | string | Resource id |
Name | string | Room number |
State | string | Dirty, Clean, Inspected, OutOfOrder |
ParentResourceId | string | Parent resource |
FloorNumber | string | Floor |
{
"Id": "<Resource id>",
"Name": "<Room number>",
"State": "<Dirty, Clean, Inspected, OutOfOrder>",
"ParentResourceId": "<Parent resource>",
"FloorNumber": "<Floor>"
}Bills records
Bills
Charges and payments on a guest account.
| Field | Type | Meaning / relationship |
|---|---|---|
Id | string | Bill id |
State | string | Open or Closed |
AccountId | string | Account id |
Number | string | Bill number |
Items | object[] | Line items |
{
"Id": "<Bill id>",
"State": "<Open or Closed>",
"AccountId": "<Account id>",
"Number": "<Bill number>",
"Items": []
}Availability records
Availability
Room availability and rates.
| Field | Type | Meaning / relationship |
|---|---|---|
ServiceId | string | Service id |
CategoryAvailabilities | object[] | Availability per category |
TimeUnitStartsUtc | datetime[] | Day starts |
RateId | string | Rate id |
{
"ServiceId": "<Service id>",
"CategoryAvailabilities": [],
"TimeUnitStartsUtc": [],
"RateId": "<Rate id>"
}