Hoppa direkt till innehåll
Use this API to edit data in Marknadsdatabasen 2. One big difference between MdB1 and MdB2 is that MdB2 is split into several databases. The name of the databases are:
  • buildings
  • building_addresses
  • building_premises
  • building_sockets


Every accessID is connected to a building, address and possibly a premise. A premise is connected to an address and an building. An address is connected to a building. If a single building has 10 addresses, 40 premises and 45 accessID and you edit the name of one of the addresses, it will still be connected to that premise, but the change will cascade down to all data that is connected to that address, such as premises and accessID's.
FormatXML AuthLogin OriginMarknadsdatabasen ConsumerStadsnät
Endpoints
  • search
    Use the search function to find the ID of the information in the seperate databases. If you want to edit any of the address information, use the value in "address_id" when using the read/delete/edit methods
  • relations
    Get related posts to a specific database post. If you want to see what accessId's are connected to a specific premises or address for instance.
  • edit
    When editing a post, the data value should be sent with PHP array notation. Not all fields need to be supplied. If you want to edit the streetName and streetNumber value of the address with id 1234, an example call would be:

    /admin/edit/mdb_buildings/plain/editapi?method=edit&hash=HASH &database=building_addresses&id=1234&data[streetName]=NewStreetName &data[streetNumber]=12
    Please note that editing data in a database propagates that data to other posts. Editing the streetName of an address means that all premises and accessID's connected to this address will have a new streetName
  • delete_post
    WARNING! This will totally delete a post in the database, there is no recovery function via API. The API user needs to have delete access in Atlas Admin. There will be a backup and log of the delete, but only for this particular post, if you delete an address that will also lead to deleting all premises and accessId's connected to that address post. There is no automatic backup of those posts.