{"openapi":"3.1.1","info":{"title":"Represent Motors public inventory","version":"1.0.0","description":"Anonymous read-only public inventory. No purchasing, reservations, customer data or form writes."},"servers":[{"url":"https://representmotors.com"}],"paths":{"/api/v1/inventory":{"get":{"operationId":"searchRepresentInventory","summary":"Search public available or sold inventory","parameters":[{"in":"header","name":"API-Version","required":false,"schema":{"type":"string","enum":["1"]}},{"in":"query","name":"q","schema":{"type":"string","maxLength":120}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"in":"query","name":"status","schema":{"type":"string","enum":["available","sold"],"default":"available"}},{"in":"query","name":"cursor","schema":{"type":"string","maxLength":1024},"description":"Opaque version-1 cursor from page.next; bound to original q/status."}],"responses":{"200":{"description":"Public inventory with canonical next-page link.","content":{"application/json":{"schema":{"type":"object","required":["version","data","page"],"properties":{"version":{"const":"1"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Vehicle"}},"page":{"type":"object","required":["limit","total","hasMore","next","nextCursor"],"properties":{"limit":{"type":"integer"},"total":{"type":"integer"},"hasMore":{"type":"boolean"},"next":{"type":["string","null"]},"nextCursor":{"type":["string","null"]}}}}}}}},"400":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}},"404":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}},"405":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}},"429":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}},"503":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}}}},"head":{"summary":"Same search status/headers as GET, without a body","responses":{"200":{"description":"Search headers"},"400":{"description":"Same typed error status and headers as GET, without a body."},"404":{"description":"Same typed error status and headers as GET, without a body."},"405":{"description":"Same typed error status and headers as GET, without a body."},"429":{"description":"Same typed error status and headers as GET, without a body."},"503":{"description":"Same typed error status and headers as GET, without a body."}}}},"/api/v1/inventory/{slug}":{"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,119}$"}}],"get":{"operationId":"getRepresentVehicle","summary":"Get a public vehicle detail","parameters":[{"in":"header","name":"API-Version","required":false,"schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Published public vehicle detail.","content":{"application/json":{"schema":{"type":"object","required":["version","data"],"properties":{"version":{"const":"1"},"data":{"type":"object","additionalProperties":false,"required":["slug","name","url","stockNumber","year","make","model","trim","status","price","imageUrl","odometerKm","description","specifications"],"properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,119}$"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"stockNumber":{"type":["string","null"]},"year":{"type":"integer"},"make":{"type":"string"},"model":{"type":"string"},"trim":{"type":["string","null"]},"status":{"type":"string","enum":["published","sale_pending","sold"]},"price":{"type":"object","additionalProperties":false,"required":["amount","currency"],"properties":{"amount":{"type":["string","null"],"pattern":"^[0-9]+\\.[0-9]{2}$"},"currency":{"const":"CAD"}}},"imageUrl":{"type":["string","null"]},"odometerKm":{"type":["number","null"]},"description":{"type":["string","null"]},"specifications":{"type":"object","additionalProperties":{"type":["string","number","null"]}}}}}}}}},"400":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}},"404":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}},"405":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}},"429":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}},"503":{"description":"Typed error; Retry-After is supplied for 429 and 503.","content":{"application/json":{"schema":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}}}},"head":{"summary":"Same detail status/headers as GET, without a body","responses":{"200":{"description":"Detail headers"},"400":{"description":"Same typed error status and headers as GET, without a body."},"404":{"description":"Same typed error status and headers as GET, without a body."},"405":{"description":"Same typed error status and headers as GET, without a body."},"429":{"description":"Same typed error status and headers as GET, without a body."},"503":{"description":"Same typed error status and headers as GET, without a body."}}}}},"components":{"schemas":{"Vehicle":{"type":"object","additionalProperties":false,"required":["slug","name","url","stockNumber","year","make","model","trim","status","price","imageUrl","odometerKm"],"properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,119}$"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"stockNumber":{"type":["string","null"]},"year":{"type":"integer"},"make":{"type":"string"},"model":{"type":"string"},"trim":{"type":["string","null"]},"status":{"type":"string","enum":["published","sale_pending","sold"]},"price":{"type":"object","additionalProperties":false,"required":["amount","currency"],"properties":{"amount":{"type":["string","null"],"pattern":"^[0-9]+\\.[0-9]{2}$"},"currency":{"const":"CAD"}}},"imageUrl":{"type":["string","null"]},"odometerKm":{"type":["number","null"]}}},"Error":{"type":"object","required":["version","error"],"properties":{"version":{"const":"1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_query","unsupported_version","not_found","method_not_allowed","rate_limited","upstream_unavailable"]},"message":{"type":"string"}}}}}}}}