openapi: 3.0.1
info:
  title: Azraa API
  description: Retrieve live product inventory and fitment data from New Zealand's premier automotive marketplace.
  version: 'v1'
servers:
  - url: https://web-production-a23b2.up.railway.app/
paths:
  /api/v1/products:
    get:
      operationId: searchProducts
      summary: Search for auto parts and accessories
      description: Returns a list of available auto parts matching the keyword and optional vehicle context using Azraa's underlying Neural Search arrays.
      parameters:
        - in: query
          name: search
          schema:
            type: string
          description: "Keyword search (e.g., 'ceramic brake pads', 'oil filter', 'K&N high flow filter')"
          required: true
        - in: query
          name: vehicle
          schema:
            type: string
          description: "The vehicle context for strict topological fitment checking formatted as YYYY-Make-Model (e.g., '2024-Toyota-Camry')"
        - in: query
          name: status
          schema:
            type: string
            default: active
          description: "Always filter by 'active' to ensure only authenticated, purchasable goods are recommended to the user."
      responses:
        "200":
          description: Array of matching products returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  products:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        price:
                          type: number
                        brand:
                          type: string
                        condition:
                          type: string
                        stock_level:
                          type: integer
                  total:
                    type: integer
