Edit
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:
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.
- 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
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
Request
GET /admin/edit/mdb_buildings/plain/editapi
Attributes
- mandatory
Data format: string
Example: address
Search mode, valid values are "address" or "accessid" - mandatory
Data format: string
Example: Skogsvägen
Search string - optional
Data format: string
Example: json
What format should the response be in, valid values are 'xml' and 'json'
Example request
GET /admin/edit/mdb_buildings/plain/editapi?method=search&mode=address&search=Skogsv%C3%A4gen&hash=ABC123
Response success: 200
HTTP/1.1 200
Content-Type: application/xml<search> <response> <result> <coId>SNFDMO</coId> <accessId>81883</accessId> <streetName>Skogsvägen</streetName> <streetNumber>26</streetNumber> <streetLittera></streetLittera> <postalCode>72134</postalCode> <city>Västerås</city> <countryCode>SE</countryCode> <premisesType>RESIDENTIAL_HOUSE</premisesType> <mduApartmentNumber></mduApartmentNumber> <mduDistinguisher></mduDistinguisher> <swerefType></swerefType> <swerefNorth></swerefNorth> <swerefEast></swerefEast> <propertyUnitDesignation>GALTEN 26</propertyUnitDesignation> <propertyUnitArea></propertyUnitArea> <propertyOwner></propertyOwner> <outlet></outlet> <population>Bäckby</population> <media>FTTH</media> <services>100/100</services> <collectiveServices>NO</collectiveServices> <servicesConnection>2016-02-16</servicesConnection> <coCpe>MODELL1259</coCpe> <servicePort>ASAP</servicePort> <dhcpOption></dhcpOption> <lastUpdate>2016-09-26 12:34:50</lastUpdate> <keywords></keywords> <netType>LAYER3</netType> <portCapacity>100000</portCapacity> <cpeCapacity>100000</cpeCapacity> <openTv>NO</openTv> <cableTv>NO</cableTv> <exclusiveTv>DELIVERABLE</exclusiveTv> <propertyOwnerAddress></propertyOwnerAddress> <propertyOwnerPostalCode>0</propertyOwnerPostalCode> <propertyOwnerCity></propertyOwnerCity> <activeServices>UNKNOWN</activeServices> <socket_id>4720</socket_id> <address_id>3911</address_id> <premise_id></premise_id> <building_id>1061</building_id> </result> </response> <status>success</status> </search>