{"openapi":"3.0.3","info":{"title":"Auto Inspect API","version":"1.0.0","description":"Vehicle history for insurers (Auto Inspect insurer plan). Exact VIN / registration lookups, private pre-inception inspections, and accident / repair / claim-closed events. Owner identity is never returned or accepted. Every call is metered."},"servers":[{"url":"https://autoinspect.co.za/api/autoinspect/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key from the insurer portal (aik_…). Scopes: read, write-claims."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"ClaimEvent":{"type":"object","additionalProperties":false,"required":["kind","date","category"],"properties":{"kind":{"type":"string","enum":["accident","repair","claim_closed"]},"date":{"type":"string","format":"date"},"category":{"type":"string","enum":["collision","hail","windscreen","theft_recovered","fire","flood","vandalism","animal","mechanical","other"]},"cost_band":{"type":"string","enum":["under_5k","5k_20k","20k_50k","50k_100k","100k_250k","over_250k","write_off"]},"repairer_name":{"type":"string","maxLength":120,"description":"The repairer business (never a person)"},"description":{"type":"string","maxLength":200}}}}},"security":[{"bearer":[]}],"paths":{"/vehicles/lookup":{"get":{"summary":"Look up a vehicle by exact VIN or registration (scope read)","parameters":[{"name":"vin","in":"query","schema":{"type":"string"}},{"name":"reg","in":"query","schema":{"type":"string"}},{"name":"purpose","in":"query","required":true,"schema":{"type":"string","enum":["pre_purchase","trade_in","repair","insurance","claim","rental","inspection","other"]}}],"responses":{"200":{"description":"found:false, or the vehicle, its history from every writer (photos as 1-hour links), flags and odometer readings"},"400":{"description":"Bad query"},"401":{"description":"No / bad key"},"403":{"description":"No plan / scope"},"429":{"description":"Rate limit or daily quota"}}}},"/inspections/{id}":{"get":{"summary":"One of your pre-inception reports (scope read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The report"},"404":{"description":"Not yours / not found"}}}},"/pre-inception-links":{"post":{"summary":"Create a one-time photo link for your customer, 7 days (scope read)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer_email":{"type":"string","format":"email"},"policy_ref":{"type":"string","maxLength":60},"vehicle_hint":{"type":"string","maxLength":80},"send":{"type":"boolean","description":"Email the link to customer_email"}}}}}},"responses":{"201":{"description":"{ id, url, expires_at }"}}}},"/vehicles/{vin}/events":{"post":{"summary":"Write an accident / repair / claim_closed event (scope write-claims)","parameters":[{"name":"vin","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimEvent"}}}},"responses":{"201":{"description":"{ event_id, verify_url }"},"400":{"description":"Validation — unknown fields (incl. personal data) are refused"},"404":{"description":"Vehicle not on the record"}}}},"/events/{id}":{"get":{"summary":"An event your business wrote (scope read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The event"},"404":{"description":"Not yours / not found"}}}}}}