Consumers: Current
This service allows consumers linked to multiple agents can change which agent they are working with.
- Supported Roles
- Available Services
- Linked Agents for the Current Consumer
- Linked Agents for a Consumer
- Individual Linked Agent for a Consumer
- Consumer Contact Records under a Linked Agent
- Current Agent
- Current Agent Description
- Expansions
- API Explorer
Supported Roles
Role |
Reads |
Writes |
Notes |
IDX |
No |
No |
|
Public |
No |
No |
|
VOW |
Yes |
Yes |
|
Portal |
Yes |
Yes |
|
Private |
Yes |
No |
|
More information about roles
may be found here.
Available Services
Linked Agents for the Current Consumer
/<API Version>/consumers/me/agents
HTTP Method |
Description |
Conditional |
Notes |
GET |
Returns all agent accounts the current user can work with. |
No
|
|
POST |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
PUT |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
DELETE |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
GET Request
Parameters:
GET Response
{
"D": {
"Success": true,
"Results": [
{
"Id": "20110112234857732941000000",
"ResourceUri": "/v1/accounts/20110112234857732941000000",
"UserType": "Member",
"Name": "Joe Realtor",
"OfficeId": "20100113238853732842000000",
"Office": "Joe's Realty",
"CompanyId": null,
"Company": null,
"FbsIdxCustomer": false,
"MlsId": "20100127075503180752000000"
"PrimaryEmail": {
"Id": "20120424173947957808000000",
"Name": "Office E-Mail",
"Primary": true,
"Type": "Office",
"Address": "myoffice@example.com"
},
"PrimaryPhone": {
"Id": "20120424173948048729000000",
"Name": "Office Phone",
"Primary": true,
"Type": "Office",
"Number": "555-555-555",
"InternationalCode": nil,
"AreaCode": "555",
"Prefix": "555",
"LineNumber": "5555",
"Extension": nil
},
"PrimaryWebsite": {
"Id": "20120424173948178569000000",
"Name": "Office Web Site",
"Primary": true,
"Uri": "http://example.org",
"Type": "Office"
},
"Images": [
{
"Id": "20110426173018175220000000",
"Type": "Photo",
"Name": "My Photo",
"Uri": "http://photos.sparkplatform.com/az/...."
},
{
"Id": "20080426173011752890000000",
"Type": "Logo",
"Name": "My Logo",
"Uri": "http://photos.sparkplatform.com/az/...."
}
]
}
]
}
}
Linked Agents for a Consumer
/<API Version>/consumers/<Consumer.Id>/agents
Consumers are linked to agents through contact records.
HTTP Method |
Description |
Conditional |
Notes |
GET |
Returns all agent accounts the consumer can work with. |
No
|
Privileged Private roles only. Contact support to request this capability. |
POST |
Links a consumer to an agent |
No
|
Returns the records for the linked agent and contact. Privileged Private roles only. Contact support to request this capability. |
PUT |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
DELETE |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
GET Request
Parameters:
GET Response
See the GET request section for for the 'Linked Agents for the Current Consumer' service..
POST Request
Request body:
{
"D": {
"Id": "20110112234857732941000000",
/* MlsId creates a consumer as an "Unconnected" contact. Review the
the contacts service for more details> */
"MlsId": "20150312233497l32442000000",
/* "Portal" can be optionally supplied instead of Id; otherwise,
"Id" will take precedence. */
"Portal": {
"Name": "PortalSlug"
},
/*
If present, will link the consumer to an existing Contact
record instead of creating a new one. If that Contact record
does not also have a VOW account associated with it, one will
be created.
*/
"ContactId": "20150312233497l32442000000",
/*
A "Contact" attribute can be provided if a new
contact is to be created instead of linking to
an existing one.
This hash can accept any data supported by the
/v1/contacts creation service.
*/
"Contact": {
"DisplayName": "My Uber Name",
"PrimaryEmail": "myemail@sparkplatform.com",
"PhoneNumber": "555-5555"
}
}
}
POST Response
{
"D": {
"Success": true,
"Results": [
{
"Id": "20110112234857732941000000",
"ResourceUri": "/v1/accounts/20110112234857732941000000",
"UserType": "Member",
"Name": "Joe Realtor",
"OfficeId": "20100113238853732842000000",
"Office": "Joe's Realty",
"CompanyId": null,
"Company": null,
"FbsIdxCustomer": false,
"MlsId": "20100127075503180752000000"
"PrimaryEmail": {
"Id": "20120424173947957808000000",
"Name": "Office E-Mail",
"Primary": true,
"Type": "Office",
"Address": "myoffice@example.com"
},
"PrimaryPhone": {
"Id": "20120424173948048729000000",
"Name": "Office Phone",
"Primary": true,
"Type": "Office",
"Number": "555-555-555",
"InternationalCode": nil,
"AreaCode": "555",
"Prefix": "555",
"LineNumber": "5555",
"Extension": nil
},
"PrimaryWebsite": {
"Id": "20120424173948178569000000",
"Name": "Office Web Site",
"Primary": true,
"Uri": "http://example.org",
"Type": "Office"
},
"Images": [
{
"Id": "20110426173018175220000000",
"Type": "Photo",
"Name": "My Photo",
"Uri": "http://photos.sparkplatform.com/az/...."
},
{
"Id": "20080426173011752890000000",
"Type": "Logo",
"Name": "My Logo",
"Uri": "http://photos.sparkplatform.com/az/...."
}
]
},
{
"ResourceUri": "/vX/contacts/201010122342756895000000",
"Id": "201010122342756895000000",
"UserType": "Contact",
"DisplayName": "Some Person",
"PrimaryEmail": "test@test.com",
"Tags": [
"IDX Lead"
]
}
]
}
}
Individual Linked Agent for a Consumer
/<API Version>/consumers/<Consumer.Id>/agents/<Agent.Id>
HTTP Method |
Description |
Conditional |
Notes |
GET |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
POST |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
PUT |
Updates the Contact that links the Consumer to the Agent |
No
|
Returns the records for the linked agent and contact. Privileged Private roles only. Contact support to request this capability. |
DELETE |
Unlinks a consumer from an agent. |
No
|
Results in the consumer no longer being able to work with the agent. |
PUT Request
Request body:
{
"D": {
"ContactId": "20150312233497l32442000000"
}
}
PUT Response
The
standard success/fail response is returned.
DELETE Request
Parameters:
DELETE Response
The
standard success/fail response is returned.
Consumer Contact Records under a Linked Agent
/<API Version>/consumers/<Consumer.Id>/agents/<Agent.Id>/contacts
HTTP Method |
Description |
Conditional |
Notes |
GET |
Returns the agent's contact record linked to the specified consumer |
No
|
|
POST |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
PUT |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
DELETE |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
GET Request
Parameters:
GET Response
{
"D": {
"Success": true,
"Results": [
{
"ResourceUri": "/vX/contacts/201010122342756895000000",
"Id": "201010122342756895000000",
"UserType": "Contact",
"DisplayName": "Some Person",
"PrimaryEmail": "test@test.com",
"Tags": [
"IDX Lead"
]
}
]
}
}
Current Agent
/<API Version>/consumers/me/agents/current
HTTP Method |
Description |
Conditional |
Notes |
GET |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
POST |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
PUT |
Assigns the agent the current user will be working with |
No
|
|
DELETE |
Returns HTTP 405 (Method Not Allowed) |
No
|
Not implemented |
PUT Request
Request body:
{
"D": {
"Id" : "20110112234857732941000000"
}
}
PUT Response
The
standard success/fail response is returned.
Consumers Description
Attribute |
Data Type |
Writeable |
Required |
Description |
Agent Profile Information |
Accounts
|
|
|
A list of user accounts linked to each user. Only attributes unique to this service or searchable in this service are described below. |
Id |
Character |
Yes |
Yes |
The Id of the agent the consumer wishes to work with. See the documentation for Consumers for more information. |
Name |
Character |
No |
No |
The name of the user. |
UserType |
Character |
No |
No |
See the values available in the accounts service. |
Expansions
None.
API Explorer
The API Explorer does not currently support this service.