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

# Check availability and price

> Checks whether the listing can be booked from `check_in` to `check_out` (`Y-m-d`, check-out after check-in) for
`guests` people, and returns the price breakdown in cents. Pass `coupon_code` to apply a coupon; a coupon that
doesn't apply returns 422 with the reason.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/availability/{listing}
openapi: 3.1.0
info:
  title: Overviu API
  version: '1.0'
  description: >-
    Read your listings and availability, and create and manage bookings, from
    your own systems. Authenticate with an API token from **Settings → API
    tokens** in Overviu, sent as `Authorization: Bearer <token>`. Endpoints
    under `/v1/public/{teamSlug}` need no token: they serve what your booking
    site shows. Guides and conventions:
    https://docs.overviu.app/api-reference/introduction
servers:
  - url: https://api.overviu.app/api
    description: Production
security:
  - http: []
tags:
  - name: Account
    description: The team an API token belongs to.
  - name: Listings
    description: The team's listings.
  - name: Availability
    description: Prices and availability for dates.
  - name: Bookings
    description: Create, read, change and cancel the team's bookings.
  - name: Guests
    description: The team's guests.
  - name: Public
    description: What a booking site shows, with no token.
paths:
  /v1/availability/{listing}:
    get:
      tags:
        - Availability
      summary: Check availability and price
      description: >-
        Checks whether the listing can be booked from `check_in` to `check_out`
        (`Y-m-d`, check-out after check-in) for

        `guests` people, and returns the price breakdown in cents. Pass
        `coupon_code` to apply a coupon; a coupon that

        doesn't apply returns 422 with the reason.
      operationId: v1.availability
      parameters:
        - name: listing
          in: path
          required: true
          description: The listing ID
          schema:
            type: string
            format: uuid
        - name: check_in
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: check_out
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: guests
          in: query
          required: true
          schema:
            type: integer
            minimum: 1
        - name: coupon_code
          in: query
          schema:
            type:
              - string
              - 'null'
            maxLength: 40
      responses:
        '200':
          description: '`AvailabilityResultResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AvailabilityResultResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    AvailabilityResultResource:
      type: object
      properties:
        available:
          type: boolean
        reason_code:
          type:
            - string
            - 'null'
        reason_message:
          type:
            - string
            - 'null'
        price:
          anyOf:
            - $ref: '#/components/schemas/PriceBreakdownResource'
            - type: 'null'
        units_left:
          anyOf:
            - type: integer
            - type: integer
              enum:
                - 0
      required:
        - available
        - reason_code
        - reason_message
        - price
        - units_left
      title: AvailabilityResultResource
    PriceBreakdownResource:
      type: object
      properties:
        accommodation_total:
          type: integer
        discount_amount:
          type: integer
        fees_total:
          type: integer
        taxes_total:
          type: integer
        grand_total:
          type: integer
        nightly_rates:
          type: array
          items: {}
        discounts:
          type: string
        fees:
          type: string
        taxes:
          type: string
        coupon_code:
          type:
            - string
            - 'null'
      required:
        - accommodation_total
        - discount_amount
        - fees_total
        - taxes_total
        - grand_total
        - nightly_rates
        - discounts
        - fees
        - taxes
        - coupon_code
      title: PriceBreakdownResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      description: >-
        An API token from **Settings → API tokens** in Overviu, sent as
        `Authorization: Bearer <token>`.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.