{"openapi":"3.1.0","info":{"title":"Wheewise Site API","version":"1.0.0","description":"Backend for a dealer's own private website: the dealer's live vehicles, and enquiries and test-drive requests that arrive in the dealer app. Send your site key (from the dealer app, Settings → AI assistant access) in the X-Wheewise-Site-Key header. A browser may only call it from a website address the dealer has allowed; a server may call it without an Origin header. The key is safe to put in front-end code."},"servers":[{"url":"https://dealer.wheewise.com/api/site/v1"}],"security":[{"siteKey":[]}],"components":{"securitySchemes":{"siteKey":{"type":"apiKey","in":"header","name":"X-Wheewise-Site-Key"}}},"paths":{"/shop":{"get":{"operationId":"getShop","summary":"The shop's public details (name, address, bio, hours, logo, gallery, number of live vehicles).","responses":{"200":{"description":"The shop"},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/vehicles":{"get":{"operationId":"listVehicles","summary":"The shop's live vehicles. Only vehicles the dealer has published appear.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search make, model or variant."},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"make","in":"query","schema":{"type":"string"}},{"name":"fuel","in":"query","schema":{"type":"string"}},{"name":"min_price","in":"query","schema":{"type":"number"}},{"name":"max_price","in":"query","schema":{"type":"number"}},{"name":"min_year","in":"query","schema":{"type":"integer"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["newest","price_asc","price_desc","year_desc"],"default":"newest"}}],"responses":{"200":{"description":"A page of vehicles","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"vehicles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"url":{"type":"string","description":"The vehicle's page on wheewise.com."},"category":{"type":"string","description":"CAR, BIKE, SCOOTER, COMMERCIAL ..."},"make":{"type":"string"},"model":{"type":"string"},"variant":{"type":["string","null"]},"year":{"type":"integer"},"fuel_type":{"type":"string","description":"PETROL, DIESEL, CNG, ELECTRIC, HYBRID"},"transmission":{"type":["string","null"]},"odometer_km":{"type":"integer"},"asking_price":{"type":"number","description":"Rupees."},"city":{"type":"string"},"description":{"type":["string","null"]},"photo_urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Public image addresses; the first is the cover."},"finance_available":{"type":"boolean","description":"The dealer offers finance on this vehicle. Show an EMI estimate only when true."},"color":{"type":["string","null"]},"body_type":{"type":["string","null"]},"seating_capacity":{"type":["integer","null"]},"cubic_capacity_cc":{"type":["integer","null"]},"horsepower_bhp":{"type":["number","null"]},"insurance_valid_months":{"type":["integer","null"]},"puc_valid_months":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/vehicles/{id}":{"get":{"operationId":"getVehicle","summary":"One live vehicle, by id or slug.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The vehicle","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"url":{"type":"string","description":"The vehicle's page on wheewise.com."},"category":{"type":"string","description":"CAR, BIKE, SCOOTER, COMMERCIAL ..."},"make":{"type":"string"},"model":{"type":"string"},"variant":{"type":["string","null"]},"year":{"type":"integer"},"fuel_type":{"type":"string","description":"PETROL, DIESEL, CNG, ELECTRIC, HYBRID"},"transmission":{"type":["string","null"]},"odometer_km":{"type":"integer"},"asking_price":{"type":"number","description":"Rupees."},"city":{"type":"string"},"description":{"type":["string","null"]},"photo_urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Public image addresses; the first is the cover."},"finance_available":{"type":"boolean","description":"The dealer offers finance on this vehicle. Show an EMI estimate only when true."},"color":{"type":["string","null"]},"body_type":{"type":["string","null"]},"seating_capacity":{"type":["integer","null"]},"cubic_capacity_cc":{"type":["integer","null"]},"horsepower_bhp":{"type":["number","null"]},"insurance_valid_months":{"type":["integer","null"]},"puc_valid_months":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/leads":{"post":{"operationId":"createLead","summary":"Send an enquiry or a test-drive request to the dealer. It appears under Leads in the dealer app and the dealer is notified.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","phone","email"],"properties":{"name":{"type":"string","maxLength":100},"phone":{"type":"string","description":"Mobile number, 8-20 digits, may start with +."},"email":{"type":"string","format":"email"},"message":{"type":"string","maxLength":500},"vehicle_id":{"type":"string","format":"uuid","description":"A vehicle id from /vehicles. Required for TEST_DRIVE."},"kind":{"type":"string","enum":["ENQUIRY","TEST_DRIVE"],"default":"ENQUIRY"},"preferred_at":{"type":"string","format":"date-time","description":"TEST_DRIVE only: when the visitor would like to drive it (ISO 8601 with offset, in the future, within 90 days)."},"website":{"type":"string","description":"Spam trap. Add a hidden form field with this name and leave it empty."}}}}}},"responses":{"200":{"description":"Sent"},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}