{"openapi":"3.1.0","info":{"title":"Motor X Checks API","version":"0.1.0","description":"Public JSON API for UK car dealers. MOT history and expected costs use DVSA MOT data. Email hello@motorxchecks.co.uk. No phone number."},"servers":[{"url":"https://motorxchecks.co.uk"}],"components":{"securitySchemes":{"dealerKey":{"type":"http","scheme":"bearer","description":"Dealer API key, or the free key mxk_free for free calls."},"adminKey":{"type":"http","scheme":"bearer","description":"Admin API key for support tickets. A dealer key is refused."}}},"paths":{"/api/v1/mot-history":{"get":{"operationId":"motHistory","summary":"Free MOT history","parameters":[{"name":"reg","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"MOT history","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/expected-costs":{"get":{"operationId":"expectedCosts","summary":"Expected costs from the latest MOT test","parameters":[{"name":"reg","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Latest-test items","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/vehicle":{"get":{"operationId":"lookupVehicle","summary":"Registration basics from the MOT record","parameters":[{"name":"reg","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Vehicle basics","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/balance":{"get":{"operationId":"balance","summary":"Dealer API balance and usage","security":[{"dealerKey":[]}],"responses":{"200":{"description":"Balance","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/service-history":{"post":{"operationId":"buyServiceHistory","summary":"Service X History. Charges only when confirm is true and confirmPrice is 4.99.","security":[{"dealerKey":[]}],"responses":{"200":{"description":"Quote, or the charge and remaining balance","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/factory-extras":{"post":{"operationId":"buyFactoryExtras","summary":"Factory X Extras. Charges only when confirm is true and confirmPrice is 4.49.","security":[{"dealerKey":[]}],"responses":{"200":{"description":"Quote, or the charge and remaining balance","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/max-bid":{"post":{"operationId":"recommendMaxBid","summary":"Recommended max bid from figures you supply","responses":{"200":{"description":"Calculation","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/trial":{"get":{"operationId":"startTrial","summary":"Link to start the free dealer trial","responses":{"200":{"description":"Trial link","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/support/tickets":{"get":{"operationId":"listSupportTickets","summary":"List support tickets. Admin key only.","security":[{"adminKey":[]}],"responses":{"200":{"description":"Tickets","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/support/tickets/{id}":{"get":{"operationId":"getSupportTicket","summary":"Read a ticket, including internal notes and unsent drafts. Admin key only.","security":[{"adminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ticket","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/support/tickets/{id}/update":{"post":{"operationId":"updateSupportTicket","summary":"Set status, priority, category, tags or assignee. Does not email the dealer.","security":[{"adminKey":[]}],"responses":{"200":{"description":"Updated ticket","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/support/tickets/{id}/notes":{"post":{"operationId":"addSupportNote","summary":"Add an internal note. Hidden from the dealer.","security":[{"adminKey":[]}],"responses":{"200":{"description":"Note","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/support/tickets/{id}/drafts":{"post":{"operationId":"draftSupportReply","summary":"Save a draft reply. It is not emailed and the dealer cannot see it until a person approves it in the admin inbox.","security":[{"adminKey":[]}],"responses":{"200":{"description":"Draft","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}