Accounts: Profile
The Profile sub-service allows management of the profile data associated with the active user.
Supported Roles
| Role | Reads? | Writes? |
|---|---|---|
| IDX | No | No |
| VOW | No | No |
| Private | Yes | Yes |
Profile
URI: /<API Version>/accounts/<Account.Id>/profile
| HTTP Method | Description | Notes |
|---|---|---|
| GET | Returns the profile associated with the account | |
| POST | Returns HTTP 405 (Method Not Allowed) | Not implemented |
| PUT | Updates a user's profile | |
| DELETE | Returns HTTP 405 (Method Not Allowed) | Not implemented |
GET Request
Parameters:- None
GET Response
See the GET request section for for the accounts service.
PUT Request
Request body:{
"D": {
"FirstName": "Sample",
"MiddleName": "T.",
"LastName": "User",
"Tags": ['Realtor'],
"Associations": ['Association of Realtors'],
"Emails": [
{
"Type": "Work",
"Name": "My Work E-mail",
"Address": "work@test.com",
"Primary": true
},
{
"Type": "Mobile",
"Name": "My Mobile E-mail",
"Address": "mobile@test.com"
}
],
"Phones": [
{
"Type": "Work",
"Name": "My Work Phone",
"Number": "701-555-1212",
"Primary": true
},
{
"Type": "Mobile",
"Name": "My Mobile Phone",
"Number": "702-555-1313"
}
],
"Websites": [
{
"Type": "Work",
"Name": "My Work Website",
"Uri": "http://iamthebestagent.com",
"Primary": true
},
{
"Type": "Mobile",
"Name": "My Mobile Website",
"Uri": "http://m.iamthebestagent.com"
}
],
"Addresses": [
{
"Type": "Work",
"Name": "My Work Address",
"Address": "101 Main Ave, Phoenix, AZ 12345",
"Primary": true
}
]
}
}
PUT Response
The standard success/fail response is returned.Collections
URI: /<API Version>/accounts/<Id>/profile/<Collection>
Where <Collection> may be one of the following: websites, emails, addresses, or phones.
| HTTP Method | Description | Notes |
|---|---|---|
| GET | Returns HTTP 405 (Method Not Allowed) | Not implemented |
| POST | Adds a new record to the collection | |
| PUT | Replaces the collection | |
| DELETE | Returns HTTP 405 (Method Not Allowed) | Not implemented |
POST Request
Request body:{
"D": {
"Type": "Office",
"Name": "My Work Website",
"Uri": "http://iamthebestagent.com",
"Primary": true
}
}
POST Response
The standard success/fail response is returned.PUT Request
Request body:See the PUT request section above.
PUT Response
The standard success/fail response is returned.Profile Collection Items
URI: /<API Version>/accounts/<Id>/profile/<Collection>/<Item.Id>
Where <Collection> may be one of the following: websites, emails, addresses, or phones.
| HTTP Method | Description | Notes |
|---|---|---|
| GET | Returns HTTP 405 (Method Not Allowed) | Not implemented |
| POST | Returns HTTP 405 (Method Not Allowed) | Not implemented |
| PUT | Replaces the collection item | |
| DELETE | Removes the collection item |
PUT Request
Request body:{
"D": {
"Type": "Work",
"Name": "My Work Website",
"Uri": "http://iamthebestagent.com",
"Primary": true
}
}
PUT Response
The standard success/fail response is returned.DELETE Request
Parameters:- None
DELETE Response
The standard success/fail response is returned.Profile Description
| Attribute | Data Type | Writeable? | Required? | Description |
|---|---|---|---|---|
| Id | Character | No | No | The account id. |
| UserType | Character | No | No | The type of account. |
| Name | Character | All UserTypes but Members | Yes | 150 characters maximum. |
| FirstName | Character | Members Only | No | 20 characters maximum. |
| MiddleName | Character | Members Only | No | 20 characters maximum. |
| LastName | Character | Members Only | No | 30 characters maximum. |
| Associations | Character List | No | No | A list of associations the user belongs to. These will vary per MLS. |
| LastName | Character | Members Only | No | 30 characters maximum. |
| Emails.Id | Character | No | No | The unique ID for the email record. |
| Emails.Type | Character | Yes | Yes | The Type of email record. See the metadata service above. |
| Emails.Primary | Boolean | Yes | No | true if this is the Primary email record. There will always be one primary record. |
| Emails.Name | Character | Yes | Yes | 20 characters maximum. |
| Emails.Address | Character | Yes | Yes | The e-mail address. 150 characters maximum. |
| Phones.Id | Character | No | No | The unique ID for the Phone record. |
| Phones.Type | Character | Yes | Yes | The Type of Phone record. See the metadata service above. |
| Phones.Primary | Boolean | Yes | No | true if this is the Primary phone record. There will always be one primary record. |
| Phones.Name | Character | Yes | Yes | 20 characters maximum. |
| Phones.Number | Character | No | No | The full phone number in a human-presentable format. |
| Phones.InternationalCode | Character | Yes | No | 4 characters maximum. |
| Phones.AreaCode | Character | Yes | No | 3 characters maximum. |
| Phones.Prefix | Character | Yes | No | 3 characters maximum. |
| Phones.LineNumber | Character | Yes | No | 4 characters maximum. |
| Phones.Extension | Character | Yes | No | 10 characters maximum. |
| Websites.Id | Character | No | No | The unique ID for the email record. |
| Websites.Type | Character | Yes | Yes | The Type of website record. See the metadata service above. |
| Websites.Primary | Boolean | Yes | No | true if this is the Primary website record. There will always be one primary record. |
| Websites.Name | Character | Yes | Yes | 20 characters maximum. |
| Websites.Uri | Character | Yes | Yes | The URI of the website. 150 characters maximum. |
| Address.Id | Character | No | No | The unique ID for the address record. |
| Address.Type | Character | Yes | Yes | The Type of address record. See the metadata service above. |
| Address.Primary | Boolean | Yes | No | true if this is the Primary address record. There will always be one primary record. |
| Address.Name | Character | Yes | Yes | 20 characters maximum. |
| Address.Address | Character | No | No | The full address in a human-presentable format. |
| Address.Street1 | Character | Yes | No | 50 characters maximum. |
| Address.Street2 | Character | Yes | No | 50 characters maximum. |
| Address.City | Character | Yes | No | 30 characters maximum. |
| Address.Region | Character | Yes | No | 2 characters maximum. |
| Address.PostalCode | Character | Yes | No | 10 characters maximum. |
Expansions
None.