Consumers: Current

This service allows consumers linked to multiple agents can change which agent they are working with.

  1. Supported Roles
  2. Available Services
    1. Linked Agents for the Current Consumer
    2. Linked Agents for a Consumer
    3. Individual Linked Agent for a Consumer
    4. Consumer Contact Records under a Linked Agent
    5. Current Agent
  3. Current Agent Description
  4. Expansions
  5. 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

URI: /<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:
  • None

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,
              "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

URI: /<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:
  • None

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"
    }
}

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,
              "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

URI: /<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:
  • None

DELETE Response

The standard success/fail response is returned.

Consumer Contact Records under a Linked Agent

URI: /<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:
  • None

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

URI: /<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 Data 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.