Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
ContentsIntroduction...............................................................................................................................3User Password hashing............................................................................................................3Definitions.................................................................................................................................3
Active...............................................................................................................................................................5
ETUser.............................................................................................................................................................5
HAWK Header..................................................................................................................................................5
PricePrSqm / RentPrSqm.................................................................................................................................5
Partner.............................................................................................................................................................5
Portal...............................................................................................................................................................5
status........................................................................................................................................5Develop...........................................................................................................................................................5
Beta.................................................................................................................................................................5
Production.......................................................................................................................................................5
API models............................................................................................................................... 6brokers......................................................................................................................................6
count...............................................................................................................................................................6
favorites....................................................................................................................................7GET..................................................................................................................................................................7
POST................................................................................................................................................................8
DELETE.............................................................................................................................................................8
metadata...................................................................................................................................8intervals...........................................................................................................................................................8
interesttypes....................................................................................................................................................8
propertytypes..................................................................................................................................................9
categories........................................................................................................................................................9
sortorders/propertytype.................................................................................................................................9
geotypes..........................................................................................................................................................9
wordtypes......................................................................................................................................................10
provincemunics.............................................................................................................................................10
searchword....................................................................................................................................................10
searchwords/propertyType...........................................................................................................................10
properties................................................................................................................................11redirect/details..............................................................................................................................................11
refTypes / PropertyLogRefType.....................................................................................................................13
redirect/broker..............................................................................................................................................13
totalcount......................................................................................................................................................13
Solution Documentation.docx
Page 1 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
newcount.......................................................................................................................................................13
lastseen.........................................................................................................................................................14
phone............................................................................................................................................................14
mail................................................................................................................................................................14
contact...........................................................................................................................................................14
GET list/searchFilterId...................................................................................................................................14
PUT list/searchFilterId...................................................................................................................................15
DisplayOptions..............................................................................................................................................15
SearchFilter....................................................................................................................................................15
GET map/searchFilterId.................................................................................................................................16
PropertyMapPoint.........................................................................................................................................16
PUT map/searchFilterId.................................................................................................................................16
POST list.........................................................................................................................................................16
POST map......................................................................................................................................................16
search.....................................................................................................................................17GET searchFilterId.........................................................................................................................................17
combined.......................................................................................................................................................17
SearchWordResult.........................................................................................................................................17
location..........................................................................................................................................................18
subscriptions...........................................................................................................................18GET agent......................................................................................................................................................18
POST agent....................................................................................................................................................18
DELETE agent/searchFilterId.........................................................................................................................18
POST agent/searchFilterId.............................................................................................................................18
PUT agent/searchFilterId/name....................................................................................................................18
DELETE agent/searchFilterId/name...............................................................................................................18
GET agent/list/searchFilterId.........................................................................................................................18
GET agent/map/searchFilterId......................................................................................................................18
GET notification/notificationId......................................................................................................................18
GET inbox.......................................................................................................................................................19
GET inbox/count............................................................................................................................................19
PUT inbox/notificationId...............................................................................................................................19
PUT inbox/all.................................................................................................................................................19
users.......................................................................................................................................19POST users/anonymous................................................................................................................................19
GET users/information..................................................................................................................................19
PUT users/information..................................................................................................................................19
DELETE users/login.......................................................................................................................................19
POST users/login...........................................................................................................................................19
Solution Documentation.docx
Page 2 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
PUT users/login/changepassword.................................................................................................................19
POST users/login/forgotpassword................................................................................................................19
POST users/login/creation.............................................................................................................................20
GET users/devicetoken..................................................................................................................................20
POST users/devicetoken................................................................................................................................20
Errorcodes..............................................................................................................................20
IntroductionThis document’s purpose is to describe Ejendomstorvet’s Partner API, its Endpoints and data in depth.
The API will provide most of its responses with error codes, messages and whether the input was valid, whenever possible. Errorcodes can be viewed in this document.
User Password hashingThe password of the user must be hashed before sending it through the API. The password is concatenated with a salt. The salt is as follows:
gdhfjkgdhfjk54785364fsdghjfsdgjh4534æøåThe algorithm for hashing goes like this
1) Concatenate the password with the salt2) Encode to bytes using the ANSII code page3) Hash using MD54) Remove any dashes ‘-‘ and change to uppercase
Example:
User’s password: AllYourBaseAreBelongToUs
1) Add hash:
AllYourBaseAreBelongToUsgdhfjkgdhfjk54785364fsdghjfsdgjh4534æøå
2) Encode to bytes using ANSI:41-6C-6C-59-6F-75-72-42-61-73-65-41-72-65-42-65-6C-6F-6E-67-54-6F-55-73-67-64-68-66-6A-6B-67-64-68-66-6A-6B-35-34-37-38-35-33-36-34-66-73-64-67-68-6A-66-73-64-67-6A-68-34-35-33-34-E6-F8-E5
3) Hash with MD5:5C-69-04-D8-55-9A-03-C2-F3-97-9C-03-54-B4-52-94
4) Remove any dash and change any letter to uppercase:5C6904D8559A03C2F3979C0354B45294
Solution Documentation.docx
Page 3 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
DefinitionsHere is an overview of what will be mentioned, and what specifically is described.
Any call (with minor exceptions) to the API, must contain the following headers:
HAWK ETUser
Word Description
Active A property is active, when the broker puts it “online”. If the property is not active, it is no longer for sale/rent.
ETUser Is a Guid and must be provided where applicable. On the API’s documentation (swagger), and in this document, it will be specified when this header may be left empty.
HAWK Header Is for authorization purposes. An API key is handed out by Sima.dk and must be stored safely on the Partner’s responsibility. Any misusage of the key can result in revoking of the key.
PricePrSqm / RentPrSqm
The PricePrSqm, and RentPrSqm are based around BaseArea if the property is of category “Parcel”. Otherwise it’s based around FloorArea
Partner The ‘Partner’ is the organization which has been given access to any of the Partner API’s. The partner is given a key and holds full responsibility for correct use of both the key and the API.
Portal www.ejendomstorvet.dk – the main site of Ejendomstorvet.
Solution Documentation.docx
Page 4 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
statusThis group of endpoints consists of one call which can be called anonymously (without HAWK- and ETUser headers).The call provides the Partner with local server time, whether they are online or not and where to find them.
property type DescriptionServerUtcTime DateTime UTC time according to the server.
Use this to ensure that the client and server agree on the time with a maximum difference of 5 minutes
MinimumAndroidVersion String The minimum versionnumber on Android that the client should allow.
MinimumiOSVersion String The minimum versionnumber on iOS that the client should allow.
ServiceEnvironments List of ServiceEnvironment Each ServiceEnvironment unveils data whether the environment is offline, the path, version and name.
The different environments are explained here:
DevelopThis environment will mostly be used for proof-of-concept and does not reflect the data on the portal, instead the data provided are all test-based data.
BetaThis environment reflects what’s to come, and serves as the name implies, as beta-testing. Data from this environment is based around what is on the portal.
ProductionThis environment reflects the portal as close as possible with minor differences. This should be used for any release-builds.
API modelsThe API Models can be seen by clicking on ”Model” under the methods’ respective requests in Swagger (marked yellow).
Solution Documentation.docx
Page 5 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
brokersCan be used to get information about brokers.
countReturns the total number of brokers.
favoritesAnything related to the user’s favorites are listed here.
GETReturns a list of favorites for a registered user. Inputting an anonymous user, will return 404. The model’s properties in details:
property type DescriptionId Integer (32-bit) The identifying key of the property.ImageThumbnailUrl String A thumbnail of the first image of this
property in the dimensions 620x400Category Enum (string) See categories in this document IsFavorite Boolean Indicates if this property is on the
input user’s favorite list. IsNew Boolean Indicates if the property was
recently uploadedIsPopular Boolean Indicates if the property is popularHasNewPrice Boolean Indicates if the price has been
recently changedInterestType Enum (string) See interesttypes in this documentHeading String A short heading, to peak the user’s
interestAddress String Streetname, number and if
applicaple, floorPostal Integer (32-bit) 4-digit postal codeCity String Name of the city under the
property’s postalAreaSqm Integer (32-bit) The area of the property/parcel.Price Long (64-bit) Price of the property, if any. If not,
this returns 0PricePrSqm Integer (32-bit) Price per area in squaremeters.
Returns 0 if there is no priceRentalPrice Long (64-bit) Yearly rental price of the property.
Returns 0 if there is noneRentalPrSqm Integer (32-bit) Yearly rental price per
squaremeters.Returns 0 if there is none
Return Double (2 decimals) The return-rate in percentage. RedirectToBroker String The url to use when the user wishes
to see the property, on the broker’s page. This is empty when the property has no redirect url.
Solution Documentation.docx
Page 6 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
ViewPropertyUrl String The url to use when the user wishes to see details about the property.
IsHighlighted Boolean Returns true if this property is part of paid advertising in this list.
POSTInserts a favorite for a registered user using PropertyId. Returns 404 if the user was not found. Otherwise this returns 201
DELETERemoves the favorite for a user. 404 if the user is not registered. Otherwise this returns 204.
metadataReturns categories, intervals etc. All methods may omit using the ETUser header.
GETReturns one combined response of all below calls, divided into the respective PropertyTypes.
intervalsReturns a list of valid interval names which the API will expect. When using these in searchfilter, the minimum and maximum values will filter the results using the input values.
property type DescriptionName String The name to use when
doing requestsDisplayNameEN String The name to display in
EnglishDisplayNameDK String The name to display in
DanishDefaultMinimum Integer (32-bit) The default
minimumvalue of this interval
DefaultMaximum Integer (32-bit) The default maximumvalue of this interval
AbsoluteMinimum Integer (64-bit) The minimum value that should never be exceeded
AbsoluteMaximum Integer (64-bit) The maximum value that should never be exceeded
interesttypesReturns a list of valid interesttypes which the API will expect
property type DescriptionName String The name to use when
doing requests
Solution Documentation.docx
Page 7 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
DisplayNameEN String The name to display in English
DisplayNameDK String The name to display in Danish
propertytypesReturns a list of valid propertytypes which the API will expect
property type DescriptionName String The name to use when
doing requestsDisplayNameEN String The name to display in
EnglishDisplayNameDK String The name to display in
Danish
categoriesReturns a list of valid categories which the API will expect.
property type DescriptionName String The name to use when
doing requestsDisplayNameEN String The name to display in
EnglishDisplayNameDK String The name to display in
Danish
sortorders/propertytypeReturns a list of valid sort orders for the input propertytype, which the API will expect.
property type DescriptionName String The name to use when
doing requestsDisplayNameEN String The name to display in
EnglishDisplayNameDK String The name to display in
Danish
geotypesReturns a list of valid geotypes:
NameRegionAreaProvinceMunicipalityPostalStreet
Solution Documentation.docx
Page 8 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
regions
Returns a list of valid regions
areas
Returns a list of valid areas. Areas are locations of varying sizes that are not necessarily officially defined otherwise.
provinces
Returns a list of valid provinces
municipalities
Returns a list of valid municipalities
postals
Returns a list of valid postal codes and the names of the cities
wordtypesReturns a list of valid wordtypes as a list of strings.
NameCategorySubcategoryWordLocation
provincemunicsThis model returns a list of provinces, each with a list of municipalities or postals under which they belong
property type DescriptionGeoType GeoType View the geotypes section in this
documentGeoName String The name of the situation
searchwordSearchwords are modelled like this:
property type DescriptionWordId Integer (32-bit) The identifying key of the word.ParentId Integer (3-bit), nullable If applicable, this declares that the
word has a parent of the input idWordType WordType See the wordtypes section in this
documentWord String The word to display and use
searchwords/propertyTypeTo receive a list of suggestions to present the enduser, use this together with one of the valid propertytypes.
Solution Documentation.docx
Page 9 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
propertiesThe Property methods gives one the opportunity to get a list of properties with minor or detailed information.
redirect/detailsTakes a propertyId, searchFilterId and a refType as input. See the reftype list in this document for further explaining.
property type DescriptionId Integer (32-bit) The identifying key of the property.ImageUrls Array of strings A list of the large images of this
property in the dimensions 1200x775
Category Enum (string) See the category list in this document
IsFavorite Boolean Indicates if this property is on the input user’s favorite list
IsNew Boolean Indicates if the property was recently uploaded
IsPopular Boolean Indicates if the property is popularInterestType Enum (string) See the interesttype list in this
documentIntroText String An introduction to further peak the
user’s interestDescription String A lengthy description of the
property.Heading String A short heading, to peak the user’s
interestAddress String Streetname, number and if
applicaple, floorPostal Integer (32-bit) 4-digit postal codeCity String Name of the city under the
property’s postalFloorAreaSqm Integer (32-bit) The floorarea of the property in
squaremeters.Price Long (64-bit) Price of the property, if any. If not,
this returns 0PricePrSqm Integer (32-bit) Price per area in squaremeters.
Returns 0 if there is no price.RentalPrice Long (64-bit) Yearly rental price of the property.
Returns 0 if there is noneRentalPrSqm Integer (32-bit) Yearly rental price per
squaremeters.Returns 0 if there is none.
Return Double (2 decimals The return-rate in percentageRedirectToBroker String The url to use when the user wishes
to see the property, on the broker’s page. This is empty if the property does not have a redirect url.
Solution Documentation.docx
Page 10 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
BaseArea Integer (32-bit) The parcel-area if any
(redirect/details continued..)
property type DescriptionSecondaryArea Integer (32-bit) The area of any secondary
properties that belong to this case.IsActive Boolean Indicates if this property is active.Latitude / Longitude Double Together, these describe the precise
location of the propertyIsSale Boolean Indicates if this property is for saleIsRental Boolean Indicates if this property is for rentEnergyMarks Array of strings The array of energy marks, if anyEnergyMarkLaw Boolean Indicates if energymarks are
required by law on this propertyReturn Double The return rate, in percentageIsProject Boolean Indicates if this property is a projectOperationCost Double Yearly costs to operate the propertyOperationCostPrSqm Double OperationCost, per squaremeterPropertyName String The name of the property, if anyMunicipality String The municipality in which this
property is placedDepriciation Boolean Indicates if this property can be
used for depreciationCaseNumber String The identifying casenumber, used by
the brokerConcealedBrokerMail String The broker’s mail, which has been
concealed. Call the /mail function to receive the mail unconcealed
ConcealedBrokerPhone String The broker’s phonenumber, which has been concealed. Call the /phone function to receive the phonenumber unconcealed
Facilities Array of strings Consists of a list of facilities that this property has
UsageExamples Array of strings A list of usage examples of the property
Solution Documentation.docx
Page 11 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
refTypes / PropertyLogRefTypeThe following values are allowed as refTypes, and is usually provided by the API:
Name DescriptionProperty Indicates that a user’s previous
display was about a propertyList Indicates that the user acted on a
listGallery Indicates interaction with a gallery –
this type is not provided by any of the API endpoints
Map Indicates interaction with a mapOther Fallback type indicating that the
interaction type is currently not supported by the API
Newest Indicates that a user interacted with a list of the newest properties
MatchingResults Indicates that a user interacted with a list of properties with matching category, pricerange and location
FrontPage Indicates that a user interacted with any property from a frontpage
Favorite Indicates that a user interacted with a property from their favorites list
Advert Indicates that a user interacted with a frontpage or a listing of an advert
AdvertOnProp Indicates an interaction with an advert that is related to the input property
Agent Indicates that a user interacted with their searchagent
InstantNotification Indicates that the user interacted with a notification that fired instantly
DailyNotification Indicates that the user interacted with a notification that fires on a daily basis
redirect/brokerUsing the RedirectToBroker, will return a RedirectAddress string. Caching or other means of saving this response, is strictly forbidden. The Partner must always use this endpoint to retrieve the data.
totalcountReturns the total number of searchable, active properties as an Integer (32-bit)
Solution Documentation.docx
Page 12 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
newcountReturns the number of searchable, active properties that have been uploaded since the start of request date, as an Integer (32-bit).
lastseenReturns a list of properties that were last seen by the user. The model is PropertyTeaser, with an additional property, LastSeen which is a datetime.
phoneTaking a propertyId as parameter, this will return a PhoneNumber string. Caching or other means of saving this response, is strictly forbidden. The Partner must always use this endpoint to retrieve the data.
mailTaking a propertyId as parameter, this will return an EmailAddress string. Caching or other means of saving this response, is strictly forbidden. The Partner must always use this endpoint to retrieve the data.
contactThis method is used, when a use wishes to get contacted by the broker. The input model looks as follows:
property type DescriptionName String The name of the userCompany String The company, for which the user
worksEmail String The email the user wishes to get
contacted onPhoneNumber String The phonenumber the user wishes
to get contacted onUserHasAcceptedTerms Boolean Indicates that the user has legally
accepted the terms and conditions that were provided by the Partner.
GET list/searchFilterIdTakes the id of the searchfilter, pageNumber (optional), sortorder (optional) and whether the ordering is descending (optional). Returns the following model:
Property type DescriptionTotalNumberOfResults Integer (32-bit) The number of total results that
match this searchfilter’s criteriaSearchFilterId Guid Used in case this filter needs to be
saved etcNumberOfPages Integer (32-bit) The number of total pages with the
input valuesCurrentPageNumber Integer (32-bit) The pagenumber this result
representsProperties Array of PropertyTeasers View the further documentation
about propertyteasers
Solution Documentation.docx
Page 13 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
Solution Documentation.docx
Page 14 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
PUT list/searchFilterIdTakes a searchfilter and its id as parameters and returns the same model as GET list/searchFilterId. The request model looks like this:
property type DescriptionDisplayOptions DisplayOptions View the further documentation
about displayoptionsSearchFilter SearchFilter View the further documentation
about searchfilters
DisplayOptionsproperty type DescriptionItemsPerPage Integer (32-bit) The number of properties that
should be shown per page. Should never exceed 100 and must be higher than 0.
PageNumber Integer(32-bit) The pagenumber to view which must be higher than 0.
SortByDescending Boolean Defines if the results should be ordered descending or ascending
SortOrder SortOrder View the sortorders in this document.
SearchFilterproperty type DescriptionPropertyType PropertyType View the propertytypes section in
this documentInterestType Array of InterestTypes View the interesttypes section in
this documentCategories Array of Categories View the categories section in this
documentSituations Array of situation View the situations section in this
document.Geometry RadiusSearchRequest RadiusSearchRequest contains a
Center with Latitude and Longitude as decimals. RadiusMetres is an integer.
SearchWords Array of searchword View the searchwords section in this document
Intervals Array of interval View the intervals section in this document.Each interval should also define a minimum and a maximum value. Each being Integet (32-bit) values.
Solution Documentation.docx
Page 15 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
GET list/searchFilterId/notificationIdTakes both a searchFilterId and a notificationId as parameters, and returns only the list of the properties from the specified notification.
GET map/searchFilterIdTakes a searchFilterId, and returns this model:
property type DescriptionPropertyMapPoints PropertyMapPoint Read on for further documentationSearchFilterId Guid The id of the search filterTotalNumberOfResults Integer (32-bit) The number of results in this output
PropertyMapPointProperty type DescriptionPropertyId Integer (32-bit) The id of the propertyLatitude Double Indicate the specific location of this
property.Longitude DoubleViewPropertyTeaserUrl String The url to use, when teaser
information is required
PUT map/searchFilterIdTakes the same request as PUT list/searchFilterId and responds as GET map/searchFilterId
PUT map/searchFilterId/notificationIdTakes the same request as PUT list/searchFilterId/notificationId and responds as GET map/searchFilterId.
POST listTakes the same searchFilter and display options as discussed earlier and returns a new searchfilterid with the same model as GET list/searchFilterId
POST mapTakes the same searchFilter and display options as discussed earlier and returns a new searchfilterid with the same model as GET map/searchFilterId
GET map/teaser/propertyIdMainly used for when a user interacts with a propertymap model. This model is found here
PUT map/regionalcountUsing the input searchFilterId and limitations, returns a list of the following model:
Property Type DescriptionGeoType String The type of situationGeoName String Name of the current situationNumberOfMatchingProperties Integer (32-bit) The number of properties that are
within this sitatuion
Solution Documentation.docx
Page 16 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
searchAnything that has to do with a user’s search filter are found here.
POST idIn case of an arbitrary searchFilterId is ever needed, use this endpoint.
GET searchFilterIdUsing this, together with the searchFilterId will return the users Search Filter. The model looking like the following:
property type DescriptionPropertyType Enum View the further documentation
about propertytypesInterestTypes Array of interesttypes View the further documentation
about interesttypesCategories Array of categories View the further documentation
about categoriesSituations Array of situations View the further documentation
about situationsGeometry RadiusSearchRequestSearchWords Array of searchwords View the further documentation
about searchwordsIntervals Array of intervals View the further documentation
about intervals.Each interval should also define a minimum and a maximum value. Each being Integet (32-bit) values.
RadiusSearchRequestproperty type DescriptionCenter Latitude (double)
Longitude (doubleThe center of the input circle that this model will form
RadiusMetres Integer (32-bit) The radius of the input circle, in metres
combinedTakes a request of the first model shown hereafter which will search for valid searchwords that can be used in the searchfilter
property type DescriptionQuery String The input string of what is to be
searchedPropertyType Enum View the further documentation
about propertytypesMaxNumberOfResults Integer (32-bit) Limits the number of results
Solution Documentation.docx
Page 17 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
The response looking like this:
Property Type DescriptionSearchWordResults Array of SearchWordResult Read further for this modelDisplayWord String The word to displayNumberOfMatchingProperties Integer (32-bit) The number of properties that
contain the word(s)
SearchWordResultProperty type DescriptionWordId Integer (32-bit) The id that the API will use to better
identify the inputParentId Integer (32-bit) – nullable An Id of this word’s parent if anyeWordType String View this document for wordtypesWord String The word to search for
locationSearches for valid locations that can be put into the searchfilter. Uses the same requestmodel as “combined”
The response looking like this:
property type DescriptionGeoType String View the further documentation
about geotypesGeoName String The name of the locationNumberOfMatchingProperties Integer (32-bit) The number of properties that are
situated here
latestReturns a list of the latest SearchFilters
Property type DescriptionSearchFilterId String The id of the searchFilterLastSearchDate DateTime The date of the last time this filter
was usedPills List of strings An overview of which filters were
used
subscriptionsGET agentReturns a list of the user’s searchagents
POST agentCreates a new search agent and returns its base info.
DELETE agent/searchFilterIdDeletes the input search agent
Solution Documentation.docx
Page 18 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
POST agent/searchFilterIdCreates an agent with the searchFilterId
PUT agent/searchFilterId/settingsUsing the optional parameters, name, isMailAgent, isDailyPush and isInstantPush – updates the input searchAgent accordingly.
PUT agent/searchFilterId/nameUpdates the name on a search agent
DELETE agent/searchFilterId/nameDeletes the name on a search agent
GET agent/list/searchFilterIdReturns a list of properties, using the search agent’s filter. Optional Parameters: pageNumber, sortOrder, sortDescending.
GET agent/map/searchFilterIdReturns a list of properties, using the search agent’s filter
GET notification/notificationIdReturns a list of properties that match the input notification Id.
property Optional type DescriptionNotificationId False String The notificationId for which
the properties should match
GET inboxReturns a list of notifications for a registered user
GET inbox/countReturns the number of unread notifications for a user
PUT inbox/notificationIdUsing the input notificationId and the optional markAsRead parameter, this sets a notification as read by default.
PUT inbox/allMarks all notifications as read for the user.
usersThis section describes all methods that relates to users.
Solution Documentation.docx
Page 19 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
POST users/anonymousCreates an anonymous user and returns an Id of that user. This id should be used as the ETUser header where required.
GET users/informationReturns the name and e-mail for the input ETUser.
PUT users/informationUpdates the name and e-mail for the input ETUser.
DELETE users/loginDeletes any kind of user, using the input ETUser header.
POST users/loginPerforms a login, using the input credentials and returns this user’s id.
PUT users/login/changepasswordChanges the input user’s password
POST users/login/forgotpasswordSends an email, helping the user change the password.
POST users/login/creationCreates a new user with the input mail, password and name – then returns an Id.
GET users/devicetokenReturns a list of devicetokens.
POST users/devicetokenAdds the input devicetoken to the list for the input user.
ErrorcodesThis list is an overview of the possible error codes that are returned during validation. Multiple errors may exist on a request, but only one error will be returned at a time.
Here is a quick reference/overview of the codes:
ErrorCode interval Name1000-1999 Errors that have anything to do with the RequestHeaders2000-2999 Errors about the user3000-3999 Errors about a property
Solution Documentation.docx
Page 20 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
4000-4999 Object errors5000-5999 Search filter errors6000-6999 Subscription errors9999 Unknown error – contact Ejendomstorvet if you face this error.
ErrorCode FieldName Message Detailed1001 IP Invalid IP format The format of the IP
was not recognized1002 UserAgent UserAgent must be entered UserAgent cannot be
null or empty1003 ETUser Missing ETUser header. The ETUser header is
missing and must be added
2001 UserId UserId cannot be null or empty, and must be a valid Guid.
The ETUser header is invalid
2002 Name Name cannot be null or empty. The user’s input name is incorrect
2003 Email Email cannot be null or empty, and must be a valid email.
The email must be valid
2004 Password Password cannot be null or empty, and must be hashed
See the documentation about hashing the password
2005 AcceptRequired User’s accept is required. This ensures that the Partner has been given proactive accept from the user
2006 Company Company name cannot be null or empty.
The user’s input company is incorrect
2007 PhoneNumber PhoneNumber cannot be null or empty and must be a valid phone number
Letters are not allowed etc
2008 UserId The input user is not registered The user did not create a login under the provided userId.
2009 DeviceToken DeviceToken may not be null or empty
The provided DeviceToken must be provided.
2010 Email The input email is already in use.
A different email must be provided
2011 UserNotFound The input email or password were invalid.
The input user could not be found.
3001 PropertyId PropertyId was not found The id of the property seems invalid
3002 PropertyLogRefType PropertyLogRefType was not found or invalid
View the further documentation about propertylogreftypes
4001 DisplayOptions DisplayOptions is null or invalid. The input object was not recognized.
4002 SearchFilter SearchFilter is null or invalid. The input object was not recognized.
Solution Documentation.docx
Page 21 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
4003 SearchQueryRequest SearchQueryRequest is null or invalid.
The input object was not recognized.
4004 UserContactInfo UserContactInfo is null or invalid.
The input object was not recognized.
4005 AgentUpdateRequest AgentUpdateRequest is null or invalid.
The input object was not recognized.
4006 SearchAgentRequest SearchAgentRequest is null or invalid.
The input object was not recognized.
4007 UserCreateRequest UserCreateRequest is null or invalid.
The input object was not recognized.
4008 UserInformationUpdateRequest UserInformationUpdateRequest is null or invalid.
The input object was not recognized.
4009 UserLoginsRequest UserLoginsRequest is null or invalid.
The input object was not recognized.
5001 SearchId SearchId cannot be null, empty or an empty guid value
5002 ItemsPerPage Items per page must be larger than 0
5003 PageNumber PageNumber must be larger than 0.
5004 SortOrder SortOrder not found View the further documentation about sortorders
5005 PropertyType One or more PropertyTypes were not found
View the further documentation about propertytypes
5006 InterestType One or more InterestTypes were not found
View the further documentation about interesttypes
5007 PropertyCategory One or more property categories were not found
View the further documentation about categories
5008 GeoType One or more GeoTypes were not found
View the further documentation about geotypes
5009 WordType One or more WordTypes were not found.
View the further documentation about wordtypes
5010 Region One or more Regions were not found
View the further documentation about regions
5011 Area One or more Areas were not found
View the further documentation about areas
5012 Province One or more Provinces were not found
View the further documentation about provinces
5013 Municipality One or more Municipalities were not found
View the further documentation about municipalities
Solution Documentation.docx
Page 22 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
5014 Postal One or more Postals were not found
View the further documentation about postals
5015 IntervalName One or more Interval names were not valid
View the further documentation about intervals
5016 IntervalValues One or more Intervals values were not valid. The Maximum value must be at least larger than Minimum.
Minimum must be smaller than Maximum
5017 IntervalMinimum The Minimum value exceeds the hard limit of 32-bit integers
An Interval has an invalid Minimum value
5018 IntervalMaximum The Maximum value exceeds the hard limit of 32-bit integers
An Interval has an invalid Maximum value
5019 Query The query cannot be null or empty and must be at least 3 characters long before posting
The input query is not allowed to be less than 3 characters long
5020 MaxNumberOfResults Max number of results must be larger than 0.
The number of results must be larger than 0.
5021 Latitude Latitude must be between 54 and 58.
The input latitude is outside the bounds of Denmark, and are therefore not valid
5022 Longitude Longitude must be between 7 and 16.
The input longitude is outside the bounds of Denmark, and are therefore not valid
5023 Radius Radius must be larger than 100 metres.
The input radius is too small, the search is therefore ignored.
6001 AgentName AgentName cannot be longer than 100 characters.
Input a name for the searchagent that is shorter than 100 characters.
6002 NotificationId NotificationId could not be found.
The input id is not valid or could not be found.
9999 [Any] [Any] Please try again or contact Ejendomstorvet if you receive this error.
Changelog
Date Initials Changes/Updates
02-07-2019 PVS Created this document, added sections: _status, favorites, metadata, properties
04-07-2019 PVS Added section about ‘search’ and
Solution Documentation.docx
Page 23 / 24
Oline.Partner.Api SOLUTION DOCUMENTATION19-02-2019
errors
23-07-2019 PVS Added more error codes, saved searches and agents
01-08-2019 PVS Added links to cross references
13-08-2019 PVS Added more errors
20-08-2019 PVS Increased readability
04-09-2019 PVS Added more errors and Areas under metadata
10-09-2019 PVS Added error 2010. Updated metadata models
23-09-2019 PVS Added Users section
29-10-2019 PVS Geometry added to searchFilter
Solution Documentation.docx
Page 24 / 24