> ## 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 log

> Fetch intra-day-precise availability for a variant, for hourly and time-slot booking.

Returns a sparse, **intra-day-precise** change log of how many items are available for a variant, spanning from the earliest possible rental start through 12 months. Use this instead of the [availability timeline](/api-reference/storefront/availability-timelines) when you need time-of-day precision, for example to build hourly or time-slot pickers.

The `occupancy` array is a chronological list of change points. Each `{ at, available }` entry means that from `at` onward, `available` items are free, until the next entry. The first entry is the opening level, and a trailing entry with `available` of `0` marks the end of the bookable window. Because availability only changes at a handful of instants, the array stays small.

`at` is a shop-local, offset-free timestamp (`YYYY-MM-DDTHH:MM:SS`). Interpret it in the shop's timezone; do not apply a UTC offset.

The counts already account for the selected delivery and return methods, including their preparation and restock times. These turnaround times can be configured in hours, so an item that comes back at 14:00 with a 6-hour restock will not become available again until 20:00, and a slot earlier that evening will report as unavailable.


## OpenAPI

````yaml GET /{proxy_path_prefix}/availability_log
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_log:
    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 log
      description: >-
        Returns a sparse, intra-day-precise change log of how many items are
        available for a variant across a 12-month window. Unlike the
        availability timeline (one count per calendar day), this emits a count
        only at the instants availability changes, with time-of-day precision.
        Use this to build hourly or time-slot pickers (e.g. pick up and drop off
        at a chosen time).
      operationId: getAvailabilityLog
      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
            enum:
              - shipping
              - pick_up
          description: >-
            Delivery method type used to calculate logistics padding (defaults
            to the shop's default delivery method)
        - name: return_method_type
          in: query
          required: false
          schema:
            type: string
            enum:
              - shipping
              - drop_off
          description: >-
            Return method type used to calculate logistics padding (defaults to
            the shop's default return method)
      responses:
        '200':
          description: Successful response with the availability change log
          content:
            application/json:
              schema:
                type: object
                properties:
                  occupancy:
                    type: array
                    description: >-
                      Chronological list of availability changes. Each entry
                      sets the number of available items from its `at` instant
                      until the next entry. The first entry is the opening
                      level; a trailing entry with `available` 0 bounds the end
                      of the window.
                    items:
                      type: object
                      properties:
                        at:
                          type: string
                          description: >-
                            Shop-local, offset-free ISO 8601 timestamp
                            (YYYY-MM-DDTHH:MM:SS) at which the available count
                            changes. Interpret in the shop's timezone; do not
                            apply a UTC offset.
                        available:
                          type: integer
                          description: >-
                            Number of items available from this instant until
                            the next entry.
                      required:
                        - at
                        - available
                  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:
                  - at: '2025-01-01T09:00:00'
                    available: 3
                  - at: '2025-01-03T14:30:00'
                    available: 1
                  - at: '2025-01-08T11:00:00'
                    available: 3
                  - at: '2025-12-31T23:59:59'
                    available: 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

````