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

# Product availability

> Fetch the availability of variants for a given set of products.



## OpenAPI

````yaml POST /{proxy_path_prefix}/product_availability_checks
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}/product_availability_checks:
    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')
    post:
      tags:
        - Product Availability
      summary: Product availability
      description: >-
        Returns available variants for a given set of products within a rental
        date range.
      operationId: createProductAvailabilityCheck
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_ids:
                  type: array
                  items:
                    type: integer
                  description: Array of Shopify product IDs to check
                rental_start:
                  type: string
                  format: date-time
                  description: Start date of the rental period
                rental_end:
                  type: string
                  format: date-time
                  description: End date of the rental period
              required:
                - product_ids
                - rental_start
            example:
              product_ids:
                - 123
                - 456
              rental_start: '2025-02-25T09:00:00Z'
              rental_end: '2025-02-28T17:00:00Z'
      responses:
        '200':
          description: Successful response with product availability
          content:
            application/json:
              schema:
                type: object
                properties:
                  products:
                    type: array
                    items:
                      $ref: '#/components/schemas/Product'
                required:
                  - products
              example:
                products:
                  - shopifyId: 123
                    title: Product 1
                    availableVariants:
                      - shopifyId: 1001
                        title: Variant 1
                      - shopifyId: 1002
                        title: Variant 2
                  - shopifyId: 456
                    title: Product 2
                    availableVariants: []
        '500':
          description: Server error
components:
  schemas:
    Product:
      type: object
      properties:
        shopifyId:
          type: integer
          description: The Shopify ID of the product
        title:
          type: string
          description: The product title
        availableVariants:
          type: array
          items:
            $ref: '#/components/schemas/Variant'
          description: Array of available variants for the reservation period
      required:
        - shopifyId
        - title
        - availableVariants
    Variant:
      type: object
      properties:
        shopifyId:
          type: integer
          description: The Shopify ID of the variant
        title:
          type: string
          description: The variant title
      required:
        - shopifyId
        - title

````