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

# Get Availability

> Returns availability status for each campsite in the campground for upcoming dates

Returns a daily availability structure associated with the given campground for up to 12 months in the future with a maximum of 60 days returned at a time.

| Status                   | Description                                                           |
| ------------------------ | --------------------------------------------------------------------- |
| `available`              | The campsite is available for reservation for that date               |
| `reserved`               | The campsite is already reserved and occupied for that date           |
| `closed`                 | The campsite is closed and not accepting reservations or walk-ups     |
| `first-come-first-serve` | The campsite is available on a first come first serve basis           |
| `not-yet-released`       | The date is in the future but reservations have not yet been released |
| `unknown`                | The availability status is unknown or cannot be determined            |

```
GET /campground/:id/availability
```

```javascript theme={null}
[
  {
    "campsite_id": "123456",
    "availability": {
      "2023-06-01": "available",
      "2023-06-02": "reserved",
      "2023-06-03": "closed",
      "2023-06-04": "closed",
      "2023-06-05": "closed",
      "2023-06-06": "closed",
      ...
    },
  },
  {
    "campsite_id": "38477",
    "availability": {
      "2023-06-01": "first-come-first-serve",
      "2023-06-02": "first-come-first-serve",
      "2023-06-03": "first-come-first-serve",
      "2023-06-04": "closed",
      "2023-06-05": "closed",
      "2023-06-06": "closed",
      ...
    }
    ...
]
```


## OpenAPI

````yaml GET /campground/:id/availability
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  version: 1.0.0
servers:
  - url: https://api.campflare.com/v2
security: []
paths:
  /campground/:id/availability:
    get:
      summary: Get availability for all campsites in a campground
      description: >-
        Returns availability status for each campsite in the campground for
        upcoming dates
      parameters:
        - name: id
          in: path
          description: Unique identifier of the campground
          required: true
          schema:
            type: string
        - name: start_date
          in: query
          description: Start date in YYYY-MM-DD format
          required: true
          schema:
            type: string
            format: date
        - name: end_date
          in: query
          description: End date in YYYY-MM-DD format
          required: true
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Array of campsite availability
          content:
            application/json:
              schema:
                type: object
                required:
                  - campsite_availability
                properties:
                  campsite_availability:
                    type: array
                    items:
                      type: object
                      required:
                        - campsite_id
                        - availability
                      properties:
                        campsite_id:
                          type: string
                          description: Unique identifier for the campsite
                        availability:
                          type: object
                          additionalProperties:
                            type: string
                            enum:
                              - available
                              - reserved
                              - closed
                              - first-come-first-serve
                              - not-yet-released
                              - unknown
                          description: >-
                            Object mapping dates (YYYY-MM-DD) to availability
                            status
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            kind:
              type: string

````