# Capabilities

Peek Pro currently supports the following capabilities:

* `Pricing`
* `Webhooks`

They are enabled by passing them into the request header, as mentioned in the previous Headers section. Capabilities are optional but may provide functionality to improve your integration.

| Name                                                          | ID              | Description                                                                                     |
| ------------------------------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------- |
| [Pricing](https://octodocs.peek.com/capabilities-1/pricing)   | `octo/pricing`  | Adds pricing to most endpoints giving you advanced static and dynamic pricing capabilities.     |
| [Webhooks](https://octodocs.peek.com/capabilities-1/webhooks) | `octo/webhooks` | Programatically create webhooks to listen for booking confirmations, updates and cancellations. |

Each capability is defined like the following:

```javascript
{
  "id": "octo/pricing",
  "revision": 1,
  "required": true,
  "dependencies": ["octo/pricing"],
  "default": true
}
```

| Field          | Description                                                                                                                                |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `id`           | The identifier of this capability. You'll need to include this in the request header or parameter to use this capability.                  |
| `revision`     | A auto-incrementing integer indicating the supported revision of this capability. Capability revisions will always be backward compatible. |
| `required`     | Whether supporting this capability is required in order to sell this product.                                                              |
| `dependencies` | An array of other capabilities that this capability requires in order to be used.                                                          |
| `docs`         | A URL to the online documentation for this capability.                                                                                     |
| `default`      | Whether this is a default capability that's enabled.                                                                                       |

By default, Peek Pro will enable the full list of capabilities all the time. There is currently no mechanism for controlling which capabilities are active.

To know which capabilities you are using, the HTTP response will echo the `Octo-Capabilities` header including the list that were applied. For example:

```http
HTTP/1.1 200 OK
Octo-Capabilities: octo/pricing, octo/webhooks
```

## Required Capabilities

Some products cannot be sold without the use of a capability. If that is the case then the `required: true` will be put on the capability object within that product. If you have not implemented that capability then you cannot sell the product.

## Capability Versioning

The capabilities defined on products include a `revision` number which will increment each time we update the capability. It's important to note that capabilities will **NEVER** introduce breaking changes, if they do then a new capability will be written entirely. For example: `octo/pricing2`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://octodocs.peek.com/getting-started/capabilities.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
