Salta ai contenuti

Local property setup

Questi contenuti non sono ancora disponibili nella tua lingua.

Open All properties in the property switcher (/w/ws_…/properties). A member with properties.configure (with the built-in roles, an administrator) can create a local property with its name, IANA time zone and ISO 4217 currency. A property’s settings URL contains both identifiers:

/w/ws_…/p/prop_…/settings

Reopening or reloading that URL fetches persisted settings with the caller’s session. Members with properties.read can read settings; only properties.configure creates or updates them. An inaccessible workspace has no page, and an API read outside the selected workspace returns not found. Validation errors retain the draft and focus its field. English text, keyboard controls and empty/loading/error states are included.

Select a workspace with GuestCraft-Workspace-Id. JSON field names stay snake_case.

  • GET /api/v1/properties: {data, next_cursor, has_more}, ordered by property ID. limit defaults to 20 and ranges from 1 to 100. Follow the returned opaque cursor; it is bound to the workspace and ordering. Cross-context or malformed cursors return cursor.invalid. Pagination is a live list, not a frozen snapshot.
  • POST /api/v1/properties: settings {name, time_zone, currency}; returns the new property with status 201 and a Location header. Identifiers/workspace are assigned by the server; extra body fields are rejected.
  • GET /api/v1/properties/{id}: persisted property settings.
  • PUT /api/v1/properties/{id}: full replacement of the three settings, retaining ID and workspace; returns status 200. Version preconditions are not yet implemented, so concurrent settings updates currently use last-write-wins semantics.
const property = await guestcraft.properties.create({
name: "Example Hotel",
time_zone: "Asia/Tokyo",
currency: "JPY",
});
const page = await guestcraft.properties.list({ limit: 20 });
await guestcraft.properties.get(property.id);
await guestcraft.properties.update(property.id, {
name: "Example Hotel — Annex",
time_zone: property.time_zone,
currency: property.currency,
});

Each write records an identifier-only audit entry and thin domain event in the same transaction. Failure rolls back data, audit and event together. Writes are never retried automatically; an interrupted response may have committed. Check the list before repeating a create. No plaintext settings are copied into audit/event payloads.

This workflow configures local properties. It does not import/map Channex records or create room types, physical units, reservations, prices or inventory. A currency already used by financial records cannot be changed. Time-zone edits change the civil date used by future front-desk actions; booked PlainDate values remain unchanged.