Hoppa direkt till innehåll
API specifications
Export API for Service providers. The exported data contains coId codes that can be found here where you can also get a CSV readout to parse in your scripts.

Note that the API for import is open for KO between midnight and 7 am, and an aggregation script is run at 7:10 to create the files for downloads for XSP, so if you want as fresh data as possible, you should fetch via this API at around 8 am.
FormatXML AuthLogin OriginStadsnät ConsumerService Provider
getfile
This will give you the URL of a the file to download with the data relevant to you
  • Request

    GET https://www.stadsnatsportalen.se/admin/edit/mdb_buildings/plain/xspexport
    • Attributes

    • Example request

      GET /admin/edit/mdb_buildings/plain/xspexport?method=getfile&format=tab&hash=abcd123
    • Response success: 200 OK

      HTTP/1.1 200 OK
      Content-Type: application/xml
        <getfile>     <response>       <location>http://www.stadsnatsfabriken.se/admin/edit/mdb_buildings/plain/download.php?filename=mdb2_36931.txt</location>     </response>     <status>success</status>   </getfile>