# FareHarbor

> Book tours and activities through FareHarbor: list companies, items and availabilities with prices, validate and make bookings, rebook, cancel, check customers in and staff availabilities. Start a workflow when a booking is made or an availability is nearly full.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/fareharbor

## Actions

### Add crew member

Assign a staff member to an availability, with a role and a note.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Availability (`availability`, text, required): The availability's ID (one date and time of an item), from 'List availabilities', a booking or a trigger.
- User (`username`, text, required): The staff member, picked from the company's users or typed as their username.
- Role (`role`, text): Their role, such as captain, from the company's list.
- Note (`note`, text): A note on their assignment, such as what they're doing.

**Outputs**

- `id` (number): The crew assignment's ID
- `name` (text): Their full name
- `note` (text): The note on their assignment
- `role` (text): Their role's short name, such as captain; empty if none
- `username` (text): The crew member's username

**Example output**

```json
{
  "id": 12345,
  "name": "John Smith",
  "note": "Responsible for safety briefing and equipment check",
  "role": "captain",
  "username": "jsmith"
}
```

### Cancel booking

Cancel a booking. Whether it can be, and any refund, follows the company's cancellation policy; a booking can always be cancelled in the 5 minutes after it's made.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Booking (`booking`, text, required): The booking's ID, such as d75102be-9732-4523-90a8-c698eff2b983, from another FareHarbor step or the trigger, or its dashboard link.

**Outputs**

- `amount_paid_display` (text): How much has been paid, written out
- `arrival` (text): When customers should arrive; empty if picked up
- `availability_id` (number): The booked availability's ID
- `can_cancel` (true/false): Whether it can be cancelled now
- `cancel_by` (text): The last moment it can be cancelled (ISO 8601); empty if there's no cutoff
- `company` (text): The company's shortname
- `company_name` (text): The company's name
- `contact_email` (text): Their email
- `contact_name` (text): The name of who booked
- `contact_phone` (text): Their phone number, with its country code
- `created_at` (text): When it was made, in UTC (ISO 8601)
- `customer_count` (number): How many customers it's for
- `customers` (list): The customers on it
- `dashboard_url` (text): A link to it in FareHarbor's dashboard
- `display_id` (text): The booking number customers see, such as #6876876
- `end_at` (text): When it ends, in the company's time zone (ISO 8601)
- `external_id` (text): Your own reference for it; empty if none
- `id` (number): The booking's number
- `item_id` (number): The booked item's ID
- `item_name` (text): The booked item's name
- `note` (text): The booking's note
- `pickup` (text): Where and when customers are picked up; empty if no pickup
- `rebooked_from` (text): The ID of the booking it replaced; empty if none
- `rebooked_to` (text): The ID of the booking that replaced it; empty if none
- `source` (text): How it was made, such as online or external-api
- `start_at` (text): When it starts, in the company's time zone (ISO 8601)
- `status` (text): booked, cancelled or rebooked
- `total` (number): What it costs in all, in the smallest unit of the company's currency, such as cents: 20000 is 200.00; empty if hidden from your keys
- `total_display` (text): What it costs in all, written out, such as 387.76
- `uuid` (text): The booking's ID, which the booking steps take
- `voucher_number` (text): Its voucher number; empty if none

**Example output**

```json
{
  "amount_paid_display": "387.76",
  "arrival": "",
  "availability_id": 50291151,
  "can_cancel": false,
  "cancel_by": "2017-01-22T13:30:00-1000",
  "company": "hawaiianadventures",
  "company_name": "Hawaiian Adventures",
  "contact_email": "johndoe@example.com",
  "contact_name": "John Doe",
  "contact_phone": "+14157894563",
  "created_at": "2024-06-20T17:14:33+0000",
  "customer_count": 1,
  "customers": [
    {
      "checked_in": true,
      "checkin_status": "checked in",
      "checkin_url": "https://fhchk.co/abc",
      "customer_type": "Adult",
      "id": 28,
      "rate_id": 65675
    }
  ],
  "dashboard_url": "https://fareharbor.com/hawaiianadventures/dashboard/?overlay=/contacts/7/bookings/d75102be-9732-4523-90a8-c698eff2b983/",
  "display_id": "#6876876",
  "end_at": "2023-08-18T03:30:00-0600",
  "external_id": "DataTracker5678",
  "id": 6876876,
  "item_id": 1867,
  "item_name": "Jet Ski Tour",
  "note": "Optional booking note.",
  "pickup": "We'll pick you up at 10:30am from Wyndham Royal Garden",
  "rebooked_from": "",
  "rebooked_to": "",
  "source": "external-api",
  "start_at": "2023-08-18T00:30:00-0600",
  "status": "cancelled",
  "total": 38776,
  "total_display": "387.76",
  "uuid": "d75102be-9732-4523-90a8-c698eff2b983",
  "voucher_number": "V-35791209"
}
```

### Check in booking

Check in everyone on a booking, or one customer, or clear a check-in.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Booking (`booking`, text, required): The booking's ID, such as d75102be-9732-4523-90a8-c698eff2b983, from another FareHarbor step or the trigger, or its dashboard link.
- Status (`status`, text): The check-in status to set, from the company's list. Leave blank to let FareHarbor choose, or pick Clear check-in to undo one.
- Customer (`customer`, text): One customer's ID, from the booking's customers, to check in only them. Leave blank for everyone on it.

**Outputs**

- `amount_paid_display` (text): How much has been paid, written out
- `arrival` (text): When customers should arrive; empty if picked up
- `availability_id` (number): The booked availability's ID
- `can_cancel` (true/false): Whether it can be cancelled now
- `cancel_by` (text): The last moment it can be cancelled (ISO 8601); empty if there's no cutoff
- `company` (text): The company's shortname
- `company_name` (text): The company's name
- `contact_email` (text): Their email
- `contact_name` (text): The name of who booked
- `contact_phone` (text): Their phone number, with its country code
- `created_at` (text): When it was made, in UTC (ISO 8601)
- `customer_count` (number): How many customers it's for
- `customers` (list): The customers on it
- `dashboard_url` (text): A link to it in FareHarbor's dashboard
- `display_id` (text): The booking number customers see, such as #6876876
- `end_at` (text): When it ends, in the company's time zone (ISO 8601)
- `external_id` (text): Your own reference for it; empty if none
- `id` (number): The booking's number
- `item_id` (number): The booked item's ID
- `item_name` (text): The booked item's name
- `note` (text): The booking's note
- `pickup` (text): Where and when customers are picked up; empty if no pickup
- `rebooked_from` (text): The ID of the booking it replaced; empty if none
- `rebooked_to` (text): The ID of the booking that replaced it; empty if none
- `source` (text): How it was made, such as online or external-api
- `start_at` (text): When it starts, in the company's time zone (ISO 8601)
- `status` (text): booked, cancelled or rebooked
- `total` (number): What it costs in all, in the smallest unit of the company's currency, such as cents: 20000 is 200.00; empty if hidden from your keys
- `total_display` (text): What it costs in all, written out, such as 387.76
- `uuid` (text): The booking's ID, which the booking steps take
- `voucher_number` (text): Its voucher number; empty if none

**Example output**

```json
{
  "amount_paid_display": "387.76",
  "arrival": "",
  "availability_id": 50291151,
  "can_cancel": true,
  "cancel_by": "2017-01-22T13:30:00-1000",
  "company": "hawaiianadventures",
  "company_name": "Hawaiian Adventures",
  "contact_email": "johndoe@example.com",
  "contact_name": "John Doe",
  "contact_phone": "+14157894563",
  "created_at": "2024-06-20T17:14:33+0000",
  "customer_count": 1,
  "customers": [
    {
      "checked_in": true,
      "checkin_status": "checked in",
      "checkin_url": "https://fhchk.co/abc",
      "customer_type": "Adult",
      "id": 28,
      "rate_id": 65675
    }
  ],
  "dashboard_url": "https://fareharbor.com/hawaiianadventures/dashboard/?overlay=/contacts/7/bookings/d75102be-9732-4523-90a8-c698eff2b983/",
  "display_id": "#6876876",
  "end_at": "2023-08-18T03:30:00-0600",
  "external_id": "DataTracker5678",
  "id": 6876876,
  "item_id": 1867,
  "item_name": "Jet Ski Tour",
  "note": "Optional booking note.",
  "pickup": "We'll pick you up at 10:30am from Wyndham Royal Garden",
  "rebooked_from": "",
  "rebooked_to": "",
  "source": "external-api",
  "start_at": "2023-08-18T00:30:00-0600",
  "status": "booked",
  "total": 38776,
  "total_display": "387.76",
  "uuid": "d75102be-9732-4523-90a8-c698eff2b983",
  "voucher_number": "V-35791209"
}
```

### Check in by QR code

Check in the customer whose QR code was scanned, or their whole booking.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- QR code (`qr_code`, text, required): What the customer's QR code holds: their check-in link, such as https://fhchk.co/abc.
- Whole booking (`whole_booking`, true/false): Check in everyone on the booking, not just this customer. Default: `false`.
- Status (`status`, text): The check-in status to set, from the company's list. Leave blank to let FareHarbor choose, or pick Clear check-in to undo one.

**Outputs**

- `amount_paid_display` (text): How much has been paid, written out
- `arrival` (text): When customers should arrive; empty if picked up
- `availability_id` (number): The booked availability's ID
- `can_cancel` (true/false): Whether it can be cancelled now
- `cancel_by` (text): The last moment it can be cancelled (ISO 8601); empty if there's no cutoff
- `company` (text): The company's shortname
- `company_name` (text): The company's name
- `contact_email` (text): Their email
- `contact_name` (text): The name of who booked
- `contact_phone` (text): Their phone number, with its country code
- `created_at` (text): When it was made, in UTC (ISO 8601)
- `customer_count` (number): How many customers it's for
- `customers` (list): The customers on it
- `dashboard_url` (text): A link to it in FareHarbor's dashboard
- `display_id` (text): The booking number customers see, such as #6876876
- `end_at` (text): When it ends, in the company's time zone (ISO 8601)
- `external_id` (text): Your own reference for it; empty if none
- `id` (number): The booking's number
- `item_id` (number): The booked item's ID
- `item_name` (text): The booked item's name
- `note` (text): The booking's note
- `pickup` (text): Where and when customers are picked up; empty if no pickup
- `rebooked_from` (text): The ID of the booking it replaced; empty if none
- `rebooked_to` (text): The ID of the booking that replaced it; empty if none
- `source` (text): How it was made, such as online or external-api
- `start_at` (text): When it starts, in the company's time zone (ISO 8601)
- `status` (text): booked, cancelled or rebooked
- `total` (number): What it costs in all, in the smallest unit of the company's currency, such as cents: 20000 is 200.00; empty if hidden from your keys
- `total_display` (text): What it costs in all, written out, such as 387.76
- `uuid` (text): The booking's ID, which the booking steps take
- `voucher_number` (text): Its voucher number; empty if none

**Example output**

```json
{
  "amount_paid_display": "387.76",
  "arrival": "",
  "availability_id": 50291151,
  "can_cancel": true,
  "cancel_by": "2017-01-22T13:30:00-1000",
  "company": "hawaiianadventures",
  "company_name": "Hawaiian Adventures",
  "contact_email": "johndoe@example.com",
  "contact_name": "John Doe",
  "contact_phone": "+14157894563",
  "created_at": "2024-06-20T17:14:33+0000",
  "customer_count": 1,
  "customers": [
    {
      "checked_in": true,
      "checkin_status": "checked in",
      "checkin_url": "https://fhchk.co/abc",
      "customer_type": "Adult",
      "id": 28,
      "rate_id": 65675
    }
  ],
  "dashboard_url": "https://fareharbor.com/hawaiianadventures/dashboard/?overlay=/contacts/7/bookings/d75102be-9732-4523-90a8-c698eff2b983/",
  "display_id": "#6876876",
  "end_at": "2023-08-18T03:30:00-0600",
  "external_id": "DataTracker5678",
  "id": 6876876,
  "item_id": 1867,
  "item_name": "Jet Ski Tour",
  "note": "Optional booking note.",
  "pickup": "We'll pick you up at 10:30am from Wyndham Royal Garden",
  "rebooked_from": "",
  "rebooked_to": "",
  "source": "external-api",
  "start_at": "2023-08-18T00:30:00-0600",
  "status": "booked",
  "total": 38776,
  "total_display": "387.76",
  "uuid": "d75102be-9732-4523-90a8-c698eff2b983",
  "voucher_number": "V-35791209"
}
```

### Create booking

Book customers on an availability. It's a real booking: the company sees it, and FareHarbor may email the contact.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Item (`item`, text, required): The item (the tour or activity), picked from the company's list or typed as its ID.
- Availability (`availability`, text, required): The availability (the date and time) to book, picked from the item's next 7 days or typed as its ID, such as from 'List availabilities'.
- Customers (`customers`, object, required): How many of each customer type to book, such as Adult 2 and Child 1. A type can also be named by its ID, and a list with one type per customer works too.
- Contact name (`contact_name`, text, required): The name of the person booking, who heads the party.
- Contact email (`contact_email`, text, required): Their email. FareHarbor sends booking emails here.
- Contact phone (`contact_phone`, text, required): Their phone number with its country code, such as +1 415 789 4563.
- Note (`note`, text): A note on the booking.
- Voucher number (`voucher_number`, text): Your reference for the booking. Some companies ask affiliates for one; bookings that aren't an affiliate's can't have one.
- External ID (`external_id`, text): An ID of your own to keep on the booking.
- Custom fields (`custom_fields`, object): Answers to the availability's own questions, by question, such as Hotel and room: Hilton 415. A yes-no question takes yes or no, and one with options takes the option's name.
- Lodging (`lodging`, text): Where the customers are staying, to be picked up there if the availability offers it.
- Agent (`agent`, text): The agent who made the sale, by name or ID.
- Desk (`desk`, text): The desk the sale was made at, by name or ID.

**Outputs**

- `amount_paid_display` (text): How much has been paid, written out
- `arrival` (text): When customers should arrive; empty if picked up
- `availability_id` (number): The booked availability's ID
- `can_cancel` (true/false): Whether it can be cancelled now
- `cancel_by` (text): The last moment it can be cancelled (ISO 8601); empty if there's no cutoff
- `company` (text): The company's shortname
- `company_name` (text): The company's name
- `contact_email` (text): Their email
- `contact_name` (text): The name of who booked
- `contact_phone` (text): Their phone number, with its country code
- `created_at` (text): When it was made, in UTC (ISO 8601)
- `customer_count` (number): How many customers it's for
- `customers` (list): The customers on it
- `dashboard_url` (text): A link to it in FareHarbor's dashboard
- `display_id` (text): The booking number customers see, such as #6876876
- `end_at` (text): When it ends, in the company's time zone (ISO 8601)
- `external_id` (text): Your own reference for it; empty if none
- `id` (number): The booking's number
- `item_id` (number): The booked item's ID
- `item_name` (text): The booked item's name
- `note` (text): The booking's note
- `pickup` (text): Where and when customers are picked up; empty if no pickup
- `rebooked_from` (text): The ID of the booking it replaced; empty if none
- `rebooked_to` (text): The ID of the booking that replaced it; empty if none
- `source` (text): How it was made, such as online or external-api
- `start_at` (text): When it starts, in the company's time zone (ISO 8601)
- `status` (text): booked, cancelled or rebooked
- `total` (number): What it costs in all, in the smallest unit of the company's currency, such as cents: 20000 is 200.00; empty if hidden from your keys
- `total_display` (text): What it costs in all, written out, such as 387.76
- `uuid` (text): The booking's ID, which the booking steps take
- `voucher_number` (text): Its voucher number; empty if none

**Example output**

```json
{
  "amount_paid_display": "387.76",
  "arrival": "",
  "availability_id": 50291151,
  "can_cancel": true,
  "cancel_by": "2017-01-22T13:30:00-1000",
  "company": "hawaiianadventures",
  "company_name": "Hawaiian Adventures",
  "contact_email": "johndoe@example.com",
  "contact_name": "John Doe",
  "contact_phone": "+14157894563",
  "created_at": "2024-06-20T17:14:33+0000",
  "customer_count": 1,
  "customers": [
    {
      "checked_in": true,
      "checkin_status": "checked in",
      "checkin_url": "https://fhchk.co/abc",
      "customer_type": "Adult",
      "id": 28,
      "rate_id": 65675
    }
  ],
  "dashboard_url": "https://fareharbor.com/hawaiianadventures/dashboard/?overlay=/contacts/7/bookings/d75102be-9732-4523-90a8-c698eff2b983/",
  "display_id": "#6876876",
  "end_at": "2023-08-18T03:30:00-0600",
  "external_id": "DataTracker5678",
  "id": 6876876,
  "item_id": 1867,
  "item_name": "Jet Ski Tour",
  "note": "Optional booking note.",
  "pickup": "We'll pick you up at 10:30am from Wyndham Royal Garden",
  "rebooked_from": "",
  "rebooked_to": "",
  "source": "external-api",
  "start_at": "2023-08-18T00:30:00-0600",
  "status": "booked",
  "total": 38776,
  "total_display": "387.76",
  "uuid": "d75102be-9732-4523-90a8-c698eff2b983",
  "voucher_number": "V-35791209"
}
```

### Get availability

Get one availability: its item, times, spaces left, rates, the questions a booking answers and its booking and cancellation cutoffs.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Availability (`availability`, text, required): The availability's ID (one date and time of an item), from 'List availabilities', a booking or a trigger.

**Outputs**

- `book_by` (text): The last moment it can be booked (ISO 8601); empty if FareHarbor doesn't say
- `booking_status` (text): Whether it can be booked online: auto, open, call, closed or cancelled
- `cancel_by` (text): The last moment a booking on it can be cancelled (ISO 8601); empty if there's no cutoff
- `custom_fields` (list): The questions a booking answers, as 'Custom fields' takes them
- `end_at` (text): When it ends, in the company's time zone (ISO 8601)
- `headline` (text): Its headline
- `id` (number): The availability's ID
- `item_id` (number): Its item's ID
- `item_name` (text): Its item's name
- `maximum_party_size` (number): The most customers a booking may have; empty if no limit
- `minimum_party_size` (number): The fewest customers a booking may have; empty if no limit
- `rates` (list): The customer types it can be booked for, with prices
- `spaces_left` (number): How many more customers can book it
- `start_at` (text): When it starts, in the company's time zone (ISO 8601)

**Example output**

```json
{
  "book_by": "",
  "booking_status": "auto",
  "cancel_by": "2017-01-22T13:30:00-1000",
  "custom_fields": [
    {
      "id": 4502,
      "name": "Safety Equipment",
      "options": [
        "Helmet"
      ],
      "required": false,
      "type": "extended-option"
    }
  ],
  "end_at": "2023-08-18T03:30:00-0600",
  "headline": "Epic Jet Ski Tour",
  "id": 50291151,
  "item_id": 1867,
  "item_name": "Jet Ski Tour",
  "maximum_party_size": null,
  "minimum_party_size": 1,
  "rates": [
    {
      "customer_type_id": 2522,
      "id": 65675,
      "name": "Adult",
      "price": 20000,
      "spaces_left": 10
    }
  ],
  "spaces_left": 3,
  "start_at": "2023-08-18T00:30:00-0600"
}
```

### Get booking

Get a booking: its availability, contact, customers, total, check-in statuses and whether it can still be cancelled.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Booking (`booking`, text, required): The booking's ID, such as d75102be-9732-4523-90a8-c698eff2b983, from another FareHarbor step or the trigger, or its dashboard link.

**Outputs**

- `amount_paid_display` (text): How much has been paid, written out
- `arrival` (text): When customers should arrive; empty if picked up
- `availability_id` (number): The booked availability's ID
- `can_cancel` (true/false): Whether it can be cancelled now
- `cancel_by` (text): The last moment it can be cancelled (ISO 8601); empty if there's no cutoff
- `company` (text): The company's shortname
- `company_name` (text): The company's name
- `contact_email` (text): Their email
- `contact_name` (text): The name of who booked
- `contact_phone` (text): Their phone number, with its country code
- `created_at` (text): When it was made, in UTC (ISO 8601)
- `customer_count` (number): How many customers it's for
- `customers` (list): The customers on it
- `dashboard_url` (text): A link to it in FareHarbor's dashboard
- `display_id` (text): The booking number customers see, such as #6876876
- `end_at` (text): When it ends, in the company's time zone (ISO 8601)
- `external_id` (text): Your own reference for it; empty if none
- `id` (number): The booking's number
- `item_id` (number): The booked item's ID
- `item_name` (text): The booked item's name
- `note` (text): The booking's note
- `pickup` (text): Where and when customers are picked up; empty if no pickup
- `rebooked_from` (text): The ID of the booking it replaced; empty if none
- `rebooked_to` (text): The ID of the booking that replaced it; empty if none
- `source` (text): How it was made, such as online or external-api
- `start_at` (text): When it starts, in the company's time zone (ISO 8601)
- `status` (text): booked, cancelled or rebooked
- `total` (number): What it costs in all, in the smallest unit of the company's currency, such as cents: 20000 is 200.00; empty if hidden from your keys
- `total_display` (text): What it costs in all, written out, such as 387.76
- `uuid` (text): The booking's ID, which the booking steps take
- `voucher_number` (text): Its voucher number; empty if none

**Example output**

```json
{
  "amount_paid_display": "387.76",
  "arrival": "",
  "availability_id": 50291151,
  "can_cancel": true,
  "cancel_by": "2017-01-22T13:30:00-1000",
  "company": "hawaiianadventures",
  "company_name": "Hawaiian Adventures",
  "contact_email": "johndoe@example.com",
  "contact_name": "John Doe",
  "contact_phone": "+14157894563",
  "created_at": "2024-06-20T17:14:33+0000",
  "customer_count": 1,
  "customers": [
    {
      "checked_in": true,
      "checkin_status": "checked in",
      "checkin_url": "https://fhchk.co/abc",
      "customer_type": "Adult",
      "id": 28,
      "rate_id": 65675
    }
  ],
  "dashboard_url": "https://fareharbor.com/hawaiianadventures/dashboard/?overlay=/contacts/7/bookings/d75102be-9732-4523-90a8-c698eff2b983/",
  "display_id": "#6876876",
  "end_at": "2023-08-18T03:30:00-0600",
  "external_id": "DataTracker5678",
  "id": 6876876,
  "item_id": 1867,
  "item_name": "Jet Ski Tour",
  "note": "Optional booking note.",
  "pickup": "We'll pick you up at 10:30am from Wyndham Royal Garden",
  "rebooked_from": "",
  "rebooked_to": "",
  "source": "external-api",
  "start_at": "2023-08-18T00:30:00-0600",
  "status": "booked",
  "total": 38776,
  "total_display": "387.76",
  "uuid": "d75102be-9732-4523-90a8-c698eff2b983",
  "voucher_number": "V-35791209"
}
```

### Get company

Get a company's details: its time zone, address, website, contact details and booking notes.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.

**Outputs**

- `about` (text): Its About page text
- `address` (text): Its address, on one line
- `affiliated_since` (text): When your partnership with it started (ISO 8601); empty if FareHarbor doesn't say
- `booking_notes` (text): Its general notes for customers who book
- `city` (text): The city of its main location
- `contact_email` (text): Its contact email
- `contact_phone` (text): Its contact phone number
- `country` (text): The country of its main location, such as US
- `currency` (text): Its currency, such as usd
- `name` (text): The company's name
- `shortname` (text): The company's shortname, which FareHarbor uses as its ID, such as hawaiianadventures
- `summary` (text): Its tagline
- `timezone` (text): Its time zone, such as America/Los_Angeles
- `website` (text): Its website

**Example output**

```json
{
  "about": "Hawaiian Adventures offers several water activities that you are sure to enjoy.",
  "address": "123 Wailupe Cir, Honolulu, HI 96821, US",
  "affiliated_since": "2022-07-01T19:38:58+0000",
  "booking_notes": "Weather conditions will be evaluated at the time of check-in.",
  "city": "Honolulu",
  "contact_email": "info@hawaiianadventures.com",
  "contact_phone": "+1-808-555-1234",
  "country": "US",
  "currency": "usd",
  "name": "Hawaiian Adventures",
  "shortname": "hawaiianadventures",
  "summary": "Water activities 365 days a year",
  "timezone": "America/Los_Angeles",
  "website": "https://company-url.com"
}
```

### Get item

Get one item (a tour or activity): its description, location, cancellation policy, and customer types with their prices.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Item (`item`, text, required): The item (the tour or activity), picked from the company's list or typed as its ID.

**Outputs**

- `cancellation_policy` (text): Its cancellation policy
- `customer_types` (list): The kinds of customer it can be booked for
- `description` (text): Its description, as plain text
- `headline` (text): Its headline
- `id` (number): The item's ID
- `image_url` (text): A link to its main image
- `location` (text): Where it takes place or leaves from
- `name` (text): The item's name, such as Jet Ski Tour
- `offers_pickup` (true/false): Whether it can pick customers up from their lodging

**Example output**

```json
{
  "cancellation_policy": "A full refund will be issued if notice is given at least 24 hours before start time.",
  "customer_types": [
    {
      "id": 2522,
      "name": "Adult",
      "price": 20000
    }
  ],
  "description": "See Honolulu from a jet ski!",
  "headline": "Epic Jet Ski Tour",
  "id": 1867,
  "image_url": "https://d1a2dkr8rai8e2.cloudfront.net/api/file/rvybRyLWTgyV5w4xg42p/",
  "location": "Honolulu, HI",
  "name": "Jet Ski Tour",
  "offers_pickup": true
}
```

### List availabilities

List an item's availabilities (its dates and times) on a day or over up to 31 days, with spaces left and each customer type's rate and price.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Item (`item`, text, required): The item (the tour or activity), picked from the company's list or typed as its ID.
- Date (`date`, date, required): The day to list, in the company's time zone, or the first day of a range.
- End date (`end_date`, date): The last day of a range, up to 31 days. Leave blank for one day.
- Only bookable (`bookable_only`, true/false): Leave out availabilities that can't be booked now. Default: `false`.

**Outputs**

- `availabilities` (list): The availabilities
- `count` (number): How many are listed

**Example output**

```json
{
  "availabilities": [
    {
      "booking_status": "auto",
      "end_at": "2023-08-18T03:30:00-0600",
      "id": 50291151,
      "item_id": 1867,
      "maximum_party_size": null,
      "minimum_party_size": 1,
      "rates": [
        {
          "customer_type_id": 2522,
          "id": 65675,
          "name": "Adult",
          "price": 20000,
          "spaces_left": 10
        }
      ],
      "spaces_left": 3,
      "start_at": "2023-08-18T00:30:00-0600"
    }
  ],
  "count": 1
}
```

### List bookings for an availability

List every booking on an availability, with its contact and status.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Availability (`availability`, text, required): The availability's ID (one date and time of an item), from 'List availabilities', a booking or a trigger.

**Outputs**

- `bookings` (list): The bookings
- `count` (number): How many are listed

**Example output**

```json
{
  "bookings": [
    {
      "company": "hawaiianadventures",
      "contact_email": "johndoe@example.com",
      "contact_name": "John Doe",
      "contact_phone": "+14157894563",
      "created_at": "2024-06-20T17:14:33+0000",
      "dashboard_url": "https://fareharbor.com/hawaiianadventures/dashboard/?overlay=/contacts/7/bookings/d75102be-9732-4523-90a8-c698eff2b983/",
      "display_id": "#12",
      "external_id": "DataTracker5678",
      "id": 6876876,
      "rebooked_from": "",
      "rebooked_to": "",
      "source": "online",
      "status": "booked",
      "uuid": "d75102be-9732-4523-90a8-c698eff2b983"
    }
  ],
  "count": 1
}
```

### List bookings made on a date

List the bookings made at a company on one day (in UTC), with their status. 'Get booking' gives each one's details.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Date (`date`, date, required): The day the bookings were made, in UTC.

**Outputs**

- `bookings` (list): The bookings
- `count` (number): How many are listed

**Example output**

```json
{
  "bookings": [
    {
      "company": "hawaiianadventures",
      "company_name": "Hawaiian Adventures",
      "id": 6876876,
      "status": "booked",
      "uuid": "d75102be-9732-4523-90a8-c698eff2b983"
    }
  ],
  "count": 1
}
```

### List companies

List the companies (operators) your keys can book for, with their shortnames, which the other steps take.

**Inputs**: None.

**Outputs**

- `companies` (list): The companies
- `count` (number): How many are listed

**Example output**

```json
{
  "companies": [
    {
      "affiliated_since": "2022-07-01T19:38:58+0000",
      "city": "Honolulu",
      "contact_email": "info@hawaiianadventures.com",
      "contact_phone": "+1-808-555-1234",
      "country": "US",
      "currency": "usd",
      "name": "Hawaiian Adventures",
      "shortname": "hawaiianadventures"
    }
  ],
  "count": 1
}
```

### List crew members

List the staff assigned to an availability, with their roles.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Availability (`availability`, text, required): The availability's ID (one date and time of an item), from 'List availabilities', a booking or a trigger.

**Outputs**

- `count` (number): How many are listed
- `crew_members` (list): The crew members

**Example output**

```json
{
  "count": 1,
  "crew_members": [
    {
      "id": 12345,
      "name": "John Smith",
      "note": "Responsible for safety briefing and equipment check",
      "role": "captain",
      "username": "jsmith"
    }
  ]
}
```

### List items

List a company's items (its tours and activities) with their customer types and prices.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Only bookable (`upcoming_only`, true/false): Only items with availabilities that can still be booked. Default: `false`.

**Outputs**

- `count` (number): How many are listed
- `items` (list): The items

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "cancellation_policy": "A full refund will be issued if notice is given at least 24 hours before start time.",
      "customer_types": [
        {
          "id": 2522,
          "name": "Adult",
          "price": 20000
        }
      ],
      "description": "See Honolulu from a jet ski!",
      "headline": "Epic Jet Ski Tour",
      "id": 1867,
      "image_url": "https://d1a2dkr8rai8e2.cloudfront.net/api/file/rvybRyLWTgyV5w4xg42p/",
      "location": "Honolulu, HI",
      "name": "Jet Ski Tour",
      "offers_pickup": true
    }
  ]
}
```

### List lodgings

List the hotels and other lodgings a company can pick customers up from.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.

**Outputs**

- `count` (number): How many are listed
- `lodgings` (list): The lodgings

**Example output**

```json
{
  "count": 1,
  "lodgings": [
    {
      "address": "440 Olohana St Honolulu, HI 96815",
      "id": 231,
      "name": "Wyndham Royal Garden",
      "own_accommodation": false,
      "phone": "(808) 943-0202",
      "url": "https://www.extraholidays.com/honolulu-hawaii/royal-garden-at-waikiki.aspx"
    }
  ]
}
```

### List lodgings for an availability

List the lodgings for one availability, with whether and when customers staying there are picked up.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Availability (`availability`, text, required): The availability's ID (one date and time of an item), from 'List availabilities', a booking or a trigger.

**Outputs**

- `count` (number): How many are listed
- `lodgings` (list): The lodgings

**Example output**

```json
{
  "count": 1,
  "lodgings": [
    {
      "id": 2314,
      "name": "Wyndham Royal Garden",
      "pickup_available": true,
      "pickup_map_url": "https://goo.gl/maps/qW2THBcd5Pj8Ga8w6",
      "pickup_point": "Frankton Bus Shelter",
      "pickup_time": "2024-10-08T09:00:00-0400"
    }
  ]
}
```

### List users

List a company's users (its staff), whose usernames 'Add crew member' takes.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.

**Outputs**

- `count` (number): How many are listed
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "users": [
    {
      "name": "John Smith",
      "username": "jsmith"
    }
  ]
}
```

### Rebook booking

Move a booking to another availability, or change who's on it. FareHarbor cancels it and makes a new booking with the same contact; the result is the new booking.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Booking (`booking`, text, required): The booking's ID, such as d75102be-9732-4523-90a8-c698eff2b983, from another FareHarbor step or the trigger, or its dashboard link.
- Item (`item`, text, required): The item (the tour or activity), picked from the company's list or typed as its ID.
- Availability (`availability`, text, required): The availability (the date and time) to book, picked from the item's next 7 days or typed as its ID, such as from 'List availabilities'.
- Customers (`customers`, object): How many of each customer type to book now. Leave blank to keep the same customers.
- Note (`note`, text): A new note. Leave blank to keep the booking's note.

**Outputs**

- `amount_paid_display` (text): How much has been paid, written out
- `arrival` (text): When customers should arrive; empty if picked up
- `availability_id` (number): The booked availability's ID
- `can_cancel` (true/false): Whether it can be cancelled now
- `cancel_by` (text): The last moment it can be cancelled (ISO 8601); empty if there's no cutoff
- `company` (text): The company's shortname
- `company_name` (text): The company's name
- `contact_email` (text): Their email
- `contact_name` (text): The name of who booked
- `contact_phone` (text): Their phone number, with its country code
- `created_at` (text): When it was made, in UTC (ISO 8601)
- `customer_count` (number): How many customers it's for
- `customers` (list): The customers on it
- `dashboard_url` (text): A link to it in FareHarbor's dashboard
- `display_id` (text): The booking number customers see, such as #6876876
- `end_at` (text): When it ends, in the company's time zone (ISO 8601)
- `external_id` (text): Your own reference for it; empty if none
- `id` (number): The booking's number
- `item_id` (number): The booked item's ID
- `item_name` (text): The booked item's name
- `note` (text): The booking's note
- `pickup` (text): Where and when customers are picked up; empty if no pickup
- `rebooked_from` (text): The ID of the booking it replaced; empty if none
- `rebooked_to` (text): The ID of the booking that replaced it; empty if none
- `source` (text): How it was made, such as online or external-api
- `start_at` (text): When it starts, in the company's time zone (ISO 8601)
- `status` (text): booked, cancelled or rebooked
- `total` (number): What it costs in all, in the smallest unit of the company's currency, such as cents: 20000 is 200.00; empty if hidden from your keys
- `total_display` (text): What it costs in all, written out, such as 387.76
- `uuid` (text): The booking's ID, which the booking steps take
- `voucher_number` (text): Its voucher number; empty if none

**Example output**

```json
{
  "amount_paid_display": "387.76",
  "arrival": "",
  "availability_id": 50291151,
  "can_cancel": true,
  "cancel_by": "2017-01-22T13:30:00-1000",
  "company": "hawaiianadventures",
  "company_name": "Hawaiian Adventures",
  "contact_email": "johndoe@example.com",
  "contact_name": "John Doe",
  "contact_phone": "+14157894563",
  "created_at": "2024-06-20T17:14:33+0000",
  "customer_count": 1,
  "customers": [
    {
      "checked_in": true,
      "checkin_status": "checked in",
      "checkin_url": "https://fhchk.co/abc",
      "customer_type": "Adult",
      "id": 28,
      "rate_id": 65675
    }
  ],
  "dashboard_url": "https://fareharbor.com/hawaiianadventures/dashboard/?overlay=/contacts/7/bookings/d75102be-9732-4523-90a8-c698eff2b983/",
  "display_id": "#6876876",
  "end_at": "2023-08-18T03:30:00-0600",
  "external_id": "DataTracker5678",
  "id": 6876876,
  "item_id": 1867,
  "item_name": "Jet Ski Tour",
  "note": "Optional booking note.",
  "pickup": "We'll pick you up at 10:30am from Wyndham Royal Garden",
  "rebooked_from": "d75102be-9732-4523-90a8-c698eff2b983",
  "rebooked_to": "",
  "source": "external-api",
  "start_at": "2023-08-18T00:30:00-0600",
  "status": "booked",
  "total": 38776,
  "total_display": "387.76",
  "uuid": "d75102be-9732-4523-90a8-c698eff2b983",
  "voucher_number": "V-35791209"
}
```

### Remove crew member

Take a staff member off an availability's crew.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Availability (`availability`, text, required): The availability's ID (one date and time of an item), from 'List availabilities', a booking or a trigger.
- Crew member (`crew_member`, text, required): The crew assignment, picked from the availability's crew or typed as its ID.

**Outputs**

- `id` (number): The crew assignment's ID
- `name` (text): Their full name
- `note` (text): The note on their assignment
- `role` (text): Their role's short name, such as captain; empty if none
- `username` (text): The crew member's username

**Example output**

```json
{
  "id": 12345,
  "name": "John Smith",
  "note": "Responsible for safety briefing and equipment check",
  "role": "captain",
  "username": "jsmith"
}
```

### Resend confirmation email

Send the confirmation email again for every booking with this contact email whose activity falls between two dates. FareHarbor sends it to the address on each booking, and never says whether any matched.

**Inputs**

- Email (`email`, text, required): The customer's email, as on their bookings.
- From (`from_date`, date, required): The first activity date to look at.
- To (`to_date`, date, required): The last activity date to look at, at most 31 days on.

**Outputs**

- `message` (text): FareHarbor's answer, the same whether or not any booking matched

**Example output**

```json
{
  "message": "Any matching confirmation emails have been queued for delivery."
}
```

### Update booking note

Replace a booking's note.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Booking (`booking`, text, required): The booking's ID, such as d75102be-9732-4523-90a8-c698eff2b983, from another FareHarbor step or the trigger, or its dashboard link.
- Note (`note`, text, required): The new note. It replaces the one the booking has.

**Outputs**

- `amount_paid_display` (text): How much has been paid, written out
- `arrival` (text): When customers should arrive; empty if picked up
- `availability_id` (number): The booked availability's ID
- `can_cancel` (true/false): Whether it can be cancelled now
- `cancel_by` (text): The last moment it can be cancelled (ISO 8601); empty if there's no cutoff
- `company` (text): The company's shortname
- `company_name` (text): The company's name
- `contact_email` (text): Their email
- `contact_name` (text): The name of who booked
- `contact_phone` (text): Their phone number, with its country code
- `created_at` (text): When it was made, in UTC (ISO 8601)
- `customer_count` (number): How many customers it's for
- `customers` (list): The customers on it
- `dashboard_url` (text): A link to it in FareHarbor's dashboard
- `display_id` (text): The booking number customers see, such as #6876876
- `end_at` (text): When it ends, in the company's time zone (ISO 8601)
- `external_id` (text): Your own reference for it; empty if none
- `id` (number): The booking's number
- `item_id` (number): The booked item's ID
- `item_name` (text): The booked item's name
- `note` (text): The booking's note
- `pickup` (text): Where and when customers are picked up; empty if no pickup
- `rebooked_from` (text): The ID of the booking it replaced; empty if none
- `rebooked_to` (text): The ID of the booking that replaced it; empty if none
- `source` (text): How it was made, such as online or external-api
- `start_at` (text): When it starts, in the company's time zone (ISO 8601)
- `status` (text): booked, cancelled or rebooked
- `total` (number): What it costs in all, in the smallest unit of the company's currency, such as cents: 20000 is 200.00; empty if hidden from your keys
- `total_display` (text): What it costs in all, written out, such as 387.76
- `uuid` (text): The booking's ID, which the booking steps take
- `voucher_number` (text): Its voucher number; empty if none

**Example output**

```json
{
  "amount_paid_display": "387.76",
  "arrival": "",
  "availability_id": 50291151,
  "can_cancel": true,
  "cancel_by": "2017-01-22T13:30:00-1000",
  "company": "hawaiianadventures",
  "company_name": "Hawaiian Adventures",
  "contact_email": "johndoe@example.com",
  "contact_name": "John Doe",
  "contact_phone": "+14157894563",
  "created_at": "2024-06-20T17:14:33+0000",
  "customer_count": 1,
  "customers": [
    {
      "checked_in": true,
      "checkin_status": "checked in",
      "checkin_url": "https://fhchk.co/abc",
      "customer_type": "Adult",
      "id": 28,
      "rate_id": 65675
    }
  ],
  "dashboard_url": "https://fareharbor.com/hawaiianadventures/dashboard/?overlay=/contacts/7/bookings/d75102be-9732-4523-90a8-c698eff2b983/",
  "display_id": "#6876876",
  "end_at": "2023-08-18T03:30:00-0600",
  "external_id": "DataTracker5678",
  "id": 6876876,
  "item_id": 1867,
  "item_name": "Jet Ski Tour",
  "note": "Optional booking note.",
  "pickup": "We'll pick you up at 10:30am from Wyndham Royal Garden",
  "rebooked_from": "",
  "rebooked_to": "",
  "source": "external-api",
  "start_at": "2023-08-18T00:30:00-0600",
  "status": "booked",
  "total": 38776,
  "total_display": "387.76",
  "uuid": "d75102be-9732-4523-90a8-c698eff2b983",
  "voucher_number": "V-35791209"
}
```

### Update crew member

Change a crew member's role or note on an availability. Fields left blank keep what they have.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Availability (`availability`, text, required): The availability's ID (one date and time of an item), from 'List availabilities', a booking or a trigger.
- Crew member (`crew_member`, text, required): The crew assignment, picked from the availability's crew or typed as its ID.
- Role (`role`, text): Their role, such as captain, from the company's list.
- Note (`note`, text): A note on their assignment, such as what they're doing.

**Outputs**

- `id` (number): The crew assignment's ID
- `name` (text): Their full name
- `note` (text): The note on their assignment
- `role` (text): Their role's short name, such as captain; empty if none
- `username` (text): The crew member's username

**Example output**

```json
{
  "id": 12345,
  "name": "John Smith",
  "note": "Responsible for safety briefing and equipment check",
  "role": "captain",
  "username": "jsmith"
}
```

### Validate booking

Check whether a booking can be made, and its price, without making it.

**Inputs**

- Company (`company`, text, required): The company (the operator), picked from the list or typed as its shortname, such as hawaiianadventures.
- Item (`item`, text, required): The item (the tour or activity), picked from the company's list or typed as its ID.
- Availability (`availability`, text, required): The availability (the date and time) to book, picked from the item's next 7 days or typed as its ID, such as from 'List availabilities'.
- Customers (`customers`, object, required): How many of each customer type to book, such as Adult 2 and Child 1. A type can also be named by its ID, and a list with one type per customer works too.
- Contact name (`contact_name`, text, required): The name of the person booking, who heads the party.
- Contact email (`contact_email`, text, required): Their email. FareHarbor sends booking emails here.
- Contact phone (`contact_phone`, text, required): Their phone number with its country code, such as +1 415 789 4563.
- Note (`note`, text): A note on the booking.
- Voucher number (`voucher_number`, text): Your reference for the booking. Some companies ask affiliates for one; bookings that aren't an affiliate's can't have one.
- External ID (`external_id`, text): An ID of your own to keep on the booking.
- Custom fields (`custom_fields`, object): Answers to the availability's own questions, by question, such as Hotel and room: Hilton 415. A yes-no question takes yes or no, and one with options takes the option's name.

**Outputs**

- `code` (text): FareHarbor's code for why not, such as bookability-error
- `error` (text): Why not, in FareHarbor's words; empty if it can
- `is_bookable` (true/false): Whether the booking can be made as it stands
- `pickup` (text): Where and when customers would be picked up; empty if no pickup
- `subtotal` (number): Its price before taxes, in the smallest unit of the company's currency, such as cents: 20000 is 200.00
- `taxes` (number): Its taxes, in the smallest unit of the company's currency, such as cents: 20000 is 200.00
- `total` (number): What it would cost in all, in the smallest unit of the company's currency, such as cents: 20000 is 200.00

**Example output**

```json
{
  "code": "",
  "error": "",
  "is_bookable": true,
  "pickup": "",
  "subtotal": 36000,
  "taxes": 2776,
  "total": 38776
}
```
