API Context
Most Service Providers and Operators will have Properties within their community. Managing the Properties can be achieved with this API.
The Properties Web Services API enables external systems to -
- Find properties by identifier
- Update the external reference for a property
- Create new properties
- View property details based on reference number
- Find properties
External systems are required to authenticate to gain access to web services.
Concepts
Adding a property
The following information can be specified for a property:
- Address Line 1
- Address Line 2
- Building Name
- Site Name
- City/Town
- State
- Postcode
- Country
- Building Type
- Room Count
A property must have a property name, address line 1 and a country before it can be created.
Optionally, you may specify a property ID for the property. This is useful in the case of adding properties from an external system that uses a separate reference number to identify properties.
Upon creation, a property is assigned a unique Internal Ref#, for example 'PP-00000050'.
Base URL
https://{your_company_name}.leapcities.com/api/v1/properties
API
Get a Property by LEAP identifier External ID
This enables an external system to retrieve information about a property by the internal Leap property identifier (e.g. PP-77889988) or by the external property ID.
URL:
properties/identifier
properties/extid/external-identifier
Where identifier or external-identifier is the value for the required property.
Method: GET
Error Response Codes:
- 404 The supplied identifier doesn't exist
- 404 The supplied external property identifier doesn't exist
Example Response:
<property
xmlns="http://schema.majitek.com/leap-ws-v1.0"
identifier="PP-10000001"
ref="http://company.leapcities/api/v1/properties/PP-10000001"
extid="MAX12345"
unacked-since="2011-02-08T22:07:43.000+0000">
<name>My Mansion</name>
<address>
<street-address>1 Example Street</street-address>
<extended-address>Suite 201</extended-address>
<locality>New York</locality>
<region>NYC</region>
<postal-code>922654</postal-code>
<country-name code="US" />
</address>
<building-name>R1</building-name>
<site-name>Head Office</site-name>
<account-relationships>
<account-relationship identifier="1" ref="http://company.leapcities/api/v1/property-relationship/1" unacked-since="2011-03-18T08:47:20.000+1100"/>
</account-relationships>
<communities>
<community>original</community>
<community>alternative</community>
</communities>
<building-type>Commercial</building-type>
<room-count>394</room-count>
</property>
Update the external reference for a property
This method allows the external identifier to be set or updated on a property. The external identifier can then be used for future queries and updates.
URL:
properties/identifier/extid
Where identifier is the identifier for the required property.
Method: POST
POST Parameters:
- extid - The new external reference to apply to the property
Response Codes:
- 404 The supplied property identifier does not exist.
- 409 The supplied external identifier is already in use by another property.
Example
Request:
POST:
extid=MAX12345
Response:
<ref xmlns="http://schema.majitek.com/leap-ws-v1.0" ref="http://company.leapcities.com/api/v1/properties/PP-10000001" identifier="000000001" extid="MAX12345"/>
Acknowledge changes to a property
Allows an external system to acknowledge that it has dealt with the fact that there has been a creation or update to a property.
Performing this POST will clear the unacknowledged-since flag on the property and all its updates. It does not affect the unacknowledged-since flag on any entity references. (eg account-relationship)
URL:
properties/acked - * Uses LEAP identifiers to indicate which properties to clear the flag for.
properties/external/acked - * Uses external identifiers to indicate which properties to clear the flag for.
Method: POST
Parameters:
- none
Response Codes:
- 404 The supplied property identifier / external identifier does not exist.
Example Request:
<acknowledgements> <acknowledgement>10000001</acknowledgement> <acknowledgement>10000002</acknowledgement> </acknowledgements>
Create a Property
This enables an external system to create a new property record.
URL:
properties/
Method: POST
Example Request:
<property xmlns="http://schema.majitek.com/leap-ws-v1.0" > <name>My Mansion</name> <address> <street-address>1 Example Street</street-address> <extended-address>Suite 201</extended-address> <locality>New York</locality> <region>NYC</region> <postal-code>988654</postal-code> <country-name code="US" /> </address> <building-name>R1</building-name> <site-name>Head Office</site-name> </property>
Update a Property
This method allows an external system to update the details of a property.
URL:
properties/identifier
properties/extid/external-identifier
Where identifier or external-identifier are the values for the required property.
Method: PUT
Example Request:
<property> <name>My Mansion</name> <address> <street-address>1 Example Street</street-address> <extended-address>Suite 201</extended-address> <locality>New York</locality> <region>NYC</region> <postal-code>988654</postal-code> <country-name code="US" /> </address> <building-name>Towers</building-name> <site-name>Central York</site-name> <building-type>Commercial</building-type> <room-count>394</room-count> <communities> <community>original</community> </communities> </property>
Find Properties
This method allows an external system to retrieve the properties in the system:
- acked - restricts results to only properties that have been acknowledged / or need to be acknowledged, as applicable. Not passing acked parameter results in find all.
- limit - number of results to return. Optional - default is 100. Maximum limit is 100.
- offset - number of results to skip. Used to page through results.
URL:
properties/
Method: GET
Example Parameters:
- acked=false
Example Response:
<properties> <property xmlns="http://schema.majitek.com/leap-ws-v1.0" identifier="PP-10000001" ref="http://company.leapcities/api/v1/properties/PP-10000001" extid="MAX12345" unacked-since="2011-02-08T22:07:43.000+0000"> <name>My Mansion</name> <address> <street-address>1 Example Street</street-address> <extended-address>Suite 201</extended-address> <locality>New York</locality> <region>NYC</region> <postal-code>922654</postal-code> <country-name code="US" /> </address> <building-name>R1</building-name> <site-name>Head Office</site-name> <account-relationships> <account-relationship identifier="1" ref="http://localhost:23308/api/v1/property-relationship/1" unacked-since="2011-03-18T08:47:20.000+1100"/> </account-relationships> <communities> <community>original</community> <community>alternative</community> </communities> <building-type>Commercial</building-type> <room-count>222</room-count> </property> <property xmlns="http://schema.majitek.com/leap-ws-v1.0" identifier="PP-10000002" ref="http://company.leapcities/api/v1/properties/PP-10000002"> <name>My Other house</name> <address> <street-address>2 Example Street</street-address> <extended-address>Suite 301</extended-address> <locality>New York</locality> <region>NYC</region> <postal-code>922654</postal-code> <country-name code="US" /> </address> <account-relationships> <account-relationship identifier="2" ref="http://localhost:23308/api/v1/property-relationship/2" unacked-since="2011-03-18T08:47:20.000+1100"/> </account-relationships> </property> </properties>