Skip to main content

Tours

Available on NTController.tours.

tours.list()

GET /api/v1/tours

Every tour visible to the current token.

Returns PropertyListItem[] — a summary shape carrying only what a listing needs. Fetch a tour by id for its floors, rooms and scans.

const tours = await NTController.tours.list();

tours.get(id)

GET /api/v1/tours/{id}

One tour in full, including every floor, room and scan.

ParameterTypeDescription
id (required)stringTour identifier.

Returns PropertyItem

const tour = await NTController.tours.get("tour_123");

for (const floor of tour.floors) {
for (const room of floor.rooms) {
console.log(room.name, room.scans.length);
}
}

tours.getBySlug(slug)

GET /api/v1/public/tours/{slug}

One public tour, addressed by its slug. A tour has a slug only while its visibility is PUBLIC; setting it private revokes the slug and this call begins returning 404.

ParameterTypeDescription
slug (required)stringPublic slug, from PropertyItem.slug.

Returns PropertyItem

const tour = await NTController.tours.getBySlug("riverside-apartment");

tours.update(id, body)

PATCH /api/v1/tours/{id}

Updates a tour. Send only the fields that change; omitted fields are left untouched.

FieldTypeDescription
namestringDisplay name. 1–100 characters.
descriptionstringFree-text description. 1–500 characters.
visibilityVisibility"PUBLIC" mints a slug; "PRIVATE" revokes it.
defaultScanIdstring | nullScan the viewer opens on. null clears it.

Returns PropertyItem — the updated tour. Read slug from the response after a visibility change rather than assuming its value.

const updated = await NTController.tours.update("tour_123", {
visibility: "PUBLIC"
});

// updated.slug is now set

tours.delete(id)

DELETE /api/v1/tours/{id}

Permanently deletes a tour and everything under it. This cannot be undone.

Returns void