Passer au contenu principal
Autrex
Panier (0 articles)
GET/api/v1/search

Search Products

Search products using natural language queries with optional filters for vehicle fitment, category, brand, price range, and availability. Rows may include customerShipRange { minBd, maxBd, tier: fast|standard|slow }, nullable and optional. Absent and null both preserve legacy wording, including own-stock, partial-quantity and out-of-stock labels. The ERP CUSTOMER_SHIP_RANGE_WORDING flag controls emission. Availability status call_for_price means stock has no published price (price null, quantity 0). Call for pricing; it is not purchasable online and is not a confirmed stockout.

The same-origin /api/erp relay accepts only storefront allow-listed paths and methods; other routes return 404. Browser-supplied API keys are discarded. Direct public API endpoints remain available at their documented URLs.

searchproductsfilter

Use Cases

  • Product search with natural language
  • Filter products by vehicle fitment
  • Browse products by category
  • Find products within price range

Query Parameters

ParameterTypeRequiredDescription
qstringOptionalSearch query (natural language)
yearnumberOptionalVehicle year filter
makestringOptionalVehicle make filter
modelstringOptionalVehicle model filter
categorystringOptionalProduct category filter
brandstringOptionalBrand filter
tire_typestringOptionalTire type group (with category=tires): light-truck and SUV tires
tire_performancestringOptionalTire performance group (with category=tires); comma-separate to combine
price_minnumberOptionalMinimum price (CAD)
price_maxnumberOptionalMaximum price (CAD)
in_stock_onlybooleanOptionalOnly show in-stock items
on_salebooleanOptionalOnly listings on sale (open or cart-only price). Answers 503 sale_filter_unavailable with Retry-After while the listing projection is not ready.
campaignstringOptionalOnly listings covered by an active window of this sale campaign slug; implies on_sale. An unknown slug returns an empty result.
sortstringOptionalSort order
pagenumberOptionalPage number
limitnumberOptionalResults per page
Allowed values for tire_type:
truck-suv
Allowed values for tire_performance:
performanceall-terrain
Allowed values for sort:
relevanceprice_ascprice_descname_ascnewest

Request Example

cURL
curl "https://autrex.ca/api/v1/search?q=ceramic brake pads&year=2024"
JavaScript
fetch("https://autrex.ca/api/v1/search?q=ceramic brake pads&year=2024")

Response

200Search results
{
  "results": [
    {
      "sku": "PS-Z23-1324",
      "name": "PowerStop Z23 Evolution Sport Ceramic Brake Pads - Front",
      "brand": "PowerStop",
      "category": "Brake Pads",
      "description_short": "Carbon fiber ceramic compound for superior stopping power with low dust",
      "pricing": {
        "msrp": 109.99,
        "sale_price": 89.99,
        "currency": "CAD",
        "discount_percent": 18
      },
      "availability": {
        "status": "in_stock",
        "quantity": 47
      },
      "media": {
        "thumbnail": "https://cdn.autrex.ca/products/ps-z23-1324/thumb.jpg",
        "images": [
          "https://cdn.autrex.ca/products/ps-z23-1324/main.jpg"
        ]
      },
      "fitment": {
        "total_applications": 156,
        "universal": false
      },
      "seo": {
        "url": "https://autrex.ca/products/powerstop-z23-ceramic-brake-pads-front"
      }
    },
    {
      "sku": "BRM-09A820",
      "name": "Brembo UV Coated Brake Rotor - Front",
      "brand": "Brembo",
      "category": "Brake Rotors",
      "description_short": "OEM-quality brake rotor with UV coating for corrosion resistance",
      "pricing": {
        "msrp": 129.99,
        "sale_price": 119.99,
        "currency": "CAD",
        "discount_percent": 8
      },
      "availability": {
        "status": "in_stock",
        "quantity": 23
      },
      "media": {
        "thumbnail": "https://cdn.autrex.ca/products/brm-09a820/thumb.jpg",
        "images": [
          "https://cdn.autrex.ca/products/brm-09a820/main.jpg"
        ]
      },
      "fitment": {
        "total_applications": 142,
        "universal": false
      },
      "seo": {
        "url": "https://autrex.ca/products/brembo-uv-coated-brake-rotor-front"
      }
    },
    {
      "sku": "WAG-BP1108",
      "name": "Wagner ThermoQuiet Rear Brake Pads",
      "brand": "Wagner",
      "category": "Brake Pads",
      "description_short": "One-piece design with integrally molded noise insulator",
      "pricing": {
        "msrp": 69.99,
        "sale_price": 59.99,
        "currency": "CAD",
        "discount_percent": 14
      },
      "availability": {
        "status": "in_stock",
        "quantity": 35
      },
      "media": {
        "thumbnail": "https://cdn.autrex.ca/products/wag-bp1108/thumb.jpg",
        "images": [
          "https://cdn.autrex.ca/products/wag-bp1108/main.jpg"
        ]
      },
      "fitment": {
        "total_applications": 189,
        "universal": false
      },
      "seo": {
        "url": "https://autrex.ca/products/wagner-thermoquiet-rear-brake-pads"
      }
    },
    {
      "sku": "EBC-DP31210C",
      "name": "EBC Redstuff Ceramic Brake Pads - Front",
      "brand": "EBC",
      "category": "Brake Pads",
      "description_short": "High-performance ceramic pads with low dust and excellent cold bite",
      "pricing": {
        "msrp": 149.99,
        "sale_price": null,
        "currency": "CAD"
      },
      "availability": {
        "status": "in_stock",
        "quantity": 12
      },
      "media": {
        "thumbnail": "https://cdn.autrex.ca/products/ebc-dp31210c/thumb.jpg",
        "images": [
          "https://cdn.autrex.ca/products/ebc-dp31210c/main.jpg"
        ]
      },
      "fitment": {
        "total_applications": 98,
        "universal": false
      },
      "seo": {
        "url": "https://autrex.ca/products/ebc-redstuff-ceramic-brake-pads-front"
      }
    },
    {
      "sku": "STP-126.33137",
      "name": "StopTech Sport Slotted Brake Rotor - Front",
      "brand": "StopTech",
      "category": "Brake Rotors",
      "description_short": "Slotted design for improved heat dissipation and wet weather performance",
      "pricing": {
        "msrp": 159.99,
        "sale_price": 139.99,
        "currency": "CAD",
        "discount_percent": 13
      },
      "availability": {
        "status": "low_stock",
        "quantity": 4
      },
      "media": {
        "thumbnail": "https://cdn.autrex.ca/products/stp-126/thumb.jpg",
        "images": [
          "https://cdn.autrex.ca/products/stp-126/main.jpg"
        ]
      },
      "fitment": {
        "total_applications": 76,
        "universal": false
      },
      "seo": {
        "url": "https://autrex.ca/products/stoptech-sport-slotted-brake-rotor-front"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 24,
    "total": 5,
    "total_pages": 1,
    "has_next": false,
    "has_previous": false
  },
  "filters_applied": {
    "q": "brake pads",
    "category": "brakes"
  },
  "meta": {
    "api_version": "v1",
    "cache_duration": 300,
    "query_time_ms": 45
  }
}
400Malformed sale filter (`on_sale` not true/false, or `campaign` not a valid slug): `{ error: 'Invalid sale filter', message }`
{
  "error": "Invalid sale filter",
  "message": "on_sale must be true/false/1/0 and campaign a valid slug."
}
503Sale filter unavailable while the listing projection is not ready: `{ error: 'sale_filter_unavailable' }` (or `listing_projection_changed`) with a `Retry-After` header. Never an unfiltered page; retry once after the delay.
{
  "error": "sale_filter_unavailable",
  "message": "The sale listing projection is not ready. Retry after the Retry-After delay."
}

Caching

Max Age
300s
Stale While Revalidate
600s