> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daysync.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tours

> List, create, edit, and soft-delete tours, and list a tour's members.

A **tour** is the top-level container in Daysync — it holds days, schedule items, venues, accommodation, guest lists, and bulletins. Tours are identified by a UUID string.

All endpoints require the standard [authentication](/authentication) headers.

***

## List tours

```text theme={null}
GET /v1/tours?org_id={orgId}
```

Returns every tour in an organization that the authenticated user can see.

**Scope:** `tours.read`

**Query parameters**

| Name     | Type          | Required | Description                         |
| -------- | ------------- | -------- | ----------------------------------- |
| `org_id` | string (UUID) | Yes      | The organization to list tours for. |

**Example**

```bash theme={null}
curl "$BASE/v1/tours?org_id=2f1c…" \
  -H "x-api-key: $KEY" -H "x-api-secret: $SECRET" -H "Authorization: Bearer $TOKEN"
```

**Response `data`** — array of tour memberships:

```json theme={null}
{
  "status": true,
  "message": "Success",
  "data": [
    {
      "role": "ADMIN",
      "member_count": 8,
      "tour": {
        "id": "2f1c…",
        "name": "Spring Tour 2026",
        "image": "https://…",
        "fileName": "cover.jpg",
        "start_date": "2026-06-01T00:00:00Z",
        "end_date": "2026-06-30T00:00:00Z",
        "is_archived": false,
        "is_deleted": false,
        "tourDays": [
          { "id": 1843, "day": { "id": 1843, "name": "Day 1", "date": "2026-06-01T00:00:00Z", "time_zone": "Australia/Sydney" } }
        ],
        "created_by": { "id": "…", "firstname": "Jane", "lastname": "Doe", "email": "jane@…", "image": "https://…" }
      }
    }
  ]
}
```

* `role` — the authenticated user's role on the tour.
* `member_count` — number of members on the tour.
* `tour.tourDays` — the tour's days; each day `id` is used as `dayId` in schedule and guest-list routes.

***

## Create a tour

```text theme={null}
POST /v1/tours
```

**Scope:** `tours.write`

**Body**

| Field           | Type              | Required | Description                                                                      |
| --------------- | ----------------- | -------- | -------------------------------------------------------------------------------- |
| `name`          | string            | Yes      | Tour name (1–500 characters).                                                    |
| `org_id`        | string (UUID)     | Yes      | Organization the tour belongs to.                                                |
| `start_date`    | ISO 8601 datetime | Yes      | Tour start.                                                                      |
| `end_date`      | ISO 8601 datetime | Yes      | Tour end. Must be ≥ `start_date`.                                                |
| `timeZone`      | string (IANA)     | Yes      | e.g. `Australia/Sydney`.                                                         |
| `days`          | array\<Day>       | Yes      | One or more days (see below). Must be non-empty.                                 |
| `image`         | string            | No       | Cover image URL.                                                                 |
| `fileName`      | string            | No       | Cover image file name.                                                           |
| `avatarColor`   | string            | No       | Avatar colour.                                                                   |
| `avatarColorId` | number            | No       | Avatar colour ID — [valid values](/field-reference#avatar-colors-avatarcolorid). |
| `is_demo`       | boolean           | No       | Marks the tour as demo data.                                                     |

**Day object** (`days[]`)

| Field               | Type              | Required | Description                                                        |
| ------------------- | ----------------- | -------- | ------------------------------------------------------------------ |
| `day_type_id`       | number            | Yes      | Day type — see [List Day Types](#list-day-types) for valid values. |
| `name`              | string            | Yes      | Day name.                                                          |
| `formatted_address` | string            | Yes      | Display address for the day.                                       |
| `date`              | ISO 8601 datetime | Yes      | The day's date.                                                    |
| `place_id`          | string            | No       | Maps place ID.                                                     |
| `timeZone`          | string (IANA)     | No       | Day time zone.                                                     |
| `viewport`          | Viewport          | No       | `{ northeast: {lat,lng}, southwest: {lat,lng} }`.                  |

**Example**

```bash theme={null}
curl -X POST "$BASE/v1/tours" \
  -H "x-api-key: $KEY" -H "x-api-secret: $SECRET" -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Spring Tour 2026",
    "org_id": "2f1c…",
    "start_date": "2026-06-01T00:00:00Z",
    "end_date": "2026-06-30T00:00:00Z",
    "timeZone": "Australia/Sydney",
    "days": [
      { "day_type_id": 1, "name": "Day 1", "formatted_address": "Sydney NSW", "date": "2026-06-01T00:00:00Z" }
    ]
  }'
```

**Response `data`:** `{ "id": "2f1c…" }` — the new tour's ID.

<Note>
  Tour creation is subject to the [subscription requirement](/errors#subscription-requirement-402) (`402`) for non-exempt organizations, and to the validation rules in [Errors](/errors#input-validation-400).
</Note>

***

## Edit a tour

```text theme={null}
PUT /v1/tours/{tourId}
```

**Scope:** `tours.write`

**Path parameters**

| Name     | Type          | Description   |
| -------- | ------------- | ------------- |
| `tourId` | string (UUID) | Tour to edit. |

**Body** — all fields optional; send only what you want to change.

| Field           | Type                | Description                                                                                                                                                                                                                                                                   |
| --------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`          | string              | Tour name (1–500 chars when provided).                                                                                                                                                                                                                                        |
| `start_date`    | ISO 8601 datetime   | New start.                                                                                                                                                                                                                                                                    |
| `end_date`      | ISO 8601 datetime   | New end (must be ≥ `start_date`).                                                                                                                                                                                                                                             |
| `timeZone`      | string (IANA)       | New time zone.                                                                                                                                                                                                                                                                |
| `image`         | string              | Cover image URL.                                                                                                                                                                                                                                                              |
| `fileName`      | string              | Cover image file name.                                                                                                                                                                                                                                                        |
| `avatarColorId` | number              | Avatar colour ID — [valid values](/field-reference#avatar-colors-avatarcolorid).                                                                                                                                                                                              |
| `day_list`      | array\<EditTourDay> | **Declarative full list** of the tour's days — see the warning below. Each entry may include `day_id`, `day_type_id`, `name`, `formatted_address`, `place_id`, `date`, `timeZone`, `viewport`. Entries with a `day_id` update that day; entries without one create a new day. |

<Warning>
  **`day_list` replaces the tour's day set — omitted days are permanently deleted, including everything on them.**

  When you send `day_list`, any existing day whose `day_id` is *not* in the list is **hard-deleted** (not soft-deleted), and the deletion **cascades to all content on that day** — schedule items, guest list entries, and day-scoped links are destroyed and cannot be recovered through the API.

  To safely update one day:

  1. `GET /v1/tours?org_id=…` and collect **every** `day.id` from the tour's `tourDays`.
  2. Send `day_list` containing **all** existing days (just `{ "day_id": … }` is enough to preserve one unchanged), with your modifications on the day you're editing.

  If you only want to change tour-level fields (`name`, dates, `timeZone`, …), **omit `day_list` entirely** — days are untouched when the field is absent.
</Warning>

**Response `data`:** none (status + message only).

***

## Delete a tour

```text theme={null}
DELETE /v1/tours/{tourId}
```

Soft-deletes the tour. After deletion, any request referencing the tour returns `404 TOUR_NOT_FOUND`.

**Scope:** `tours.write`

**Path parameters**

| Name     | Type          | Description     |
| -------- | ------------- | --------------- |
| `tourId` | string (UUID) | Tour to delete. |

**Response `data`:** none.

***

## List tour members

```text theme={null}
GET /v1/tours/{tourId}/users
```

Returns the tour's members and any pending invites.

**Scope:** `users.read`

**Path parameters**

| Name     | Type          | Description               |
| -------- | ------------- | ------------------------- |
| `tourId` | string (UUID) | Tour to list members for. |

**Response `data`**

```json theme={null}
{
  "tour_users": [
    {
      "id": "…",
      "user": { "id": "…", "firstname": "Jane", "lastname": "Doe", "email": "jane@…", "phone_number": "+61…", "image": "https://…" },
      "user_role_type": { "id": 1, "name": "Admin", "description": "Full access" }
    }
  ],
  "pending_invites": [ { "id": "…", "email": "newuser@…" } ]
}
```

***

## List Day Types

```text theme={null}
GET /v1/day-types
```

Returns the valid `day_type_id` values used in the `days` array when creating or editing a tour.

**Scope:** `tours.read`

No parameters. Day types are global — the same list applies to every organization and tour.

**Example**

```bash theme={null}
curl "$BASE/v1/day-types" \
  -H "x-api-key: $KEY" -H "x-api-secret: $SECRET" -H "Authorization: Bearer $TOKEN"
```

**Response `data`** — array of day types:

```json theme={null}
{
  "status": true,
  "message": "Success",
  "data": [
    { "id": 1, "type": "…", "description": "…" }
  ]
}
```

| Field         | Type   | Description                                       |
| ------------- | ------ | ------------------------------------------------- |
| `id`          | number | Use as `day_type_id` when creating/editing tours. |
| `type`        | string | Display name of the day type.                     |
| `description` | string | Longer description.                               |

<Tip>
  Call this once and cache the result — day types change rarely. Fetch the live list rather than hardcoding IDs.
</Tip>

***

See also: [Schedule](/endpoints/schedule), [Venues](/endpoints/venues), [Accommodation](/endpoints/accommodation), [Guest List](/endpoints/guest-list), [Bulletins](/endpoints/bulletins).
