# API reference

This page renders the complete, machine-readable contract for the Distribution Partner API directly from the canonical specification — every operation, request and response schema, status code, and authentication requirement — each with a built-in "Try it" console.

Base URL: `https://ari.console.adrasis.com/api/v1`. Authentication is OAuth 2.0 client-credentials → Bearer token — see [Authentication](/developer/authentication.md).

## Availability & rates

{% openapi src="<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>" path="/search" method="post" %}
<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>" path="/availability/check" method="post" %}
<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>
{% endopenapi %}

## Property content

{% openapi src="<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>" path="/properties" method="get" %}
<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>" path="/properties/{public\_id}" method="get" %}
<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>
{% endopenapi %}

## Booking

{% openapi src="<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>" path="/prebook" method="post" %}
<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>" path="/book" method="post" %}
<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>" path="/bookings/{public\_id}" method="get" %}
<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>" path="/bookings/{public\_id}/cancellation-quote" method="post" %}
<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>" path="/bookings/{public\_id}/cancel" method="post" %}
<https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml>
{% endopenapi %}

## Generate a client

The contract is a standard OpenAPI 3.0 document, so you can generate a typed client in your language of choice instead of hand-writing HTTP calls. The specification is published at `https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml` (also downloadable from the interactive reference above).

**openapi-generator** (multi-language — Java, Python, Go, C#, and more):

```bash
# Install once (requires a JRE)
npm install -g @openapitools/openapi-generator-cli

# Generate, e.g., a TypeScript client
openapi-generator-cli generate \
  -i https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml \
  -g typescript-fetch \
  -o ./adrasis-distribution-client
```

Swap `-g typescript-fetch` for `python`, `go`, `csharp`, etc. to target another language.

**openapi-typescript** (TypeScript types only — pairs well with a `fetch` wrapper):

```bash
npm install -D openapi-typescript

npx openapi-typescript https://openapi.gitbook.com/o/eB3GGLRIw8pOdwbjJ90e/spec/distribution-partner-api.yaml -o ./distribution-api.d.ts
```

Building an AI agent? See [AI agent integration (MCP)](/developer/ai-agents-mcp.md). The published site also serves an LLM-readable index at `/llms.txt`.

## Related guides

* [Getting started](/developer/getting-started.md)
* [Authentication](/developer/authentication.md)
* [Property content](/developer/property-content.md)
* [The booking flow](/developer/booking-flow.md)
* [Idempotency](/developer/idempotency.md)
* [Errors](/developer/errors.md)
* [Currencies, occupancy & allocations](/developer/currencies-occupancy-allocations.md)
* [Rate limits & usage](/developer/rate-limits-and-usage.md)

```
```


---

# 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://adrasis.gitbook.io/developer/api-reference.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.
