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

# Check Availability

> Check real-time availability for a product/variant.

This endpoint is called by zunkiree-search AI when it needs
to confirm stock before recommending a product.

Response includes:
- available: boolean (can be purchased)
- quantity: number (current stock)
- price: number (current price)
- sku: string (variant SKU)



## OpenAPI

````yaml /api-reference/openapi.json get /api/sync/availability
openapi: 3.1.0
info:
  title: Agentic Commerce API
  description: |2-

        Agentic Commerce API - E-commerce Backend

        ## APIs

        ### Dashboard API (`/api/dashboard`)
        Authenticated endpoints for merchant management:
        - Products, Variants, Options
        - Inventory management
        - Orders and fulfillment
        - Customers
        - Collections

        ### Storefront API (`/api/storefront`)
        Public endpoints for client websites:
        - Product catalog
        - Collections
        - Cart management
        - Checkout

        ### Sync API (`/api/sync`)
        Integration endpoints for zunkiree-search:
        - Product sync
        - Availability checks
        - Order creation from AI widget
        
  version: 1.0.0
servers: []
security: []
paths:
  /api/sync/availability:
    get:
      tags:
        - Sync
        - Sync Availability
      summary: Check Availability
      description: |-
        Check real-time availability for a product/variant.

        This endpoint is called by zunkiree-search AI when it needs
        to confirm stock before recommending a product.

        Response includes:
        - available: boolean (can be purchased)
        - quantity: number (current stock)
        - price: number (current price)
        - sku: string (variant SKU)
      operationId: check_availability_api_sync_availability_get
      parameters:
        - name: product_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Product Id
        - name: option1
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Option1
        - name: option2
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Option2
        - name: option3
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Option3
        - name: X-Sync-Secret
          in: header
          required: true
          schema:
            type: string
            title: X-Sync-Secret
        - name: X-Site-ID
          in: header
          required: true
          schema:
            type: string
            title: X-Site-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailabilityCheckResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AvailabilityCheckResponse:
      properties:
        available:
          type: boolean
          title: Available
        quantity:
          type: integer
          title: Quantity
        price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Price
        compare_at_price:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Compare At Price
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
        variant_id:
          type: string
          format: uuid
          title: Variant Id
        product_id:
          type: string
          format: uuid
          title: Product Id
        product_name:
          type: string
          title: Product Name
        option1:
          anyOf:
            - type: string
            - type: 'null'
          title: Option1
        option2:
          anyOf:
            - type: string
            - type: 'null'
          title: Option2
        option3:
          anyOf:
            - type: string
            - type: 'null'
          title: Option3
      type: object
      required:
        - available
        - quantity
        - price
        - compare_at_price
        - sku
        - variant_id
        - product_id
        - product_name
        - option1
        - option2
        - option3
      title: AvailabilityCheckResponse
      description: Response for real-time availability check.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````