{"openapi":"3.0.3","info":{"title":"Autrex Catalog and Fitment API","description":"Autrex is an auto parts, tire, and wheel retailer with Canada and USA storefronts. Public read-only endpoints expose product search, vehicle fitment verification, and catalog data for ecommerce integrations and AI assistants. 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.","version":"v1","contact":{"email":"support@autrex.ca"},"x-logo":{"url":"https://assets.autrex.ca/catalog/assets/Branding/Autrex-Logo-Navy-Copper-A.png"}},"servers":[{"url":"https://autrex.ca/api/v1","description":"Production server"}],"tags":[{"name":"products","description":"Product catalog operations"},{"name":"search","description":"Search and filter products"},{"name":"vehicles","description":"Vehicle make/model data"},{"name":"fitment","description":"Vehicle-product compatibility"},{"name":"health","description":"API health and status"},{"name":"seo","description":"Keyword targets and page-level SEO data"}],"paths":{"/products/{sku}":{"get":{"operationId":"product_detail","summary":"Get Product Details","description":"Retrieve complete product information including specifications, fitment data, pricing, availability, and media. Returns all data needed to display a product detail page. Optional lang=fr|en selects PIES text with English fallback per code; optional description_language identifies short prose, description_long_language identifies long prose (EXT/MKT), and descriptions[].language preserves each returned lowercase PIES language code, including last-resort languages such as es or de. Older ERP deployments may omit these fields. Optional battery_local_only is the authoritative ERP pickup/local-delivery restriction for batteries; it is not provided on search/listing items. 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.","tags":["products","detail","sku"],"responses":{"200":{"description":"Product found successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"description_language":{"type":"string","enum":["fr","en"]},"description_long_language":{"type":"string","enum":["fr","en"]},"descriptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"type":{"type":"string"},"text":{"type":"string"},"language":{"type":"string"}},"required":["code","type","text"],"additionalProperties":false}},"sku":{"type":"string","minLength":1},"slug":{"type":"string"},"part_number":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"brand":{"type":"string","minLength":1},"brand_id":{"type":"string"},"battery_local_only":{"description":"When present, the ERP battery shipping rule: pickup or local delivery only for the whole cart.","type":"boolean"},"category":{"type":"string","minLength":1},"description_short":{"type":"string","maxLength":500},"description_long":{"type":"string"},"specifications":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}},"fitment":{"type":"object","properties":{"universal":{"type":"boolean"},"compatible_vehicles":{"type":"array","items":{"type":"object","properties":{"year_start":{"type":"integer","minimum":1900,"maximum":2100},"year_end":{"type":"integer","minimum":1900,"maximum":2100},"make":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"trim":{"type":"array","items":{"type":"string"}},"submodel":{"type":"string"},"engine":{"type":"string"}},"required":["year_start","year_end","make","model"],"additionalProperties":false}},"total_applications":{"type":"integer","minimum":0,"maximum":9007199254740991},"assurance":{"type":"string","enum":["manufacturer","spec_match","universal","unknown"]},"treatment":{"type":"string","enum":["fits","meets_spec","universal","unverified"]},"verified":{"type":"boolean"}},"required":["universal","compatible_vehicles","total_applications"],"additionalProperties":false},"pricing":{"type":"object","properties":{"headline":{"nullable":true,"type":"string"},"headline_fr":{"nullable":true,"type":"string"},"msrp":{"type":"number","minimum":0,"exclusiveMinimum":true},"sale_price":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"default":"CAD","type":"string"},"discount_percent":{"type":"number","minimum":0,"maximum":100}},"required":["msrp","sale_price","currency"],"additionalProperties":false},"cart_promo_signal":{"type":"object","properties":{"level":{"type":"string","enum":["GENERIC","PERCENT","AMOUNT"]},"badge_text_fr":{"nullable":true,"type":"string"},"headline_fr":{"nullable":true,"type":"string"},"badge_text":{"type":"string","minLength":1},"percent":{"type":"number","minimum":0,"maximum":100},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"ends_at":{"type":"string"},"headline":{"type":"string","minLength":1},"cart_price_visible":{"type":"boolean"},"min_subtotal":{"nullable":true,"type":"number"},"tiers":{"nullable":true,"type":"array","items":{"type":"object","properties":{"min_subtotal":{"type":"number"},"percent":{"type":"number"},"amount":{"type":"number"}},"required":["min_subtotal"],"additionalProperties":false}}},"required":["level","badge_text","ends_at"],"additionalProperties":false},"rebate":{},"three_pmsf_rated":{"nullable":true,"type":"boolean"},"loadRange":{"nullable":true,"type":"string"},"loadRangeVerified":{"nullable":true,"type":"boolean"},"availability":{"type":"object","properties":{"status":{"type":"string","enum":["call_for_price","in_stock","out_of_stock","low_stock","backordered","discontinued"]},"quantity":{"type":"integer","minimum":0,"maximum":9007199254740991},"lead_time_days":{"type":"integer","minimum":0,"maximum":9007199254740991},"warehouse_location":{"type":"string"}},"required":["status"],"additionalProperties":false},"media":{"type":"object","properties":{"images":{"type":"array","items":{"type":"string","format":"uri"}},"videos":{"type":"array","items":{"type":"string","format":"uri"}},"thumbnail":{"type":"string","format":"uri"}},"required":["images"],"additionalProperties":false},"seo":{"type":"object","properties":{"url":{"type":"string"},"meta_title":{"type":"string","maxLength":70},"meta_description":{"type":"string","maxLength":160},"canonical_url":{"type":"string"}},"required":["url","meta_title"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["sku","part_number","name","brand","category","description_short","specifications","fitment","pricing","availability","media","seo"],"additionalProperties":false},"meta":{"type":"object","properties":{"api_version":{"type":"string"},"cache_duration":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"query_time_ms":{"type":"number"}},"required":["api_version"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"retry_after":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["error","message"],"additionalProperties":false}}}}},"parameters":[{"name":"sku","in":"path","required":true,"description":"Unique product SKU (e.g., \"BCZC283107\")","schema":{"type":"string","example":"BCZC283107"}},{"name":"lang","in":"query","required":false,"description":"Preferred PIES description language; French falls back to English per code. Omit for the existing English response.","schema":{"type":"string","example":"fr","enum":["fr","en"]}}]}},"/products/{sku}/fitments":{"get":{"operationId":"product_fitments","summary":"Get Product Fitments","description":"Retrieve paginated list of vehicles compatible with a specific product. Useful for displaying \"Fits These Vehicles\" sections.","tags":["products","fitment","vehicles"],"responses":{"200":{"description":"Fitments retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"fitments":{"type":"array","items":{"type":"object","properties":{"year_start":{"type":"integer","minimum":1900,"maximum":2100},"year_end":{"type":"integer","minimum":1900,"maximum":2100},"make":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"trim":{"type":"array","items":{"type":"string"}},"submodel":{"type":"string"},"engine":{"type":"string"}},"required":["year_start","year_end","make","model"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":true,"maximum":100},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_pages":{"type":"integer","minimum":0,"maximum":9007199254740991},"has_next":{"type":"boolean"},"has_previous":{"type":"boolean"}},"required":["page","limit","total","total_pages","has_next","has_previous"],"additionalProperties":false}},"required":["fitments","pagination"],"additionalProperties":false}}}}},"parameters":[{"name":"sku","in":"path","required":true,"description":"Product SKU","schema":{"type":"string","example":"BCZC283107"}},{"name":"page","in":"query","required":false,"description":"Page number (1-based)","schema":{"type":"number","example":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Results per page (max 100)","schema":{"type":"number","example":50,"default":50}}]}},"/search":{"get":{"operationId":"search","summary":"Search Products","description":"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.","tags":["search","products","filter"],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"customerShipRange":{"nullable":true,"type":"object","properties":{"minBd":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxBd":{"type":"integer","minimum":0,"maximum":9007199254740991},"tier":{"type":"string","enum":["fast","standard","slow"]}},"required":["minBd","maxBd","tier"],"additionalProperties":false},"sku":{"type":"string"},"name":{"type":"string"},"brand":{"type":"string"},"category":{"type":"string"},"description_short":{"type":"string"},"pricing":{"type":"object","properties":{"headline":{"nullable":true,"type":"string"},"headline_fr":{"nullable":true,"type":"string"},"msrp":{"type":"number","minimum":0,"exclusiveMinimum":true},"sale_price":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"default":"CAD","type":"string"},"discount_percent":{"type":"number","minimum":0,"maximum":100}},"required":["msrp","sale_price","currency"],"additionalProperties":false},"cart_promo_signal":{"type":"object","properties":{"level":{"type":"string","enum":["GENERIC","PERCENT","AMOUNT"]},"badge_text_fr":{"nullable":true,"type":"string"},"headline_fr":{"nullable":true,"type":"string"},"badge_text":{"type":"string","minLength":1},"percent":{"type":"number","minimum":0,"maximum":100},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"ends_at":{"type":"string"},"headline":{"type":"string","minLength":1},"cart_price_visible":{"type":"boolean"},"min_subtotal":{"nullable":true,"type":"number"},"tiers":{"nullable":true,"type":"array","items":{"type":"object","properties":{"min_subtotal":{"type":"number"},"percent":{"type":"number"},"amount":{"type":"number"}},"required":["min_subtotal"],"additionalProperties":false}}},"required":["level","badge_text","ends_at"],"additionalProperties":false},"rebate":{},"three_pmsf_rated":{"nullable":true,"type":"boolean"},"fitment_condition":{"nullable":true,"type":"object","properties":{"text":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}}},"required":["text","conditions"],"additionalProperties":false},"variant_badge":{"nullable":true,"type":"object","properties":{"label":{"type":"string"},"source":{"type":"string","enum":["note","name"]}},"required":["label","source"],"additionalProperties":false},"availability":{"type":"object","properties":{"status":{"type":"string","enum":["call_for_price","in_stock","out_of_stock","low_stock","backordered","discontinued"]},"quantity":{"type":"integer","minimum":0,"maximum":9007199254740991},"lead_time_days":{"type":"integer","minimum":0,"maximum":9007199254740991},"warehouse_location":{"type":"string"}},"required":["status"],"additionalProperties":false},"media":{"type":"object","properties":{"thumbnail":{"type":"string","format":"uri"},"images":{"type":"array","items":{"type":"string","format":"uri"}}},"required":["images"],"additionalProperties":false},"fitment":{"type":"object","properties":{"total_applications":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"universal":{"type":"boolean"},"assurance":{"type":"string","enum":["manufacturer","spec_match","universal","unknown"]},"treatment":{"type":"string","enum":["fits","meets_spec","universal","unverified"]},"verified":{"type":"boolean"}},"required":["total_applications","universal"],"additionalProperties":false},"seo":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"required":["sku","name","brand","category","description_short","pricing","availability","media","fitment","seo"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":true,"maximum":100},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_pages":{"type":"integer","minimum":0,"maximum":9007199254740991},"has_next":{"type":"boolean"},"has_previous":{"type":"boolean"}},"required":["page","limit","total","total_pages","has_next","has_previous"],"additionalProperties":false},"filters_applied":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"meta":{"type":"object","properties":{"api_version":{"type":"string"},"cache_duration":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"query_time_ms":{"type":"number"}},"required":["api_version"],"additionalProperties":false}},"required":["results","pagination","filters_applied","meta"],"additionalProperties":false}}}},"400":{"description":"Malformed sale filter (`on_sale` not true/false, or `campaign` not a valid slug): `{ error: 'Invalid sale filter', message }`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","minLength":1,"maxLength":100},"message":{"type":"string","maxLength":500}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Sale 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.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","minLength":1,"maxLength":100},"message":{"type":"string","maxLength":500}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"name":"q","in":"query","required":false,"description":"Search query (natural language)","schema":{"type":"string","example":"ceramic brake pads"}},{"name":"year","in":"query","required":false,"description":"Vehicle year filter","schema":{"type":"number","example":2024}},{"name":"make","in":"query","required":false,"description":"Vehicle make filter","schema":{"type":"string","example":"Toyota"}},{"name":"model","in":"query","required":false,"description":"Vehicle model filter","schema":{"type":"string","example":"Camry"}},{"name":"category","in":"query","required":false,"description":"Product category filter","schema":{"type":"string","example":"brakes"}},{"name":"brand","in":"query","required":false,"description":"Brand filter","schema":{"type":"string","example":"PowerStop"}},{"name":"tire_type","in":"query","required":false,"description":"Tire type group (with category=tires): light-truck and SUV tires","schema":{"type":"string","example":"truck-suv","enum":["truck-suv"]}},{"name":"tire_performance","in":"query","required":false,"description":"Tire performance group (with category=tires); comma-separate to combine","schema":{"type":"string","example":"all-terrain","enum":["performance","all-terrain"]}},{"name":"price_min","in":"query","required":false,"description":"Minimum price (CAD)","schema":{"type":"number","example":50}},{"name":"price_max","in":"query","required":false,"description":"Maximum price (CAD)","schema":{"type":"number","example":200}},{"name":"in_stock_only","in":"query","required":false,"description":"Only show in-stock items","schema":{"type":"boolean","example":true,"default":false}},{"name":"on_sale","in":"query","required":false,"description":"Only listings on sale (open or cart-only price). Answers 503 sale_filter_unavailable with Retry-After while the listing projection is not ready.","schema":{"type":"boolean","example":true,"default":false}},{"name":"campaign","in":"query","required":false,"description":"Only listings covered by an active window of this sale campaign slug; implies on_sale. An unknown slug returns an empty result.","schema":{"type":"string","example":"fall-wheel-sale"}},{"name":"sort","in":"query","required":false,"description":"Sort order","schema":{"type":"string","example":"relevance","default":"relevance","enum":["relevance","price_asc","price_desc","name_asc","newest"]}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"number","example":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Results per page","schema":{"type":"number","example":24,"default":24}}]}},"/vehicles/makes":{"get":{"operationId":"vehicle_makes","summary":"Get Vehicle Makes","description":"Retrieve list of vehicle makes, optionally filtered by year. Used for vehicle selector dropdowns.","tags":["vehicles","makes","selector"],"responses":{"200":{"description":"List of vehicle makes","content":{"application/json":{"schema":{"type":"object","properties":{"makes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"product_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name"],"additionalProperties":false}}},"required":["makes"],"additionalProperties":false}}}}},"parameters":[{"name":"year","in":"query","required":false,"description":"Filter makes by year","schema":{"type":"number","example":2024}}]}},"/vehicles/models":{"get":{"operationId":"vehicle_models","summary":"Get Vehicle Models","description":"Retrieve list of vehicle models for a specific year and make.","tags":["vehicles","models","selector"],"responses":{"200":{"description":"List of vehicle models","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"year_start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"year_end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name"],"additionalProperties":false}}},"required":["models"],"additionalProperties":false}}}}},"parameters":[{"name":"year","in":"query","required":true,"description":"Vehicle year","schema":{"type":"number","example":2024}},{"name":"make","in":"query","required":true,"description":"Vehicle make name or ID","schema":{"type":"string","example":"Toyota"}}]}},"/fitment/verify":{"post":{"operationId":"fitment_verify","summary":"Verify Fitment","description":"Issue signed, line-bound fitment evidence for one SKU, canonical vehicle scope, and axle position. Product classification selects ACES for parts or geometry for tires and wheels.","tags":["fitment","verify","compatibility"],"responses":{"200":{"description":"Canonical decision, bound evidence, and signed V2 token","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"decision":{"type":"object","properties":{"version":{"type":"number","enum":[2]},"status":{"type":"string","enum":["confirmed_for_ymm","needs_configuration","confirmed_for_configuration","not_fit","manual_review","unverified"]},"tier":{"type":"string","enum":["FactoryFit","VerifiedFit","StanceFit","ExtremeFit","NoFit","Unverified"]},"requiredFields":{"type":"array","items":{"type":"string","enum":["submodel","engine","drive","body","transmission","region","other"]}},"matchedApplicationIds":{"type":"array","items":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"algorithmVersion":{"type":"string","minLength":1,"maxLength":80},"catalogRevision":{"type":"string","minLength":1,"maxLength":160},"evaluatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contextHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["version","status","requiredFields","matchedApplicationIds","algorithmVersion","catalogRevision","evaluatedAt","contextHash"],"additionalProperties":false},"evidence":{"type":"object","properties":{"lineKey":{"type":"string","minLength":1,"maxLength":300},"sku":{"type":"string","minLength":1,"maxLength":100},"productId":{"type":"string","minLength":1,"maxLength":100},"productDomain":{"type":"string","enum":["aces","geometry"]},"productKind":{"type":"string","enum":["part","tire","wheel","wheel_tire_assembly"]},"vehicle":{"oneOf":[{"type":"object","properties":{"domain":{"type":"string","enum":["aces"]},"identity":{"type":"object","properties":{"namespace":{"type":"string","enum":["vcdb_base_vehicle"]},"id":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["namespace","id"],"additionalProperties":false},"scope":{"type":"string","enum":["exact_vehicle","all_trims"]},"context":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"garageVehicleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source":{"type":"string","enum":["ymm","vin","garage","progressive_prompt","staff"]},"year":{"type":"integer","minimum":1886,"maximum":2200},"makeId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"make":{"type":"string","minLength":1,"maxLength":120},"modelId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"model":{"type":"string","minLength":1,"maxLength":160},"baseVehicleId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"vehicleId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"submodelId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"submodel":{"type":"string","minLength":1,"maxLength":160},"engineConfigId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"engineBaseId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"engine":{"type":"string","minLength":1,"maxLength":200},"engineLiters":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":30},"driveTypeId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"drive":{"type":"string","minLength":1,"maxLength":120},"bodyConfigId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"body":{"type":"string","minLength":1,"maxLength":160},"transmissionId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"transmission":{"type":"string","minLength":1,"maxLength":200},"regionId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"otherSelections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"dimensionKey":{"type":"string","pattern":"^[a-z0-9_.:-]{1,64}$"},"optionId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"label":{"type":"string","minLength":1,"maxLength":160}},"required":["dimensionKey","optionId","label"],"additionalProperties":false}},"configurationState":{"type":"string","enum":["configuration_partial","configuration_resolved"]}},"required":["version","source","year","make","model","baseVehicleId","configurationState"],"additionalProperties":false}},"required":["domain","identity","scope","context"],"additionalProperties":false},{"type":"object","properties":{"domain":{"type":"string","enum":["geometry"]},"identity":{"type":"object","properties":{"namespace":{"type":"string","enum":["fitment_vehicle","vcdb_vehicle","vcdb_base_vehicle"]},"id":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["namespace","id"],"additionalProperties":false},"scope":{"type":"string","enum":["exact_vehicle","all_trims"]},"context":{"nullable":true,"type":"object","properties":{"version":{"type":"number","enum":[1]},"garageVehicleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source":{"type":"string","enum":["ymm","vin","garage","progressive_prompt","staff"]},"year":{"type":"integer","minimum":1886,"maximum":2200},"makeId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"make":{"type":"string","minLength":1,"maxLength":120},"modelId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"model":{"type":"string","minLength":1,"maxLength":160},"baseVehicleId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"vehicleId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"submodelId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"submodel":{"type":"string","minLength":1,"maxLength":160},"engineConfigId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"engineBaseId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"engine":{"type":"string","minLength":1,"maxLength":200},"engineLiters":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":30},"driveTypeId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"drive":{"type":"string","minLength":1,"maxLength":120},"bodyConfigId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"body":{"type":"string","minLength":1,"maxLength":160},"transmissionId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"transmission":{"type":"string","minLength":1,"maxLength":200},"regionId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"otherSelections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"dimensionKey":{"type":"string","pattern":"^[a-z0-9_.:-]{1,64}$"},"optionId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"label":{"type":"string","minLength":1,"maxLength":160}},"required":["dimensionKey","optionId","label"],"additionalProperties":false}},"configurationState":{"type":"string","enum":["configuration_partial","configuration_resolved"]}},"required":["version","source","year","make","model","baseVehicleId","configurationState"],"additionalProperties":false},"resolvedIdentity":{"type":"object","properties":{"request":{"type":"object","properties":{"namespace":{"type":"string","enum":["fitment_vehicle","vcdb_vehicle","vcdb_base_vehicle"]},"id":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["namespace","id"],"additionalProperties":false},"scope":{"type":"string","enum":["exact_vehicle","all_trims"]},"fitmentVehicleIds":{"type":"array","items":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"vcdbVehicleId":{"nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"vcdbBaseVehicleId":{"nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"year":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"make":{"nullable":true,"type":"string"},"model":{"nullable":true,"type":"string"},"submodel":{"nullable":true,"type":"string"}},"required":["request","scope","fitmentVehicleIds","vcdbVehicleId","vcdbBaseVehicleId","year","make","model","submodel"],"additionalProperties":false}},"required":["domain","identity","scope","context","resolvedIdentity"],"additionalProperties":false}]},"axlePosition":{"type":"string","enum":["front","rear","all","unspecified"]},"conditions":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_.:-]{1,64}$"},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}},"conditionsComplete":{"type":"boolean"}},"required":["lineKey","sku","productId","productDomain","productKind","vehicle","axlePosition","conditions","conditionsComplete"],"additionalProperties":false},"fitmentToken":{"type":"string","maxLength":12000,"pattern":"^v2\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$"}},"required":["decision","evidence","fitmentToken"],"additionalProperties":false},{"oneOf":[{"allOf":[{"type":"object","required":["evidence"],"properties":{"evidence":{"type":"object","required":["productDomain","productKind","vehicle"],"properties":{"productDomain":{"enum":["aces"]},"productKind":{"enum":["part"]},"vehicle":{"type":"object","required":["domain","identity","scope","context"],"properties":{"domain":{"enum":["aces"]},"scope":{"enum":["all_trims"]},"context":{"type":"object","allOf":[{"not":{"anyOf":[{"required":["vehicleId"]},{"required":["submodelId"]},{"required":["engineConfigId"]},{"required":["engineBaseId"]},{"required":["driveTypeId"]},{"required":["bodyConfigId"]},{"required":["transmissionId"]},{"required":["regionId"]}]}},{"properties":{"otherSelections":{"type":"array","maxItems":0}}}]},"identity":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["vcdb_base_vehicle"]}}}}}}}}},{"type":"object","required":["decision"],"properties":{"decision":{"type":"object","required":["status"],"not":{"required":["tier"]},"properties":{"status":{"enum":["confirmed_for_ymm","needs_configuration","not_fit","manual_review","unverified"]}}}}}]},{"allOf":[{"type":"object","required":["evidence"],"properties":{"evidence":{"type":"object","required":["productDomain","productKind","vehicle"],"properties":{"productDomain":{"enum":["aces"]},"productKind":{"enum":["part"]},"vehicle":{"type":"object","required":["domain","identity","scope","context"],"properties":{"domain":{"enum":["aces"]},"scope":{"enum":["exact_vehicle"]},"context":{"type":"object","anyOf":[{"required":["vehicleId"]},{"required":["submodelId"]},{"required":["engineConfigId"]},{"required":["engineBaseId"]},{"required":["driveTypeId"]},{"required":["bodyConfigId"]},{"required":["transmissionId"]},{"required":["regionId"]},{"required":["otherSelections"],"properties":{"otherSelections":{"type":"array","minItems":1}}}]},"identity":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["vcdb_base_vehicle"]}}}}}}}}},{"type":"object","required":["decision"],"properties":{"decision":{"type":"object","required":["status"],"not":{"required":["tier"]},"properties":{"status":{"enum":["confirmed_for_configuration","needs_configuration","not_fit","manual_review","unverified"]}}}}}]},{"allOf":[{"type":"object","required":["evidence"],"properties":{"evidence":{"type":"object","required":["productDomain","productKind","vehicle"],"properties":{"productDomain":{"enum":["geometry"]},"productKind":{"enum":["tire","wheel","wheel_tire_assembly"]},"vehicle":{"type":"object","required":["domain","identity","scope","resolvedIdentity"],"properties":{"domain":{"enum":["geometry"]},"scope":{"enum":["all_trims"]},"identity":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["vcdb_base_vehicle"]}}},"resolvedIdentity":{"type":"object","required":["request","scope"],"properties":{"scope":{"enum":["all_trims"]},"request":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["vcdb_base_vehicle"]}}}}}}}}}}},{"type":"object","required":["decision"],"properties":{"decision":{"type":"object","required":["status","tier"],"properties":{"status":{"enum":["confirmed_for_ymm"]},"tier":{"enum":["FactoryFit","VerifiedFit","StanceFit","ExtremeFit"]}}}}}]},{"allOf":[{"type":"object","required":["evidence"],"properties":{"evidence":{"type":"object","required":["productDomain","productKind","vehicle"],"properties":{"productDomain":{"enum":["geometry"]},"productKind":{"enum":["tire","wheel","wheel_tire_assembly"]},"vehicle":{"type":"object","required":["domain","identity","scope","resolvedIdentity"],"properties":{"domain":{"enum":["geometry"]},"scope":{"enum":["all_trims"]},"identity":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["vcdb_base_vehicle"]}}},"resolvedIdentity":{"type":"object","required":["request","scope"],"properties":{"scope":{"enum":["all_trims"]},"request":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["vcdb_base_vehicle"]}}}}}}}}}}},{"type":"object","required":["decision"],"properties":{"decision":{"type":"object","required":["status","tier"],"properties":{"status":{"enum":["not_fit"]},"tier":{"enum":["NoFit"]}}}}}]},{"allOf":[{"type":"object","required":["evidence"],"properties":{"evidence":{"type":"object","required":["productDomain","productKind","vehicle"],"properties":{"productDomain":{"enum":["geometry"]},"productKind":{"enum":["tire","wheel","wheel_tire_assembly"]},"vehicle":{"type":"object","required":["domain","identity","scope","resolvedIdentity"],"properties":{"domain":{"enum":["geometry"]},"scope":{"enum":["all_trims"]},"identity":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["vcdb_base_vehicle"]}}},"resolvedIdentity":{"type":"object","required":["request","scope"],"properties":{"scope":{"enum":["all_trims"]},"request":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["vcdb_base_vehicle"]}}}}}}}}}}},{"type":"object","required":["decision"],"properties":{"decision":{"type":"object","required":["status","tier"],"properties":{"status":{"enum":["unverified"]},"tier":{"enum":["Unverified"]}}}}}]},{"allOf":[{"type":"object","required":["evidence"],"properties":{"evidence":{"type":"object","required":["productDomain","productKind","vehicle"],"properties":{"productDomain":{"enum":["geometry"]},"productKind":{"enum":["tire","wheel","wheel_tire_assembly"]},"vehicle":{"type":"object","required":["domain","identity","scope","resolvedIdentity"],"properties":{"domain":{"enum":["geometry"]},"scope":{"enum":["exact_vehicle"]},"identity":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["fitment_vehicle","vcdb_vehicle"]}}},"resolvedIdentity":{"type":"object","required":["request","scope"],"properties":{"scope":{"enum":["exact_vehicle"]},"request":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["fitment_vehicle","vcdb_vehicle"]}}}}}}}}}}},{"type":"object","required":["decision"],"properties":{"decision":{"type":"object","required":["status","tier"],"properties":{"status":{"enum":["confirmed_for_configuration"]},"tier":{"enum":["FactoryFit","VerifiedFit","StanceFit","ExtremeFit"]}}}}}]},{"allOf":[{"type":"object","required":["evidence"],"properties":{"evidence":{"type":"object","required":["productDomain","productKind","vehicle"],"properties":{"productDomain":{"enum":["geometry"]},"productKind":{"enum":["tire","wheel","wheel_tire_assembly"]},"vehicle":{"type":"object","required":["domain","identity","scope","resolvedIdentity"],"properties":{"domain":{"enum":["geometry"]},"scope":{"enum":["exact_vehicle"]},"identity":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["fitment_vehicle","vcdb_vehicle"]}}},"resolvedIdentity":{"type":"object","required":["request","scope"],"properties":{"scope":{"enum":["exact_vehicle"]},"request":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["fitment_vehicle","vcdb_vehicle"]}}}}}}}}}}},{"type":"object","required":["decision"],"properties":{"decision":{"type":"object","required":["status","tier"],"properties":{"status":{"enum":["not_fit"]},"tier":{"enum":["NoFit"]}}}}}]},{"allOf":[{"type":"object","required":["evidence"],"properties":{"evidence":{"type":"object","required":["productDomain","productKind","vehicle"],"properties":{"productDomain":{"enum":["geometry"]},"productKind":{"enum":["tire","wheel","wheel_tire_assembly"]},"vehicle":{"type":"object","required":["domain","identity","scope","resolvedIdentity"],"properties":{"domain":{"enum":["geometry"]},"scope":{"enum":["exact_vehicle"]},"identity":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["fitment_vehicle","vcdb_vehicle"]}}},"resolvedIdentity":{"type":"object","required":["request","scope"],"properties":{"scope":{"enum":["exact_vehicle"]},"request":{"type":"object","required":["namespace"],"properties":{"namespace":{"enum":["fitment_vehicle","vcdb_vehicle"]}}}}}}}}}}},{"type":"object","required":["decision"],"properties":{"decision":{"type":"object","required":["status","tier"],"properties":{"status":{"enum":["unverified"]},"tier":{"enum":["Unverified"]}}}}}]}]}]}}}}},"requestBody":{"required":true,"description":"Immutable cart-line identity and canonical vehicle evidence","content":{"application/json":{"schema":{"allOf":[{"anyOf":[{"type":"object","properties":{"lineKey":{"type":"string","minLength":1,"maxLength":300},"sku":{"type":"string","minLength":1,"maxLength":100},"scope":{"type":"string","enum":["exact_vehicle","all_trims"]},"axlePosition":{"type":"string","enum":["front","rear","all","unspecified"]},"conditions":{"default":[],"type":"array","items":{"not":{}}},"vehicle":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"garageVehicleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source":{"type":"string","enum":["ymm","vin","garage","progressive_prompt","staff"]},"year":{"type":"integer","minimum":1886,"maximum":2200},"makeId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"make":{"type":"string","minLength":1,"maxLength":120},"modelId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"model":{"type":"string","minLength":1,"maxLength":160},"baseVehicleId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"vehicleId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"submodelId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"submodel":{"type":"string","minLength":1,"maxLength":160},"engineConfigId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"engineBaseId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"engine":{"type":"string","minLength":1,"maxLength":200},"engineLiters":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":30},"driveTypeId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"drive":{"type":"string","minLength":1,"maxLength":120},"bodyConfigId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"body":{"type":"string","minLength":1,"maxLength":160},"transmissionId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"transmission":{"type":"string","minLength":1,"maxLength":200},"regionId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"otherSelections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"dimensionKey":{"type":"string","pattern":"^[a-z0-9_.:-]{1,64}$"},"optionId":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"label":{"type":"string","minLength":1,"maxLength":160}},"required":["dimensionKey","optionId","label"],"additionalProperties":false}},"configurationState":{"type":"string","enum":["configuration_partial","configuration_resolved"]}},"required":["version","source","year","make","model","baseVehicleId","configurationState"],"additionalProperties":false},"vehicleIdentity":{"not":{}}},"required":["lineKey","sku","scope","axlePosition","conditions","vehicle"],"additionalProperties":false},{"type":"object","properties":{"lineKey":{"type":"string","minLength":1,"maxLength":300},"sku":{"type":"string","minLength":1,"maxLength":100},"scope":{"type":"string","enum":["all_trims"]},"axlePosition":{"type":"string","enum":["front","rear","all","unspecified"]},"conditions":{"default":[],"type":"array","items":{"not":{}}},"vehicle":{"not":{}},"vehicleIdentity":{"type":"object","properties":{"namespace":{"type":"string","enum":["vcdb_base_vehicle"]},"id":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["namespace","id"],"additionalProperties":false}},"required":["lineKey","sku","scope","axlePosition","conditions","vehicleIdentity"],"additionalProperties":false},{"type":"object","properties":{"lineKey":{"type":"string","minLength":1,"maxLength":300},"sku":{"type":"string","minLength":1,"maxLength":100},"scope":{"type":"string","enum":["exact_vehicle"]},"axlePosition":{"type":"string","enum":["front","rear","all","unspecified"]},"conditions":{"default":[],"type":"array","items":{"not":{}}},"vehicle":{"not":{}},"vehicleIdentity":{"type":"object","properties":{"namespace":{"type":"string","enum":["fitment_vehicle","vcdb_vehicle"]},"id":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["namespace","id"],"additionalProperties":false}},"required":["lineKey","sku","scope","axlePosition","conditions","vehicleIdentity"],"additionalProperties":false}]},{"oneOf":[{"type":"object","required":["vehicle","scope"],"properties":{"scope":{"enum":["all_trims"]},"vehicle":{"type":"object","allOf":[{"not":{"anyOf":[{"required":["vehicleId"]},{"required":["submodelId"]},{"required":["engineConfigId"]},{"required":["engineBaseId"]},{"required":["driveTypeId"]},{"required":["bodyConfigId"]},{"required":["transmissionId"]},{"required":["regionId"]}]}},{"properties":{"otherSelections":{"type":"array","maxItems":0}}}]}}},{"type":"object","required":["vehicle","scope"],"properties":{"scope":{"enum":["exact_vehicle"]},"vehicle":{"type":"object","anyOf":[{"required":["vehicleId"]},{"required":["submodelId"]},{"required":["engineConfigId"]},{"required":["engineBaseId"]},{"required":["driveTypeId"]},{"required":["bodyConfigId"]},{"required":["transmissionId"]},{"required":["regionId"]},{"required":["otherSelections"],"properties":{"otherSelections":{"type":"array","minItems":1}}}]}}},{"type":"object","required":["vehicleIdentity"]}]}]},"example":{"lineKey":"06f7f86c5d8dc1f96f97ac9c4ff5ea9f7e41d2209248f83291c7887d56f5ee26","sku":"BCZC283107","vehicle":{"version":1,"source":"ymm","year":2024,"make":"Toyota","model":"Camry","baseVehicleId":148891,"configurationState":"configuration_partial"},"scope":"all_trims","axlePosition":"unspecified","conditions":[]}}}}}},"/health":{"get":{"operationId":"health","summary":"Health Check","description":"Check API health status and version information.","tags":["health","status"],"responses":{"200":{"description":"API is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","degraded","unhealthy"]},"version":{"type":"string"},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["status","version","timestamp"],"additionalProperties":false}}}}}}},"/api/public/v1/seo/keyword-targets":{"get":{"operationId":"seo_keyword_targets","summary":"SEO Keyword Targets","description":"Keyword-to-page mapping so storefront templates can reuse the keywords a page is meant to rank for. Two modes: pass `url` (a storefront path) to get one object for that page, or pass `page_type` to get `{ targets: [...] }` for the best pages of that type. Served by the ERP (public, read-only, non-sensitive fields only) and reachable through the same-origin storefront /api/erp proxy (base URL: {site}/api/erp). Fail-soft: a page with no mapped keywords returns `primary_keyword: null`; an unseeded page type returns an empty `targets` array. Storefront code reads it through src/lib/api/seo-keywords.ts, which validates the response and returns null on any error.","tags":["seo","keywords","ranking","page-type"],"responses":{"200":{"description":"url mode: { url, locale, primary_keyword, secondary_keywords[], intent, page_type }. page_type mode: { page_type, locale, targets: [same item shape] }","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"locale":{"nullable":true,"type":"string"},"primary_keyword":{"nullable":true,"type":"string","minLength":1},"secondary_keywords":{"type":"array","items":{"type":"string","minLength":1}},"intent":{"nullable":true,"type":"string"},"page_type":{"nullable":true,"type":"string"}},"required":["url","locale","primary_keyword","secondary_keywords","intent","page_type"],"additionalProperties":false},{"type":"object","properties":{"page_type":{"type":"string"},"locale":{"nullable":true,"type":"string"},"targets":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"locale":{"nullable":true,"type":"string"},"primary_keyword":{"nullable":true,"type":"string","minLength":1},"secondary_keywords":{"type":"array","items":{"type":"string","minLength":1}},"intent":{"nullable":true,"type":"string"},"page_type":{"nullable":true,"type":"string"}},"required":["url","locale","primary_keyword","secondary_keywords","intent","page_type"],"additionalProperties":false}}},"required":["page_type","locale","targets"],"additionalProperties":false}]}}}},"400":{"description":"Missing or invalid parameters (neither url nor page_type, unknown page_type, malformed locale)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Temporarily unavailable. Callers must fail soft and fall back to existing copy.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"name":"url","in":"query","required":false,"description":"Storefront path, e.g. /en-ca/brands/bosch (host, query and fragment ignored). Provide url or page_type.","schema":{"type":"string","example":"/en-ca/brands/bosch"}},{"name":"locale","in":"query","required":false,"description":"BCP-47 locale filter, e.g. en-CA or fr-CA. Omit for all locales.","schema":{"type":"string","example":"en-CA"}},{"name":"page_type","in":"query","required":false,"description":"Return the best pages of this type instead of one page. Provide url or page_type.","schema":{"type":"string","example":"brand","enum":["home","pdp","category","vehicle","vehicle_category","brand","tire_size","wheel","blog","guide","tool","location","sale","other"]}},{"name":"limit","in":"query","required":false,"description":"Keywords per page (max 25)","schema":{"type":"number","example":10,"default":10}},{"name":"pages","in":"query","required":false,"description":"page_type mode only: maximum pages returned (max 100)","schema":{"type":"number","example":50,"default":50}}]},"servers":[{"url":"https://autrex.ca/api/erp"}]},"/tires/sets":{"get":{"operationId":"tire_sets","summary":"Staggered Tire Sets","description":"Tire models available in BOTH a front and a rear size, for staggered vehicles and shoppers (a set is the same brand and model in both sizes, 2 front and 2 rear). Each set carries both display rows, cart-line quantities, a display-only set price (`setPrice.display` is false when either half is unpriced or carries a cart-only promotion, and no total may then be shown), and 2 + 2 availability (`purchasableForSet`, `availabilityUnknown`, and the optional additive `notPurchasableReason`: `front_not_purchasable`, `rear_not_purchasable` or `both_not_purchasable` when a half has stock and a price but is not published for online sale; absent on ERP releases that predate it, and callers must tolerate unknown values). Served by the ERP (public, read-only) and reachable through the same-origin storefront /api/erp proxy (base URL: {site}/api/erp). Sizes are catalogue notation (245/35R19); equal sizes return 400. Callers must fail soft: an ERP release that predates the endpoint answers 404.","tags":["tires","staggered","sets","fitment"],"responses":{"200":{"description":"A page of sets with facets counted over sets and the number of models that exist in only one of the two sizes","content":{"application/json":{"schema":{"type":"object","properties":{"front":{"type":"object","properties":{"size":{"type":"string"}},"required":["size"],"additionalProperties":false},"rear":{"type":"object","properties":{"size":{"type":"string"}},"required":["size"],"additionalProperties":false},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"page":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"sets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"brand":{"type":"string"},"model":{"type":"string"},"front":{"type":"object","properties":{"sku":{"type":"string","minLength":1}},"required":["sku"],"additionalProperties":{}},"rear":{"type":"object","properties":{"sku":{"type":"string","minLength":1}},"required":["sku"],"additionalProperties":{}},"quantities":{"type":"object","properties":{"front":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"rear":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["front","rear"],"additionalProperties":false},"setPrice":{"type":"object","properties":{"amount":{"nullable":true,"type":"number"},"currency":{"type":"string"},"display":{"type":"boolean"}},"required":["amount","currency","display"],"additionalProperties":false},"availability":{"type":"object","properties":{"frontQuantity":{"nullable":true,"type":"number"},"rearQuantity":{"nullable":true,"type":"number"},"purchasableForSet":{"type":"boolean"},"availabilityUnknown":{"type":"boolean"},"notPurchasableReason":{"nullable":true,"type":"string","enum":["front_not_purchasable","rear_not_purchasable","both_not_purchasable"]}},"required":["frontQuantity","rearQuantity","purchasableForSet","availabilityUnknown"],"additionalProperties":false},"fit":{"type":"object","properties":{"front":{"nullable":true,"type":"string"},"rear":{"nullable":true,"type":"string"}},"required":["front","rear"],"additionalProperties":false}},"required":["key","brand","model","front","rear","quantities","setPrice","availability"],"additionalProperties":false}},"facets":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"brand":{"type":"string"},"count":{"type":"number"}},"required":["brand","count"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"season":{"type":"string"},"count":{"type":"number"}},"required":["season","count"],"additionalProperties":false}}},"required":["brands","seasons"],"additionalProperties":false},"unpairedFrontModels":{"type":"integer","minimum":0,"maximum":9007199254740991},"unpairedRearModels":{"type":"integer","minimum":0,"maximum":9007199254740991},"meta":{"type":"object","properties":{"droppedForMissingRow":{"type":"number"},"vehicle_graded":{"type":"boolean"}},"additionalProperties":{}}},"required":["front","rear","total","page","limit","sets","facets","unpairedFrontModels","unpairedRearModels"],"additionalProperties":false}}}},"400":{"description":"Missing or unrecognised size, or front equals rear","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"retry_after":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["error","message"],"additionalProperties":false}}}}},"parameters":[{"name":"front","in":"query","required":true,"description":"Front size, e.g. 245/35R19","schema":{"type":"string","example":"245/35R19"}},{"name":"rear","in":"query","required":true,"description":"Rear size; must differ from front","schema":{"type":"string","example":"275/35R19"}},{"name":"brand","in":"query","required":false,"description":"Brand id or name; comma list or repeated","schema":{"type":"string","example":"Michelin"}},{"name":"season","in":"query","required":false,"description":"Season, e.g. summer, winter, all-season","schema":{"type":"string","example":"summer"}},{"name":"price_min","in":"query","required":false,"description":"Minimum set price (CAD)","schema":{"type":"number","example":400}},{"name":"price_max","in":"query","required":false,"description":"Maximum set price (CAD)","schema":{"type":"number","example":1500}},{"name":"sort","in":"query","required":false,"description":"Sort order; purchasable sets always come first","schema":{"type":"string","example":"availability","default":"availability","enum":["availability","price_asc","price_desc","brand"]}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"number","example":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Sets per page (max 48)","schema":{"type":"number","example":24,"default":24}}]},"servers":[{"url":"https://autrex.ca/api/erp"}]},"/api/public/v1/locations":{"get":{"operationId":"public_locations","summary":"Store Locations","description":"Public Autrex store locations with address, geo coordinates, phone, Google identifiers, services (for example in-store pickup) and weekly opening hours shaped for schema.org OpeningHoursSpecification. Served by the ERP (public, read-only, non-sensitive fields only) and reachable through the same-origin storefront /api/erp proxy (base URL: {site}/api/erp). `opening_hours` is null when no schedule is linked (hours are never guessed) and `geo` is null when no position is known. The storefront /locations/{slug} pages and their AutoPartsStore JSON-LD are built from this endpoint through src/lib/api/locations.ts, which validates the response and falls back to an identity snapshot carrying the Google Business Profile hours on any error or missing schedule; Cornwall (coming soon) is never published.","tags":["seo","locations","stores","hours","pickup"],"responses":{"200":{"description":"{ locations: [{ slug, name, description, address{street_address,address_line_2,locality,region,postal_code,country}, geo{latitude,longitude}|null, phone, google_place_id, google_store_code, services[], opening_hours{timezone,days[],specification[]}|null }], generated_at }","content":{"application/json":{"schema":{"type":"object","properties":{"locations":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"},"address":{"type":"object","properties":{"street_address":{"nullable":true,"type":"string"},"address_line_2":{"nullable":true,"type":"string"},"locality":{"nullable":true,"type":"string"},"region":{"nullable":true,"type":"string"},"postal_code":{"nullable":true,"type":"string"},"country":{"type":"string","minLength":1}},"required":["street_address","address_line_2","locality","region","postal_code","country"],"additionalProperties":false},"geo":{"nullable":true,"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["latitude","longitude"],"additionalProperties":false},"phone":{"nullable":true,"type":"string"},"google_place_id":{"nullable":true,"type":"string"},"google_store_code":{"nullable":true,"type":"string"},"services":{"type":"array","items":{"type":"string"}},"opening_hours":{"nullable":true,"type":"object","properties":{"timezone":{"type":"string","minLength":1},"days":{"type":"array","items":{"type":"object","properties":{"day_of_week":{"type":"string","minLength":1},"is_open":{"type":"boolean"},"opens":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"closes":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["day_of_week","is_open","opens","closes"],"additionalProperties":false}},"specification":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"opens":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"closes":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["dayOfWeek","opens","closes"],"additionalProperties":false}}},"required":["timezone","days","specification"],"additionalProperties":false}},"required":["slug","name","description","address","geo","phone","google_place_id","google_store_code","services","opening_hours"],"additionalProperties":false}},"generated_at":{"type":"string"}},"required":["locations","generated_at"],"additionalProperties":false}}}},"503":{"description":"Temporarily unavailable. Callers must fail soft and fall back to the identity snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}},"servers":[{"url":"https://autrex.ca/api/erp"}]},"/legacy/{site}/{path}":{"get":{"operationId":"legacy_redirect","summary":"Legacy Store URL Redirect","description":"Resolves an old capitalautoparts.ca URL (BigCommerce-era /wheels, /tires, Shopify /collections and Odoo /shop paths) to its current Autrex page with one permanent redirect. Consumed by the Cloudflare Worker in front of capitalautoparts.ca, which forwards the original path as /legacy/capitalautoparts/{path} (or /legacy/capitalautoparts-erp/{path} for erp.capitalautoparts.ca). The Location is a product page only when a single live product matches size, brand, model and rating; otherwise a brand page, then a size or category page. It never redirects to the homepage. Brand/model collections go directly to an existing indexable wheel model; absent or thin models retain the brand page. The response carries an X-Legacy-Match header (exact, fuzzy-unique, model, brand, category, passthrough). Product paths pass through to the localized PDP, whose separate legacy identity fallback may issue a 308 to its canonical live slug. Not for browsers or crawlers to discover: these URLs are deliberately not in the sitemap.","tags":["seo","redirect","legacy","capitalautoparts"],"responses":{"301":{"description":"Permanent redirect to the Autrex page; see the Location and X-Legacy-Match headers (no body)","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number","enum":[301]},"headers":{"type":"object","properties":{"location":{"type":"string","format":"uri"},"x-legacy-match":{"type":"string","enum":["exact","fuzzy-unique","model","brand","category","passthrough"]}},"required":["location","x-legacy-match"],"additionalProperties":false}},"required":["status","headers"],"additionalProperties":false}}}},"404":{"description":"Unknown legacy URL shape (plain text body, cached 5 minutes, noindex)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Catalogue lookup unavailable (no-store, Retry-After 30); callers must retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"name":"site","in":"path","required":true,"description":"\"capitalautoparts\" for capitalautoparts.ca, \"capitalautoparts-erp\" for erp.capitalautoparts.ca","schema":{"type":"string","example":"capitalautoparts"}},{"name":"path","in":"path","required":true,"description":"The original URL path, slashes preserved (max 512 characters)","schema":{"type":"string","example":"wheels/art-replica-163-17x7-0-45-5x114-3-gloss-black-machined-face"}}]},"servers":[{"url":"https://autrex.ca"}]},"/api/img/i.jpg":{"get":{"operationId":"jpeg_share_image","summary":"JPEG Product Share Image","description":"Allowlisted, SSRF-protected JPEG image optimizer. Optional share canvas requires exactly w=1200, h=630 and fit=contain together; other height/fit combinations return 400. Products are centred without enlargement on the design system sand background. Versioned source URLs cache immutably for one year; unversioned sources cache at the edge for seven days. No Accept negotiation.","tags":["seo","images","sharing"],"responses":{"200":{"description":"JPEG bytes (1200×630 for the share canvas)","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid URL or unsupported share canvas","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Host or resolved address not allowed","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Undecodable source image","content":{"text/plain":{"schema":{"type":"string"}}}},"503":{"description":"Resize capacity busy (retry after five seconds), or share canvas background temporarily unavailable","content":{"text/plain":{"schema":{"type":"string"}}}}},"parameters":[{"name":"url","in":"query","required":true,"description":"Absolute public HTTP(S) source image on an allowed host. Preserve its v content version.","schema":{"type":"string","example":"https://assets.autrex.ca/catalog/product.png?v=abc123"}},{"name":"w","in":"query","required":false,"description":"Allowed image width; the share canvas requires exactly 1200.","schema":{"type":"number","example":1200}},{"name":"h","in":"query","required":false,"description":"Share canvas height. Only 630 with w=1200 and fit=contain is supported.","schema":{"type":"number","example":630}},{"name":"fit","in":"query","required":false,"description":"Only contain with w=1200 and h=630; never crops or enlarges the product.","schema":{"type":"string","example":"contain","enum":["contain"]}},{"name":"q","in":"query","required":false,"description":"JPEG quality, clamped to 1–100.","schema":{"type":"number","example":80,"default":80}}]},"servers":[{"url":"https://autrex.ca"}]}},"components":{"securitySchemes":{}},"x-rate-limit":{"requestsPerMinute":60,"requestsPerDay":10000}}