Fetching pricelist data
The best practice successfully followed by the 100+ connected project webs is the following:
Fetch the pricelist every hour and store the result in a relational database for a quick frontend pricelist/unit detail rendering.
Look at what resource UIDs your local cache is missing and fetch them.
If there is any problem with the API log it and retry at some later time.
Request
Use HTTP POST and the endpoint https://cms.realpad.eu/ws/v10/get-project
Send the following required parameters as a URL-encoded form:
login
- string login obtained from our support.password
- string password obtained from our support.screenid
- integer value, typically constant, obtained from our support.developerid
- integer value, typically constant, obtained from our support.projectid
- integer value identifying the project, will change between projects.
Do not send data as JSON in this endpoint. The API expects to receive a URL-encoded form. See the cURL example for guidance.
To get screenid
, developerid
, projectid
parameters you will need to call the https://cms.realpad.eu/ws/v10/get-projects-info
API endpoint using HTTP POST. You will only need previously obtained login
and password
parameters to do this.
Example call in cURL:
Response
The response consists of the HTTP Status Code and, if the call was successful, XML payload. Status codes:
200 OK
- all was fine, the call succeeded and the payload contains the XML data.400 BAD REQUEST
- one of the IDs was invalid, e.g. unknown project was requested.401 NOT AUTHORIZED
- the credentials are invalid or requesting IP is banned.429 TOO MANY REQUESTS
- you are calling the endpoint too often - the body of the response tells you when it will be possible to call it again.
Payload
The file is structured using this hierarchy:export-> project -> building -> floor -> flat
. Typically you will only need to use the data in the <flat>
elements containing the relevant units (so not only flats but also cellars parking spots etc). The unit plan and PDF UIDs (see below) can be found in <flat>
XML attributes, the rest of the important data is stored in <flat-attribute>
sub-elements identified by their keys. Explanation follows:
flat_area
- unit area in square meters (sqm).flat_area_balcony
- balcony area in sqm.flat_area_garden
- garden area in sqm.flat_area_terrace
- terrace area in sqm.flat_discount_vat
- unit pricelist discount with VAT.flat_disposition
- unit disposition (1+kk, 2+1 etc).flat_internal_id
- unit name / ID in the Realpad system.flat_orientation
- unit orientation (SV, J, W, S-E etc).flat_price
- unit price with VAT.flat_price_without_vat
- unit price without VAT.flat_status
- unit status (availability), typically project webs will only display units with availability 0 or 1. Possible values are:0 - free.
1 - pre-reserved.
2 - reserved.
3 - sold.
4 - not for sale.
5 - delayed.
flat_type
- unit type, possible values are:1 - flat.
2 - parking.
3 - cellar.
4 - outdoor parking.
5 - garage.
6 - commercial space.
7 - family house.
8 - land.
9 - atelier.
10 - office.
11 - art workshop.
12 - non-residential unit.
13 - motorbike parking.
14 - creative workshop.
15 - townhouse.
16 - utility room.
17 - condominium.
18 - storage.
19 - apartment.
20 - accommodation unit.
21 - bike stand.
22 - communal area.
23 - non-residential unit - other.
24 - berth.
25 - construction right.
26 - villa.
27 - technical space.
28 - outdoor parking position for motorbike.
29 - property management unit.
30 - attic.
31 - backyard.
32 - terrace.
33 - cubicle.
34 - tenement house.
35 - paved area.
36 - garage position.
99 - other.
Resources
XML payload contains attributes and values in the form of bd5563ae-abc... These are the UIDs (Unique IDentifiers) of the resources you can retrieve: unit plans, PDFs, gallery pictures, etc. You can fetch resources using HTTP GET by retrieving a URL in the following form: https://cms.realpad.eu/resource/<UID>
Example call in cURL:
Important note: you must serve the resources from your application, you may not simply point to Realpad Flats CRM URLs. Always cache resources “forever”. The resources you obtain this way are immutable. This means that the same UID will always refer to exactly the same data. If the data changes, you will see a different UID in one of the XMLs. You may freely cache the resources forever: you don’t have to re-download the same UID ever again.
Last updated
Was this helpful?