{"openapi": "3.1.0", "info": {"title": "Lupra Vehicle API", "version": "1.0.0", "description": "Subscriber access to published vehicles, full available specifications and equipment, costs, photos and Swiss comparisons. Read-only. No guaranteed sale prices or profit."}, "servers": [{"url": "https://lupra.ch"}], "paths": {"/api/v1/vehicles/": {"get": {"summary": "Search published vehicles", "security": [{"ApiKey": []}, {"OAuth": ["vehicles:read"]}], "parameters": [{"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 120}}, {"name": "make", "in": "query", "schema": {"type": "string", "maxLength": 120}}, {"name": "fuel", "in": "query", "schema": {"type": "string", "maxLength": 120}}, {"name": "body", "in": "query", "schema": {"type": "string", "maxLength": 120}}, {"name": "transmission", "in": "query", "schema": {"type": "string", "maxLength": 120}}, {"name": "drive", "in": "query", "schema": {"type": "string", "maxLength": 120}}, {"name": "year_from", "in": "query", "schema": {"type": "integer", "minimum": 1900, "maximum": 2100}}, {"name": "year_to", "in": "query", "schema": {"type": "integer", "minimum": 1900, "maximum": 2100}}, {"name": "mileage_max", "in": "query", "schema": {"type": "integer", "minimum": 0}}, {"name": "price_max", "in": "query", "schema": {"type": "integer", "minimum": 0}}, {"name": "power_min", "in": "query", "schema": {"type": "integer", "minimum": 0}}, {"name": "margin_min", "in": "query", "schema": {"type": "integer", "minimum": 0}}, {"name": "margin_max", "in": "query", "schema": {"type": "integer", "minimum": 0}}, {"name": "exclude_new", "in": "query", "schema": {"type": "boolean"}}, {"name": "exclude_co2", "in": "query", "schema": {"type": "boolean"}}, {"name": "sort", "in": "query", "schema": {"type": "string", "maxLength": 120}}, {"name": "model", "in": "query", "schema": {"type": "string", "maxLength": 120}}, {"name": "trim", "in": "query", "schema": {"type": "string", "maxLength": 120}}, {"name": "mileage_min", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 5000000}}, {"name": "power_max", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 5000}}, {"name": "price_min", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 100000000}}, {"name": "language", "in": "query", "schema": {"type": "string", "enum": ["de", "fr", "it"], "default": "de"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 50}}, {"name": "offset", "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 100000}}, {"name": "equipment", "in": "query", "schema": {"type": "array", "maxItems": 12, "items": {"type": "string", "minLength": 1, "maxLength": 120}, "description": "All terms must match vehicle equipment or description; absent or unknown equipment is not guaranteed."}}], "responses": {"200": {"description": "Available customer vehicle data. Unknown facts are null; prices use exact decimal strings.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VehicleSearch"}}}}, "401": {"description": "Missing, expired, invalid or revoked bearer credential."}, "403": {"description": "Subscription is inactive."}, "404": {"description": "Vehicle is not published or does not exist."}, "429": {"description": "Rate limit. Retry-After gives waiting time in seconds."}}}, "post": {"summary": "Search using JSON filters", "security": [{"ApiKey": []}, {"OAuth": ["vehicles:read"]}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"q": {"type": "string", "maxLength": 120}, "make": {"type": "string", "maxLength": 120}, "fuel": {"type": "string", "maxLength": 120}, "body": {"type": "string", "maxLength": 120}, "transmission": {"type": "string", "maxLength": 120}, "drive": {"type": "string", "maxLength": 120}, "year_from": {"type": "integer", "minimum": 1900, "maximum": 2100}, "year_to": {"type": "integer", "minimum": 1900, "maximum": 2100}, "mileage_max": {"type": "integer", "minimum": 0}, "price_max": {"type": "integer", "minimum": 0}, "power_min": {"type": "integer", "minimum": 0}, "margin_min": {"type": "integer", "minimum": 0}, "margin_max": {"type": "integer", "minimum": 0}, "exclude_new": {"type": "boolean"}, "exclude_co2": {"type": "boolean"}, "sort": {"type": "string", "maxLength": 120}, "model": {"type": "string", "maxLength": 120}, "trim": {"type": "string", "maxLength": 120}, "mileage_min": {"type": "integer", "minimum": 0, "maximum": 5000000}, "power_max": {"type": "integer", "minimum": 0, "maximum": 5000}, "price_min": {"type": "integer", "minimum": 0, "maximum": 100000000}, "language": {"type": "string", "enum": ["de", "fr", "it"], "default": "de"}, "limit": {"type": "integer", "minimum": 1, "maximum": 50}, "offset": {"type": "integer", "minimum": 0, "maximum": 100000}, "equipment": {"type": "array", "maxItems": 12, "items": {"type": "string", "minLength": 1, "maxLength": 120}, "description": "All terms must match vehicle equipment or description; absent or unknown equipment is not guaranteed."}}, "additionalProperties": false}}}}, "responses": {"200": {"description": "Available customer vehicle data. Unknown facts are null; prices use exact decimal strings.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VehicleSearch"}}}}, "401": {"description": "Missing, expired, invalid or revoked bearer credential."}, "403": {"description": "Subscription is inactive."}, "404": {"description": "Vehicle is not published or does not exist."}, "429": {"description": "Rate limit. Retry-After gives waiting time in seconds."}}}}, "/api/v1/vehicles/{reference}/": {"get": {"summary": "Complete available customer vehicle record", "security": [{"ApiKey": []}, {"OAuth": ["vehicles:read"]}], "parameters": [{"name": "reference", "in": "path", "required": true, "schema": {"type": "string"}, "description": "LU reference (e.g. LU005342) or numeric ID."}, {"name": "language", "in": "query", "schema": {"type": "string", "enum": ["de", "fr", "it"]}}], "responses": {"200": {"description": "Available customer vehicle data. Unknown facts are null; prices use exact decimal strings.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VehicleDetail"}}}}, "401": {"description": "Missing, expired, invalid or revoked bearer credential."}, "403": {"description": "Subscription is inactive."}, "404": {"description": "Vehicle is not published or does not exist."}, "429": {"description": "Rate limit. Retry-After gives waiting time in seconds."}}}}, "/api/v1/vehicles/{reference}/references/": {"get": {"summary": "All Swiss references, with pagination", "security": [{"ApiKey": []}, {"OAuth": ["vehicles:read"]}], "parameters": [{"name": "reference", "in": "path", "required": true, "schema": {"type": "string"}, "description": "LU reference (e.g. LU005342) or numeric ID."}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}, {"name": "offset", "in": "query", "schema": {"type": "integer", "minimum": 0}}], "responses": {"200": {"description": "Available customer vehicle data. Unknown facts are null; prices use exact decimal strings.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SwissReferences"}}}}, "401": {"description": "Missing, expired, invalid or revoked bearer credential."}, "403": {"description": "Subscription is inactive."}, "404": {"description": "Vehicle is not published or does not exist."}, "429": {"description": "Rate limit. Retry-After gives waiting time in seconds."}}}}, "/api/v1/vehicles/{reference}/pdf/": {"get": {"summary": "Generate neutral customer PDF on demand (3 per ten minutes)", "security": [{"ApiKey": []}, {"OAuth": ["vehicles:read"]}], "parameters": [{"name": "reference", "in": "path", "required": true, "schema": {"type": "string"}, "description": "LU reference (e.g. LU005342) or numeric ID."}], "responses": {"200": {"description": "Available customer vehicle data. Unknown facts are null; prices use exact decimal strings."}, "401": {"description": "Missing, expired, invalid or revoked bearer credential."}, "403": {"description": "Subscription is inactive."}, "404": {"description": "Vehicle is not published or does not exist."}, "429": {"description": "Rate limit. Retry-After gives waiting time in seconds."}}}}, "/api/v1/vehicles/{reference}/photos/{index}/": {"get": {"summary": "Authenticated vehicle photo", "security": [{"ApiKey": []}, {"OAuth": ["vehicles:read"]}], "parameters": [{"name": "reference", "in": "path", "required": true, "schema": {"type": "string"}, "description": "LU reference (e.g. LU005342) or numeric ID."}, {"name": "index", "in": "path", "required": true, "schema": {"type": "integer", "minimum": 0, "maximum": 59}}], "responses": {"200": {"description": "Available customer vehicle data. Unknown facts are null; prices use exact decimal strings."}, "401": {"description": "Missing, expired, invalid or revoked bearer credential."}, "403": {"description": "Subscription is inactive."}, "404": {"description": "Vehicle is not published or does not exist."}, "429": {"description": "Rate limit. Retry-After gives waiting time in seconds."}}}}, "/api/v1/account/": {"get": {"summary": "Current garage and entitlement expiry", "security": [{"ApiKey": []}, {"OAuth": ["vehicles:read"]}], "parameters": [], "responses": {"200": {"description": "Available customer vehicle data. Unknown facts are null; prices use exact decimal strings."}, "401": {"description": "Missing, expired, invalid or revoked bearer credential."}, "403": {"description": "Subscription is inactive."}, "404": {"description": "Vehicle is not published or does not exist."}, "429": {"description": "Rate limit. Retry-After gives waiting time in seconds."}}}}, "/api/v1/filters/": {"get": {"summary": "Accepted filter values, units, limits and search schema", "security": [{"ApiKey": []}, {"OAuth": ["vehicles:read"]}], "parameters": [], "responses": {"200": {"description": "Available customer vehicle data. Unknown facts are null; prices use exact decimal strings."}, "401": {"description": "Missing, expired, invalid or revoked bearer credential."}, "403": {"description": "Subscription is inactive."}, "404": {"description": "Vehicle is not published or does not exist."}, "429": {"description": "Rate limit. Retry-After gives waiting time in seconds."}}}}}, "components": {"schemas": {"Money": {"type": "object", "required": ["amount", "currency"], "properties": {"amount": {"type": "string", "pattern": "^-?[0-9]+\\.[0-9]{2}$"}, "currency": {"type": "string", "enum": ["CHF", "EUR"]}}}, "VehicleSummary": {"type": "object", "required": ["id", "reference", "title", "url", "purchase_price", "availability"], "properties": {"title": {"type": ["string", "null"]}, "make": {"type": ["string", "null"]}, "url": {"type": ["string", "null"]}, "first_registration": {"type": ["string", "null"]}, "fuel": {"type": ["string", "null"]}, "transmission": {"type": ["string", "null"]}, "condition": {"type": ["string", "null"]}, "location": {"type": ["string", "null"]}, "references_checked_at": {"type": ["string", "null"]}, "photo_url": {"type": ["string", "null"]}, "details_url": {"type": ["string", "null"]}, "year": {"type": ["number", "null"]}, "mileage_km": {"type": ["number", "null"]}, "power_ps": {"type": ["number", "null"]}, "purchase_price": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "landed_price_estimate": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "swiss_average": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "margin_estimate": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "id": {"type": "integer"}, "reference": {"type": "string", "pattern": "^LU[0-9]+$"}, "availability": {"type": "string", "enum": ["published"]}, "updated_at": {"type": "string", "format": "date-time"}, "swiss_reference_count": {"type": "integer", "minimum": 0}}}, "VehicleDetail": {"allOf": [{"$ref": "#/components/schemas/VehicleSummary"}, {"type": "object", "properties": {"model": {"type": ["string", "null"]}, "trim": {"type": ["string", "null"]}, "body": {"type": ["string", "null"]}, "drive": {"type": ["string", "null"]}, "language": {"type": ["string", "null"]}, "description": {"type": ["string", "null"]}, "pdf_url": {"type": ["string", "null"]}, "pdf_browser_url": {"type": ["string", "null"]}, "references_url": {"type": ["string", "null"]}, "exterior_colour": {"type": ["string", "null"]}, "interior_colour": {"type": ["string", "null"]}, "upholstery": {"type": ["string", "null"]}, "power_kw": {"type": ["number", "null"]}, "engine_capacity_cc": {"type": ["number", "null"]}, "cylinders": {"type": ["number", "null"]}, "seats": {"type": ["number", "null"]}, "doors": {"type": ["number", "null"]}, "kerb_weight_kg": {"type": ["number", "null"]}, "gross_weight_kg": {"type": ["number", "null"]}, "towing_capacity_kg": {"type": ["number", "null"]}, "battery_capacity_kwh": {"type": ["number", "null"]}, "electric_range_km": {"type": ["number", "null"]}, "specifications": {"type": "array", "items": {"type": "object", "properties": {"label": {"type": ["string", "null"]}, "value": {"type": ["string", "null"]}}}}, "equipment": {"type": "array", "items": {"type": "object", "properties": {"category": {"type": ["string", "null"]}, "items": {"type": "array", "items": {"type": "object", "properties": {"label": {"type": ["string", "null"]}, "value": {"type": ["string", "null"]}, "present": {"type": "boolean"}}}}}}}, "equipment_notes": {"type": "array", "items": {"type": ["string", "null"]}}, "photos": {"type": "array", "items": {"type": "object", "properties": {"index": {"type": "integer"}, "url": {"type": "string"}}}}, "energy": {"type": "object", "properties": {"available": {"type": "boolean"}, "category": {"type": ["string", "null"]}, "rows": {"type": "array", "items": {"type": "object", "properties": {"label": {"type": ["string", "null"]}, "value": {"type": ["string", "null"]}}}}}}, "co2_import": {"type": ["object", "null"], "properties": {"kind": {"type": ["string", "null"]}, "title": {"type": ["string", "null"]}, "reason": {"type": ["string", "null"]}}}, "costs": {"type": "object", "properties": {"purchase_chf": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "automobile_tax": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "import_vat": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "landed_estimate": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "exchange_rate": {"type": ["string", "null"]}, "exchange_rate_date": {"type": ["string", "null"]}, "excluded_costs": {"type": "array", "items": {"type": "string"}}, "notice": {"type": ["string", "null"]}}}, "swiss_references": {"$ref": "#/components/schemas/SwissReferences"}, "options": {"description": "Additional supplied vehicle equipment. Structure follows the available customer information."}, "features": {"description": "Additional supplied vehicle equipment. Structure follows the available customer information."}, "equipment_groups": {"description": "Additional supplied vehicle equipment. Structure follows the available customer information."}}}]}, "SwissReference": {"type": "object", "properties": {"id": {"type": ["string", "null"]}, "title": {"type": ["string", "null"]}, "url": {"type": ["string", "null"]}, "first_registration": {"type": ["string", "null"]}, "transmission": {"type": ["string", "null"]}, "fuel": {"type": ["string", "null"]}, "body": {"type": ["string", "null"]}, "trim": {"type": ["string", "null"]}, "mileage_km": {"type": ["number", "null"]}, "power_ps": {"type": ["number", "null"]}, "price": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}}}, "SwissReferences": {"type": "object", "properties": {"average": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "minimum": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "maximum": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "average_count": {"type": "integer"}, "total": {"type": "integer"}, "limit": {"type": "integer"}, "offset": {"type": "integer"}, "next_offset": {"type": ["integer", "null"]}, "checked_at": {"type": ["string", "null"]}, "basis": {"type": ["string", "null"]}, "results": {"type": "array", "items": {"$ref": "#/components/schemas/SwissReference"}}}}, "VehicleSearch": {"type": "object", "required": ["results", "total", "limit", "offset", "next_offset"], "properties": {"results": {"type": "array", "items": {"$ref": "#/components/schemas/VehicleSummary"}}, "total": {"type": "integer"}, "limit": {"type": "integer"}, "offset": {"type": "integer"}, "next_offset": {"type": ["integer", "null"]}, "language": {"type": ["string", "null"]}, "notice": {"type": ["string", "null"]}}}}, "securitySchemes": {"ApiKey": {"type": "http", "scheme": "bearer", "description": "Create a 90-day revocable key in Mein Konto \u2192 API & MCP."}, "OAuth": {"type": "oauth2", "flows": {"authorizationCode": {"authorizationUrl": "https://lupra.ch/oauth/authorize/", "tokenUrl": "https://lupra.ch/oauth/token/", "scopes": {"vehicles:read": "Read published customer vehicle data"}}}}}}}