apiSite
Site (/apiSite)
The following methods should be used to implement website functionality.
exportedListingIdList
URI | /exportedListingIdList |
---|---|
HTTP method | GET |
Access scope | Company |
Parameters | closedDays (integer) /* optional blockedDays (integer) /* optional |
Result | id, lastUpdated |
Description | Get full list listing in one request closedDays=5 - added to list listing on status closed when closing up to max 5 days back blockedDays=10 - added to list listing on status pending (blocked) when blocked up to max 10 days back Getting without parametr "closedDays" and "blockedDays", only active listings for company are returned |
listingList
URI | /listingList |
---|---|
HTTP method | GET |
Access scope | Company |
Parameters | section (dictionary Section) [ [ {"lat":52.21233272492634,"lng":21.15037536621094}, {"lat":52.20223398331719,"lng":21.308303833007816}, {"lat":52.166027974826804,"lng":21.01304626464844} ] ]
|
Result | List of objects { id: (integer), listingId: (string), mlsId: (string), // MLS WSPON swoId: (string), // for SWO with own numerator sectionName: (dictionary Section), geoLat: (float), geoLng: (float), country: { id: (integer), name: (string), code: (string} }, location: { id: (integer), name: (string), province: (string), locality: (string) }, street: { id: (integer), name: (string), fullName: (string) }, foreignStreet: (string), foreignLocation: (string), contractType: (dictionary ContractType), ownershipType: (dictionary OwnershipType), groundOwnershipType: (dictionary GroundOwnershipType), isSpecial: (boolean), price: (money), dateCreated: (date), lastUpdated: (date), actualisationDate: (date), statusChangeDate: (date), images:(array of objects {id:(integer)}), licenceNumber: (string), //additional fields for section according to //section parameter and /apiSite/listingFieldsMetadata //all fields with 'list' in 'view' property will be returned description: (string), englishDescription: (string), parentListingId: (integer)} |
Description | List of listings. If section parameter is empty, method will return listings from all sections with no additional fields. Only active listings for company are returned. ... ApartmentSale: [ { name: "priceM2", views: ["show","edit","list","search"] type: "money" } ... Following parameters can be sent for given field type: |
listing
URI | /listing |
---|---|
HTTP method | GET |
Access scope | Company |
Parameters | id* (integer) |
Result | Listing object { //all fields from /listingList plus description: (string), englishDescription: (string), user: { id: (integer), firstName: (string), lastName: (string), email: (string), phoneNumber: (string), skypeUser: (string), imageId: (integer) }, parentListing: { id: (integer), listingId: (string), name: (string) }, nestedListings :(array of objects {id:(integer), listingId:(integer)}) } |
Description | Return details of listing. Currently only listings of section Investments can be parentListing. Listings of any type can be nestedListings. |
image
URI | img.asariweb.pl/thumbnail/ |
---|---|
HTTP method | GET |
Access scope | Public |
Parameters | id* (integer) |
Result | an image |
Description | Returns image for listing. |
listingFieldsMetadata
URI | /listingFieldsMetadata |
---|---|
HTTP method | GET |
Access scope | Company |
Parameters | |
Result | object - properties are names of section (Section dictionary) and values are arrays of object defining field in following format { name:(string), type:(dictionary FieldType), //views that fields should occure in interface views: (array of dictionary View) //if type=dictionary or type=dictionaryList, //array of possible dictionary values values: (array of string), //if type=dictionary or type=dictionaryListi18n message prefix //(dictionaryMessageKey+'.'+value gives full key f.ex. taskStatus.Closed) //it is dictionary name with first letter lowercase dictionaryMessageKey: (string) } || |
Description | Fields specific to listings from given section (HouseSale,LotRental etc.). { ApartmentSale:[ name:'price',type:'money',views:['show','list'], name:'noOfRooms',type:'integer':views:['show','list'] ], LotSale:[ ... ], ... } |
i18nMessages
URI | /i18nMessages |
---|---|
HTTP method | GET |
Access scope | Company |
Parameters | locale* (string) |
Result | object, property name is key and value is translated messge |
Description | Messages for fields from /listingFieldsMetadata |
provinceList
URI | /provinceList |
---|---|
HTTP method | GET |
Access scope | Company |
Parameters | Location object { id: (integer), name: (string) } |
Result | Provinces of company's listings |
Description |
localityList
URI | /localityList |
---|---|
HTTP method | GET |
Access scope | Company |
Parameters | provinceId* (integer) |
Result | Location object { id: (integer), name: (string) } |
Description | Localities of company's listings for given province |
createListing
URI | /createListing |
---|---|
HTTP method | POST |
Access scope | Company |
Parameters |
|
Result | ID of the new listing |
Description | sets up a customer and creates a new listing with Draft status |
createSeeker
URI | /createSeeker |
---|---|
HTTP method | POST |
Access scope | Company |
Parameters |
|
Result | ID of the new seeker |
Description | sets up a customer and creates a new seeker with Draft status |
subscribeToNewsletter
URI | /subscribeToNewsletter |
---|---|
HTTP method | POST |
Access scope | Company |
Parameters |
|
Result | success/failure |
Description | sets up a new customer if necessary (i.e. the email address provided doesn't exist in database Company-wide) and subscribes it to a newsletter |