Lookups | Geo data | Files
Offices
Supported methods
- get list of offices
- get office detail
- create office
- update office
- terminate office
- cancel all offices' properties
- remove office image
* All listings are provided as example. They might not contain the entire list of fields. For the complete list of fields, please consult the corresponding data dictionary.
Get offices
This method returns a paginated list of offices.
Using the default options, the method returns only public available offices (offices that are not disabled). See optional parameters below.
You cannot bring the entire list of offices in one call. You have to make multiple calls, in pages, until you get the entire list.
Call
GET integrator/{integrator id}/offices?page={page number}&take={page size}
All parameters can be used in the same time. Their effect is cummulative.
Required parameters:
- page
- Represents the page number you want to retrieve from the available list of records. The minimum value is 1. The maximum value can be found out from the Response from TotalPageCount element.
- take
- Represents the page size. How many records a page should contain. The minimum value is 1, the maximum value is 100.
Optional parameters:
- all
- If this optional parameter is ommitted or all=0, then only public available offices (offices that are not disabled) are retrieved. If all=1, then all resource records are retrieved.
- startDate
- If this optional parameter is used, then only records that were modified from this date (inclusive) will be returned. Use English date format. Recommended format: yyyy-MM-ddThh:mm:ss
- endDate
- If this optional parameter is used, then only records that were modified until this date (inclusive) will be returned. Recommended format: yyyy-MM-ddThh:mm:ss
Request
GET http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices?page=1&take=100 HTTP/1.1 Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk+", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619" Accept: application/xml; charset=utf-8
Response XML
HTTP/1.1 200 OK Content-Type: application/xml; charset=utf-8 <RexApiList> <HasNextPage>true</HasNextPage> <HasPreviousPage>false</HasPreviousPage> <PageIndex>1</PageIndex> <PageSize>100</PageSize> <TotalCount>346</TotalCount> <TotalPageCount>4</TotalPageCount> <Items> <Office> <Address1>16787 Bernardo Center Dr #6</Address1> <AlternateURL /> .....
</Office>
.....
</Items>
</RexApiList>
Response JSON
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "PageIndex": 1, "PageSize": 100, "TotalCount": 346, "TotalPageCount": 4, "HasNextPage": true, "HasPreviousPage": false, "Items": [ { "ID": 1005343, "IntegratorID": 1005001, "ExternalID": "6241", .....
},
.....
]
}
Http Status Codes Responses & Messages
Status | Message | Description |
---|---|---|
200 - OK | You get the list of objects | Call was successful |
404 - Bad request | <Error> <Message>The request is invalid.</Message> <ModelState> ..... </ModelState> </Error> |
You used the wrong parameter values. <ModelState> element will provide you the necessary details. Please correct the issues and try again. |
Get office
This method returns the details of one office. You can use Gryphtech Office ID or your own Office ExternalID.
GET integrator/{integrator id}/offices/{resource id}
Required parameters:
- resource id
- Gryphtech Office ID or your own ExternalID can be used. To use
ExtrenalID, prefix your ID with "ext-", like this: ext-ExternalID
{IntegratorOfficeID} can contain only numbers, non accented letters and characters "_", "-"
Example of call using Gryphtech OfficeID: integrator/1005001/offices/123
Example of call using your own IntegratorOfficeID: integrator/1005001/offices/ext-abc_456
Request
GET http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices/ext-6241 HTTP/1.1 Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk+", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619" Accept: application/xml; charset=utf-8
Response XML
HTTP/1.1 200 OK Content-Type: application/xml; charset=utf-8 <Office> <Address1>16787 Bernardo Center Dr #6</Address1> <Closer></Closer> <CollectionCertified>false</CollectionCertified> <CommercialCertified>false</CommercialCertified> <CreatedDate>2012-12-01T06:38:00</CreatedDate> <Email>qatest@gryphtech.com</Email> <ExternalID>6241</ExternalID> <Fax>666-666-6666</Fax> <GeoCoordinates> <Latitude>33.019437000000</Latitude> <Longitude>-117.075068000000</Longitude> </GeoCoordinates> <GeoData> <CityID>4178216</CityID> </GeoData> <ID>1005343</ID> <IntegratorID>1005001</IntegratorID> <InternationalID>R0040520</InternationalID> <ModifiedDate>2014-11-02T04:55:00</ModifiedDate> <OfficeDescription> </OfficeDescription> <OfficeName>RE/MAX ASSOCIATES</OfficeName> <Phone>666-666-6666</Phone> <PostalCode>92128</PostalCode> <RegionID>1005</RegionID> <ShowAssociateDirectDial>true</ShowAssociateDirectDial> <SucceedCertified>false</SucceedCertified> <Terminated>false</Terminated> <URLToPrivatePage>http://associates0040520.californiahawaii.com</URLToPrivatePage> </Office>
Response JSON
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "ID": 1005343, "IntegratorID": 1005001, "ExternalID": "6241", "CreatedDate": "2012-12-01T06:38:00", "ModifiedDate": "2014-11-02T04:55:00", "Terminated": false, "RegionID": 1005, "InternationalID": "R0040520", "OfficeName": "RE/MAX ASSOCIATES", "Address1": "16787 Bernardo Center Dr #6", "PostalCode": "92128", "Email": "qatest@gryphtech.com", "Fax": "666-666-6666", "Phone": "666-666-6666", "URLToPrivatePage": "http://associates0040520.californiahawaii.com", "GeoData": { "CityID": 4178216 }, "GeoCoordinates": { "Latitude": 33.019437, "Longitude": -117.075068 }, "OfficeDescription": "", "Closer": "", "ShowAssociateDirectDial": true, "CollectionCertified": false, "CommercialCertified": false, "SucceedCertified": false, } }
Http Status Codes Responses & Messages
Status | Message | Description |
---|---|---|
200 - OK | You get the resource object | Call was successful |
404 - Not Found | Resource was not found for the specified ID |
Create office
This method allows you to create a new office.
Following values from your object model are ignored:
- ID:
- This value is system generated.
- CreatedDate and ModifiedDate
- these dates are system generated
- IntegratorID and RegionID
- they are preset for your account.
- LeadAdminAssociateID
- If the office does not yet exist, there are no associates added. Here you must specify an existing Associate ID from the same office. Create the office, add associates to the office, then update the office with the desired value. This is a Gryphtech Associate ID.
Call
POST integrator/{integrator id}/offices
Request XML
In XML, elements order is important. The order is alphabetical.
POST http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices HTTP/1.1 Accept: application/xml; charset=utf-8 Content-Type: application/xml; charset=utf-8 Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619" <Office> <Address1>#5 Miraleste Plaza</Address1> <CollectionCertified>false</CollectionCertified> <CommercialCertified>false</CommercialCertified> <Email>qatest@gryphtech.com</Email> <ExternalID>6242_Test1</ExternalID> <Fax>666-666-6666</Fax> <GeoCoordinates> <Latitude>33.748776000000</Latitude> <Longitude>-118.325178000000</Longitude> </GeoCoordinates> <GeoData> <CityID>4168766</CityID> </GeoData> <InternationalID>R0040532</InternationalID> <OfficeDescription> My office description </OfficeDescription> <OfficeName>RE/MAX ESTATE PROPERTIES</OfficeName> <Phone>666-666-6666</Phone> <PostalCode>90275</PostalCode> <ShowAssociateDirectDial>true</ShowAssociateDirectDial> <SucceedCertified>false</SucceedCertified> <URLToPrivatePage>http://palosverdesrealty0040532.californiahawaii.com</URLToPrivatePage> </Office>
Response XML
HTTP/1.1 201 Created Content-Type: application/xml; charset=utf-8 Location: http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices/ext-6242_Test1 ... created Office object with new ID ...
Request JSON
In JSON, element order does not matter.
POST http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices HTTP/1.1 Accept: application/json; charset=utf-8 Content-Type: application/json; charset=utf-8 Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619" { "Address1": "#5 Miraleste Plaza", "CollectionCertified": false, "CommercialCertified": false, "Email": "qatest@gryphtech.com", "ExternalID": "6242_Test1", "Fax": "666-666-6666", "GeoData": { "CityID": 4168766 }, "GeoCoordinates": { "Latitude": 33.748776, "Longitude": -118.325178 }, "InternationalID": "R0040532", "OfficeDescription": "My office description", "OfficeName": "RE/MAX ESTATE PROPERTIES", "Phone": "666-666-6666", "PostalCode": "90275", "ShowAssociateDirectDial": true, "SucceedCertified": false, "URLToPrivatePage": "http://palosverdesrealty0040532.californiahawaii.com" }
Response JSON
HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 Location: http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices/ext-6242_Test1 ... created Office object with new ID ...
Http Status Codes Responses & Messages
Status | Message | Description |
---|---|---|
201 - Created | You get the created resource object | Call was successful |
400 - Bad request | <Error> <Message> New resource validation failure. Resource was not created. </Message> <MessageDetail> ..... </MessageDetail> </Error> |
<MessageDetail> element will contain the reasons why validation failed. Correct the raised issues and try again. |
400 - Bad request | <Error> <Message>The request is invalid.</Message> <ModelState> <requestModel>.....</requestModel> </ModelState> </Error> |
The object you tried to upload does not match the expected object definition. <ModelState> element will explain where your object do not match the expected model. Please correct the raised issues and try again. |
409 - Conflict | <Error> <Message> A resource with ExternalID {0} already exists! Resource was not created. </Message> </Error> |
Every Office has to have an unique ExternalID. You cannot have 2 offices with the same ExternalID. |
409 - Conflict | <Error> <Message> Resource was not created. Please contact Gryphtech support </Message> </Error> |
Please contact Gryphtech support |
Update office
This method allows you to update an existing office.
This can be a full or a partial update. Partial update means that you do not have to provide the entire object, just the object properties that changed. Both PUT and PATCH methods are equivalent, no matter you choose full or partial update.
Following values from your object model are ignored:
- ID and ExternalID
- The resource to be updated is identified by the {resource id} URL parameter
- CreatedDate and ModifiedDate
- These dates are system generated
- IntegratorID and RegionID
- You cannot update these values. They are preset for your account.
Call
Full update
PUT integrator/{integrator id}/offices/{resource id}
Partial update
PATCH integrator/{integrator id}/offices/{resource id}
Required parameters:
- resource id
- See Get Office method for parameter description
Request XML
This is an example for a partial update. For a full update, the entire object must be present.
PUT http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices HTTP/1.1 Accept: application/xml; charset=utf-8 Content-Type: application/xml; charset=utf-8 Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619" <Office> <CollectionCertified>true</CollectionCertified> </Office>
Request JSON
This is an example for a partial update. For a full update, the entire object must be present.
PUT http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices HTTP/1.1 Accept: application/json; charset=utf-8 Content-Type: application/json; charset=utf-8 Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619" { "CollectionCertified": true }
Response
If the update was successful you will get the resource object back with the updated values. See Get Office method for XML and JSON responses.
Http Status Codes Responses & Messages
Status | Message | Description |
---|---|---|
200 - OK | You get the updated resource object | Call was successful |
404 - Not Found | <Error> <Message> Requested resource cannot be found. Requested operation was not performed </Message> <MessageDetail> Please make sure that a resource with the requested ID actually exist before making the call </MessageDetail> </Error> |
Resource was not found for the specified resource ID |
400 - Bad Request | <Error> <Message> New resource validation failure. Resource was not created. </Message> <MessageDetail> ..... </MessageDetail> </Error> |
<MessageDetail> element will contain the reasons why validation failed. Correct the raised issues and try again. |
400 - Bad Request | <Error> <Message>The request is invalid.</Message> <ModelState> <requestModel>.....</requestModel> </ModelState> </Error> |
The object you tried to upload does not match the expected object definition. <ModelState> element will explain where your object do not match the expected model. Please correct the raised issues and try again. |
Terminate office
To terminate on office you must use the Update Office method. Set Terminated property of the office to true and you are done.
Please note that when an office is terminated, the office and all its agents and properties are no longer visible on the public website even if there are agents or properties still active.
Http Status Codes Responses & Messages
Please see Update Office method.
Cancel all properties belonging to an office
This method cancel all properties belonging to the office identified with the {resource id}. Listing Status of the properties will be set to Cancelled.
Please note that as a result of this method call, all properties belonging to the office will no longer be visible on the public website.
Call
PUT integrator/{integrator id}/offices/{resource id}/cancelalllistings
Required parameters:
- resource id
- See Get Office method for parameter description
Request
PUT http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices/12345/cancelalllistings HTTP/1.1 Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"
Response
HTTP/1.1 204 No Content
Http Status Codes Responses & Messages
Status | Message | Description |
---|---|---|
204 - No Content | Call was successful | |
404 - Not Found | <Error> <Message> Requested resource cannot be found. Requested operation was not performed </Message> </Error> |
Resource was not found for the specified ID. As a result, the requested operation could not be performed. |
Remove office image
This method will remove the office image.
As a result of this call, on the public website, the office image will be replaced by a default image.
Call
PUT integrator/{integrator id}/offices/{resource id}/removeimage
Required parameters:
- resource id
- See Get Office method for parameter description
Request
PUT http://rexapi.gryphtech.com/api/v1/integrator/1005001/offices/12345/removeimage HTTP/1.1 Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"
Response
HTTP/1.1 204 No Content
Http Status Codes Responses & Messages
Status | Message | Description |
---|---|---|
204 - No Content | Call was successful | |
404 - Not Found | <Error> <Message> Requested resource cannot be found. Requested operation was not performed </Message> </Error> |
Resource was not found for the specified ID. As a result, the requested operation could not be performed. |