{"openapi":"3.1.0","info":{"title":"Dekkskift API","version":"1.2.0","description":"Should a driver in Norway change between summer and winter tyres now? Answers per tyre type from the MET Norway forecast and the legal studded-tyre dates, plus nearby workshops with published prices, which can be sorted by the cheapest tyre change or tyre hotel. Texts are in Norwegian (bokmål). Free, no key, rate limited per IP address. Answers are refreshed every 30 minutes; cite Dekkskift and link `links.page` when showing them."},"servers":[{"url":"https://www.dekkskift.app/api/v1"}],"paths":{"/sjekk":{"get":{"operationId":"checkTyres","summary":"Whether to change tyres at a place in Norway","description":"Give either `sted` or `lat` and `lon`. Coordinates are rounded to about 5 km.","parameters":[{"name":"sted","in":"query","schema":{"type":"string"},"description":"Town or municipality, e.g. \"Trondheim\", \"Mo i Rana\" or \"tromsø\"."},{"name":"lat","in":"query","schema":{"type":"number"},"description":"Latitude (WGS84). Use with lon."},{"name":"lon","in":"query","schema":{"type":"number"},"description":"Longitude (WGS84). Use with lat."},{"name":"sorter","in":"query","schema":{"type":"string","enum":["avstand","dekkskift","dekkhotell"],"default":"avstand"},"description":"Which workshops to list: the closest (avstand), or the cheapest within 30 km for a tyre change (dekkskift) or tyre hotel (dekkhotell), compared on `comparablePrices`. Sorted by price, workshops without one are left out."},{"name":"felg","in":"query","schema":{"type":"number","minimum":10,"maximum":30},"description":"Rim size in inches, e.g. 19 (from a tyre size like 255/45R19). Prices for that rim size are compared where the workshop lists them."}],"responses":{"200":{"description":"The answer for the place.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Check"}}}},"400":{"description":"Missing or invalid place, or outside Norway.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No place with that name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests from this address; wait a minute and try again."},"503":{"description":"The forecast could not be fetched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/steder":{"get":{"operationId":"listPlaces","summary":"Places with their own page on dekkskift.app","responses":{"200":{"description":"Places, with links to their page and API answer."}}}}},"components":{"schemas":{"ComparablePrice":{"type":"object","required":["nok","from","forRim"],"properties":{"nok":{"type":"number","description":"Kroner, incl. VAT."},"from":{"type":"boolean","description":"The lowest of several prices (\"fra\")."},"forRim":{"type":"boolean","description":"For the requested rim size (`felg`)."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"What went wrong, in Norwegian."}}},"Check":{"type":"object","required":["place","updatedAt","answers","keyDates","forecast","workshops","sort","rim","links","source"],"properties":{"place":{"type":"object","properties":{"name":{"type":"string"},"detail":{"type":["string","null"],"description":"County or municipality."},"lat":{"type":"number"},"lon":{"type":"number"},"northern":{"type":"boolean","description":"Nordland, Troms and Finnmark rules: studs allowed 16 October to 30 April."}}},"updatedAt":{"type":"string","format":"date-time"},"answers":{"type":"object","description":"One answer per tyre type the driver may have on now.","properties":{"summer":{"type":"object","required":["level","switchTo","title","message"],"properties":{"level":{"type":"string","enum":["ok","soon","now","urgent"],"description":"ok: nothing to do; soon: book a change soon; now: time to change; urgent: change right away (frost, snow or studs out of season)."},"switchTo":{"type":["string","null"],"enum":["summer","winter",null],"description":"What to change to; null when the tyres on are fine."},"title":{"type":"string","description":"Short answer in Norwegian."},"message":{"type":"string","description":"Why, in Norwegian."}}},"winter_studless":{"type":"object","required":["level","switchTo","title","message"],"properties":{"level":{"type":"string","enum":["ok","soon","now","urgent"],"description":"ok: nothing to do; soon: book a change soon; now: time to change; urgent: change right away (frost, snow or studs out of season)."},"switchTo":{"type":["string","null"],"enum":["summer","winter",null],"description":"What to change to; null when the tyres on are fine."},"title":{"type":"string","description":"Short answer in Norwegian."},"message":{"type":"string","description":"Why, in Norwegian."}}},"winter_studded":{"type":"object","required":["level","switchTo","title","message"],"properties":{"level":{"type":"string","enum":["ok","soon","now","urgent"],"description":"ok: nothing to do; soon: book a change soon; now: time to change; urgent: change right away (frost, snow or studs out of season)."},"switchTo":{"type":["string","null"],"enum":["summer","winter",null],"description":"What to change to; null when the tyres on are fine."},"title":{"type":"string","description":"Short answer in Norwegian."},"message":{"type":"string","description":"Why, in Norwegian."}}}}},"keyDates":{"type":"array","description":"The next start and end of the studded-tyre season at this place.","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"kind":{"type":"string","enum":["studs_allowed_from","studs_deadline"]},"label":{"type":"string"}}}},"forecast":{"type":"array","description":"Daily forecast from today, Oslo time.","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"minTemp":{"type":"number"},"maxTemp":{"type":"number"},"meanTemp":{"type":"number"},"precipMm":{"type":"number"},"snow":{"type":"boolean"}}}},"workshops":{"type":["array","null"],"description":"Up to 5 workshops within 30 km, closest first (or cheapest first with `sorter`); null if they could not be fetched.","items":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":["string","null"]},"distanceKm":{"type":"number"},"lat":{"type":["number","null"]},"lon":{"type":["number","null"]},"phone":{"type":["string","null"]},"openingHours":{"type":["string","null"]},"website":{"type":["string","null"],"format":"uri","description":"The workshop's website, through a dekkskift.app link that redirects to it (and counts the visit for the workshop)."},"bookingUrl":{"type":["string","null"],"format":"uri","description":"Where to book, through a redirect link like `website`."},"services":{"type":"array","items":{"type":"string","enum":["tyre_change","tyre_hotel","balancing","puncture_repair","tpms","alignment","mobile_service"]},"description":"What the workshop offers, as far as we know."},"comesToYou":{"type":"boolean","description":"It changes tyres where the car is (mobile service); its address is its base."},"serviceArea":{"type":["string","null"],"description":"Where a workshop that comes to you goes, as it writes it, e.g. \"Oslo / Lørenskog / Asker og Bærum\"."},"prices":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"Service, e.g. \"Dekkskift\"."},"priceText":{"type":"string","description":"As published, e.g. \"Fra 780 kr\"."},"priceNok":{"type":["number","null"]},"note":{"type":["string","null"],"description":"E.g. which car the price is for (\"SUV/varebil\") or what is included."},"rimMin":{"type":["number","null"],"description":"Smallest rim size in inches the price is for."},"rimMax":{"type":["number","null"],"description":"Largest rim size in inches the price is for."}}}},"comparablePrices":{"type":"object","description":"The price to compare between workshops, for a passenger car: for `felg` when the workshop lists that rim size (`forRim`), else its general price, else its cheapest by rim size. `from` means it's the lowest of several (show as \"fra\"). Null when the workshop gives no such price.","properties":{"tyreChange":{"oneOf":[{"$ref":"#/components/schemas/ComparablePrice"},{"type":"null"}]},"tyreHotel":{"oneOf":[{"$ref":"#/components/schemas/ComparablePrice"},{"type":"null"}],"description":"Per season."}}},"url":{"type":"string","description":"The workshop in the Dekkskift web app."}}}},"sort":{"type":"string","enum":["distance","tyreChange","tyreHotel"],"description":"How `workshops` is ordered."},"rim":{"type":["number","null"],"description":"The rim size prices were compared for (`felg`)."},"links":{"type":"object","properties":{"page":{"type":["string","null"],"description":"The place page on dekkskift.app, to link the user to."},"workshopMap":{"type":"string","description":"The workshop map around the place."}}},"source":{"type":"string"}}}}}}