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

# Availability timeline

> Fetch the availability of a variant across a date window.

Returns a day-by-day count of available items for a variant, spanning from the earliest possible rental start date through 12 months. Use this to build a date picker that disables fully booked days.

The `occupancy` object maps each date to the number of available items on that day. A value of `0` means fully booked.


## OpenAPI

````yaml GET /{proxy_path_prefix}/availability_timelines
openapi: 3.0.3
info:
  title: Product Availability and Rental Intent API
  version: 1.0.0
  description: >-
    API for checking product availability and managing rental intents in a
    customer portal via Shopify proxy
servers: []
security: []
paths:
  /{proxy_path_prefix}/availability_timelines:
    parameters:
      - name: proxy_path_prefix
        in: path
        required: true
        schema:
          type: string
        description: >-
          The Shopify proxy path prefix configured for the app (e.g.,
          'customer_portal')
    get:
      tags:
        - Product Availability
      summary: Availability timeline
      description: >-
        Returns a day-by-day count of available items for a variant across a
        12-month window.
      operationId: getAvailabilityTimeline
      parameters:
        - name: variant_shopify_id
          in: query
          required: true
          schema:
            type: integer
          description: Shopify ID of the variant to check availability for
        - name: location_id
          in: query
          required: false
          schema:
            type: integer
          description: Optional Shopify location ID to filter items by location
        - name: delivery_method_type
          in: query
          required: false
          schema:
            type: string
          description: >-
            Delivery method type used to calculate logistics padding (defaults
            to 'shipping')
      responses:
        '200':
          description: Successful response with availability timeline
          content:
            application/json:
              schema:
                type: object
                properties:
                  occupancy:
                    type: object
                    description: >-
                      Map of date (YYYY-MM-DD) to number of available items on
                      that day. A value of 0 means fully booked.
                    additionalProperties:
                      type: integer
                  inventoryCount:
                    type: integer
                    description: Total number of available items for the variant
                  futureAvailabilityInventoryCount:
                    type: integer
                    description: >-
                      Number of items not on an unbounded (open-ended) current
                      rental — i.e. items that will eventually become available
                  uncommitedInventoryCount:
                    type: integer
                    description: >-
                      Number of items not committed to any current or future
                      rental
                required:
                  - occupancy
                  - inventoryCount
                  - futureAvailabilityInventoryCount
                  - uncommitedInventoryCount
              example:
                occupancy:
                  '2025-01-01': 3
                  '2025-01-02': 3
                  '2025-01-03': 2
                  '2025-01-04': 0
                inventoryCount: 3
                futureAvailabilityInventoryCount: 3
                uncommitedInventoryCount: 1
        '404':
          description: Variant not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
              example:
                error: Variant not found
        '500':
          description: Server error

````