Site

Site (/site)

Authorization

Site authorized only by userId and Token in HEADER

key: "SiteAuth"

value: "userID:Token"

curl --request POST -H "Content-Type=multipart/form-data" -H "SiteAuth:<userId>:<Token>" "$URL"


The following methods should be used to implement website functionality.

exportedListingIdList

URI

/exportedListingIdList

HTTP method

POST

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

listing

URI

/listing

HTTP method

POST

Access scope

Company

Parameters

id* (integer)

Result

Listing object

{
//all fields from /listingList plus
description: (string),
englishDescription: (string),
agent: {
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/

HTTP method

GET

Access scope

Public

Parameters

id* (integer)

Result

an image

Description

Returns image for listing.
/thumbnail/ - returns image size 180x120px
/normal/ - returns image size 1024x768px

listingFieldsMetadata

URI

/listingFieldsMetadata

HTTP method

POST

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:[
...
],
...

}

customField/listFields

URI

/customField/listFields


HTTP method

POST

Access scope

Company

Parameters


Result

list of custom field


Description

Get full list custom field

company/getCompanyData

URI

/company/getCompanyData


HTTP method

POST

Access scope

Company

Parameters


Result

list of company settings


Description

Get list of company settings

i18nMessages

URI

/i18nMessages

HTTP method

POST

Access scope

Company

Parameters

locale* (string)

Result

object, property name is key and value is translated message

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

POST

Access scope

Company

Parameters

Location object

{
id: (integer),
name: (string)
}

Result

Provinces of company's listings

Description


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)

Example params:

section:ApartmentSale
listing.country.id: 34
listing.location.id: 55920
listing.geoLat: 52.18491
listing.geoLng: 21.08136
listing.totalArea: 120
listing.price.amount: 500000
listing.price.currency: PLN
listing.priceM2.amount: 4166.67
listing.priceM2.currency: PLN
listing.mortgageMarket: Secondary
listing.description:Listing description
customer.customerType:Person
customer.firstName:Janusz
customer.lastName:Kowalski
email:email@exaple.com
customer.phones[0].phoneNumber:0123456789
customer.documentNo:ABC1234567
customer.address.city:Warsaw
customer.address.postalCode:01-001
customer.address.street:Sobieskiego

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

  • section* (Section dictionary)
  • customer.(...) (same as Customer/create parameters)
  • seeker.(...) (same as Seeker/create parameters)

Example params:

section:ApartmentSale
seeker.description:Seeker description
listingFilter.country.id:34
listingFilter.priceCurrency:PLN
listingFilter.priceMin:400000
listingFilter.priceMax:500000
listingFilter.totalAreaMin:45
listingFilter.totalAreaMax:55
customer.customerType:Person
customer.firstName:Janusz
customer.lastName:Kowalski
email:email@exaple.com
customer.phones[0].phoneNumber:0123456789
customer.documentNo:ABC1234567
customer.address.city:Warsaw
customer.address.postalCode:01-001
customer.address.street:Sobieskiego


Result

ID of the new seeker

Description

sets up a customer and creates a new seeker with Draft status

customer/create

URI

/customer/create

HTTP method

POST

Access scope

Company

Parameters

Example params:

customerType:Person/Lead
firstName:Jan
lastName:Kowalski
customerFrom:Other
phones[0].phoneNumber:228307240
emails[0].email:example@asari.pl
assignedTo.id:<USER_ID>


Example
curl --location 'https://api.asari.pro/site/customer/create' \
--header 'Accept: application/json' \
--header 'SiteAuth: <UserID>:<TOKEN>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'customerType=Person' \
--data-urlencode 'firstName=Jan' \
--data-urlencode 'lastName=Kowalski' \
--data-urlencode 'customerFrom=Other' \
--data-urlencode 'phones%5B0%5D.phoneNumber=228307240' \
--data-urlencode 'emails%5B0%5D.email=example@asari.pl' \
--data-urlencode 'address.city=Warszawa' \
--data-urlencode 'address.fullStreet=Polna 30' \
--data-urlencode 'address.postalCode=00-001'

Result

ID of the new customer

Description


user/list

URI

/user/list

HTTP method

POST

Parameters

Example params:

active=1
start=0
limit=200 


Result

list of user

Description


user/get

URI

/user/get

HTTP method

POST

Parameters

id* (integer)

Result

User object

Description