{
  "$schema": "https://agentprotocol.ai/schemas/agents.json/v1",
  "version": "1.0",
  "info": {
    "title": "Auto Compressor World Agent API",
    "description": "AI agent interface for searching, verifying fitment, and purchasing automotive A/C compressors and parts. Covers passenger vehicles, commercial trucks, agricultural equipment, buses, and off-road vehicles.",
    "contact": {
      "name": "Customer Service",
      "email": "info@autocompressorworld.com",
      "phone": "+1-800-804-5720",
      "hours": "Monday–Friday 8am–5pm CST, Saturday 8am–4pm CST"
    },
    "domains": [
      "autocompressorworld.com",
      "thecompressorwarehouse.com"
    ]
  },
  "capabilities": {
    "search": true,
    "cart": true,
    "checkout": true,
    "inventory": true,
    "fitmentCheck": true,
    "guestCheckout": true,
    "localPickup": true
  },
  "authentication": {
    "required": false,
    "guestCheckout": true,
    "note": "All catalog browsing, search, and inventory checks are unauthenticated. Cart and checkout support guest mode."
  },
  "warehouses": {
    "note": "All warehouse identifiers exposed to agents use the public display name only. Internal system names are never returned in agent-facing responses. Location data is sourced from the Supabase warehouses table, public_name column.",
    "locations": [
      {
        "displayName": "Houston",
        "services": [
          "shipping",
          "local-pickup",
          "will-call"
        ],
        "sameDayCutoff": "4:00 PM CST",
        "address": "14444 Stuebner Airline Rd, Houston, TX 77069",
        "phone": "(800) 804-5720",
        "hours": "Mon–Fri 8am–5pm CST, Sat 8am–4pm CST",
        "localPickup": true,
        "note": "The ONLY location offering local pickup, will-call, and in-person customer service"
      },
      {
        "displayName": "Dallas/Ft. Worth 1",
        "services": [
          "shipping"
        ],
        "sameDayCutoff": "3:00 PM CST",
        "localPickup": false
      },
      {
        "displayName": "Dallas/Ft. Worth 2",
        "services": [
          "shipping"
        ],
        "sameDayCutoff": "2:00 PM CST",
        "localPickup": false
      },
      {
        "displayName": "Reno, NV",
        "services": [
          "shipping"
        ],
        "sameDayCutoff": "5:00 PM PST",
        "localPickup": false
      },
      {
        "displayName": "Tampa, FL",
        "services": [
          "shipping"
        ],
        "sameDayCutoff": "2:00 PM EST",
        "localPickup": false
      },
      {
        "displayName": "Multiple",
        "services": [
          "shipping"
        ],
        "note": "System-assigned when a single order ships from more than one fulfillment location. Not selectable by the customer or agent — assigned automatically by the backend."
      }
    ]
  },
  "flows": [
    {
      "id": "find_part_by_vehicle",
      "name": "Find A/C Part by Vehicle",
      "description": "Complete flow to find compatible A/C parts for a specific vehicle. Start with vehicle year/make/model, get matching parts, check availability, and optionally add to cart.",
      "steps": [
        {
          "id": "get_makes",
          "name": "Get Vehicle Makes",
          "description": "Get list of vehicle manufacturers for a given model year",
          "method": "GET",
          "url": "/api/vehicle/makes?year={year}",
          "parameters": {
            "year": {
              "type": "integer",
              "description": "4-digit model year",
              "required": true
            }
          },
          "returns": {
            "makes": "array of manufacturer names"
          }
        },
        {
          "id": "get_models",
          "name": "Get Vehicle Models",
          "description": "Get vehicle models for a year/make combination",
          "method": "GET",
          "url": "/api/vehicle/models?year={year}&make={make}",
          "parameters": {
            "year": {
              "type": "integer",
              "required": true
            },
            "make": {
              "type": "string",
              "required": true
            }
          },
          "returns": {
            "models": "array of model names"
          }
        },
        {
          "id": "search_by_vehicle",
          "name": "Get Parts for Vehicle",
          "description": "Returns all compatible A/C parts for a year/make/model",
          "method": "GET",
          "url": "/api/parts?year={year}&make={make}&model={model}&category={category}",
          "parameters": {
            "year": {
              "type": "integer",
              "required": true
            },
            "make": {
              "type": "string",
              "required": true
            },
            "model": {
              "type": "string",
              "required": true
            },
            "category": {
              "type": "string",
              "required": false,
              "enum": [
                "compressors",
                "condensers",
                "evaporators",
                "driers",
                "hoses",
                "kits",
                "all"
              ],
              "default": "all"
            }
          },
          "returns": {
            "parts": "array",
            "fields": [
              "partNumber",
              "name",
              "brand",
              "price",
              "inStock",
              "qty",
              "warranty",
              "image"
            ]
          }
        }
      ]
    },
    {
      "id": "search_by_part_number",
      "name": "Search by Part Number",
      "description": "Direct lookup by OEM, aftermarket, or interchange part number. Returns exact matches and cross-references.",
      "steps": [
        {
          "id": "part_lookup",
          "name": "Part Number Lookup",
          "method": "GET",
          "url": "/api/parts/lookup?partNumber={partNumber}",
          "parameters": {
            "partNumber": {
              "type": "string",
              "required": true,
              "description": "OEM, TCW, or interchange part number"
            }
          },
          "returns": {
            "exactMatch": "part object or null",
            "crossReferences": "array of interchange matches",
            "fields": [
              "partNumber",
              "name",
              "brand",
              "price",
              "inStock",
              "qty",
              "fitment"
            ]
          }
        }
      ]
    },
    {
      "id": "check_inventory",
      "name": "Check Stock / Qty on Hand",
      "description": "Check real-time inventory levels at each warehouse for one or more part numbers.",
      "steps": [
        {
          "id": "inventory_check",
          "name": "Get Inventory",
          "method": "GET",
          "url": "/api/inventory?partNumber={partNumber}",
          "parameters": {
            "partNumber": {
              "type": "string",
              "required": true
            }
          },
          "returns": {
            "partNumber": "string",
            "locations": [
              {
                "displayName": "string — always the warehouse public display name",
                "qty": "integer",
                "inStock": "boolean",
                "localPickup": "boolean — true only for Houston",
                "leadTime": "string (e.g. 'Same day by 4pm CST', '1-2 business days')"
              }
            ],
            "note": "Location names are sourced from the warehouses.public_name column. Internal names are never exposed."
          }
        }
      ]
    },
    {
      "id": "add_to_cart_flow",
      "name": "Add Item to Cart",
      "description": "Add a verified part to the cart with quantity and warehouse selection.",
      "steps": [
        {
          "id": "check_stock_before_add",
          "name": "Verify Stock",
          "description": "Recommended: check inventory before adding to cart",
          "method": "GET",
          "url": "/api/inventory?partNumber={partNumber}",
          "parameters": {
            "partNumber": {
              "type": "string",
              "required": true
            }
          }
        },
        {
          "id": "select_warehouse",
          "name": "Select Ship-From Warehouse",
          "description": "Get available warehouses that have this part in stock. Present display names to the customer for selection.",
          "method": "GET",
          "url": "/api/warehouses?partNumber={partNumber}",
          "parameters": {
            "partNumber": {
              "type": "string",
              "required": true
            }
          },
          "returns": {
            "warehouses": [
              {
                "displayName": "string — the customer-facing location name",
                "services": "array",
                "sameDayCutoff": "string",
                "qty": "integer",
                "localPickup": "boolean — true ONLY for Houston"
              }
            ]
          }
        },
        {
          "id": "add_to_cart",
          "name": "Add to Cart",
          "method": "POST",
          "url": "/api/cart/add",
          "body": {
            "partNumber": {
              "type": "string",
              "required": true
            },
            "quantity": {
              "type": "integer",
              "default": 1
            },
            "warehouseDisplayName": {
              "type": "string",
              "required": false,
              "description": "Customer's chosen location by display name, as returned by the warehouses endpoint."
            }
          },
          "returns": {
            "success": "boolean",
            "cartId": "string",
            "cartTotal": "number",
            "itemCount": "integer",
            "estimatedShipDate": "string"
          }
        }
      ]
    },
    {
      "id": "checkout_flow",
      "name": "Checkout",
      "description": "Complete checkout flow. Agent prepares the cart, presents shipping options, and initiates checkout, then directs customer to secure payment page. The agent never handles payment credentials.",
      "steps": [
        {
          "id": "view_cart",
          "name": "Review Cart",
          "method": "GET",
          "url": "/api/cart",
          "returns": {
            "items": "array",
            "subtotal": "number",
            "estimatedShipping": "number",
            "estimatedTax": "number",
            "total": "number"
          }
        },
        {
          "id": "get_shipping_estimate",
          "name": "Get Shipping Options & Rates",
          "description": "Get live shipping rates for the current cart. If cart subtotal >= $150, ground shipping will be free.",
          "method": "GET",
          "url": "/api/shipping/estimate?destinationZip={zip}&shippingMethod=ground",
          "note": "Call twice — once with shippingMethod=ground and once with shippingMethod=overnight — to present both options.",
          "returns": {
            "method": "ground | overnight",
            "carrier": "string",
            "cost": "number (0 if free shipping applies)",
            "freeShipping": "boolean",
            "freeShippingReason": "string | null",
            "estimatedDelivery": "string",
            "shipFromWarehouse": "display name",
            "sameDayCutoff": "string"
          }
        },
        {
          "id": "get_payment_options",
          "name": "Get Payment Methods",
          "description": "Returns available payment options, including PayPal crypto where supported.",
          "method": "GET",
          "url": "/api/checkout/payment-options",
          "returns": {
            "methods": [
              {
                "id": "credit-card",
                "name": "Credit Card",
                "brands": [
                  "Visa",
                  "Mastercard",
                  "American Express",
                  "Discover"
                ]
              },
              {
                "id": "google-pay",
                "name": "Google Pay"
              },
              {
                "id": "paypal",
                "name": "PayPal",
                "note": "Includes standard PayPal checkout options"
              },
              {
                "id": "paypal-pay-later",
                "name": "Pay in 4",
                "minOrder": 30,
                "maxOrder": 1500,
                "interestFree": true
              },
              {
                "id": "paypal-crypto",
                "name": "Pay with Crypto (PayPal)",
                "note": "Availability depends on customer account and region"
              }
            ],
            "currency": "USD"
          }
        },
        {
          "id": "initiate_checkout",
          "name": "Initiate Checkout",
          "description": "Creates a checkout session and returns a URL for the customer to complete payment. The agent must direct the customer to this URL.",
          "method": "POST",
          "url": "/api/checkout/initiate",
          "body": {
            "guestEmail": {
              "type": "string",
              "required": false
            },
            "agentInitiated": {
              "type": "boolean",
              "default": true
            }
          },
          "returns": {
            "checkoutUrl": "string — secure URL for customer to complete payment",
            "sessionId": "string",
            "expiresIn": "integer (seconds)"
          }
        }
      ]
    },
    {
      "id": "fitment_verification",
      "name": "Verify Part Fitment",
      "description": "Check if a part is compatible with a specific vehicle before purchase.",
      "steps": [
        {
          "id": "check_fitment",
          "name": "Fitment Check",
          "method": "GET",
          "url": "/api/fitment?partNumber={partNumber}&year={year}&make={make}&model={model}",
          "parameters": {
            "partNumber": {
              "type": "string",
              "required": true
            },
            "year": {
              "type": "integer",
              "required": true
            },
            "make": {
              "type": "string",
              "required": true
            },
            "model": {
              "type": "string",
              "required": true
            },
            "engine": {
              "type": "string",
              "required": false
            }
          },
          "returns": {
            "fits": "boolean",
            "confidence": "string (exact / probable / incompatible)",
            "notes": "string",
            "alternativeParts": "array of part numbers if incompatible"
          }
        }
      ]
    },
    {
      "id": "local_pickup",
      "name": "Local Pickup / Will-Call Order",
      "description": "Place an order for same-day or next-day local pickup or will-call from our Houston location. Local pickup and in-person service are available ONLY at the Houston location (14444 Stuebner Airline Rd, Houston TX 77069).",
      "steps": [
        {
          "id": "check_local_stock",
          "name": "Check Houston Stock",
          "description": "Check inventory at Houston specifically. Pass the display name 'Houston'.",
          "method": "GET",
          "url": "/api/inventory?partNumber={partNumber}&warehouseDisplayName=Houston",
          "returns": {
            "displayName": "Houston",
            "qty": "integer",
            "inStock": "boolean",
            "localPickup": true,
            "sameDayCutoffLocal": "4:00 PM CST",
            "address": "14444 Stuebner Airline Rd, Houston, TX 77069",
            "phone": "(800) 804-5720"
          }
        },
        {
          "id": "add_to_cart_pickup",
          "name": "Add to Cart for Pickup",
          "method": "POST",
          "url": "/api/cart/add",
          "body": {
            "partNumber": {
              "type": "string",
              "required": true
            },
            "quantity": {
              "type": "integer",
              "default": 1
            },
            "fulfillmentMethod": "local-pickup",
            "warehouseDisplayName": "Houston"
          }
        },
        {
          "id": "initiate_checkout_pickup",
          "name": "Initiate Pickup Checkout",
          "method": "POST",
          "url": "/api/checkout/initiate",
          "body": {
            "fulfillmentMethod": "local-pickup",
            "warehouseDisplayName": "Houston"
          }
        }
      ]
    }
  ],
  "shipping": {
    "policy": {
      "freeShipping": {
        "available": true,
        "threshold": 150,
        "currency": "USD",
        "appliesTo": "Standard ground shipping only",
        "description": "Free standard ground shipping on all orders over $150"
      },
      "carriers": [
        "UPS",
        "FedEx",
        "USPS"
      ],
      "currency": "USD",
      "rateCalculation": "Dynamic — rates are calculated server-side using Supabase shipping tables. Agents must use the /api/shipping/estimate endpoint for live quotes and must never attempt to calculate rates independently.",
      "methods": [
        {
          "id": "ground",
          "name": "Standard Ground",
          "description": "Standard ground shipping via UPS, FedEx, or USPS. Delivery in 1–5 business days.",
          "freeShippingEligible": true,
          "quoteEndpoint": "/api/shipping/estimate?shippingMethod=ground&destinationZip={zip}"
        },
        {
          "id": "overnight",
          "name": "Overnight / Next-Day",
          "description": "Next-business-day delivery via UPS or FedEx. Order must be placed before warehouse cutoff time.",
          "freeShippingEligible": false,
          "quoteEndpoint": "/api/shipping/estimate?shippingMethod=overnight&destinationZip={zip}"
        }
      ],
      "sameDayCutoffs": {
        "Houston": "4:00 PM CST",
        "Dallas/Ft. Worth 1": "3:00 PM CST",
        "Dallas/Ft. Worth 2": "2:00 PM CST",
        "Reno, NV": "5:00 PM PST",
        "Tampa, FL": "2:00 PM EST",
        "note": "Cutoff times use warehouse local time. Orders placed after cutoff ship the next business day."
      },
      "localPickup": {
        "available": true,
        "cost": "Free",
        "location": "Houston only — 14444 Stuebner Airline Rd, Houston, TX 77069",
        "hours": "Mon–Fri 8am–5pm CST, Sat 8am–4pm CST"
      }
    }
  },
  "catalog": {
    "productTypes": [
      "compressors",
      "condensers",
      "evaporators",
      "driers",
      "accumulators",
      "hoses",
      "kits",
      "expansion-devices",
      "heater-cores",
      "refrigerants",
      "oils",
      "seal-kits",
      "tools"
    ],
    "vehicleTypes": [
      "passenger",
      "commercial",
      "heavy-duty",
      "agricultural",
      "bus",
      "off-road",
      "tractor"
    ],
    "brands": [
      "TCW",
      "Denso",
      "Valeo",
      "Sanden",
      "A6",
      "OEM-remanufactured"
    ],
    "feedUrl": "https://autocompressorworld.com/google-merchant-feed.tsv",
    "openAiFeedUrl": "https://autocompressorworld.com/openai-product-feed.tsv",
    "productUrlPattern": "https://autocompressorworld.com/products/{partNumber}"
  },
  "payments": {
    "acceptedPaymentMethods": [
      "Credit Card (Visa, Mastercard, American Express, Discover)",
      "Google Pay",
      "PayPal (including supported crypto checkout options)"
    ],
    "installmentOptions": [
      {
        "provider": "PayPal Pay in 4",
        "description": "4 interest-free payments over 6 weeks",
        "minimumOrder": 30,
        "maximumOrder": 1500
      }
    ],
    "notAccepted": []
  }
}