Page tree
Skip to end of metadata
Go to start of metadata

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)
scope (dictionary ListingSearchScope )
locations (integer)
priceMin (integer)
priceMax (integer)
parentListing.id (integer)
isSpecial(boolean)

geoPolygon(string) //string in JSON format containing lat/lng coordinates e.g.

[
	[
		{"lat":52.21233272492634,"lng":21.15037536621094},
		{"lat":52.20223398331719,"lng":21.308303833007816},
		{"lat":52.166027974826804,"lng":21.01304626464844}
	]
]



pagination
sorting keys - price, dateCreated
//additional parameters //based on section

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.

Parameters:
locations - id returned by /provinceList or /localityList method; more then one location can be sent.

Additional parameters can be sent if section parameter is provided. Parameter can be sent if /listingFieldsMetadata has field for section and property 'views' for this fields has value 'search' in array. e.g.

...
ApartmentSale: [
{
  name: "priceM2",
  views: ["show","edit","list","search"]
  type: "money"
}
...

Following parameters can be sent for given field type:

- integer - two parameters for field ending with 'Min' and 'Max' f.ex. noOfRoomsMin and noOfRoomsMax for noOfRooms (one or both parameters can be sent)
- money - two parameters for field ending with 'Min' and 'Max' f.ex. priceM2Min priceM2Max for priceM2, paremeter should be integer (one or both parameters can be sent)
- date - two parameters for field ending with 'Min' and 'Max' paremeter should be date (one or both parameter can be sent)
- string - parameter name same as field
- boolean -  parameter name same as field
- dictionary -  parameter name same as field (multiple paramters with same name for one dictionary can be sent)
- dictionaryList  - parameter name same as field (multiple paramters with same name for one dictionary can be sent)

Only listings marked for export to portals are returned (can be set by agent in asariWEB).

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/
img.asariweb.pl/normal/
img.asariweb.pl/large/

HTTP method

GET

Access scope

Public

Parameters

id* (integer)

Result

an image

Description

Returns image for listing.
/thumbnail/ - returns image size 76x51px
/normal/ - returns image size 640x480px
/large/ - in the future returns image of size (1024x768px or 1280x960px)

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.).
F.ex.

{
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

locale - a string value determining the locale of messages being requested. Currently, the supported locale values are 'pl' and 'en'

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

  • section* (Section dictionary)
  • customer.(...) (same as Customer/create parameters, e. g. customer.firstName, customer.lastName, ...)
  • listing.(...) (same as Listing/create 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

  • No labels