Oikotie Cards API¶
This document contains the details on how to use cards API endpoint to retrieve Oikotie ad information for use on customer homepage.
Requirements¶
To be able to retrieve card data over the api you will need to have an API key. Additional information on getting API key can be found on this page under the Getting api key heading.
How to find your "brokerCompanyId"¶
To find your unique "brokerCompanyId" navigate to https://asunnot.oikotie.fi/yritys and find your company page. While on this page your "brokerCompanyId" is displayed as part of the url in browser address bar. In example "/yritys/esimerkkiyritys-oy-12345678", the company name is followed by a string of numbers. This sequence of numbers is the "brokerCompanyId" used to identify your company in the API request.
Cards Endpoint¶
cards endpoint can be used to retrieve a list of company's current listings.
GET¶
Path: /api/latest/cards/:brokerCompanyId
Endpoint provides a list of ads your company currently has. In some cases the information provided by this endpoint is sufficient for homepage listings, however the data provided by this endpoint includes "cardId" field that contains unique card identifier which can be used with card endpoint to retrieve the full ad listing data.
Card endpoint¶
card endpoint is used to retrieve data of an individual ad using the cardId obtained from listing provided by Cards endpoint.
GET¶
Path: /api/latest/card/:Id
Endpoint provides full data from an existing ad in Oikotie. Data is provided in json format by default. Complete list of possible fields is provided in the full API description .