# Planyo Online Booking

Planyo is an online reservation system which can be used by any business taking bookings: for days, nights, hours or minutes, or scheduled events.

- **Category:** scheduling & booking
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 7
- **Triggers:** 0
- **Slug:** `PLANYO_ONLINE_BOOKING`
- **Version:** 00000000_00

## Tools

### Add Reservation

**Slug:** `PLANYO_ONLINE_BOOKING_ADD_RESERVATION`

Tool to create a new reservation. Use after gathering resource, timing, and customer details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `force` | boolean | No | Set to True to override conflicts and limits |
| `site_id` | integer | Yes | ID of the Planyo site to reserve on |
| `user_id` | integer | No | Existing Planyo user ID; if not provided, user_email, first_name, and last_name are required |
| `end_time` | string | No | Reservation end time; will be converted to UNIX timestamp |
| `language` | string | No | Language for reservation notifications (e.g., 'en', 'fr') |
| `quantity` | integer | Yes | Number of items or seats to reserve |
| `last_name` | string | No | Customer last name; required if user_id not provided |
| `admin_mode` | boolean | No | Set to True to run in admin mode |
| `first_name` | string | No | Customer first name; required if user_id not provided |
| `start_time` | string | No | Reservation start time; will be converted to UNIX timestamp |
| `user_email` | string | No | Customer email; required if user_id not provided |
| `resource_id` | integer | Yes | ID of the resource to reserve |
| `voucher_code` | string | No | Voucher code to apply |
| `custom_fields` | object | No | Additional custom form fields; keys are field IDs or names; 'req_' prefix will be added automatically |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Add User

**Slug:** `PLANYO_ONLINE_BOOKING_ADD_USER`

Tool to add a new user in Planyo. Use when you need to create a user account after gathering user details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fax` | string | No | User's fax number |
| `zip` | string | No | User's postal code |
| `city` | string | No | User's city |
| `email` | string | Yes | User's email address |
| `phone` | string | No | User's phone number |
| `state` | string | No | User's state or province |
| `mobile` | string | No | User's mobile phone number |
| `vat_id` | string | No | VAT identification number |
| `address` | string | No | User's street address |
| `company` | string | No | Company name associated with the user |
| `country` | string | No | User's country (2-letter ISO code) |
| `last_name` | string | No | User's last name |
| `first_name` | string | No | User's first name |
| `custom_fields` | object | No | Custom fields mapping using field IDs, e.g. {'3': 'value'} |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Add-on List

**Slug:** `PLANYO_ONLINE_BOOKING_GET_ADDON_LIST`

Tool to retrieve a list of add-ons. Use when you need to inspect or manage add-ons for a specific resource or across the entire site after setting up credentials.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `site_id` | integer | No | Site ID to query; deduced from api_key or resource_id if omitted |
| `user_id` | integer | No | Numeric user ID for authentication; alternative to login_name/password |
| `password` | string | No | Password for authentication; required if api_key is not provided |
| `admin_mode` | boolean | No | If true, list add-ons in admin mode when no resource_id is given |
| `login_name` | string | No | Username for authentication; required if api_key is not provided |
| `session_id` | string | No | Session token for authentication; alternative to login_name/password |
| `resource_id` | integer | No | Resource ID for which to retrieve add-ons; omit to fetch all site-wide add-ons |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Coupon List

**Slug:** `PLANYO_ONLINE_BOOKING_GET_COUPON_LIST`

Tool to retrieve a list of coupons. Use when you need to fetch all coupons for a specific resource or the entire site (if no resource_id provided).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `site_id` | integer | No | ID of the site to fetch coupons for. Required if no resource_id is provided. |
| `admin_email` | string | No | Admin email for authentication if required. |
| `resource_id` | integer | No | ID of the resource to filter coupons. If omitted, returns all coupons for the site. |
| `admin_password` | string | No | Admin password for authentication if required. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Resource Availability

**Slug:** `PLANYO_ONLINE_BOOKING_GET_RESOURCE_AVAILABILITY`

Tool to check resource availability within a specified date/time range. Use when validating if a resource can be reserved before creating a reservation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end_time` | string | No | End of the interval; will be converted to UNIX timestamp |
| `quantity` | integer | No | Number of units requested |
| `test_mode` | integer ("0" | "1") | No | If set to 1, simulate without creating a reservation |
| `start_time` | string | No | Start of the interval; will be converted to UNIX timestamp |
| `end_user_id` | integer | No | End user ID for checking membership or restrictions |
| `ignore_cart` | boolean | No | If true, ignore items in the shopping cart |
| `resource_id` | integer | Yes | ID of the resource to check availability for |
| `min_duration` | integer | No | Minimum required availability in minutes |
| `ignore_reservations` | boolean | No | If true, ignore existing reservations |
| `check_specific_slots` | integer ("0" | "1") | No | If set to 1, return specific time slots within interval |
| `preliminary_filtering` | integer ("0" | "1") | No | If set to 1, only check restrictions, skip conflict checks |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Resource Blackouts

**Slug:** `PLANYO_ONLINE_BOOKING_GET_RESOURCE_BLACKOUTS`

Tool to fetch blackout periods for a resource. Use when determining unavailable timeslots before booking.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end_time` | integer | No | UNIX timestamp to return blackouts up to this time (inclusive). |
| `start_time` | integer | No | UNIX timestamp to return blackouts starting from this time (inclusive). |
| `admin_email` | string | No | Admin email for authentication, if required. |
| `resource_id` | integer | Yes | ID of the resource to retrieve blackouts for. |
| `admin_password` | string | No | Password for the admin email, if required. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Resource Reviews

**Slug:** `PLANYO_ONLINE_BOOKING_GET_RESOURCE_REVIEWS`

Tool to fetch reviews and ratings for a specific resource. Use when you have a resource_id and need to display customer feedback.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of reviews to return (1-500) |
| `resource_id` | integer | Yes | ID of the resource to fetch reviews for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
