NAV
JSON Ruby PHP HTTP

Welcome

Welcome to the Moxi Works Platform documentation. Here you’ll find documentation about integrating with the Moxi Works Authentication service and Moxi Works API.

Getting Started

If you have not received your platform credentials, please contact your Moxi Works Platform Partner Services Representative. Once you have received your Moxi Works Platform Credentials, you can begin your integration. For details on the integration process for Moxi Works Authentication service, please see Moxi Works Authentication section. For details about integration with Moxi Works API, see Moxi Works API section.

Credentials

When starting your integration process with Moxi Works Authentication or Moxi Works API your Moxi Works Platform representative will issue you a dedicated set of credentials for either Moxi Works Authentication, Moxi Works API or both. For Moxi Works Authentication, you’ll be provided a Client ID and a Client Secret that you can use along with this documentation to integrate with Moxi Works Platform Authentication service. For Moxi Works API, you’ll be provided a Platform Identifier and Platform Secret to send in your requests. For more information about Moxi Works Authentication credentials, see OAuth Credentials. For more information about Moxi Works API Credentials, see API Authorization.

QA Credentials

When integrating with Moxi Works API, you will be issued QA credentials and standard Moxi Works Platform credentials. Your Moxi Works QA credentials will be different than your Moxi Works Platform credentials and will not work on the Moxi Works Platform.

Moxi Works v1 API

API Overview

Moxi Works api allows partner access to Moxi Works Products.

Examples: See examples here for information on accessing resources using various languages.

Introduction

Production Base URL: https://api.moxiworks.com/

QA Base URL: https://api-qa.moxiworks.com/

The Moxi Works API provides programmatic access to Moxi Works features and data. We do our best to adhere to open and accepted common standards, including REST for access, JSON format for the data, and HTTP Basic Auth for Authorization.

The URL for the production version of the Moxi Works API is referenced in the API Usage section of the documentation. When developing your integration into the Moxi Works Platform using QA credentials, you can replace the production URL with the QA URL. The hostname for the QA environment is https://api-qa.moxiworks.com instead of api.moxiworks.com. In any production URL referenced in the documentation, simply subsitute the QA hostname for the production hostname.

Client Libraries

The following libraries are available to help your integration process with the Moxi Works Platform public API:

Install Ruby Library: gem install moxiworks_platform

Ruby

Ruby client libraries for the Moxi Works Platform can be found on rubygems.org and installed using gem.

Install PHP Library: composer require moxiworks/moxiworks_platform

PHP

PHP client libraries for the Moxi Works Platform can be found on packagist.org and installed using composer.

RESTful Architecture

The response payload is JSON encoded object(s) with defined structure which reflects a data model.

URL structure follows typical resource-oriented conventions. For example, to get a list of contacts, use GET https://api.moxiworks.com/contacts. This will return a list of Contact objects, where each Contact will have an “id” attribute. To get details on a particular contact, use GET https://api.moxiworks.com/contacts/123456, where 123456 is the “id” of the Contact you want. Similarly, to create a Contact, POST a Contact object to https://api.moxiworks.com/contacts/.

HTTP Standards

All actions taken through the API are done via HTTP using standard HTTP methods: GET (to retrieve an object), POST (to create), PUT (to modify), and DELETE. Standard HTTP Response codes are used to indicate success and error conditions.

Data Security

The Moxi Works Platform public API requires all requests use HTTPS. Any response to the Moxi Works Platform API using HTTP will be rejected with a 403 (forbidden) error.

Rate Limiting

To ensure that system resources are not overloaded and response quality degrated, Moxi Works allows only a limited number of requests every minute.

Over-limit Error Response Example
{
  "status": "fail",
  "errorCode": 4000,
  "message": "'Too many requests. Please try again later."
}

Handling “Rate Limit Exceeded” error In order to prevent abuse and undue stress on the Moxi Works servers, the API has a rate limiting feature that restricts users to 300 requests per minute per Access Token.

If and when the limit is enforced, any requests that exceed this limit will be rejected with an 429 HTTP status code, along with the JSON response body shown to the right

It is recommended that you design your integration to gracefully handle this rate limit error. One way to accomplish this would be to have your integration sleep for 60 seconds when this error is returned from the API, then retry the request. Alternatively, you might choose to use exponential backoff (an error handling strategy whereby you periodically retry a failed request with progressively longer wait times between retries, until either the request succeeds or a specified number of retry attempts is reached).

The Moxi Works Platform includes rate limiting information in the response headers. The following headers are included in every response:

Response Header Type Description
X-RateLimit-Limit Integer Number of request available in each period
X-RateLimit-Remaining Integer Requests remaining in current period
X-RateLimit-Period Integer Rate limit period length (in seconds)
X-RateLimit-Reset Unix Timestamp Timestamp at which the next period begins

Session Handling

Set-Cookie Response Example

  
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
X-Request-Id: c953f03d-05d6-43e9-baac-995d9b278004
X-Runtime: 0.757307
Server: Moximus
Date: Wed, 22 Jan 2017 18:34:44 GMT
Content-Length: 132
Connection: Keep-Alive
Set-Cookie: _wms_svc_public_session=Y0pzOEdSOGNlRklWSHVkTDVoeE11OU9xVEhoczZuVXJBWGo2Tzk1L0RKOGRwZVBkUnFWMG9nQ2o1QittT3dwN3lZNGVZQXgzSnJPNUp3RGlDS1dKQkZYT3FJQ0ZBaWFLczZTdFl1TjU5VVpRUEx2c29uUHI0cUFhYkUzbDNYMjR6SWdLZjFqM1pNS1dzYmp3dDhkQWw5cjVzMVVOZW1sTndoazNKeThWakhZPS0tNHZBUjk3aGFPbWs3bk9YQlhSbDBRUT09--7faa50a21bc8e09861bc9637eb828a4ce154a980; path=/; HttpOnly


Cookie Request Example

  
PUT /api/tasks/[partner_task_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded
Cookie: _wms_svc_public_session=QlpZQXFoOSs5TGFXZTZ5OVJvQXZIOUhSYSsrYnhXU1Q3cTJHdEd2enJabVdTbjZiWWtnaVFVbURLVmVOV0hEVURLbjZ0NGIzTnE1Mkg2ZEUwMlBLZDZBYWNBSm5xWUk4MWJLUGFFNEREK05Bd0JxZFZWbVp4SFFLVUVyRTdiTXJQb3doMGxkcjZVa3pCNENHZ3RZVWExQncvYkVnPS0tYy9oelpsbWtFd3lxR3VjWkt2ai9rdz09--b46be7a70083e0f70fea4370554b1f0250b3264c; path=/; HttpOnly


The Moxi Works Platform utilizes Cookie headers in order to propagate session data between requests. Each request is atomic and the session data is used atomically within the request. The session data itself is used to ensure that connection setup is as efficient as possible and to provide higher throughput to authorized users.

If you fail to include session data in your request, you will notice a far lower number of allowed connections to the Moxi Works Platform than is advertised in Rate Limiting.

When you successfully connect to the Moxi Works Platform, you will recieve a Set-Cookie header. The name of the cookie will be _wms_svc_public_session. You’ll need to send this cookie name - value pair back to The Moxi Works Platform in a Cookie request header.

Example Requests & Responses

For every API operation in this documentation, we show example requests and an example (JSON) response.

You’ll see the examples displayed in the grey panel to the right of each operation.

To view the sample code in a specific language, select the corresponding language tab at the top of the panel to the right. For more information about using the sample code in this API documentation, see Client Libraries.

As with any REST API, you can also test API requests / responses using a Chrome extension like Advanced REST Client (Chrome App) or Postman.

API Changes

Non-breaking changes: New features, functionality and bug fixes will be added to the API over time; you should expect to see new endpoints or new attributes in the payload for existing endpoints. Non-breaking changes will not result in a new API version. Ensure that your API consumer logic can handle new attributes gracefully. Ensure your API consumer logic does not depend on the order in which records are returned, unless static order is explicitly denoted in this documentation.

Breaking changes: Although we intend to support and maintain the current version of the API indefinitely, if changes that break the current API are made, we will publish the api update with a new version number, in order to ensure that the existing API functionality remains available to API consumers relying on that version. When breaking changes are added, the current version of the API will continue to be available.

Deprecations: Moxi Works occasionally deprecates APIs to indicate that those APIs should no longer be used in active development. Deprecated APIs typically remain present and usable for a reasonable period of time following the release in which they were deprecated; however, they may be removed entirely from a future version of the API as required. You should never use deprecated APIs in new development, and if you have existing code that uses deprecated APIs, we recommend that you update that code as soon as possible.

Required Headers

Required Headers Example

POST /api/[RESOURCE] HTTP/1.1
Authorization: Basic bpiYWFhYWFycnJycnJy==
Content-Type: application/x-www-form-urlencoded
Accept: application/vnd.moxi-platform+json;version=1
Cookie: _wms_svc_public_session=QlpZQXFoOSs5TGFXZT...
# required headers set automatically by moxiworks_platform library.
# to view, use the following:

MoxiworksPlatform::Resource.headers.inspect
<?php
/* required headers seat automatically by moxiworks_platform library.
to view, use the following:
*/
print_r(MoxiworksPlatform\Resource::headers());
?>

If you are implementing your own Moxi Works Platform library, you’ll need to ensure that you have the following headers configured in your request:

Authorization Used for platform authorization Basic [base64 encoded Partner ID and Partner Secret]
Accept Used for API version and resource routing application/vnd.moxi-platform+json;version=1
Content-Type Used for handling data in request application/x-www-form-urlencoded
Cookie Used for connection setup and rate limiting _wms_svc_public_session

For more information on the Cookie header, see Session Handling

Authorization

Example Authorization Header: (note that the authorization header platform identifier and platform secret are base64 encoded)

POST /api/[RESOURCE] HTTP/1.1
Authorization: Basic Zm9vb29vb29vb29vbzpiYWFhYWFycnJycnJy==

require 'moxiworks_platform'

platform_identifier = 'abc123' # platorm_identifier provided by Moxi Works Platform Rep
platform_secret = 'secret' #platform_secret provided by Moxi Works Platform Rep

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)


<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);
?>

The Moxi Works API utilizes Authorization HTTP headers for authorization.

To authorize your request, use the API Identifier and Secret combination you have been provided by your Moxi Works Platform representative.

When composing your basic header, per RFC 2617 you’ll need to base 64 encode your Moxi Works Platform Identifier and Secret and remember to separate your platform identifier and secret with a colon.

Help with HTTP Basic Auth on your platform

The following links provide helpful information for various platforms on creating HTTP Basic Auth Headers

ColdFusion

Still need more info? Email api@moxiworks.com and let us know what language you’re using to connect to the Moxi Works Platform.

Request Formatting

Setting Payload Format To Form Data using Content-Type header

POST /api/[RESOURCE] HTTP/1.1
Content-Type: application/x-www-form-urlencoded

moxi_works_agent_id=abc123&partner_contact_id=abc982cdf345&contact_name=Billy+Football

# required headers set automatically by moxiworks_platform library.
# to view, use the following:

MoxiworksPlatform::Resource.content_type_header.inspect
<?php
/* required headers seat automatically by moxiworks_platform library.
to view, use the following: 
*/
print_r(MoxiworksPlatform\Resource::contentTypeHeader());
?>

Setting Payload Format To JSON using Content-Type header

POST /api/[RESOURCE] HTTP/1.1
Content-Type: application/json
# required headers set automatically to x-www-form-urlencoded moxiworks_platform library.

<?php
/* required headers seat automatically to x-www-form-urlencoded by moxiworks_platform library.*/
?>

Your request body payload can either be formatted as JSON or as url encoded form parameters. Whichever method you choose, you’ll need to configure your Content-Type header to match the payload format.

Sending Data

When sending data, your payload should be formatted as a standard encoded form data or JSON.

For GET and DELETE requests, parameters should be embedded in the URL.

For POST, PUT request, the parameters should be included in the entity body of the request.

API Versioning

API Version Embedded In Accept Header

POST /api/[RESOURCE] HTTP/1.1
Accept: application/vnd.moxi-platform+json;version=1
 # accept header api version automatically set by moxiworks_platform in requests
 # to view the version of the API used with your version of  moxiworks_platform Ruby library:

MoxiworksPlatform::Resource.accept_header

 <?php
 /* accept header api version automatically sett by moxiworks_platform in requsts
 to view the version of the API used with your version of moxiworks_platform PHP library:
  */
echo MoxiworksPlatform\Resource::acceptHeader();
?>

Moxi Works API uses the Accept header to denote the version of the API to be used.

If you are using a Moxi Works Platform library, this header will already be included with every request.

Accept The Moxi Works API uses the Accept header to denote the API version to be used ( application/vnd.moxi-platform+json;version=[VERSION NUMBER]).

Error Handling

Error Response Example

{
  "status":"error",
  "messages":["Invalid moxi_works_agent_id"],
  "status_code":1040,
  "request_id":"c1b24426-397d-4855-9389-e39b58b918da"
}

The following table specifies the recommended action for each Moxi Works API error code.

Use this table to implement error handling logic according to the following guidelines:

• If the error code indicates a permanent error condition, do not retry the request.

• If the error code indicates a problem that can be fixed, do not retry the request until the problem has been fixed.

• If the error code indicates a problem that could be overcome by retrying the request after a period of time, retry the request using exponential backoff.

API Error Code HTTP Status Code Message Recommended Action
1000 400 A required header was missing or invalid: Fix issue, then retry.
1010 400 A required object attribute is missing from your request. Fix issue, then retry.
1020 400 Unable to parse request. Error will be included in response payload. Fix issue, then retry.
1030 400 A required parameter is missing from your request. Fix issue, then retry.
1040 400 The value was not valid for the parameter. Fix issue, then retry.
1050 400 The HTTP request body is required for this Method. Fix issue, then retry.
1060 400 The attribute(s) are not allowed for this operation. Fix issue, then retry.
1200 400 Malformed data in request. Fix issue, then retry.
1210 400 Unsupported operation. Do not retry.
2000 401 Basic Authorization header required. Fix issue, then retry.

Hint: Verify that Authorization header is present and set properly.
2010 401 Your Authorization header is invalid. Fix issue, then retry.

Hint: Verify that the Moxi Works Platform Identifier and Secret specified in the Authorization header are valid and properly encoded.
2015 401 Unauthorized request. Do not retry.
2020 403 You are forbidden to perform this action. Do not retry.

2025 403 You are forbidden to perform this action. Agent does not have access to requested resource. Do not retry.

3010 404 Version not supported. Fix issue, then retry.
3015 404 Resource not found. Fix issue, then retry.

Hint: Verify that you are using a valid resource path (i.e. /api/contacts/, /api/events/ etc.)
3020 405 HTTP Method not supported. Fix issue, then retry.

Hint: Verify that the proper verb is specified for the request (GET, PUT, POST, or DELETE).
3030 406 Invalid Accept header. Fix issue, then retry.

Hint: Verify that Accept header is set to the proper value (to match the output of the invoked endpoint – typically “application/json”).
3060 415 Invalid Content-Type header. Media type not supported. Fix issue, then retry.

Hint: Verify that Content-Type header is specified and set to the proper value.
4000 429 Rate limit exceeded. Retry using exponential backoff.

Hint: Reduce the rate at which you are sending requests.
5000 500 An unexpected error has occurred. Please contact api@moxiworks.com for assistance. Do not retry.
5010 500 An unexpected error has occurred. Please retry your request. If you encounter this error repeatedly, please contact api@moxiworks.com for assistance. Retry using exponential backoff.
5020 500 Server timeout exceeded. Request has failed. Retry using exponential backoff.
5030 503 api.moxiworks.com is currently offline for system maintenance. Please check back again shortly. Retry using exponential backoff.

Hint: Wait time between retries should measure in minutes (not seconds).

Agent Identifiers

The Moxi Works Platform provides two different primary keys for Agents to allow maximum flexibility for differing use-cases.

If you have already existing Agent data, agent accounts and your own user interface that Agents can use to integrate your account with their Moxi Works Platform account then you should use moxi_works_agent_id. This identifier guaranteed to be unique, but may be either an alphanumeric string or an email address. It is intended for use cases where integration is managed by end-user interaction.

If you are pulling Agent data from The Moxi Works Platform and integrating with your own system in a managed or automated fashion, then using agent_uuid is preferable. agent_uuid is guaranteed to be unique, uniformly formatted and to never change for the lifetime of the account.

API Usage

Use the following section to determine the request requirements and payload structure for Moxi Works Platform endpoints.

ActionLog

Moxi Works ActionLog entries record actions that contacts take that an agent might want to see to increase their effectivity. For example, if a contact sends an email to an agent asking a question, Moxi Works ActionLog will record that interaction and display it to the agent.

ActionLog Create

ActionLog Create (using agent_uuid) Request Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "partner_contact_id":"mySystemsContactId",
  "title":"Contact Called",
  "body":"this contact called you"
}

POST /api/action_logs HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


agent_uuid=12345678-1234-1234-1234-1234567890ab&partner_contact_id=mySystemsContactId&title=Contact%20Called&body=this%20contact%20called%20you

###### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_action_log = MoxiworksPlatform::ActionLog.create(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_contact_id: "mySystemsContactId",
        title: "Contact Called",
        body: "this contact called you"
        )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_action_log = MoxiworksPlatform\ActionLog::create([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'partner_contact_id' => 'mySystemsContactId',
        'title' => 'Contact Called',
        'body' => 'this contact called you']);
?>

ActionLog Create (using moxi_works_agent_id) Request Example

{
  "moxi_works_agent_id":"abc123",
  "partner_contact_id":"mySystemsContactId",
  "title":"Contact Called",
  "body":"this contact called you"
}

POST /api/action_logs HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


moxi_works_agent_id=abc123&partner_contact_id=mySystemsContactId&title=Contact%20Called&body=this%20contact%20called%20you

###### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_action_log = MoxiworksPlatform::ActionLog.create(
        moxi_works_agent_id: "1234abcd",
        partner_contact_id: "mySystemsContactId",
        title: "Contact Called",
        body: "this contact called you"
        )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_action_log = MoxiworksPlatform\ActionLog::create([
        'moxi_works_agent_id' => '1234abcd',
        'partner_contact_id' => 'mySystemsContactId',
        'title' => 'Contact Called',
        'body' => 'this contact called you']);
?>

When creating an ActionLog using the Moxi Works platform API, format your request using the following parameters.

ActionLog Create Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
body String 255
moxi_works_contact_id † String 255
partner_contact_id † String 255
title String 85

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

† Either moxi_works_contact_id or partner_contact_id must be supplied.

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your ActionLog request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated with. This will be a string that may take the form of an email address, or a unique identification string. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your ActionLog request to be accepted.

body This is a human readable string which would be presented to the Agent as the content of the ActionLog entry. This can be any arbitrary plain-text string which would be practical for the agent to see in the history of events associated with a Contact. It must be greater than 0 and must be less than 255 characters.

moxi_works_contact_id This is the Moxi Works Platform ID of the Contact which this ActionLog object is to be associated with. This will be an RFC 4122 compliant UUID. This data is required and must reference a valid Moxi Works Contact ID for your ActionLog Create request to be accepted. This is the same as the moxi_works_contact_id attribute of the Contact response.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that you are creating an ActionLog entry about. You should have already created the Contact record on the Moxi Works Platform using Contact Create before attempting to use the contact ID to create an ActionLog entry about the Contact. Your request will be rejected if the Contact record does not exist. title This is the human readable plain-text string which will be presented to the Agent as the heading of the ActionLog entry. This can be any short, descriptive sentence which would be practical for the agent to see in the history of events associated with a Contact.

ActionLog Create Response Payload

The following attributes make up the payload of the ActionLog response for a Create request.

ActionLog Create (using agent_uuid) Response Payload Example

  {
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_contact_id": "mySystemsContactId",
  "type": "log_entry_type",
  "timestamp": 1462234227,
  "title": "Contact Called",
  "body": "this contact called you"
}
ActionLog Create (using moxi_works_agent_id and moxi_works_contact_id) Response Payload Example

  {
  "moxi_works_agent_id": "1234abcd",
  "moxi_works_contact_id": "22345678-1234-1234-1234-1234567890ab",
  "type": "log_entry_type",
  "timestamp": 1462234227,
  "title": "Contact Called",
  "body": "this contact called you"
}
ActionLog Create Failure Response
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Create Response Attributes
Attribute Type
agent_uuid* String
moxi_works_agent_id* String
body String
moxi_works_contact_id † String
partner_contact_id † String
timestamp Integer
title String

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

† Either moxi_works_contact_id or partner_contact_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated with. This will be a string that may take the form of an email address, or a unique identification string.

body This is a human readable string which would be presented to the Agent as the content of the ActionLog entry. This can be any arbitrary plain-text string which would be practical for the agent to see in the history of events associated with a Contact. This should be the same as the data sent in the body parameter of the ActionLog Create request.

moxi_works_contact_id This is the Moxi Works Platform ID of the Contact that you are creating an ActionLog entry about. This will be an RFC 4122 compliant UUID.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that you are creating an ActionLog entry about. You should have already created the Contact record on the Moxi Works Platform using Contact Create

timestamp This is the Unix timestamp for the creation time of the ActionLog entry.

title This is the human readable plain-text string which will be presented to the Agent as the heading of the ActionLog entry. This may be any short, descriptive sentence which would be practical for the agent to see in the history of events associated with a Contact. This should be the same as the data sent in the title parameter of the ActionLog Create request.

ActionLog Index

When searching for ActionLog entities using the Moxi Works platform API, format your request using the following parameters.

ActionLog Index (using agent_uuid Request Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "partner_contact_id":"mySystemsContactId"
}

GET /api/action_logs?agent_uuid=12345678-1234-1234-1234-1234567890ab&partner_contact_id=mySystemsContactId HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisitesa

moxi_works_action_log_entries = MoxiworksPlatform::ActionLog.search(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_contact_id: "mySystemsContactId")


<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_action_log_entries = MoxiworksPlatform\ActionLog::search([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'partner_contact_id' => 'mySystemsContactId']);

?>

ActionLog Index (using moxi_works_agent_id Request Example

{
  "moxi_works_agent_id":"abc123",
  "partner_contact_id":"mySystemsContactId"
}

GET /api/action_logs?moxi_works_agent_id=abc123&partner_contact_id=mySystemsContactId HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisitesa

moxi_works_action_log_entries = MoxiworksPlatform::ActionLog.search(
        moxi_works_agent_id: "1234abcd",
        partner_contact_id: "mySystemsContactId")


<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_action_log_entries = MoxiworksPlatform\ActionLog::search([
        'moxi_works_agent_id' => '1234abcd',
        'partner_contact_id' => 'mySystemsContactId']);

?>
ActionLog Index Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
moxi_works_contact_id † String 255
partner_contact_id † String 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

† Either moxi_works_contact_id or partner_contact_id must be supplied.

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your ActionLog request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated with. This will be a string that may take the form of an email address, or a unique identification string. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your ActionLog request to be accepted.

moxi_works_contact_id This is the Moxi Works Platform ID of the Contact which the ActionLog objects are associated with. This will be an RFC 4122 compliant UUID. This data is required and must reference a valid Moxi Works Contact ID for your ActionLog Index request to be accepted. This is the same as the moxi_works_contact_id attribute of the Contact response.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that you are creating an ActionLog entry about. You should have already created the Contact record on the Moxi Works Platform using Contact Create before attempting to use your system’s contact ID to show ActionLog entries for the Contact. Your request will be rejected if the Contact record does not exist.

ActionLog Index Response Payload

The following attributes make up the payload of the ActionLog response for a Index request.

ActionLog Index (using agent_uuid) Response Payload Example

{
  "agent_uuid": "1234abcd",
  "partner_contact_id": "11111abe",
  "actions": [
  {
    "moxi_works_action_log_id": "02b918",
    "type": "lead_update_api",
    "log_data": {
      "source": "datplace",
      "timestamp": "1465937163",
      "user_info": {
        "property_info":{},
        "search_criteria":{},
        "contact":{
          "first_name":null,
          "message":"",
          "source":"datplace"
        }
      }
    }
  }
  {
    "moxi_works_action_log_id": "bded1806-3271-11e6-9bb3-5254000f954a",
    "type": "lead_update_api",
    "log_data": {
      "source": "foo.what",
      "timestamp": "1465937477",
      "user_info": {
        "property_info":{
          "PropertyURL":"www.wat.com",
          "MLSNumber":"",
          "StreetAddress":"",
          "City":"",
          "State":"",
          "Zip":"",
          "Beds":"",
          "Baths":"",
          "ListingPrice":"",
          "ListingStatus":"",
          "PhotoURL":""
        },
        "search_criteria":{},
        "contact":{
          "first_name":null,
          "message":"",
          "source":"foo.what"
        }
      }
    }
  }
  ]
}
ActionLog Index Response Payload Example (using moxi_works_agent_id)

{
  "moxi_works_agent_id": "1234abcd",
  "partner_contact_id": "11111abe",
  "actions": [
  {
    "moxi_works_action_log_id": "02b918",
    "type": "lead_update_api",
    "log_data": {
      "source": "datplace",
      "timestamp": "1465937163",
      "user_info": {
        "property_info":{},
        "search_criteria":{},
        "contact":{
          "first_name":null,
          "message":"",
          "source":"datplace"
        }
      }
    }
  }
  {
    "moxi_works_action_log_id": "bded1806-3271-11e6-9bb3-5254000f954a",
    "type": "lead_update_api",
    "log_data": {
      "source": "foo.what",
      "timestamp": "1465937477",
      "user_info": {
        "property_info":{
          "PropertyURL":"www.wat.com",
          "MLSNumber":"",
          "StreetAddress":"",
          "City":"",
          "State":"",
          "Zip":"",
          "Beds":"",
          "Baths":"",
          "ListingPrice":"",
          "ListingStatus":"",
          "PhotoURL":""
        },
        "search_criteria":{},
        "contact":{
          "first_name":null,
          "message":"",
          "source":"foo.what"
        }
      }
    }
  }
  ]
}
ActionLog Index Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Index Response Attributes
Attribute Type
agent_uuid* String
moxi_works_agent_id* String
moxi_works_contact_id † String
partner_contact_id † String

|actions|Array|

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

† Either moxi_works_contact_id or partner_contact_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which an ActionLog entry is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which an action log entry is associated with. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

moxi_works_contact_id This is the Moxi Works Platform ID of this Contact that this ActionLog entry is about. This will be an RFC 4122 compliant UUID.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that this ActionLog entry is about.

actions This is an Array containing any ActionLog entries found for the Index request.

actions Object

The actions array contains Dictionary objects representing ActionLog entries. The structure of each ActionLog entry is shown below.

Attribute Type
moxi_works_action_log_id String
type String
timestamp Integer
log_data Dictionary

moxi_works_action_log_id This is the unique identifier for the Moxi Works Platform ActionLog entry.

type This is a string from an enumerated set representing the type of ActionLog entry this is. The string should be formatted in lowercase with an underscore between each word. Individual ActionLog types are outside the scope of this document.

timestamp This is the Unix timestamp for the creation time of the ActionLog entry.

log_data This is the payload data of the ActionLog entry. The strucuture returned is dependent on the kind of ActionLog entry this is. Use the type attribute to determine what the structure of the ActionLog entry is and how to handle it. Details of various structures contained in ActionLog log_data in is outside the scope of this documentation.

Agent

Moxi Works Agent objects contain data about agents that your organization can use. For example, you can determine an agent’s office address or primary phone number from an Agent object.

Agent Show

Agent Show (using agent_uuid) Example

GET /api/agents/[agent_uuid]&moxi_works_company_id=[moxi_works_company_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_company_id":"the_company"
}

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_agent = MoxiworksPlatform::Agent.find(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        moxi_works_company_id: "abc123")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_agent = MoxiworksPlatform\Agent::find([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'moxi_works_company_id' => 'abc123']);
?>

Agent Show (using moxi_works_agent_id) Example

GET /api/agents/[moxi_works_agent_id]&moxi_works_company_id=[moxi_works_company_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{
  "moxi_works_agent_id":"abc123",
  "moxi_works_company_id":"the_company"
}

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_agent = MoxiworksPlatform::Agent.find(
        moxi_works_agent_id: "1234abcd",
        moxi_works_company_id: "abc123")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_agent = MoxiworksPlatform\Agent::find([
        'moxi_works_agent_id' => '1234abcd',
        'moxi_works_company_id' => 'abc123']);
?>
Agent Show Request Attributes

When finding an Agent using the Moxi Works platform API, format your request using the following parameters.

Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
moxi_works_company_id String 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the agent. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Agent request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent. This will be a string that may take the form of an email address, or a unique identification string. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Agent request to be accepted.

moxi_works_company_id A valid Moxi Works Company ID. Use Company Endpoint to determine what moxi_works_company_id you can use.

Agent Show Response Payload

The following attributes make up the payload of the Agent response for a Show request.

Agent Index Response Payload Example
{
  "moxi_works_agent_id": "abc123",
  "moxi_works_office_id":"8c3f446c-aab9-11e6-9a0f-d0e1408e8026",
  "office_address_street": "3456 Office Ln.",
  "office_address_street2":"Suite 1234",
  "office_address_city": "Officeville",
  "office_address_state": "AG",
  "office_address_zip": "12345",
  "name": "Buckminster Fuller",
  "first_name": "Buckminster",
  "last_name": "Fuller",
  "main_phone_number": "555) 9101112",
  "mobile_phone_number": "555 333 4567",
  "alt_phone_number": "(555) 567-8910",
  "fax_phone_number": "5557891011",
  "office_phone_number": "(234)456-7890",
  "primary_email_address": "the_agent@agentdomain.com",
  "secondary_email_address": "the_agent_alt@otherdomain.com",
  "title": "Broker",
  "uuid":"8675309e9-1234-dead-beef-deadbeefdead",
  "twitter": "@agentguy",
  "google_plus": "https://plus.google.com/1234567891011121314/posts",
  "facebook": "https://www.facebook.com/moxiworks/",
  "home_page": "foo.com",
  "profile_image_url": "http://picturererer.com/pics37/ImageStore.dll?id=852087C5D3A533DD&w=200",
  "profile_thumb_url": "http://picturererer.com/pics37/ImageStore.dll?id=852087C5D3A533DD&w=75",
  "alternate_offices": [
  {
    "moxi_works_office_id": "abc123",
    "office_id": 1234,
    "office_address_street": "2636 NW Office Street",
    "office_address_street2": null,
    "office_address_city": "Altville",
    "office_address_state": "IN",
    "office_address_zip": "23232",
    "office_phone_number": "813.555.1221"
    },
      {
    "moxi_works_office_id": "xyz789",
    "office_id": 5678,
    "office_address_street": "700 123rd Ave",
    "office_address_street2": "Suite 1234",
    "office_address_city": "Nextus",
    "office_address_state": "AL",
    "office_address_zip": "99899",
    "office_phone_number": "66655544444"
    }
  ]
}
Agent Show: Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Show Response Attributes
Attribute Type
moxi_works_agent_id String
moxi_works_office_id String
office_address_street String or null
office_address_street2 String or null
office_address_city String or null
office_address_state String or null
office_address_zip String or null
name String or null
first_name String or null
last_name String or null
main_phone_number String or null
mobile_phone_number String or null
alt_phone_number String or null
fax_phone_number String or null
office_phone_number String or null
primary_email_address String or null
secondary_email_address String or null
title String or null
uuid String
twitter String or null
google_plus String or null
facebook String or null
home_page String or null
profile_image_url String
profile_thumb_url String
alternate_offices Array

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

moxi_works_office_id This is the Moxi Works Platform ID of the office for this Agent. This will be an RFC 4122 compliant UUID.

office_address_street The street address of the agent’s office. This can be null if there is no data for this attribute.

office_address_street2 The suite or office number of the agent’s office. This can be null if there is no data for this attribute.

office_address_city The city the agent’s office is in. This can be null if there is no data for this attribute.

office_address_state The state or provice the agent’s office is in. This can be null if there is no data for this attribute.

office_address_zip The postal code the agent’s office is in. This can be null if there is no data for this attribute.

name The full name of the agent. This can be null if there is no data for this attribute.

first_name The first name of the agent. This can be null if there is no data for this attribute.

last_name The last name of the agent. This can be null if there is no data for this attribute.

mobile_phone_number Mobile phone number of the agent. main_phone_number should be considered higher priority, if not the same. This can be null if there is no data for this attribute.

alt_phone_number Alternate phone number for the agent. This should be considered second in priority to main_phone_number. This can be null if there is no data for this attribute.

fax_phone_number This is the agent’s fax phone number. This can be null if there is no data for this attribute.

main_phone_number This is the agent’s main phone number. This number should be considered the number the agent would like to be contacted by. This can be null if there is no data for this attribute.

fax_phone_number This is the agent’s fax phone number. This can be null if there is no data for this attribute.

office_phone_number This is the agent’s office phone number. This can be null if there is no data for this attribute.

primary_email_address This is the agent’s main email address. This email address should be considered the email address the agent would prefer to be contacted by. This can be null if there is no data for this attribute.

secondary_email_address This is the agent’s alternate email address. This email address should be considered the email address the agent would want to be contacted by only if the address in primary_email_address is not functional. This can be null if there is no data for this attribute.

title This is the business title of the agent. This can be null if there is no data for this attribute.

uuid This is an RFC 4122 compliant UUID associated with the agent. This UUID can be used as a unique identifier in determining associations between Agent objects and Listing objects.

twitter Agent’s Twitter account name. This can be null if there is no data available for this attribute.

google_plus Agent’s Google Plus account name. This can be null if there is no data for this attribute.

facebook Agent’s Facebook page url. This can be null if there is no data for this attribute.

home_page Agent’s website domain. This will be returned without the HTTP(S) prefix. You’ll need to prefix the domain with protocol if using this attribute for an href. This can be null if there is no data for this attribute.

profile_image_url This is a valid URL for a larger size image for the agent. If no agent image has been uploaded for this agent a default image url will be provided.

profile_thumb_url This is a valid URL for a thumbnail size image for the agent. If no agent image has been uploaded for this agent a default image url will be provided.

alternate_offices Object

The alternate_offices array contains Dictionary objects representing AlternateOffice entries. The structure of each AlternateOffice entry is shown below.

Attribute Type
moxi_works_office_id String
office_id Integer
office_address_street String
office_address_street2 String
office_address_city String
office_address_state String
office_address_zip String
office_phone_number String

moxi_works_office_id This is the unique identifier for the Moxi Works Platform AlternateOffice entry.

office_id This is an integer identifier for the Moxi Works Platform AlternateOffice entry. If you are using Moxi Works SSO, this will be the ID corresponding to the ID provided there.

office_address_street The street address of the office represented by this AlternateOffice entry.

office_address_street2 The second line of the street address (if required) of the office represented by this AlternateOffice entry.

office_address_city The city portion of the address of the office represented by this AlternateOffice entry.

office_address_state The state portion of the address of the office represented by this AlternateOffice entry.

office_address_zip The postal code portion of the address of the office represented by this AlternateOffice entry.

office_phone_number The phone number of the office represented by this AlternateOffice entry.

Agent Index

Agent Index Example

First page of all Agent objects for specified Company updated since a given timestamp

GET /api/agents?moxi_works_company_id=abc123&updated_since=1461108284 HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{
  "moxi_works_company_id":"the_company",
  "updated_since":1461108284
}


##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

one_week =  defined?(Rails) ? 1.week : 604800
company_agents = MoxiworksPlatform::Agent.search(moxi_works_company_id: "abc123", updated_since: Time.now - one_week)

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$one_week = 604800;
$company_agents = MoxiworksPlatform\Agent::search(['moxi_works_company_id' => 'abc123', 'updated_since' => time() - $one_week]);
?>

Second page of All Agent objects for a specified Company updated since a given timestamp

GET /api/agents?moxi_works_company_id=abc123&updated_since=1461108284&page_number=2 HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{
  "moxi_works_company_id":"the_company",
  "updated_since":1461108284,
  "page_number":2
}

one_week =  defined?(Rails) ? 1.week : 604800
company_agents = MoxiworksPlatform::Agent.search(moxi_works_company_id: "abc123", updated_since: Time.now - one_week, page_number: 2)

<?php
$one_week = 604800;
$company_agents = MoxiworksPlatform\Agent::search(['moxi_works_company_id' => 'abc123', 'updated_since' => time() - $one_week, 'page_number' => 2]);
?>

First page of All Agent objects for a specified Office updated since a given timestamp

GET /api/agents?moxi_works_office_id=8c3f446c-aab9-11e6-9a0f-d0e1408e8026&moxi_works_company_id=abc123&updated_since=1461108284 HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{
  "moxi_works_company_id":"the_company",
  "moxi_works_office_id":"8c3f446c-aab9-11e6-9a0f-d0e1408e8026",
  "updated_since":1461108284
}

one_week =  defined?(Rails) ? 1.week : 604800
company_agents = MoxiworksPlatform::Agent.search(moxi_works_company_id: "abc123", updated_since: Time.now - one_week, moxi_works_office_id: "8c3f446c-aab9-11e6-9a0f-d0e1408e8026")

<?php
$one_week = 604800;
$company_agents = MoxiworksPlatform\Agent::search(['moxi_works_company_id' => 'abc123', 'updated_since' => time() - $one_week, 'moxi_works_office_id' => '8c3f446c-aab9-11e6-9a0f-d0e1408e8026']);
?>
Agent Index Request Attributes

When searching for Agent entities using the Moxi Works platform API, format your data using the following parameters.

Attribute Type Length Limit
moxi_works_company_id String 255
moxi_works_office_id String 255
updated_since Integer 255
page_number Integer 255

Required Parameters Are In Red

moxi_works_company_id A valid Moxi Works Company ID. Use Company Endpoint to determine what moxi_works_company_id you can use.

moxi_works_office_id A valid Moxi Works Office ID. Use Office Endpoint to determine what moxi_works_office_id you can use.

updated_since any Agent objects updated after this Unix timestamp will be returned in the response. If no updated_since parameter is included in the request, only Agent objects updated in the last seven days will be returned.

page_number For queries with multi-page responses, use the page_number parameter to return data for specific pages. Data for page 1 is returned if this parameter is not included. Use this parameter if total_pages indicates that there is more than one page of data available.

Agent Index: Success Response

{
"page_number":9,
"total_pages":9,
"agents":[
{
  "moxi_works_agent_id": "abc123",
  "moxi_works_office_id":"8c3f446c-aab9-11e6-9a0f-d0e1408e8026",
  "office_address_street":"3456 Office Ln.",
  "office_address_street2":"Suite 1234",
  "office_address_city": "Officeville",
  "office_address_state": "AG",
  "office_address_zip": "12345",
  "name": "Buckminster Fuller",
  "first_name":"Buckminster",
  "last_name":"Fuller",
  "main_phone_number": "555) 9101112",
  "mobile_phone_number": "555 333 4567",
  "alt_phone_number": "(555) 567-8910",
  "fax_phone_number": "5557891011",
  "office_phone_number": "(234)456-7890",
  "primary_email_address": "the_agent@agentdomain.com",
  "secondary_email_address": "the_agent_alt@otherdomain.com",
  "title": "Broker",
  "uuid":"8675309e9-1234-dead-beef-deadbeefdead",
  "twitter": "@agentguy",
  "google_plus": "https://plus.google.com/1234567891011121314/posts",
  "facebook": "https://www.facebook.com/moxiworks/",
  "home_page": "foo.com",
  "profile_image_url": "http://picturererer.com/pics37/ImageStore.dll?id=852087C5D3A533DD&w=200",
  "profile_thumb_url": "http://picturererer.com/pics37/ImageStore.dll?id=852087C5D3A533DD&w=75",
  "alternate_offices": [
  {
    "moxi_works_office_id": "abc123",
    "office_id": 1234,
    "office_address_street": "2636 NW Office Street",
    "office_address_street2": null,
    "office_address_city": "Altville",
    "office_address_state": "IN",
    "office_address_zip": "23232",
    "office_phone_number": "813.555.1221"
    },
      {
    "moxi_works_office_id": "xyz789",
    "office_id": 5678,
    "office_address_street": "700 123rd Ave",
    "office_address_street2": "Suite 1234",
    "office_address_city": "Nextus",
    "office_address_state": "AL",
    "office_address_zip": "99899",
    "office_phone_number": "66655544444"
    }
  ]
}
]
}
Agent Index: Failure Response
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Agent Index responses are divided into pages of Agent objects. Use response payload attributes total_pages and page_number to determine how many pages of Agent objects there are and whether additional pages need to be requested.

Attribute Type
page_number Integer
total_pages Integer
agents Array
agents Object

The agents array contains Dictionary objects representing Agent entries. The structure of each Agent entry is shown below.

Attribute Type
moxi_works_agent_id String
moxi_works_office_id String
office_address_street String or null
office_address_street2 String or null
office_address_city String or null
office_address_state String or null
office_address_zip String or null
name String or null
first_name String or null
last_name String or null
main_phone_number String or null
mobile_phone_number String or null
alt_phone_number String or null
fax_phone_number String or null
office_phone_number String or null
primary_email_address String or null
secondary_email_address String or null
title String or null
uuid String
twitter String or null
google_plus String or null
facebook String or null
home_page String or null
profile_image_url String
profile_thumb_url String
alternate_offices Array

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

moxi_works_office_id This is the Moxi Works Platform ID of the office for this Agent. This will be an RFC 4122 compliant UUID.

office_address_street The street address of the agent’s office. This can be null if there is no data for this attribute.

office_address_street2 The suite or office number of the agent’s office. This can be null if there is no data for this attribute.

office_address_city The city the agent’s office is in. This can be null if there is no data for this attribute.

office_address_state The state or provice the agent’s office is in. This can be null if there is no data for this attribute.

office_address_zip The postal code the agent’s office is in. This can be null if there is no data for this attribute.

name The full name of the agent. This can be null if there is no data for this attribute.

first_name The first name of the agent. This can be null if there is no data for this attribute.

last_name The last name of the agent. This can be null if there is no data for this attribute.

mobile_phone_number Mobile phone number of the agent. main_phone_number should be considered higher priority, if not the same. This can be null if there is no data for this attribute.

alt_phone_number Alternate phone number for the agent. This should be considered second in priority to main_phone_number. This can be null if there is no data for this attribute.

fax_phone_number This is the agent’s fax phone number. This can be null if there is no data for this attribute.

main_phone_number This is the agent’s main phone number. This number should be considered the number the agent would like to be contacted by. This can be null if there is no data for this attribute.

fax_phone_number This is the agent’s fax phone number. This can be null if there is no data for this attribute.

office_phone_number This is the agent’s office phone number. This can be null if there is no data for this attribute.

primary_email_address This is the agent’s main email address. This email address should be considered the email address the agent would prefer to be contacted by. This can be null if there is no data for this attribute.

secondary_email_address This is the agent’s alternate email address. This email address should be considered the email address the agent would want to be contacted by only if the address in primary_email_address is not functional. This can be null if there is no data for this attribute.

title This is the business title of the agent. This can be null if there is no data for this attribute.

uuid This is an RFC 4122 compliant UUID associated with the agent. This UUID can be used as a unique identifier in determining associations between Agent objects and Listing objects.

twitter Agent’s Twitter account name. This can be null if there is no data available for this attribute.

google_plus Agent’s Google Plus account name. This can be null if there is no data for this attribute.

facebook Agent’s Facebook page url. This can be null if there is no data for this attribute.

home_page Agent’s website domain. This will be returned without the HTTP(S) prefix. You’ll need to prefix the domain with protocol if using this attribute for an href. This can be null if there is no data for this attribute.

profile_image_url This is a valid URL for a larger size image for the agent. If no agent image has been uploaded for this agent a default image url will be provided.

profile_thumb_url This is a valid URL for a thumbnail size image for the agent. If no agent image has been uploaded for this agent a default image url will be provided.

alternate_offices Object

The alternate_offices array contains Dictionary objects representing AlternateOffice entries. The structure of each AlternateOffice entry is shown below.

Attribute Type
moxi_works_office_id String
office_id Integer
office_address_street String
office_address_street2 String
office_address_city String
office_address_state String
office_address_zip String
office_phone_number String

moxi_works_office_id This is the unique identifier for the Moxi Works Platform AlternateOffice entry.

office_id This is an integer identifier for the Moxi Works Platform AlternateOffice entry. If you are using Moxi Works SSO, this will be the ID corresponding to the ID provided there.

office_address_street The street address of the office represented by this AlternateOffice entry.

office_address_street2 The second line of the street address (if required) of the office represented by this AlternateOffice entry.

office_address_city The city portion of the address of the office represented by this AlternateOffice entry.

office_address_state The state portion of the address of the office represented by this AlternateOffice entry.

office_address_zip The postal code portion of the address of the office represented by this AlternateOffice entry.

office_phone_number The phone number of the office represented by this AlternateOffice entry.

BuyerTransaction

Moxi Works Platform BuyerTransaction entities represent buyer-side transactions that agents are working on.

BuyerTransaction Stages

Each BuyerTransaction passes through five stages. Each stage represents a different stage in the transaction lifecycle. Every BuyerTransaction response will include the current stage of the BuyerTransaction both in its numeric form as well as a human readable string representation. As the transaction progresses through its lifecycle, you can promote it to the next stage. See Promoting BuyerTransaction Stage for information about promoting a BuyerTransaction object to the next stage.

Each BuyerTransaction created through the Moxi Works Platform will be created as a stage 3 (active) BuyerTransaction.

Use the table below to determine the mapping between the integer represended in stage and its human readable counterpart.

stage stage_name description
1 initialized This is an empty BuyerTransaction already associated with a Contact and is ready to be configured
2 configured This is an inactive BuyerTransaction that has been configured. This BuyerTransaction is not actively being worked on.
3 active This is a configured and active BuyerTransaction. The agent is actively working on this transaction.
4 pending This is an active BuyerTransaction that is in a pending state.
5 complete This is a BuyerTransaction which has been completed.

BuyerTransaction Create

BuyerTransaction Create (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223
}


POST /api/buyer_transactions HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

agent_uuid=12345678-1234-1234-1234-1234567890ab&moxi_works_contact_id=babebead-feed-face-dead-beefbad4babe&min_beds=12&max_beds=34&min_baths=1.75&max_baths=34.5&area_of_interest=Port%20Interesting&notes=take%20care%20to%20write%20notes%20that%20are%20descriptive%20and%20helpful&transaction_name=Bob%20And%20Linda%20Tonkanaka&address=1234%20memory%20lane&city=hereville&state=provinceland&zip_code=18292&sqft=2345&is_mls_transaction=true&commission_flat_fee=12345&target_price=&max_price=2323223&min_price=232323&mls_number=abc123

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.create(
      agent_uuid:"12345678-1234-1234-1234-1234567890ab",
      moxi_works_contact_id:"babebead-feed-face-dead-beefbad4babe",
      transaction_name:"Bob And Linda Tonkanaka",
      notes:"take care to write notes that are descriptive and helpful",
      address:"1234 memory lane",
      city:"hereville",
      state:"provinceland",
      zip_code:"18292",
      min_sqft:1234,
      max_sqft:2345,
      min_beds:3,
      max_beds:12,
      min_baths:1.75,
      max_baths:34.5,
      area_of_interest:"Port Interesting",
      is_mls_transaction:true,
      mls_number:"abc123",
      commission_flat_fee:12345,
      min_price:292929,
      max_price:2323223
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::create([
      "agent_uuid" => "12345678-1234-1234-1234-1234567890ab",
      "moxi_works_contact_id" => "babebead-feed-face-dead-beefbad4babe",
      "transaction_name" => "Bob And Linda Tonkanaka",
      "notes" => "take care to write notes that are descriptive and helpful",
      "address" => "1234 memory lane",
      "city" => "hereville",
      "state" => "provinceland",
      "zip_code" => "18292",
      "min_sqft" => 1234,
      "max_sqft" => 2345,
      "min_beds" => 3,
      "max_beds" => 12,
      "min_baths" => 1.75,
      "max_baths" => 34.5,
      "area_of_interest":"Port Interesting",
      "is_mls_transaction" => true,
      "mls_number" => "abc123",
      "commission_flat_fee" => 12345,
      "min_price" => 292929,
      "max_price" => 2323223
       ]);
?>

BuyerTransaction Create (using moxi_works_agent_id) Example

{
  "moxi_works_agent_id":"abc123",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223
}


POST /api/buyer_transactions HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

moxi_works_agent_id=abc123&moxi_works_contact_id=babebead-feed-face-dead-beefbad4babe&min_beds=12&max_beds=34&min_baths=1.75&max_baths=34.5&area_of_interest=Port%20Interesting&notes=take%20care%20to%20write%20notes%20that%20are%20descriptive%20and%20helpful&transaction_name=Bob%20And%20Linda%20Tonkanaka&address=1234%20memory%20lane&city=hereville&state=provinceland&zip_code=18292&sqft=2345&is_mls_transaction=true&commission_flat_fee=12345&target_price=&max_price=2323223&min_price=232323&mls_number=abc123

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.create(
      moxi_works_agent_id:"abc123",
      moxi_works_contact_id:"babebead-feed-face-dead-beefbad4babe",
      transaction_name:"Bob And Linda Tonkanaka",
      notes:"take care to write notes that are descriptive and helpful",
      address:"1234 memory lane",
      city:"hereville",
      state:"provinceland",
      zip_code:"18292",
      min_sqft:1234,
      max_sqft:2345,
      min_beds:3,
      max_beds:12,
      min_baths:1.75,
      max_baths:34.5,
      area_of_interest:"Port Interesting",
      is_mls_transaction:true,
      mls_number:"abc123",
      commission_flat_fee:12345,
      min_price:292929,
      max_price:2323223
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::create([
      "moxi_works_agent_id" => "abc123",
      "moxi_works_contact_id" => "babebead-feed-face-dead-beefbad4babe",
      "transaction_name" => "Bob And Linda Tonkanaka",
      "notes" => "take care to write notes that are descriptive and helpful",
      "address" => "1234 memory lane",
      "city" => "hereville",
      "state" => "provinceland",
      "zip_code" => "18292",
      "min_sqft" => 1234,
      "max_sqft" => 2345,
      "min_beds" => 3,
      "max_beds" => 12,
      "min_baths" => 1.75,
      "max_baths" => 34.5,
      "area_of_interest":"Port Interesting",
      "is_mls_transaction" => true,
      "mls_number" => "abc123",
      "commission_flat_fee" => 12345,
      "min_price" => 292929,
      "max_price" => 2323223
       ]);
?>

Non MLS BuyerTransaction Create (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":false,
  "start_timestamp":1480536319,
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223
}


POST /api/buyer_transactions HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

agent_uuid=12345678-1234-1234-1234-1234567890ab&moxi_works_contact_id=babebead-feed-face-dead-beefbad4babe&min_beds=12&max_beds=34&min_baths=1.75&max_baths=34.5&area_of_interest=Port%20Interesting&notes=take%20care%20to%20write%20notes%20that%20are%20descriptive%20and%20helpful&transaction_name=Bob%20And%20Linda%20Tonkanaka&address=1234%20memory%20lane&city=hereville&state=provinceland&zip_code=18292&sqft=2345&is_mls_transaction=false&commission_flat_fee=12345&target_price=&max_price=2323223&min_price=232323

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.create(
      agent_uuid:"12345678-1234-1234-1234-1234567890ab",
      moxi_works_contact_id:"babebead-feed-face-dead-beefbad4babe",
      transaction_name:"Bob And Linda Tonkanaka",
      notes:"take care to write notes that are descriptive and helpful",
      address:"1234 memory lane",
      city:"hereville",
      state:"provinceland",
      zip_code:"18292",
      min_sqft:1234,
      max_sqft:2345,
      min_beds:3,
      max_beds:12,
      min_baths:1.75,
      max_baths:34.5,
      is_mls_transaction:false,
      start_timestamp:1480536319,
      commission_flat_fee:12345,
      min_price:292929,
      max_price:2323223
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::create([
      "agent_uuid" => "12345678-1234-1234-1234-1234567890ab",
      "moxi_works_contact_id" => "babebead-feed-face-dead-beefbad4babe",
      "transaction_name" => "Bob And Linda Tonkanaka",
      "notes" => "take care to write notes that are descriptive and helpful",
      "address" => "1234 memory lane",
      "city" => "hereville",
      "state" => "provinceland",
      "zip_code" => "18292",
      "min_sqft" => 1234,
      "max_sqft" => 2345,
      "min_beds" => 3,
      "max_beds" => 12,
      "min_baths" => 1.75,
      "max_baths" => 34.5,
      "is_mls_transaction" => true,
      "start_timestamp" => 1480536319,
      "commission_flat_fee" => 12345,
      "min_price" => 292929,
      "max_price" => 2323223
       ]);
?>

When creating an transaction using the Moxi Works platform API, format your data using the following parameters.

BuyerTransaction Create Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
moxi_works_contact_id String 255
partner_contact_id String 255
transaction_name String 255
notes String
address String 255
city String 255
state String 255
zip_code String 255
min_sqft Integer 255
max_sqft Integer 255
min_beds Integer 255
max_beds Integer 255
min_baths Float 255
max_baths Float 255
area_of_interest Integer 255
is_mls_transaction Boolean 255
mls_number String 255
start_timestamp Integer 255
commission_percentage Float 255
commission_flat_fee Integer 255
target_price Integer 255
min_price Integer 255
max_price Integer 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which the BuyerTransaction entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your BuyerTransaction request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this BuyerTransaction object is to be associated with. This will be a string that may take the form of an email address, or a unique identification string. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your BuyerTransaction request to be accepted.

moxi_works_contact_id This is the Moxi Works Platform ID of the Contact which this BuyerTransaction object is to be associated with. This will be an RFC 4122 compliant UUID. This data is required and must reference a valid Moxi Works Contact ID for your BuyerTransaction Create request to be accepted. This is the same as the moxi_works_contact_id attribute of the Contact response.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that this BuyerTransaction regards. If the referenced contact was not created by you, then this should not be used, instead use moxi_works_contact_id.

transaction_name A brief, human readable title that will be shown to the agent as the subject of the BuyerTransaction that you are creating.

notes Brief, human readable content that will be shown to the agent as notes about the BuyerTransaction that you are creating.

address The street address of the property being purchased. This should be populated if this BuyerTransaction is_mls_transaction is false.

city The city or township of the property being purchased. This should be populated if this BuyerTransaction is_mls_transaction is false.

state The state or province of the property being purchased. This should be populated if this BuyerTransaction is_mls_transaction is false.

zip_code The postal code of the property being purchased. This should be populated if this BuyerTransaction is_mls_transaction is false.

min_sqft The minimum desired living area for prospective properties.

max_sqft The maximum desired living area for prospective properties.

min_beds The minimum number of bedrooms for prospective properties.

max_beds The maximum number of bedrooms for prospective properties.

min_baths The minimum number of bathrooms for prospective properties.

max_baths The maximum number of bathrooms for prospective properties.

area_of_interest The name of a locality representing an area of interest for prospective properties.

is_mls_transaction Whether the property being purchased is being listed on an MLS. This should be false for paperwork-only, for sale by owner, off-market, or pocket listing type transactions or any transactions that will not be tracked through an MLS.

mls_number The MLS number of the the property being purchased.

start_timestamp This is the Unix timestamp representing the date that the agent initiated transaction discussions with the client.

commission_percentage Commission for the transaction. If the commission for the transaction is based on a percentage of the purchase amount, use this attribute. If no commission (either commission_percentage or commission_flat_fee) is supplied during creation, commission_percentage is set to the default commission_percentage for the associated Agent.

commission_flat_fee Commission for the transaction. If the commission for the transaction is based on a flat dollar amount, use this attribute.

target_price The desired purchase price for a property if using target rather than range.

min_price The minimum price range for a property if using a price range rather than target price.

max_price The maximum price range for a property if using a price range rather than target price.

BuyerTransaction Create Response Payload Example (using agent_uuid)
{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_transaction_id": "facefeed-beef-daff-dead-cad4edd1e4d",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
  "partner_contact_id":"MySystemsContactIDForTheContactAssociatedWithThisBuyerTransaction",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "stage": 2,
  "stage_name":"initialized",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223,
  "closing_price":null,
  "closing_timestamp":null,
  "start_timestamp":null
}
BuyerTransaction Create Response Payload Example (using moxi_works_agent_id)
{
  "moxi_works_agent_id":"abc123",
  "moxi_works_transaction_id": "facefeed-beef-daff-dead-cad4edd1e4d",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
  "partner_contact_id":"MySystemsContactIDForTheContactAssociatedWithThisBuyerTransaction",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "stage": 2,
  "stage_name":"initialized",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223,
  "closing_price":null,
  "closing_timestamp":null,
  "start_timestamp":null
}
BuyerTransaction Create Failure Response Example
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

BuyerTransaction Create Response Payload

The following attributes make up the payload of the BuyerTransaction response for a Create request.

Attribute Type
agent_uuid* String
moxi_works_agent_id* String
moxi_works_transaction_id String
moxi_works_contact_id String
partner_contact_id String
transaction_name String or null
notes String or null
stage Integer
stage_name String
address String or null
city String or null
state String or null
zip_code String or null
min_sqft Integer or null
max_sqft Integer or null
min_beds Integer or null
max_beds Integer or null
min_baths Float or null
max_baths Float or null
area_of_interest String or null
is_mls_transaction Boolean
mls_number String or null
start_timestamp Integer or null
commission_percentage Float or null
commission_flat_fee Integer or null
target_price Integer or null
min_price String or null
max_price Integer or null
closing_price Integer or null
closing_timestamp Integer or null

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the agent which an BuyerTransaction entry is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this BuyerTransaction is associated with. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

moxi_works_transaction_id This is the Moxi Works Platform ID of the BuyerTransaction which you have created. This will be an RFC 4122 compliant UUID. This ID should be recorded on response as it is the key ID for updating the BuyerTransaction.

moxi_works_contact_id This is the Moxi Works Platform ID of the Contact which this BuyerTransaction has been associated with. This will be an RFC 4122 compliant UUID.

partner_contact_id If this Contact was created by your sytem in the Moxi Works Platform, then this is the unique identifer you use in your system that has been associated with the Contact that you are creating this BuyerTransaction for. If the Contact was not created by you, then partner_contact_id will be empty.

transaction_name A brief, human readable title that is shown to the agent as the subject of the BuyerTransaction.

notes Brief, human readable content that is shown to the agent as notes about the BuyerTransaction. Use this attribute to store and display data to the agent that is not otherwise explicitly available via attributes for the entity.

stage Each BuyerTransaction has five stages (1-5). stage displays the stage number that the BuyerTransaction is currently in. For more information about BuyerTransaction stages, see BuyerTransaction Stages.

stage_name This attribute displays a human readable stage name that is associated with the current stage attribute. When created through the Moxi Works Platform BuyerTransaction objects will automatically be configured as active transactions. For more information about BuyerTransaction stages, see BuyerTransaction Stages.

address The street address for the property being purchased.

city The city or township of the property being purchased.

state The state or province of the property being purchased.

zip_code The postal code of the property being purchased.

min_sqft The minimum desired living area for prospective properties.

max_sqft The maximum desired living area for prospective properties.

min_beds The minimum number of bedrooms for prospective properties.

max_beds The maximum number of bedrooms for prospective properties.

min_baths The minimum number of bathrooms for prospective properties.

max_baths The maximum number of bathrooms for prospective properties.

area_of_interest A the name of a locality representing an area of interest for prospective properties.

is_mls_transaction Whether the property being purchased is being listed on an MLS.

mls_number If this is an MLS transaction, then this is the MLS number for the BuyerTransaction.

start_timestamp For non-MLS transactions, this is the Unix timestamp representing the date that the property search began. This should be null if the BuyerTransaction is an MLS sale.

commission_percentage If the agent is to receive commission based on percentage of purchase price for the transaction associated with this BuyerTransaction, then this will represent the commission that the agent is to receive.This should be null if the BuyerTransaction uses commission_flat_fee.

commission_flat_fee If the agent is to receive a flat-rate commission for the transaction associated with this BuyerTransaction, then this will represent the commission that the agent is to receive. This should be null if the BuyerTransaction uses commission_percentage.

target_price The desired purchase price for a property if using target rather than range.

min_price The minimum price range for a property if using a price range rather than target price.

max_price The maximum price range for a property if using a price range rather than target price.

closing_price This is the closing price for the transaction . This should be null if the BuyerTransaction is not yet in complete state.

closing_timestamp A Unix timestamp representing the point in time when the transaction for this BuyerTransaction object was completed. This should be null if the BuyerTransaction is not yet in complete state.

BuyerTransaction Update

BuyerTransaction Update (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_transaction_id":"babebead-feed-face-dead-beefbad4babe",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223,
  "promote_transaction":true
}


PUT /api/buyer_transactions/[moxi_works_transaction_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

agent_uuid=12345678-1234-1234-1234-1234567890ab&min_beds=12&max_beds=34&min_baths=1.75&max_baths=34.5&area_of_interest=Port%20Interesting&notes=take%20care%20to%20write%20notes%20that%20are%20descriptive%20and%20helpful&transaction_name=Bob%20And%20Linda%20Tonkanaka&address=1234%20memory%20lane&city=hereville&state=provinceland&zip_code=18292&sqft=2345&is_mls_transaction=true&commission_flat_fee=12345&target_price=&max_price=2323223&min_price=232323&mls_number=abc123

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.update(
      agent_uuid:"12345678-1234-1234-1234-1234567890ab",
      moxi_works_transaction_id:"babebead-feed-face-dead-beefbad4babe",
      transaction_name:"Bob And Linda Tonkanaka",
      notes:"take care to write notes that are descriptive and helpful",
      address:"1234 memory lane",
      city:"hereville",
      state:"provinceland",
      zip_code:"18292",
      min_sqft:1234,
      max_sqft:2345,
      min_beds:3,
      max_beds:12,
      min_baths:1.75,
      max_baths:34.5,
      area_of_interest:"Port Interesting",
      is_mls_transaction:true,
      mls_number:"abc123",
      commission_flat_fee:12345,
      min_price:292929,
      max_price:2323223,
      promote_transaction:true
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::update([
      "agent_uuid" => "12345678-1234-1234-1234-1234567890ab",
      "moxi_works_transaction_id" => "babebead-feed-face-dead-beefbad4babe",
      "transaction_name" => "Bob And Linda Tonkanaka",
      "notes" => "take care to write notes that are descriptive and helpful",
      "address" => "1234 memory lane",
      "city" => "hereville",
      "state" => "provinceland",
      "zip_code" => "18292",
      "min_sqft" => 1234,
      "max_sqft" => 2345,
      "min_beds" => 3,
      "max_beds" => 12,
      "min_baths" => 1.75,
      "max_baths" => 34.5,
      "area_of_interest":"Port Interesting",
      "is_mls_transaction" => true,
      "mls_number" => "abc123",
      "commission_flat_fee" => 12345,
      "min_price" => 292929,
      "max_price" => 2323223,
      "promote_transaction" => true
       ]);
?>

BuyerTransaction Update (using moxi_works_agent_id) Example

{
  "moxi_works_agent_id":"abc123",
  "moxi_works_transaction_id":"babebead-feed-face-dead-beefbad4babe",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223,
  "promote_transaction":true
}


PUT /api/buyer_transactions/[moxi_works_transaction_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

moxi_works_agent_id=abc123&min_beds=12&max_beds=34&min_baths=1.75&max_baths=34.5&area_of_interest=Port%20Interesting&notes=take%20care%20to%20write%20notes%20that%20are%20descriptive%20and%20helpful&transaction_name=Bob%20And%20Linda%20Tonkanaka&address=1234%20memory%20lane&city=hereville&state=provinceland&zip_code=18292&sqft=2345&is_mls_transaction=true&commission_flat_fee=12345&target_price=&max_price=2323223&min_price=232323&mls_number=abc123

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.update(
      moxi_works_agent_id:"abc123",
      moxi_works_transaction_id:"babebead-feed-face-dead-beefbad4babe",
      transaction_name:"Bob And Linda Tonkanaka",
      notes:"take care to write notes that are descriptive and helpful",
      address:"1234 memory lane",
      city:"hereville",
      state:"provinceland",
      zip_code:"18292",
      min_sqft:1234,
      max_sqft:2345,
      min_beds:3,
      max_beds:12,
      min_baths:1.75,
      max_baths:34.5,
      area_of_interest:"Port Interesting",
      is_mls_transaction:true,
      mls_number:"abc123",
      commission_flat_fee:12345,
      min_price:292929,
      max_price:2323223,
      promote_transaction:true
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::update([
      "moxi_works_agent_id" => "abc123",
      "moxi_works_transaction_id" => "babebead-feed-face-dead-beefbad4babe",
      "transaction_name" => "Bob And Linda Tonkanaka",
      "notes" => "take care to write notes that are descriptive and helpful",
      "address" => "1234 memory lane",
      "city" => "hereville",
      "state" => "provinceland",
      "zip_code" => "18292",
      "min_sqft" => 1234,
      "max_sqft" => 2345,
      "min_beds" => 3,
      "max_beds" => 12,
      "min_baths" => 1.75,
      "max_baths" => 34.5,
      "area_of_interest":"Port Interesting",
      "is_mls_transaction" => true,
      "mls_number" => "abc123",
      "commission_flat_fee" => 12345,
      "min_price" => 292929,
      "max_price" => 2323223,
      "promote_transaction" => true
       ]);
?>

Non MLS BuyerTransaction Update (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_transaction_id":"babebead-feed-face-dead-beefbad4babe",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":false,
  "start_timestamp":1480536319,
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223
}


PUT /api/buyer_transactions/[moxi_works_transaction_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

agent_uuid=12345678-1234-1234-1234-1234567890ab&min_beds=12&max_beds=34&min_baths=1.75&max_baths=34.5&area_of_interest=Port%20Interesting&notes=take%20care%20to%20write%20notes%20that%20are%20descriptive%20and%20helpful&transaction_name=Bob%20And%20Linda%20Tonkanaka&address=1234%20memory%20lane&city=hereville&state=provinceland&zip_code=18292&sqft=2345&is_mls_transaction=true&commission_flat_fee=12345&target_price=&max_price=2323223&min_price=232323&mls_number=abc123


##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.update(
      agent_uuid:"12345678-1234-1234-1234-1234567890ab",
      moxi_works_transaction_id:"babebead-feed-face-dead-beefbad4babe",
      transaction_name:"Bob And Linda Tonkanaka",
      notes:"take care to write notes that are descriptive and helpful",
      address:"1234 memory lane",
      city:"hereville",
      state:"provinceland",
      zip_code:"18292",
      min_sqft:1234,
      max_sqft:2345,
      min_beds:3,
      max_beds:12,
      min_baths:1.75,
      max_baths:34.5,
      area_of_interest:"Port Interesting",
      is_mls_transaction:false,
      start_timestamp:1480536319,
      commission_flat_fee:12345,
      min_price:292929,
      max_price:2323223
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::update([
      "agent_uuid" => "12345678-1234-1234-1234-1234567890ab",
      "moxi_works_transaction_id" => "babebead-feed-face-dead-beefbad4babe",
      "transaction_name" => "Bob And Linda Tonkanaka",
      "notes" => "take care to write notes that are descriptive and helpful",
      "address" => "1234 memory lane",
      "city" => "hereville",
      "state" => "provinceland",
      "zip_code" => "18292",
      "min_sqft" => 1234,
      "max_sqft" => 2345,
      "min_beds" => 3,
      "max_beds" => 12,
      "min_baths" => 1.75,
      "max_baths" => 34.5,
      "area_of_interest":"Port Interesting",
      "is_mls_transaction" => true,
      "start_timestamp" => 1480536319,
      "commission_flat_fee" => 12345,
      "min_price" => 292929,
      "max_price" => 2323223
       ]);
?>

When updating a BuyerTransaction using the Moxi Works platform API, format your data using the following parameters.

BuyerTransaction Update Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
moxi_works_transaction_id String 255
transaction_name String 255
notes String
address String 255
city String 255
state String 255
zip_code String 255
min_sqft Integer 255
max_sqft Integer 255
min_beds Integer 255
max_beds Integer 255
min_baths Float 255
max_baths Float 255
area_of_interest Integer 255
is_mls_transaction Boolean 255
mls_number String 255
start_timestamp Integer 255
commission_percentage Float 255
commission_flat_fee Integer 255
target_price Integer 255
min_price Integer 255
max_price Integer 255
closing_price Integer 255
closing_timestamp Integer 255
promote_transaction Boolean 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an BuyerTransaction entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your BuyerTransaction Show request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this BuyerTransaction object is associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your BuyerTransaction Update request to be accepted.

moxi_works_transaction_id This is the Moxi Works Platform ID of the BuyerTransaction object that you are updating. This will be an RFC 4122 compliant UUID. This data is required and must reference a valid Moxi Works BuyerTransaction ID for your BuyerTransaction Update request to be accepted. You can determine UUIDs of existing BuyerTransaction objects by using the BuyerTransactionIndex request.

transaction_name A brief, human readable title that will be shown to the agent as the subject of the BuyerTransaction that you are updating.

notes Brief, human readable content that will be shown to the agent as notes about the BuyerTransaction that you are updating.

address The street address of the property being purchased. This should be populated if this BuyerTransaction is_mls_transaction is false.

city The city or township of the property being purchased. This should be populated if this BuyerTransaction is_mls_transaction is false.

state The state or province of the property being purchased. This should be populated if this BuyerTransaction is_mls_transaction is false.

zip_code The postal code of the property being purchased. This should be populated if this BuyerTransaction is_mls_transaction is false.

min_sqft The minimum desired living area for prospective properties.

max_sqft The maximum desired living area for prospective properties.

min_beds The minimum number of bedrooms for prospective properties.

max_beds The maximum number of bedrooms for prospective properties.

min_baths The minimum number of bathrooms for prospective properties.

max_baths The maximum number of bathrooms for prospective properties.

area_of_interest The name of a locality representing an area of interest for prospective properties.

is_mls_transaction Whether the property being purchased is being listed on an MLS. This should be false for paperwork-only, for sale by owner, off-market, or pocket listing type transactions or any transactions that will not be tracked through an MLS.

mls_number The MLS number of the the property being purchased.

start_timestamp For non-MLS transactions, this is the Unix timestamp representing the date that the agent initiated transaction discussions with the client.

commission_percentage Commission for the transaction. If the commission for the transaction is based on a percentage of the purchase amount, use this attribute.

commission_flat_fee Commission for the transaction. If the commission for the transaction is based on a flat dollar amount, use this attribute.

target_price The desired purchase price for a property if using target rather than range.

min_price The minimum price range for a property if using a price range rather than target price.

max_price The maximum price range for a property if using a price range rather than target price.

closing_price This is the Unix timestamp representing the date the sale of the property associated with the BuyerTransaction was closed.

closing_timestamp A Unix timestamp representing the point in time when the transaction for this BuyerTransaction object was completed. This should be null if the BuyerTransaction is not yet in complete state or you are not promoting the BuyerTransaction to complete.

promote_transaction If this is set to true then The Moxi Works Platform will promote this transaction to the next stage.

Promoting BuyerTransaction Stage

In order to promote a BuyerTransaction to the next stage, include the promote_transaction parameter in your Update request and set it to true. For more information about BuyerTransaction stages, see BuyerTransaction Stages.

BuyerTransaction Update (using agent_uuid) Response Payload Example
{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_transaction_id": "facefeed-beef-daff-dead-cad4edd1e4d",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
  "partner_contact_id":"MySystemsContactIDForTheContactAssociatedWithThisBuyerTransaction",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "stage": 2,
  "stage_name":"initialized",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223,
  "closing_price":null,
  "closing_timestamp":null,
  "start_timestamp":null
}
BuyerTransaction Update (using moxi_works_agent_id) Response Payload Example
{
  "moxi_works_agent_id":"abc123",
  "moxi_works_transaction_id": "facefeed-beef-daff-dead-cad4edd1e4d",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
  "partner_contact_id":"MySystemsContactIDForTheContactAssociatedWithThisBuyerTransaction",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "stage": 2,
  "stage_name":"initialized",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223,
  "closing_price":null,
  "closing_timestamp":null,
  "start_timestamp":null
}
BuyerTransaction Update Failure Response Example
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

BuyerTransaction Update Response Payload

The following attributes make up the payload of the BuyerTransaction response for a Update request.

Attribute Type
agent_uuid* String
moxi_works_agent_id* String
moxi_works_transaction_id String
moxi_works_contact_id String
partner_contact_id String
transaction_name String or null
notes String or null
stage Integer
stage_name String
address String or null
city String or null
state String or null
zip_code String or null
min_sqft Integer or null
max_sqft Integer or null
min_beds Integer or null
max_beds Integer or null
min_baths Float or null
max_baths Float or null
area_of_interest String or null
is_mls_transaction Boolean
mls_number String or null
start_timestamp Integer or null
commission_percentage Float or null
commission_flat_fee Integer or null
target_price Integer or null
min_price String or null
max_price Integer or null
closing_price Integer or null
closing_timestamp Integer or null

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which this BuyerTransaction is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this BuyerTransaction is associated with. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

moxi_works_transaction_id This is the Moxi Works Platform ID of the BuyerTransaction. This will be an RFC 4122 compliant UUID.

moxi_works_contact_id This is the Moxi Works Platform ID of the Contact which this BuyerTransaction has been associated with. This will be an RFC 4122 compliant UUID.

partner_contact_id If the Contact was created by your sytem in the Moxi Works Platform, then this is the unique identifer you use in your system that has been associated with the Contact that you are updating this BuyerTransaction for. If the Contact was not created by you, then partner_contact_id will be empty.

transaction_name A brief, human readable title that is shown to the agent as the subject of the BuyerTransaction.

notes Brief, human readable content that is shown to the agent as notes about the BuyerTransaction. Use this attribute to store and display data to the agent that is not otherwise explicitly available via attributes for the entity.

stage Each BuyerTransaction has five stages (1-5). stage displays the stage number that the BuyerTransaction is currently in. For more information about BuyerTransaction stages, see BuyerTransaction Stages.

stage_name This attribute displays a human readable stage name that is associated with the current stage attribute. For more information about BuyerTransaction stages, see BuyerTransaction Stages.

address The street address for the property being purchased.

city The city or township of the property being purchased.

state The state or province of the property being purchased.

zip_code The postal code of the property being purchased.

min_sqft The minimum desired living area for prospective properties.

max_sqft The maximum desired living area for prospective properties.

min_beds The minimum number of bedrooms for prospective properties.

max_beds The maximum number of bedrooms for prospective properties.

min_baths The minimum number of bathrooms for prospective properties.

max_baths The maximum number of bathrooms for prospective properties.

area_of_interest A the name of a locality representing an area of interest for prospective properties.

is_mls_transaction Whether the property being purchased is being listed on an MLS.

mls_number If this is an MLS transaction, then this is the MLS number for the BuyerTransaction.

start_timestamp For non-MLS transactions, this is the Unix timestamp representing the date that the agent initiated transaction discussions with the client. This should be null if the BuyerTransaction is an MLS sale.

commission_percentage If the agent is to receive commission based on percentage of purchase price for the transaction associated with this BuyerTransaction, then this will represent the commission that the agent is to receive.This should be null if the BuyerTransaction uses commission_flat_fee.

commission_flat_fee If the agent is to receive a flat-rate commission for the transaction associated with this BuyerTransaction, then this will represent the commission that the agent is to receive. This should be null if the BuyerTransaction uses commission_percentage.

target_price The desired purchase price for a property if using target rather than range.

min_price The minimum price range for a property if using a price range rather than target price.

max_price The maximum price range for a property if using a price range rather than target price.

closing_price This is the closing price for the transaction . This should be null if the BuyerTransaction is not yet in complete state.

closing_timestamp A Unix timestamp representing the point in time when the transaction for this BuyerTransaction object was completed. This should be null if the BuyerTransaction is not yet in complete state.

BuyerTransaction Show

BuyerTransaction Show (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_transaction_id":"babebead-feed-face-dead-beefbad4babe"
}


GET /api/buyer_transactions/[moxi_works_transaction_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

moxi_works_agent_id=abc123

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.find(
      agent_uuid:"12345678-1234-1234-1234-1234567890ab",
      moxi_works_transaction_id:"babebead-feed-face-dead-beefbad4babe"
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::find([
      "agent_uuid" => "12345678-1234-1234-1234-1234567890ab",
      "moxi_works_transaction_id" => "babebead-feed-face-dead-beefbad4babe"
       ]);
?>

BuyerTransaction Show (using moxi_works_agent_id) Example

{
  "moxi_works_agent_id":"abc123",
  "moxi_works_transaction_id":"babebead-feed-face-dead-beefbad4babe"
}


GET /api/buyer_transactions/[moxi_works_transaction_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

moxi_works_agent_id=abc123

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.find(
      moxi_works_agent_id:"abc123",
      moxi_works_transaction_id:"babebead-feed-face-dead-beefbad4babe"
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::find([
      "moxi_works_agent_id" => "abc123",
      "moxi_works_transaction_id" => "babebead-feed-face-dead-beefbad4babe"
       ]);
?>

Non MLS BuyerTransaction Show (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_transaction_id":"babebead-feed-face-dead-beefbad4babe"
}


GET /api/buyer_transactions/[moxi_works_transaction_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

agent_uuid=12345678-1234-1234-1234-1234567890ab

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.find(
      agent_uuid:"12345678-1234-1234-1234-1234567890ab",
      moxi_works_transaction_id:"babebead-feed-face-dead-beefbad4babe"
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::find([
      "agent_uuid" => "12345678-1234-1234-1234-1234567890ab",
      "moxi_works_transaction_id" => "babebead-feed-face-dead-beefbad4babe"
       ]);
?>

When showing a BuyerTransaction using the Moxi Works platform API, format your data using the following parameters.

BuyerTransaction Show Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
moxi_works_transaction_id String 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an BuyerTransaction entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your BuyerTransaction Show request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this BuyerTransaction object is associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your BuyerTransaction Show request to be accepted.

moxi_works_transaction_id This is the Moxi Works Platform ID of the BuyerTransaction. This will be an RFC 4122 compliant UUID.

BuyerTransaction Show (using agent_uuid) Response Payload Example
{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_transaction_id": "facefeed-beef-daff-dead-cad4edd1e4d",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
  "partner_contact_id":"MySystemsContactIDForTheContactAssociatedWithThisBuyerTransaction",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "stage": 2,
  "stage_name":"initialized",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223,
  "closing_price":null,
  "closing_timestamp":null,
  "start_timestamp":null
}
BuyerTransaction Show (using moxi_works_agent_id) Response Payload Example
{
  "moxi_works_agent_id":"abc123",
  "moxi_works_transaction_id": "facefeed-beef-daff-dead-cad4edd1e4d",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
  "partner_contact_id":"MySystemsContactIDForTheContactAssociatedWithThisBuyerTransaction",
  "transaction_name":"Bob And Linda Tonkanaka",
  "notes":"take care to write notes that are descriptive and helpful",
  "stage": 2,
  "stage_name":"initialized",
  "address":"1234 memory lane",
  "city":"hereville",
  "state":"provinceland",
  "zip_code":"18292",
  "min_sqft":1234,
  "max_sqft":2345,
  "min_beds":3,
  "max_beds":12,
  "min_baths":1.75,
  "max_baths":34.5,
  "area_of_interest":"Port Interesting",
  "is_mls_transaction":true,
  "mls_number":"abc123",
  "commission_percentage":null,
  "commission_flat_fee":12345,
  "target_price":null,
  "min_price":292929,
  "max_price":2323223,
  "closing_price":null,
  "closing_timestamp":null,
  "start_timestamp":null
}
BuyerTransaction Show Failure Response Example
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

BuyerTransaction Show Response Payload

The following attributes make up the payload of the BuyerTransaction response for a Show request.

Attribute Type
agent_uuid* String
moxi_works_agent_id* String
moxi_works_transaction_id String
moxi_works_contact_id String
partner_contact_id String
transaction_name String or null
notes String or null
stage Integer
stage_name String
address String or null
city String or null
state String or null
zip_code String or null
min_sqft Integer or null
max_sqft Integer or null
min_beds Integer or null
max_beds Integer or null
min_baths Float or null
max_baths Float or null
area_of_interest String or null
is_mls_transaction Boolean
mls_number String or null
start_timestamp Integer or null
commission_percentage Float or null
commission_flat_fee Integer or null
target_price Integer or null
min_price String or null
max_price Integer or null
closing_price Integer or null
closing_timestamp Integer or null

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which this BuyerTransaction is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this BuyerTransaction is associated with. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

moxi_works_transaction_id This is the Moxi Works Platform ID of the BuyerTransaction. This will be an RFC 4122 compliant UUID.

moxi_works_contact_id This is the Moxi Works Platform ID of the Contact which this BuyerTransaction has been associated with. This will be an RFC 4122 compliant UUID.

partner_contact_id If this Contact was created by your sytem in the Moxi Works Platform, then this is the unique identifer you use in your system that has been associated with the Contact that you are creating this BuyerTransaction for. If the Contact was not created by you, then partner_contact_id will be empty.

transaction_name A brief, human readable title that is shown to the agent as the subject of the BuyerTransaction.

notes Brief, human readable content that is shown to the agent as notes about the BuyerTransaction. Use this attribute to store and display data to the agent that is not otherwise explicitly available via attributes for the entity.

stage Each BuyerTransaction has five stages (1-5). stage displays the stage number that the BuyerTransaction is currently in. For more information about BuyerTransaction stages, see BuyerTransaction Stages.

stage_name This attribute displays a human readable stage name that is associated with the current stage attribute. When created through the Moxi Works Platform BuyerTransaction objects will automatically be configured as active transactions. For more information about BuyerTransaction stages, see BuyerTransaction Stages.

address The street address for the property being purchased.

city The city or township of the property being purchased.

state The state or province of the property being purchased.

zip_code The postal code of the property being purchased.

min_sqft The minimum desired living area for prospective properties.

max_sqft The maximum desired living area for prospective properties.

min_beds The minimum number of bedrooms for prospective properties.

max_beds The maximum number of bedrooms for prospective properties.

min_baths The minimum number of bathrooms for prospective properties.

max_baths The maximum number of bathrooms for prospective properties.

area_of_interest A the name of a locality representing an area of interest for prospective properties.

is_mls_transaction Whether the property being purchased is being listed on an MLS.

mls_number If this is an MLS transaction, then this is the MLS number for the BuyerTransaction.

start_timestamp For non-MLS transactions, this is the Unix timestamp representing the date that the agent initiated transaction discussions with the client. This should be null if the BuyerTransaction is an MLS sale.

commission_percentage If the agent is to receive commission based on percentage of purchase price for the transaction associated with this BuyerTransaction, then this will represent the commission that the agent is to receive.This should be null if the BuyerTransaction uses commission_flat_fee.

commission_flat_fee If the agent is to receive a flat-rate commission for the transaction associated with this BuyerTransaction, then this will represent the commission that the agent is to receive. This should be null if the BuyerTransaction uses commission_percentage.

target_price The desired purchase price for a property if using target rather than range.

min_price The minimum price range for a property if using a price range rather than target price.

max_price The maximum price range for a property if using a price range rather than target price.

closing_price This is the closing price for the transaction . This should be null if the BuyerTransaction is not yet in complete state.

closing_timestamp A Unix timestamp representing the point in time when the transaction for this BuyerTransaction object was completed. This should be null if the BuyerTransaction is not yet in complete state.

BuyerTransaction Index

BuyerTransaction Index (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "moxi_works_transaction_id":"babebead-feed-face-dead-beefbad4babe"
}


GET /api/buyer_transactions HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

moxi_works_agent_id=abc123

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.search(
      agent_uuid:"12345678-1234-1234-1234-1234567890ab",
      moxi_works_transaction_id:"babebead-feed-face-dead-beefbad4babe"
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::search([
      "agent_uuid" => "12345678-1234-1234-1234-1234567890ab",
      "moxi_works_transaction_id" => "babebead-feed-face-dead-beefbad4babe"
       ]);
?>

BuyerTransaction Index (using moxi_works_agent_id) Example

{
  "moxi_works_agent_id":"abc123",
  "moxi_works_transaction_id":"babebead-feed-face-dead-beefbad4babe"
}


GET /api/buyer_transactions HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

moxi_works_agent_id=abc123

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.search(
      moxi_works_agent_id:"abc123",
      moxi_works_transaction_id:"babebead-feed-face-dead-beefbad4babe"
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::search([
      "moxi_works_agent_id" => "abc123",
      "moxi_works_transaction_id" => "babebead-feed-face-dead-beefbad4babe"
       ]);
?>

Non MLS BuyerTransaction Index Example

{
  "moxi_works_agent_id":"abc123",
  "moxi_works_transaction_id":"babebead-feed-face-dead-beefbad4babe"
}


GET /api/buyer_transactions HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

moxi_works_agent_id=abc123

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_transaction = MoxiworksPlatform::BuyerTransaction.search(
      moxi_works_agent_id:"abc123",
      moxi_works_transaction_id:"babebead-feed-face-dead-beefbad4babe"
      )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_transaction = MoxiworksPlatform\BuyerTransaction::search([
      "moxi_works_agent_id" => "abc123",
      "moxi_works_transaction_id" => "babebead-feed-face-dead-beefbad4babe"
       ]);
?>

When searching for BuyerTransaction objects using the Moxi Works platform API, format your data using the following parameters.

BuyerTransaction Index Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
moxi_works_contact_id String 255
partner_contact_id String 255
page_number Integer 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which the BuyerTransaction entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your BuyerTransaction request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which the BuyerTransaction objects are associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your BuyerTransaction Index request to be accepted.

moxi_works_contact_id This is the Moxi Works Platform ID of the Contact for which you are searching associated BuyerTransaction objects. This will be an RFC 4122 compliant UUID. You can use either moxi_works_contact_id or partner_contact_id when searching for BuyerTransaction objects associated with a specific Contact.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact you want to find BuyerTransaction objects for. You can use either moxi_works_contact_id or partner_contact_id when searching for BuyerTransaction objects associated with a specific Contact.

page_number Page of BuyerTransaction records to return. Use if total_pages indicates that there is more than one page of data available.

BuyerTransaction Index (using agent_uuid) Response Payload Example
{
  "page_number":1,
  "total_pages":5,
  "transactions":[
    {
      "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
      "moxi_works_transaction_id": "facefeed-beef-daff-dead-cad4edd1e4d",
      "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
      "partner_contact_id":"MySystemsContactIDForTheContactAssociatedWithThisBuyerTransaction",
      "transaction_name":"Bob And Linda Tonkanaka",
      "notes":"take care to write notes that are descriptive and helpful",
      "stage": 2,
      "stage_name":"initialized",
      "address":"1234 memory lane",
      "city":"hereville",
      "state":"provinceland",
      "zip_code":"18292",
      "min_sqft":1234,
      "max_sqft":2345,
      "min_beds":3,
      "max_beds":12,
      "min_baths":1.75,
      "max_baths":34.5,
      "area_of_interest":"Port Interesting",
      "is_mls_transaction":true,
      "mls_number":"abc123",
      "commission_percentage":null,
      "commission_flat_fee":12345,
      "target_price":null,
      "min_price":292929,
      "max_price":2323223,
      "closing_price":null,
      "closing_timestamp":null,
      "start_timestamp":null
    }
  ]
}
BuyerTransaction Index Response Payload Example (using moxi_works_agent_id)
{
  "page_number":1,
  "total_pages":5,
  "transactions":[
    {
      "moxi_works_agent_id":"abc123",
      "moxi_works_transaction_id": "facefeed-beef-daff-dead-cad4edd1e4d",
      "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe",
      "partner_contact_id":"MySystemsContactIDForTheContactAssociatedWithThisBuyerTransaction",
      "transaction_name":"Bob And Linda Tonkanaka",
      "notes":"take care to write notes that are descriptive and helpful",
      "stage": 2,
      "stage_name":"initialized",
      "address":"1234 memory lane",
      "city":"hereville",
      "state":"provinceland",
      "zip_code":"18292",
      "min_sqft":1234,
      "max_sqft":2345,
      "min_beds":3,
      "max_beds":12,
      "min_baths":1.75,
      "max_baths":34.5,
      "area_of_interest":"Port Interesting",
      "is_mls_transaction":true,
      "mls_number":"abc123",
      "commission_percentage":null,
      "commission_flat_fee":12345,
      "target_price":null,
      "min_price":292929,
      "max_price":2323223,
      "closing_price":null,
      "closing_timestamp":null,
      "start_timestamp":null
    }
  ]
}
BuyerTransaction Index Failure Response Example
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

BuyerTransaction Index Response Payload

The following attributes make up the payload of the BuyerTransaction response for a Index request.

Attribute Type
page_number Integer
total_pages Integer
transactions Array

page_number If there is more than one page of BuyerTransaction objects to return, page_number will denote which page of responses has been returned. If this is less than the value of total_pages, there are more pages that can be returned by including the page_number parameter in your API request.

total_pages If there is more than one page of BuyerTransaction objects to return, total_pages will denote how many pages of BuyerTransaction objects there are to be returned fo the current query. Subsequent pages can be returned by including the page_number parameter in your API request.

transactions This array contains the payload from the request query. Any found BuyerTransaction objects matching the query will be returned as BuyerTransaction objects in the response.

transactions BuyerTransaction Objects
Attribute Type
agent_uuid* String
moxi_works_agent_id* String
moxi_works_transaction_id String
moxi_works_contact_id String
partner_contact_id String
transaction_name String or null
notes String or null
stage Integer
stage_name String
address String or null
city String or null
state String or null
zip_code String or null
min_sqft Integer or null
max_sqft Integer or null
min_beds Integer or null
max_beds Integer or null
min_baths Float or null
max_baths Float or null
area_of_interest String or null
is_mls_transaction Boolean
mls_number String or null
start_timestamp Integer or null
commission_percentage Float or null
commission_flat_fee Integer or null
target_price Integer or null
min_price String or null
max_price Integer or null
closing_price Integer or null
closing_timestamp Integer or null

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which this BuyerTransaction is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this BuyerTransaction is associated with. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

moxi_works_transaction_id This is the Moxi Works Platform ID of the BuyerTransaction which you have created. This will be an RFC 4122 compliant UUID.

moxi_works_contact_id This is the Moxi Works Platform ID of the Contact which this BuyerTransaction has been associated with. This will be an RFC 4122 compliant UUID.

partner_contact_id If this Contact was created by your sytem in the Moxi Works Platform, then this is the unique identifer you use in your system that has been associated with the Contact that you are creating this BuyerTransaction for. If the Contact was not created by you, then partner_contact_id will be empty.

transaction_name A brief, human readable title that is shown to the agent as the subject of the BuyerTransaction.

notes Brief, human readable content that is shown to the agent as notes about the BuyerTransaction. Use this attribute to store and display data to the agent that is not otherwise explicitly available via attributes for the entity.

stage Each BuyerTransaction has five stages (1-5). stage displays the stage number that the BuyerTransaction is currently in. For more information about BuyerTransaction stages, see BuyerTransaction Stages.

stage_name This attribute displays a human readable stage name that is associated with the current stage attribute. When created through the Moxi Works Platform BuyerTransaction objects will automatically be configured as active transactions. For more information about BuyerTransaction stages, see BuyerTransaction Stages.

address The street address for the property being purchased.

city The city or township of the property being purchased.

state The state or province of the property being purchased.

zip_code The postal code of the property being purchased.

min_sqft The minimum desired living area for prospective properties.

max_sqft The maximum desired living area for prospective properties.

min_beds The minimum number of bedrooms for prospective properties.

max_beds The maximum number of bedrooms for prospective properties.

min_baths The minimum number of bathrooms for prospective properties.

max_baths The maximum number of bathrooms for prospective properties.

area_of_interest A the name of a locality representing an area of interest for prospective properties.

is_mls_transaction Whether the property being purchased is being listed on an MLS.

mls_number If this is an MLS transaction, then this is the MLS number for the BuyerTransaction.

start_timestamp For non-MLS transactions, this is the Unix timestamp representing the date that the agent initiated transaction discussions with the client. This should be null if the BuyerTransaction is an MLS sale.

commission_percentage If the agent is to receive commission based on percentage of purchase price for the transaction associated with this BuyerTransaction, then this will represent the commission that the agent is to receive.This should be null if the BuyerTransaction uses commission_flat_fee.

commission_flat_fee If the agent is to receive a flat-rate commission for the transaction associated with this BuyerTransaction, then this will represent the commission that the agent is to receive. This should be null if the BuyerTransaction uses commission_percentage.

target_price The desired purchase price for a property if using target rather than range.

min_price The minimum price range for a property if using a price range rather than target price.

max_price The maximum price range for a property if using a price range rather than target price.

closing_price This is the closing price for the transaction . This should be null if the BuyerTransaction is not yet in complete state.

closing_timestamp A Unix timestamp representing the point in time when the transaction for this BuyerTransaction object was completed. This should be null if the BuyerTransaction is not yet in complete state.

Company

Moxi Works Plaform Company entities are your entry-point for determining the established relationships for your organization to companies on the Moxi Works Platform and for accessing data about those companies. Many requests require a moxi_works_company_id, which you’ll need to derive from the Company Index endpoint.

Company Show

Company Show Example

GET /api/companies/[moxi_works_company_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{
  "moxi_works_company_id":"abc123"
}

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_company = MoxiworksPlatform::Company.find(moxi_works_company_id: "1234abcd")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_company = MoxiworksPlatform\Company::find([
        'moxi_works_company_id' => '1234abcd']);
?>
Company Show Request Attributes

When finding an Company using the Moxi Works platform API, format your request using the following parameters.

Attribute Type Length Limit
moxi_works_company_id String 255

Required Parameters Are In Red

moxi_works_company_id A valid Moxi Works Company ID. Use Company Endpoint to determine what moxi_works_company_id you can use.

Company Show Response Payload Example

{
    "moxi_works_company_id":"bobs_brokerage",
    "name":"Bob's Brokerage"
}
Company Show Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Company Show Response Payload

The following attributes make up the payload of the Company response for a Show request.

Show Response Attributes
Attribute Type
moxi_works_company_id String
name String

moxi_works_company_id This is the Moxi Works Platform ID of the Company. This will be an alphanumeric identification string which will be similar to the company name.

name This is a human readable name of the company which this Company object represents.

Company Index

The Company Index endpoint will return all Company entities your organization is associated with. When searching for Company entities using the Moxi Works platform API, format your request using the following parameters.

Company Index Request Example

GET /api/companies HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{}

companies = MoxiworksPlatform::Company.search

<?php
$companies = MoxiworksPlatform\Company::search();
?>
Company Index Request Attributes
Attribute Type Length Limit
Company Index Response Payload

Company Index returns an array of objects representing companies that your organization has access to. The following attributes make up the payload of each Company object returned in an Index request.

Company Index Response Payload Example

[
{
  "moxi_works_company_id":"bobs_brokerage",
  "name":"Bob's Brokerage"
},
{
  "moxi_works_company_id":"real_estate_two_bajillion",
  "name":"Real Estate Two-Bajillion"
}
]
Company Index Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Index Response Attributes
Attribute Type
moxi_works_company_id String
name String

moxi_works_company_id This is the Moxi Works Platform ID of the Company. This will be an alphanumeric identification string which will be similar to the company name.

name This is a human readable name of the company which this Company object represents.

Contact

Moxi Works Platform Contact entities represent an agent’s contacts in the Moxi Works Platform.

Contact Create

Contact Create (using agent_uuid) Example

{
"agent_uuid":"12345678-1234-1234-1234-1234567890ab",
"partner_contact_id":"booyuh",
"contact_name":"Firstname Middlenyme Larstnam",
"gender":"m",
"primary_email_address":"me@justabout.right.here",
"secondary_email_address":"me.too@justabout.right.here",
"primary_phone_number":"9995551212",
"secondary_phone_number":"(333) 555-1185",
"home_street_address":"1234 Sesame St.",
"home_city":"Cityville",
"home_state":"Stateland",
"home_zip":"12345-6789",
"home_country":"Ottoman Empire",
"job_title":"Junior Bacon Burner",
"occupation":"chef",
"property_url":"http://my.property.website.is/here",
"property_mls_id":"abc123",
"property_street_address":"2345 67th place",
"property_city":"Townland",
"property_state":"Statesville",
"property_zip":"98765-4321",
"property_beds":"18",
"property_baths":"12.5",
"property_list_price":"123456789",
"property_listing_status":"Active",
"property_photo_url":"http://property.photo.is/here.jpg",
"search_city":"Searchland",
"search_state":"Searchsylvania",
"search_zip":"12345-6789",
"search_min_beds":"2",
"search_min_baths":"3.25",
"search_min_price":"1234567",
"search_max_price":"1234569",
"search_min_sq_ft":"1234",
"search_max_sq_ft":"1235",
"search_min_lot_size":"3234",
"search_max_lot_size":"3235",
"search_min_year_built":"1388",
"search_max_year_built":"2044",
"search_property_types":"Condo, Single Family, Townhouse",
"note":"whatevers2009"
}
POST /api/contacts HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


agent_uuid=12345678-1234-1234-1234-1234567890ab&partner_contact_id=abc982cdf345&contact_name=Billy+Football&gender=m&primary_email_address=johnny%40football.foo&secondary_email_address=fooball%40johnnyshead.lost&primary_phone_number=123123213&secondary_phone_number=2929292922&home_street_address=1234+Winterfell+Way&home_city=Cityville&home_state=Stateland&home_zip=12345&home_country=Westeros&job_title=Junior+Bacon+Burner&occupation=Chef&property_url=http%3A%2F%2Fteh.property.is%2Fhere&property_mls_id=123abc&property_street_address=1234+here+ave.&property_city=anywhereville&property_state=anystate&property_zip=918928&property_beds=21&property_baths=12.75&property_list_price=1231213&property_listing_status=Active&property_photo_url=http%3A%2F%2Fthis.is%2Fthe%2Fphoto.jpg&search_city=searchville&search_state=ofconfusion&search_zip=92882&search_min_beds=12&search_min_baths=4&search_min_price=1234&search_max_price=22324&search_min_sq_ft=1234&search_max_sq_ft=23455&search_min_lot_size=29299&search_max_lot_size=292929&search_min_year_built=1999&search_max_year_built=2004&search_property_types=Condo%2C+Single-Family&note=whatevers2009
##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_contact = MoxiworksPlatform::Contact.create(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_contact_id: "booyuh",
        contact_name: "Firstname Middlenyme Larstnam",
        gender: "m",
        primary_email_address: "me@justabout.right.here",
        secondary_email_address: "me.too@justabout.right.here",
        primary_phone_number: "9995551212",
        secondary_phone_number: "(333) 555-1185",
        home_street_address: "1234 Sesame St.",
        home_city: "Cityville",
        home_state: "Stateland",
        home_zip: "12345-6789",
        home_country: "Ottoman Empire",
        job_title: "Junior Bacon Burner",
        occupation: "chef",
        property_url: "http://my.property.website.is/here",
        property_mls_id: "abc123",
        property_street_address: "2345 67th place",
        property_city: "Townland",
        property_state: "Statesville",
        property_zip: "98765-4321",
        property_beds: "18",
        property_baths: "12.5",
        property_list_price: "123456789",
        property_listing_status: "Active",
        property_photo_url: "http://property.photo.is/here.jpg",
        search_city: "Searchland",
        search_state: "Searchsylvania",
        search_zip: "12345-6789",
        search_min_beds: "2",
        search_min_baths: "3.25",
        search_min_price: "1234567",
        search_max_price: "1234569",
        search_min_sq_ft: "1234",
        search_max_sq_ft: "1235",
        search_min_lot_size: "3234",
        search_max_lot_size: "3235",
        search_min_year_built: "1388",
        search_max_year_built: "2044",
        search_property_types: "Condo, Single Family, Townhouse",
        note: "whatevers2009")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_contact = MoxiworksPlatform\Contact::create([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'partner_contact_id' => 'booyuh',
        'contact_name' => 'Firstname Middlenyme Larstnam',
        'gender' => 'm',
        'primary_email_address' => 'me@justabout.right.here',
        'secondary_email_address' => 'me.too@justabout.right.here',
        'primary_phone_number' => '9995551212',
        'secondary_phone_number' => '(333) 555-1185',
        'home_street_address' => '1234 Sesame St.',
        'home_city' => 'Cityville',
        'home_state' => 'Stateland',
        'home_zip' => '12345-6789',
        'home_country' => 'Ottoman Empire',
        'job_title' => 'Junior Bacon Burner',
        'occupation' => 'chef',
        'property_url' => 'http://my.property.website.is/here',
        'property_mls_id' => 'abc123',
        'property_street_address' => '2345 67th place',
        'property_city' => 'Townland',
        'property_state' => 'Statesville',
        'property_zip' => '98765-4321',
        'property_beds' => '18',
        'property_baths' => '12.5',
        'property_list_price' => '123456789',
        'property_listing_status' => 'Active',
        'property_photo_url' => 'http://property.photo.is/here.jpg',
        'search_city' => 'Searchland',
        'search_state' => 'Searchsylvania',
        'search_zip' => '12345-6789',
        'search_min_beds' => '2',
        'search_min_baths' => '3.25',
        'search_min_price' => '1234567',
        'search_max_price' => '1234569',
        'search_min_sq_ft' => '1234',
        'search_max_sq_ft' => '1235',
        'search_min_lot_size' => '3234',
        'search_max_lot_size' => '3235',
        'search_min_year_built' => '1388',
        'search_max_year_built' => '2044',
        'search_property_types' => 'Condo, Single Family, Townhouse',
        'note' => 'whatevers2009']);
?>

Contact Create (using moxi_works_agent_id) Example

{
"moxi_works_agent_id":"1234abcd",
"partner_contact_id":"booyuh",
"contact_name":"Firstname Middlenyme Larstnam",
"gender":"m",
"primary_email_address":"me@justabout.right.here",
"secondary_email_address":"me.too@justabout.right.here",
"primary_phone_number":"9995551212",
"secondary_phone_number":"(333) 555-1185",
"home_street_address":"1234 Sesame St.",
"home_city":"Cityville",
"home_state":"Stateland",
"home_zip":"12345-6789",
"home_country":"Ottoman Empire",
"job_title":"Junior Bacon Burner",
"occupation":"chef",
"property_url":"http://my.property.website.is/here",
"property_mls_id":"abc123",
"property_street_address":"2345 67th place",
"property_city":"Townland",
"property_state":"Statesville",
"property_zip":"98765-4321",
"property_beds":"18",
"property_baths":"12.5",
"property_list_price":"123456789",
"property_listing_status":"Active",
"property_photo_url":"http://property.photo.is/here.jpg",
"search_city":"Searchland",
"search_state":"Searchsylvania",
"search_zip":"12345-6789",
"search_min_beds":"2",
"search_min_baths":"3.25",
"search_min_price":"1234567",
"search_max_price":"1234569",
"search_min_sq_ft":"1234",
"search_max_sq_ft":"1235",
"search_min_lot_size":"3234",
"search_max_lot_size":"3235",
"search_min_year_built":"1388",
"search_max_year_built":"2044",
"search_property_types":"Condo, Single Family, Townhouse",
"note":"whatevers2009"
}
POST /api/contacts HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


moxi_works_agent_id=abc123&partner_contact_id=abc982cdf345&contact_name=Billy+Football&gender=m&primary_email_address=johnny%40football.foo&secondary_email_address=fooball%40johnnyshead.lost&primary_phone_number=123123213&secondary_phone_number=2929292922&home_street_address=1234+Winterfell+Way&home_city=Cityville&home_state=Stateland&home_zip=12345&home_country=Westeros&job_title=Junior+Bacon+Burner&occupation=Chef&property_url=http%3A%2F%2Fteh.property.is%2Fhere&property_mls_id=123abc&property_street_address=1234+here+ave.&property_city=anywhereville&property_state=anystate&property_zip=918928&property_beds=21&property_baths=12.75&property_list_price=1231213&property_listing_status=Active&property_photo_url=http%3A%2F%2Fthis.is%2Fthe%2Fphoto.jpg&search_city=searchville&search_state=ofconfusion&search_zip=92882&search_min_beds=12&search_min_baths=4&search_min_price=1234&search_max_price=22324&search_min_sq_ft=1234&search_max_sq_ft=23455&search_min_lot_size=29299&search_max_lot_size=292929&search_min_year_built=1999&search_max_year_built=2004&search_property_types=Condo%2C+Single-Family&note=whatevers2009
##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_contact = MoxiworksPlatform::Contact.create(
        moxi_works_agent_id: "1234abcd",
        partner_contact_id: "booyuh",
        contact_name: "Firstname Middlenyme Larstnam",
        gender: "m",
        primary_email_address: "me@justabout.right.here",
        secondary_email_address: "me.too@justabout.right.here",
        primary_phone_number: "9995551212",
        secondary_phone_number: "(333) 555-1185",
        home_street_address: "1234 Sesame St.",
        home_city: "Cityville",
        home_state: "Stateland",
        home_zip: "12345-6789",
        home_country: "Ottoman Empire",
        job_title: "Junior Bacon Burner",
        occupation: "chef",
        property_url: "http://my.property.website.is/here",
        property_mls_id: "abc123",
        property_street_address: "2345 67th place",
        property_city: "Townland",
        property_state: "Statesville",
        property_zip: "98765-4321",
        property_beds: "18",
        property_baths: "12.5",
        property_list_price: "123456789",
        property_listing_status: "Active",
        property_photo_url: "http://property.photo.is/here.jpg",
        search_city: "Searchland",
        search_state: "Searchsylvania",
        search_zip: "12345-6789",
        search_min_beds: "2",
        search_min_baths: "3.25",
        search_min_price: "1234567",
        search_max_price: "1234569",
        search_min_sq_ft: "1234",
        search_max_sq_ft: "1235",
        search_min_lot_size: "3234",
        search_max_lot_size: "3235",
        search_min_year_built: "1388",
        search_max_year_built: "2044",
        search_property_types: "Condo, Single Family, Townhouse",
        note: "whatevers2009")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_contact = MoxiworksPlatform\Contact::create([
        'moxi_works_agent_id' => '1234abcd',
        'partner_contact_id' => 'booyuh',
        'contact_name' => 'Firstname Middlenyme Larstnam',
        'gender' => 'm',
        'primary_email_address' => 'me@justabout.right.here',
        'secondary_email_address' => 'me.too@justabout.right.here',
        'primary_phone_number' => '9995551212',
        'secondary_phone_number' => '(333) 555-1185',
        'home_street_address' => '1234 Sesame St.',
        'home_city' => 'Cityville',
        'home_state' => 'Stateland',
        'home_zip' => '12345-6789',
        'home_country' => 'Ottoman Empire',
        'job_title' => 'Junior Bacon Burner',
        'occupation' => 'chef',
        'property_url' => 'http://my.property.website.is/here',
        'property_mls_id' => 'abc123',
        'property_street_address' => '2345 67th place',
        'property_city' => 'Townland',
        'property_state' => 'Statesville',
        'property_zip' => '98765-4321',
        'property_beds' => '18',
        'property_baths' => '12.5',
        'property_list_price' => '123456789',
        'property_listing_status' => 'Active',
        'property_photo_url' => 'http://property.photo.is/here.jpg',
        'search_city' => 'Searchland',
        'search_state' => 'Searchsylvania',
        'search_zip' => '12345-6789',
        'search_min_beds' => '2',
        'search_min_baths' => '3.25',
        'search_min_price' => '1234567',
        'search_max_price' => '1234569',
        'search_min_sq_ft' => '1234',
        'search_max_sq_ft' => '1235',
        'search_min_lot_size' => '3234',
        'search_max_lot_size' => '3235',
        'search_min_year_built' => '1388',
        'search_max_year_built' => '2044',
        'search_property_types' => 'Condo, Single Family, Townhouse',
        'note' => 'whatevers2009']);
?>
Contact Create Request Attributes

The agent_uuid or moxi_works_agent_id parameter will determine what Agent entity the Contact record is associated with. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers.

To create a new Contact record for the Agent with agent_uuid 12345678-1234-1234-1234-1234567890ab, you’d pass 12345678-1234-1234-1234-1234567890ab as the agent_uuid parameter and that new Contact record would be added to the agent’s contacts.

To create a new Contact record for the Agent with moxi_works_agent_id agent@moxiworks.com, you’d pass agent@moxiworks.com as the moxi_works_agent_id parameter and that new Contact record would be added to the agent’s contacts.

When creating an Contact using the Moxi Works platform API, format your request using the following parameters.

Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
partner_contact_id String 255
contact_name String 255
gender String 255
primary_email_address String 255
secondary_email_address String 255
primary_phone_number String 255
secondary_phone_number String 255
home_street_address String 255
home_city String 255
home_state String 255
home_zip String 255
home_country String 255
is_not_lead Boolean 255
job_title String 255
occupation String 255
property_url String 255
property_mls_id String 255
property_street_address String 255
property_city String 255
property_state String 255
property_zip String 255
property_beds Integer 255
property_baths Float 255
property_list_price Integer 255
property_listing_status String 255
property_photo_url String 255
search_city String 255
search_state String 255
search_zip String 255
search_min_baths Float 255
search_min_beds Integer 255
search_min_price Integer 255
search_max_price Integer 255
search_min_sq_ft Integer 255
search_max_sq_ft Integer 255
search_min_lot_size Integer 255
search_max_lot_size Integer 255
search_min_year_built Integer 255
search_max_year_built Integer 255
search_property_types String 255
note String

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an Contact entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Contact Show request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Contact object is to be associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Contact Create request to be accepted.

partner_contact_id This is the unique identifer you use in your system that will be associated with the Contact that you are creating. This data is required and must be a unique ID for your Contact Create request to be accepted.

contact_name This is the full name of the contact you are creating a Contact record for. You should format this information as first middle last.

gender The gender of the contact. This can be male, female, m or f. No matter what is provided in the request, the response payload will return m or f.

primary_email_address This is the email address that should be used first. If provided, the address must conform to RFC 3696.

secondary_email_address This is the email address that should be used as an alternate. If provided, the address must conform to RFC 3696.

home_street_address The contact’s home address street, including number and any suite / apartment number information.

home_city The city of the contact’s home address.

home_state The state of the contact’s home address.

home_zip The zip code of the contact’s home address.

home_country The country of the contact’s home address.

is_not_lead If the created Contact record is not for a lead set this to true. By default this is false.

job_title The contact’s professional job title.

occupation The contact’s profession.

property_url This should be a valid URL for a property of interest in your system that can be viewed by the agent.

property_mls_id Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the MLS ID of the property of interest.

property_street_address Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the street address of the property of interest, including number and suite/apartment number information.

property_city Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the city in which the property of interest exists.

property_state Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the state or province in which the property of interest exists.

property_zip Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the postal code in which the property of interest exists.

property_beds Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the number of bedrooms in the property of interest.

property_baths Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the number of bathrooms in the property of interest.

property_list_price Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the list price of the property of interest.

property_listing_status Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the listing status of the property of interest. This can be any arbitrary string, but for best results, this should be a state like Active, Pending, Sold, Cancelled or any other human readable state that would be useful when presented to the agent.

property_photo_url Use this if you have data about a property that this contact has shown interest in (property of interest); this should be a valid URL to an image of the property of interest.

search_city Use this if you have data about listing searches that this contact has performed; this should be the city / locale used in the listing search criteria.

search_state Use this if you have data about listing searches that this contact has performed; this should be the state / region used in the listing search criteria.

search_zip Use this if you have data about listing searches that this contact has performed; this should be the zip / postal code used in the listing search criteria.

search_min_baths Use this if you have data about listing searches that this contact has performed; this should be the minimum bathrooms used in the listing search criteria.

search_min beds Use this if you have data about listing searches that this contact has performed; this should be the minimum bedrooms used in the listing search criteria.

search_min_price Use this if you have data about listing searches that this contact has performed; this should be the minimum price used in the listing search criteria.

search_max_price Use this if you have data about listing searches that this contact has performed; this should be the maximum price used in the listing search criteria.

search_min_sq_ft Use this if you have data about listing searches that this contact has performed; this should be the minimum square feet of the total living area used in the listing search criteria.

search_max_sq_ft Use this if you have data about listing searches that this contact has performed; this should be the maximum square feet of the total living area used in the listing search criteria.

search_min_lot_size Use this if you have data about listing searches that this contact has performed; this should be the minimum lot size used in the listing search criteria.

search_max_lot_size Use this if you have data about listing searches that this contact has performed; this should be the maximum lot size used in the listing search criteria.

search_min_year_built Use this if you have data about listing searches that this contact has performed; this should be the minimum allowable year built used in the listing search criteria.

search_property_types Use this if you have data about listing searches that this contact has performed; this should be the property types used in the listing search criteria. This can be any arbitrary human readable string, but using recognized property types such as Condo, Single-Family, Townhouse, Land, Multifamily will provide more value to the agent.

note This is an arbitrary string giving the agent more details about the contact which would not otherwise fit into the Contact record. Any HTML formatting included will be stripped from the note attribute’s data.

Contact Create Response Payload

The following attributes make up the payload of the Contact response for a Create request.

Contact Create (using agent_uuid) Response Payload Example
{
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_contact_id": "booyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-2bad4daddead",
  "contact_name":"Firstname Middlenyme Larstnam",
  "first_name":"Firstname",
  "middle_name":"Middlenyme",
  "last_name":"Larstnam",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "me@justabout.right.here",
  "secondary_email_address": "me.too@justabout.right.here",
  "primary_phone_number": "9995551212",
  "secondary_phone_number": "(333) 555-1185",
  "home_street_address": "1234 Sesame St.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Ottoman Empire",
  "job_title": "Junior Bacon Burner",
  "occupation": "chef",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse",
  "note": "whatevers2009"
}
Contact Create (using moxi_works_agent_id) Response Payload Example
{
  "moxi_works_agent_id": "1234abcd",
  "partner_contact_id": "booyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-2bad4daddead",
  "contact_name":"Firstname Middlenyme Larstnam",
  "first_name":"Firstname",
  "middle_name":"Middlenyme",
  "last_name":"Larstnam",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "me@justabout.right.here",
  "secondary_email_address": "me.too@justabout.right.here",
  "primary_phone_number": "9995551212",
  "secondary_phone_number": "(333) 555-1185",
  "home_street_address": "1234 Sesame St.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Ottoman Empire",
  "job_title": "Junior Bacon Burner",
  "occupation": "chef",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse",
  "note": "whatevers2009"
}
Contact Create Failure Response Example
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Create Response Attributes
Attribute Type
agent_uuid* String
moxi_works_agent_id* String
partner_contact_id String
moxi_works_contact_id String
contact_name String or null
first_name String or null
middle_name String or null
last_name String or null
suffix String or null
gender String or null
primary_email_address String or null
secondary_email_address String or null
primary_phone_number String or null
secondary_phone_number String or null
home_street_address String or null
home_city String or null
home_state String or null
home_zip String or null
home_country String or null
job_title String or null
occupation String or null
property_url String or null
property_mls_id String or null
property_street_address String or null
property_city String or null
property_state String or null
property_zip String or null
property_beds String or null
property_baths String or null
property_list_price String or null
property_listing_status String or null
property_photo_url String or null
search_city String or null
search_state String or null
search_zip String or null
search_min_baths String or null
search_min_beds String or null
search_min_price String or null
search_max_price String or null
search_min_sq_ft String or null
search_max_sq_ft String or null
search_min_lot_size String or null
search_max_lot_size String or null
search_min_year_built String or null
search_max_year_built String or null
search_property_types String or null
note String or null

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which this Contact is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent to whom this Contact is associated. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that you are creating.

moxi_works_contact_id This is the Moxi Works Platform ID of this Contact. This will be an RFC 4122 compliant UUID.

contact_name This is the full name of the contact you are creating a Contact record for. You should format this information as first middle last. This value will be null if no data is available for this attribute.

first_name This is the first name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

middle_name This is the middle name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

last_name This is the last name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

suffix This is the generational suffix of the name of the contact associated with this Contact record. This value will be null if no data is available for this attribute. Supported suffixes are II III IV JR JR.. SR SR.

gender The gender of the contact. This can be male, female, m or f. No matter what is provided in the request, the response payload will return m or f. This value will be null if no data is available for this attribute.

primary_email_address This is the email address that should be used first. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

secondary_email_address This is the email address that should be used as an alternate. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

home_street_address The contact’s home address street, including number and any suite / apartment number information. This value will be null if no data is available for this attribute.

home_city The city of the contact’s home address. This value will be null if no data is available for this attribute. This value will be null if no data is available for this attribute.

home_state The state of the contact’s home address. This value will be null if no data is available for this attribute.

home_zip The zip code of the contact’s home address. This value will be null if no data is available for this attribute.

home_country The country of the contact’s home address. This value will be null if no data is available for this attribute.

job_title The contact’s professional job title. This value will be null if no data is available for this attribute.

occupation The contact’s profession. This value will be null if no data is available for this attribute.

property_url This will be a valid URL for a property of interest in your system that can be viewed by the agent. This value will be null if no data is available for this attribute.

property_mls_id This will be the MLS ID of the property of interest. This value will be null if no data is available for this attribute.

property_street_address This will be the street address of the property of interest, including number and suite/apartment number information. This value will be null if no data is available for this attribute.

property_city This will be the city in which the property of interest exists. This value will be null if no data is available for this attribute.

property_state This will be the state or province in which the property of interest exists. This value will be null if no data is available for this attribute.

property_zip This will be the postal code in which the property of interest exists. This value will be null if no data is available for this attribute.

property_beds This will be the number of bedrooms in the property of interest. This value will be null if no data is available for this attribute.

property_baths This will be the number of bathrooms in the property of interest. This value will be null if no data is available for this attribute.

property_list_price This will be the list price of the property of interest. This value will be null if no data is available for this attribute.

property_listing_status This will be the listing status of the property of interest. This can be any arbitrary string, but for best results, this should be a state like Active, Pending, Sold, Cancelled or any other human readable state that would be useful when presented to the agent. This value will be null if no data is available for this attribute.

property_photo_url This will be a valid URL to an image of the property of interest. This value will be null if no data is available for this attribute.

search_city This will be the city / locale used in the listing search criteria. This value will be null if no data is available for this attribute.

search_state This will be the state / region used in the listing search criteria. This value will be null if no data is available for this attribute.

search_zip This will be the zip / postal code used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_baths This will be the minimum bathrooms used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min beds This will be the minimum bedrooms used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_price This will be the minimum price used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_price This will be the maximum price used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_sq_ft This will be the minimum square feet of the total living area used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_sq_ft This will be the maximum square feet of the total living area used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_lot_size This will be the minimum lot size used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_lot_size This will be the maximum lot size used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_year_built This will be the minimum allowable year built used in the listing search criteria. This value will be null if no data is available for this attribute.

search_property_types This will be the property types used in the listing search criteria. This can be any arbitrary human readable string, but using recognized property types such as Condo, Single-Family, Townhouse, Land, Multifamily will provide more value to the agent. This value will be null if no data is available for this attribute.

note This is an arbitrary string giving the agent more details about the contact which would not otherwise fit into the Contact record. Any HTML formatting included will be stripped from the note attribute’s data. This value will be null if no data is available for this attribute.

Contact Update

Contact Update (using agent_uuid) Example

{
"agent_uuid":"12345678-1234-1234-1234-1234567890ab",
"partner_contact_id":"booyuh",
"contact_name":"Firstname Middlenyme Larstnam",
"gender":"m",
"primary_email_address":"me@justabout.right.here",
"secondary_email_address":"me.too@justabout.right.here",
"primary_phone_number":"9995551212",
"secondary_phone_number":"(333) 555-1185",
"home_street_address":"1234 Sesame St.",
"home_city":"Cityville",
"home_state":"Stateland",
"home_zip":"12345-6789",
"home_country":"Ottoman Empire",
"job_title":"Junior Bacon Burner",
"occupation":"chef",
"property_url":"http://my.property.website.is/here",
"property_mls_id":"abc123",
"property_street_address":"2345 67th place",
"property_city":"Townland",
"property_state":"Statesville",
"property_zip":"98765-4321",
"property_beds":"18",
"property_baths":"12.5",
"property_list_price":"123456789",
"property_listing_status":"Active",
"property_photo_url":"http://property.photo.is/here.jpg",
"search_city":"Searchland",
"search_state":"Searchsylvania",
"search_zip":"12345-6789",
"search_min_beds":"2",
"search_min_baths":"3.25",
"search_min_price":"1234567",
"search_max_price":"1234569",
"search_min_sq_ft":"1234",
"search_max_sq_ft":"1235",
"search_min_lot_size":"3234",
"search_max_lot_size":"3235",
"search_min_year_built":"1388",
"search_max_year_built":"2044",
"search_property_types":"Condo, Single Family, Townhouse",
"note":"whatevers2009"
}
PUT /api/contacts/[partner_contact_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


agent_uuid=12345678-1234-1234-1234-1234567890ab&partner_contact_id=abc982cdf345&contact_name=Billy+Football&gender=m&primary_email_address=johnny%40football.foo&secondary_email_address=fooball%40johnnyshead.lost&primary_phone_number=123123213&secondary_phone_number=2929292922&home_street_address=1234+Winterfell+Way&home_city=Cityville&home_state=Stateland&home_zip=12345&home_country=Westeros&job_title=Junior+Bacon+Burner&occupation=Chef&property_url=http%3A%2F%2Fteh.property.is%2Fhere&property_mls_id=123abc&property_street_address=1234+here+ave.&property_city=anywhereville&property_state=anystate&property_zip=918928&property_beds=21&property_baths=12.75&property_list_price=1231213&property_listing_status=Active&property_photo_url=http%3A%2F%2Fthis.is%2Fthe%2Fphoto.jpg&search_city=searchville&search_state=ofconfusion&search_zip=92882&search_min_beds=12&search_min_baths=4&search_min_price=1234&search_max_price=22324&search_min_sq_ft=1234&search_max_sq_ft=23455&search_min_lot_size=29299&search_max_lot_size=292929&search_min_year_built=1999&search_max_year_built=2004&search_property_types=Condo%2C+Single-Family&note=whatevers2009
##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_contact = MoxiworksPlatform::Contact.update(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_contact_id: "booyuh",
        contact_name: "Firstname Middlenyme Larstnam",
        gender: "m",
        primary_email_address: "me@justabout.right.here",
        secondary_email_address: "me.too@justabout.right.here",
        primary_phone_number: "9995551212",
        secondary_phone_number: "(333) 555-1185",
        home_street_address: "1234 Sesame St.",
        home_city: "Cityville",
        home_state: "Stateland",
        home_zip: "12345-6789",
        home_country: "Ottoman Empire",
        job_title: "Junior Bacon Burner",
        occupation: "chef",
        property_url: "http://my.property.website.is/here",
        property_mls_id: "abc123",
        property_street_address: "2345 67th place",
        property_city: "Townland",
        property_state: "Statesville",
        property_zip: "98765-4321",
        property_beds: "18",
        property_baths: "12.5",
        property_list_price: "123456789",
        property_listing_status: "Active",
        property_photo_url: "http://property.photo.is/here.jpg",
        search_city: "Searchland",
        search_state: "Searchsylvania",
        search_zip: "12345-6789",
        search_min_beds: "2",
        search_min_baths: "3.25",
        search_min_price: "1234567",
        search_max_price: "1234569",
        search_min_sq_ft: "1234",
        search_max_sq_ft: "1235",
        search_min_lot_size: "3234",
        search_max_lot_size: "3235",
        search_min_year_built: "1388",
        search_max_year_built: "2044",
        search_property_types: "Condo, Single Family, Townhouse",
        note: "whatevers2009")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_contact = 12345678-1234-1234-1234-1234567890ab\Contact::update([
        'agent_uuid'  => '1234abcd',
        'partner_contact_id'  => 'booyuh',
        'contact_name'  => 'Firstname Middlenyme Larstnam',
        'gender'  => 'm',
        'primary_email_address'  => 'me@justabout.right.here',
        'secondary_email_address'  => 'me.too@justabout.right.here',
        'primary_phone_number'  => '9995551212',
        'secondary_phone_number'  => '(333) 555-1185',
        'home_street_address'  => '1234 Sesame St.',
        'home_city'  => 'Cityville',
        'home_state'  => 'Stateland',
        'home_zip'  => '12345-6789',
        'home_country'  => 'Ottoman Empire',
        'job_title'  => 'Junior Bacon Burner',
        'occupation'  => 'chef',
        'property_url'  => 'http://my.property.website.is/here',
        'property_mls_id'  => 'abc123',
        'property_street_address'  => '2345 67th place',
        'property_city'  => 'Townland',
        'property_state'  => 'Statesville',
        'property_zip'  => '98765-4321',
        'property_beds'  => '18',
        'property_baths'  => '12.5',
        'property_list_price'  => '123456789',
        'property_listing_status'  => 'Active',
        'property_photo_url'  => 'http://property.photo.is/here.jpg',
        'search_city'  => 'Searchland',
        'search_state'  => 'Searchsylvania',
        'search_zip'  => '12345-6789',
        'search_min_beds'  => '2',
        'search_min_baths'  => '3.25',
        'search_min_price'  => '1234567',
        'search_max_price'  => '1234569',
        'search_min_sq_ft'  => '1234',
        'search_max_sq_ft'  => '1235',
        'search_min_lot_size'  => '3234',
        'search_max_lot_size'  => '3235',
        'search_min_year_built'  => '1388',
        'search_max_year_built'  => '2044',
        'search_property_types'  => 'Condo, Single Family, Townhouse',
        'note'  => 'whatevers2009']);
?>

Contact Update (using moxi_works_agent_id) Example

{
"moxi_works_agent_id":"1234abcd",
"partner_contact_id":"booyuh",
"contact_name":"Firstname Middlenyme Larstnam",
"gender":"m",
"primary_email_address":"me@justabout.right.here",
"secondary_email_address":"me.too@justabout.right.here",
"primary_phone_number":"9995551212",
"secondary_phone_number":"(333) 555-1185",
"home_street_address":"1234 Sesame St.",
"home_city":"Cityville",
"home_state":"Stateland",
"home_zip":"12345-6789",
"home_country":"Ottoman Empire",
"job_title":"Junior Bacon Burner",
"occupation":"chef",
"property_url":"http://my.property.website.is/here",
"property_mls_id":"abc123",
"property_street_address":"2345 67th place",
"property_city":"Townland",
"property_state":"Statesville",
"property_zip":"98765-4321",
"property_beds":"18",
"property_baths":"12.5",
"property_list_price":"123456789",
"property_listing_status":"Active",
"property_photo_url":"http://property.photo.is/here.jpg",
"search_city":"Searchland",
"search_state":"Searchsylvania",
"search_zip":"12345-6789",
"search_min_beds":"2",
"search_min_baths":"3.25",
"search_min_price":"1234567",
"search_max_price":"1234569",
"search_min_sq_ft":"1234",
"search_max_sq_ft":"1235",
"search_min_lot_size":"3234",
"search_max_lot_size":"3235",
"search_min_year_built":"1388",
"search_max_year_built":"2044",
"search_property_types":"Condo, Single Family, Townhouse",
"note":"whatevers2009"
}
PUT /api/contacts/[partner_contact_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


moxi_works_agent_id=abc123&partner_contact_id=abc982cdf345&contact_name=Billy+Football&gender=m&primary_email_address=johnny%40football.foo&secondary_email_address=fooball%40johnnyshead.lost&primary_phone_number=123123213&secondary_phone_number=2929292922&home_street_address=1234+Winterfell+Way&home_city=Cityville&home_state=Stateland&home_zip=12345&home_country=Westeros&job_title=Junior+Bacon+Burner&occupation=Chef&property_url=http%3A%2F%2Fteh.property.is%2Fhere&property_mls_id=123abc&property_street_address=1234+here+ave.&property_city=anywhereville&property_state=anystate&property_zip=918928&property_beds=21&property_baths=12.75&property_list_price=1231213&property_listing_status=Active&property_photo_url=http%3A%2F%2Fthis.is%2Fthe%2Fphoto.jpg&search_city=searchville&search_state=ofconfusion&search_zip=92882&search_min_beds=12&search_min_baths=4&search_min_price=1234&search_max_price=22324&search_min_sq_ft=1234&search_max_sq_ft=23455&search_min_lot_size=29299&search_max_lot_size=292929&search_min_year_built=1999&search_max_year_built=2004&search_property_types=Condo%2C+Single-Family&note=whatevers2009
##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_contact = MoxiworksPlatform::Contact.update(
        moxi_works_agent_id: "1234abcd",
        partner_contact_id: "booyuh",
        contact_name: "Firstname Middlenyme Larstnam",
        gender: "m",
        primary_email_address: "me@justabout.right.here",
        secondary_email_address: "me.too@justabout.right.here",
        primary_phone_number: "9995551212",
        secondary_phone_number: "(333) 555-1185",
        home_street_address: "1234 Sesame St.",
        home_city: "Cityville",
        home_state: "Stateland",
        home_zip: "12345-6789",
        home_country: "Ottoman Empire",
        job_title: "Junior Bacon Burner",
        occupation: "chef",
        property_url: "http://my.property.website.is/here",
        property_mls_id: "abc123",
        property_street_address: "2345 67th place",
        property_city: "Townland",
        property_state: "Statesville",
        property_zip: "98765-4321",
        property_beds: "18",
        property_baths: "12.5",
        property_list_price: "123456789",
        property_listing_status: "Active",
        property_photo_url: "http://property.photo.is/here.jpg",
        search_city: "Searchland",
        search_state: "Searchsylvania",
        search_zip: "12345-6789",
        search_min_beds: "2",
        search_min_baths: "3.25",
        search_min_price: "1234567",
        search_max_price: "1234569",
        search_min_sq_ft: "1234",
        search_max_sq_ft: "1235",
        search_min_lot_size: "3234",
        search_max_lot_size: "3235",
        search_min_year_built: "1388",
        search_max_year_built: "2044",
        search_property_types: "Condo, Single Family, Townhouse",
        note: "whatevers2009")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_contact = MoxiworksPlatform\Contact::update([
        'moxi_works_agent_id'  => '1234abcd',
        'partner_contact_id'  => 'booyuh',
        'contact_name'  => 'Firstname Middlenyme Larstnam',
        'gender'  => 'm',
        'primary_email_address'  => 'me@justabout.right.here',
        'secondary_email_address'  => 'me.too@justabout.right.here',
        'primary_phone_number'  => '9995551212',
        'secondary_phone_number'  => '(333) 555-1185',
        'home_street_address'  => '1234 Sesame St.',
        'home_city'  => 'Cityville',
        'home_state'  => 'Stateland',
        'home_zip'  => '12345-6789',
        'home_country'  => 'Ottoman Empire',
        'job_title'  => 'Junior Bacon Burner',
        'occupation'  => 'chef',
        'property_url'  => 'http://my.property.website.is/here',
        'property_mls_id'  => 'abc123',
        'property_street_address'  => '2345 67th place',
        'property_city'  => 'Townland',
        'property_state'  => 'Statesville',
        'property_zip'  => '98765-4321',
        'property_beds'  => '18',
        'property_baths'  => '12.5',
        'property_list_price'  => '123456789',
        'property_listing_status'  => 'Active',
        'property_photo_url'  => 'http://property.photo.is/here.jpg',
        'search_city'  => 'Searchland',
        'search_state'  => 'Searchsylvania',
        'search_zip'  => '12345-6789',
        'search_min_beds'  => '2',
        'search_min_baths'  => '3.25',
        'search_min_price'  => '1234567',
        'search_max_price'  => '1234569',
        'search_min_sq_ft'  => '1234',
        'search_max_sq_ft'  => '1235',
        'search_min_lot_size'  => '3234',
        'search_max_lot_size'  => '3235',
        'search_min_year_built'  => '1388',
        'search_max_year_built'  => '2044',
        'search_property_types'  => 'Condo, Single Family, Townhouse',
        'note'  => 'whatevers2009']);
?>
Contact Update Request Attributes

When updating an Contact using the Moxi Works platform API, format your request using the following parameters.

Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
partner_contact_id String 255
contact_name String 255
gender String 255
primary_email_address String 255
secondary_email_address String 255
primary_phone_number String 255
secondary_phone_number String 255
home_street_address String 255
home_city String 255
home_state String 255
home_zip String 255
home_country String 255
job_title String 255
occupation String 255
property_url String 255
property_mls_id String 255
property_street_address String 255
property_city String 255
property_state String 255
property_zip String 255
property_beds Integer 255
property_baths Float 255
property_list_price Integer 255
property_listing_status String 255
property_photo_url String 255
search_city String 255
search_state String 255
search_zip String 255
search_min_baths Float 255
search_min_beds Integer 255
search_min_price Integer 255
search_max_price Integer 255
search_min_sq_ft Integer 255
search_max_sq_ft Integer 255
search_min_lot_size Integer 255
search_max_lot_size Integer 255
search_min_year_built Integer 255
search_max_year_built Integer 255
search_property_types String 255
note String

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an Contact entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Contact Update request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Contact entry is to be associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Contact Update request to be accepted.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that you are creating.

contact_name This is the full name of the contact you are creating a Contact record for. You should format this information as first middle last.

gender The gender of the contact. This can be male, female, m or f. No matter what is provided in the request, the response payload will return m or f.

primary_email_address This is the email address that should be used first. If provided, the address must conform to RFC 3696.

secondary_email_address This is the email address that should be used as an alternate. If provided, the address must conform to RFC 3696.

home_street_address The contact’s home address street, including number and any suite / apartment number information.

home_city The city of the contact’s home address.

home_state The state of the contact’s home address.

home_zip The zip code of the contact’s home address.

home_country The country of the contact’s home address.

job_title The contact’s professional job title.

occupation The contact’s profession.

property_url This should be a valid URL for a property of interest in your system that can be viewed by the agent.

property_mls_id Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the MLS ID of the property of interest.

property_street_address Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the street address of the property of interest, including number and suite/apartment number information.

property_city Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the city in which the property of interest exists.

property_state Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the state or province in which the property of interest exists.

property_zip Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the postal code in which the property of interest exists.

property_beds Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the number of bedrooms in the property of interest.

property_baths Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the number of bathrooms in the property of interest.

property_list_price Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the list price of the property of interest.

property_listing_status Use this if you have data about a property that this contact has shown interest in (property of interest); this should be the listing status of the property of interest. This can be any arbitrary string, but for best results, this should be a state like Active, Pending, Sold, Cancelled or any other human readable state that would be useful when presented to the agent.

property_photo_url Use this if you have data about a property that this contact has shown interest in (property of interest); this should be a valid URL to an image of the property of interest.

search_city Use this if you have data about listing searches that this contact has performed; this should be the city / locale used in the listing search criteria.

search_state Use this if you have data about listing searches that this contact has performed; this should be the state / region used in the listing search criteria.

search_zip Use this if you have data about listing searches that this contact has performed; this should be the zip / postal code used in the listing search criteria.

search_min_baths Use this if you have data about listing searches that this contact has performed; this should be the minimum bathrooms used in the listing search criteria.

search_min beds Use this if you have data about listing searches that this contact has performed; this should be the minimum bedrooms used in the listing search criteria.

search_min_price Use this if you have data about listing searches that this contact has performed; this should be the minimum price used in the listing search criteria.

search_max_price Use this if you have data about listing searches that this contact has performed; this should be the maximum price used in the listing search criteria.

search_min_sq_ft Use this if you have data about listing searches that this contact has performed; this should be the minimum square feet of the total living area used in the listing search criteria.

search_max_sq_ft Use this if you have data about listing searches that this contact has performed; this should be the maximum square feet of the total living area used in the listing search criteria.

search_min_lot_size Use this if you have data about listing searches that this contact has performed; this should be the minimum lot size used in the listing search criteria.

search_max_lot_size Use this if you have data about listing searches that this contact has performed; this should be the maximum lot size used in the listing search criteria.

search_min_year_built Use this if you have data about listing searches that this contact has performed; this should be the minimum allowable year built used in the listing search criteria.

search_property_types Use this if you have data about listing searches that this contact has performed; this should be the property types used in the listing search criteria. This can be any arbitrary human readable string, but using recognized property types such as Condo, Single-Family, Townhouse, Land, Multifamily will provide more value to the agent.

note This is an arbitrary string giving the agent more details about the contact which would not otherwise fit into the Contact record. Any HTML formatting included will be stripped from the note attribute’s data.

Contact Update Response Payload

The following attributes make up the payload of the Contact response for a Update request.

Contact Update (using agent_uuid) Response Payload Example
{
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_contact_id": "booyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-bad4dad22dead",
  "contact_name":"Firstname Middlenyme Larstnam",
  "first_name":"Firstname",
  "middle_name":"Middlenyme",
  "last_name":"Larstnam",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "me@justabout.right.here",
  "secondary_email_address": "me.too@justabout.right.here",
  "primary_phone_number": "9995551212",
  "secondary_phone_number": "(333) 555-1185",
  "home_street_address": "1234 Sesame St.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Ottoman Empire",
  "job_title": "Junior Bacon Burner",
  "occupation": "chef",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse",
  "note": "whatevers2009"
}
Contact Update (using moxi_works_agent_id) Response Payload Example
{
  "moxi_works_agent_id": "1234abcd",
  "partner_contact_id": "booyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-bad4dad22dead",
  "contact_name":"Firstname Middlenyme Larstnam",
  "first_name":"Firstname",
  "middle_name":"Middlenyme",
  "last_name":"Larstnam",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "me@justabout.right.here",
  "secondary_email_address": "me.too@justabout.right.here",
  "primary_phone_number": "9995551212",
  "secondary_phone_number": "(333) 555-1185",
  "home_street_address": "1234 Sesame St.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Ottoman Empire",
  "job_title": "Junior Bacon Burner",
  "occupation": "chef",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse",
  "note": "whatevers2009"
}
Contact Update Failure Response Example
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Update Response Attributes
Attribute Type
agent_uuid* String
moxi_works_agent_id* String
partner_contact_id String
moxi_works_contact_id String
contact_name String or null
first_name String or null
middle_name String or null
last_name String or null
suffix String or null
gender String or null
primary_email_address String or null
secondary_email_address String or null
primary_phone_number String or null
secondary_phone_number String or null
home_street_address String or null
home_city String or null
home_state String or null
home_zip String or null
home_country String or null
job_title String or null
occupation String or null
property_url String or null
property_mls_id String or null
property_street_address String or null
property_city String or null
property_state String or null
property_zip String or null
property_beds String or null
property_baths String or null
property_list_price String or null
property_listing_status String or null
property_photo_url String or null
search_city String or null
search_state String or null
search_zip String or null
search_min_baths String or null
search_min_beds String or null
search_min_price String or null
search_max_price String or null
search_min_sq_ft String or null
search_max_sq_ft String or null
search_min_lot_size String or null
search_max_lot_size String or null
search_min_year_built String or null
search_max_year_built String or null
search_property_types String or null
note String or null

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which this Contact is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that you are creating.

moxi_works_contact_id This is the Moxi Works Platform ID of this Contact. This will be an RFC 4122 compliant UUID.

contact_name This is the full name of the contact you are creating a Contact record for. You should format this information as first middle last. This value will be null if no data is available for this attribute.

first_name This is the first name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

middle_name This is the middle name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

last_name This is the last name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

suffix This is the generational suffix of the name of the contact associated with this Contact record. This value will be null if no data is available for this attribute. Supported suffixes are II III IV JR JR..

gender The gender of the contact. This can be male, female, m or f. No matter what is provided in the request, the response payload will return m or f. This value will be null if no data is available for this attribute.

primary_email_address This is the email address that should be used first. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

secondary_email_address This is the email address that should be used as an alternate. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

home_street_address The contact’s home address street, including number and any suite / apartment number information. This value will be null if no data is available for this attribute.

home_city The city of the contact’s home address. This value will be null if no data is available for this attribute. This value will be null if no data is available for this attribute.

home_state The state of the contact’s home address. This value will be null if no data is available for this attribute.

home_zip The zip code of the contact’s home address. This value will be null if no data is available for this attribute.

home_country The country of the contact’s home address. This value will be null if no data is available for this attribute.

job_title The contact’s professional job title. This value will be null if no data is available for this attribute.

occupation The contact’s profession. This value will be null if no data is available for this attribute.

property_url This will be a valid URL for a property of interest in your system that can be viewed by the agent. This value will be null if no data is available for this attribute.

property_mls_id This will be the MLS ID of the property of interest. This value will be null if no data is available for this attribute.

property_street_address This will be the street address of the property of interest, including number and suite/apartment number information. This value will be null if no data is available for this attribute.

property_city This will be the city in which the property of interest exists. This value will be null if no data is available for this attribute.

property_state This will be the state or province in which the property of interest exists. This value will be null if no data is available for this attribute.

property_zip This will be the postal code in which the property of interest exists. This value will be null if no data is available for this attribute.

property_beds This will be the number of bedrooms in the property of interest. This value will be null if no data is available for this attribute.

property_baths This will be the number of bathrooms in the property of interest. This value will be null if no data is available for this attribute.

property_list_price This will be the list price of the property of interest. This value will be null if no data is available for this attribute.

property_listing_status This will be the listing status of the property of interest. This can be any arbitrary string, but for best results, this should be a state like Active, Pending, Sold, Cancelled or any other human readable state that would be useful when presented to the agent. This value will be null if no data is available for this attribute.

property_photo_url This will be a valid URL to an image of the property of interest. This value will be null if no data is available for this attribute.

search_city This will be the city / locale used in the listing search criteria. This value will be null if no data is available for this attribute.

search_state This will be the state / region used in the listing search criteria. This value will be null if no data is available for this attribute.

search_zip This will be the zip / postal code used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_baths This will be the minimum bathrooms used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min beds This will be the minimum bedrooms used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_price This will be the minimum price used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_price This will be the maximum price used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_sq_ft This will be the minimum square feet of the total living area used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_sq_ft This will be the maximum square feet of the total living area used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_lot_size This will be the minimum lot size used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_lot_size This will be the maximum lot size used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_year_built This will be the minimum allowable year built used in the listing search criteria. This value will be null if no data is available for this attribute.

search_property_types This will be the property types used in the listing search criteria. This can be any arbitrary human readable string, but using recognized property types such as Condo, Single-Family, Townhouse, Land, Multifamily will provide more value to the agent. This value will be null if no data is available for this attribute.

note This is an arbitrary string giving the agent more details about the contact which would not otherwise fit into the Contact record. Any HTML formatting included will be stripped from the note attribute’s data. This value will be null if no data is available for this attribute.

Contact Show

Contact Show (using agent_uuid) Example

GET /api/contacts/my_contact_id?agent_uuid=12345678-1234-1234-1234-1234567890ab HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab"
}
##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_contact = MoxiworksPlatform::Contact.find(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_contact_id: "booyuh")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_contact = MoxiworksPlatform\Contact::find([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'partner_contact_id' => 'booyuh']);
?>

Contact Show (using moxi_works_agent_id) Example

GET /api/contacts/my_contact_id?moxi_works_agent_id=abc123 HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{
  "moxi_works_agent_id":"abc123"
}
##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_contact = MoxiworksPlatform::Contact.find(
        moxi_works_agent_id: "1234abcd",
        partner_contact_id: "booyuh")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_contact = MoxiworksPlatform\Contact::find([
        'moxi_works_agent_id' => '1234abcd',
        'partner_contact_id' => 'booyuh']);
?>

When showing a contact using the Moxi Works platform API, format your data using the following parameters.

Contact Show Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
partner_contact_id String 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which a Contact is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Conact Show request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Contact entry is associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Contact Show request to be accepted.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that you are finding.

Contact Show Response Payload

The following attributes make up the payload of the Contact response for a Show request.

Contact Show (using agent_uuid) Response Payload Example
{
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_contact_id": "booyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-bad4dad22dead",
  "contact_name":"Firstname Middlenyme Larstnam",
  "first_name":"Firstname",
  "middle_name":"Middlenyme",
  "last_name":"Larstnam",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "me@justabout.right.here",
  "secondary_email_address": "me.too@justabout.right.here",
  "primary_phone_number": "9995551212",
  "secondary_phone_number": "(333) 555-1185",
  "home_street_address": "1234 Sesame St.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Ottoman Empire",
  "job_title": "Junior Bacon Burner",
  "occupation": "chef",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse"
}
Contact Show (using moxi_works_agent_id) Response Payload Example
{
  "moxi_works_agent_id": "1234abcd",
  "partner_contact_id": "booyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-bad4dad22dead",
  "contact_name":"Firstname Middlenyme Larstnam",
  "first_name":"Firstname",
  "middle_name":"Middlenyme",
  "last_name":"Larstnam",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "me@justabout.right.here",
  "secondary_email_address": "me.too@justabout.right.here",
  "primary_phone_number": "9995551212",
  "secondary_phone_number": "(333) 555-1185",
  "home_street_address": "1234 Sesame St.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Ottoman Empire",
  "job_title": "Junior Bacon Burner",
  "occupation": "chef",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse"
}
Contact Show Failure Response Example
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Show Response Attributes
Attribute Type
agent_uuid* String
moxi_works_agent_id* String
partner_contact_id String
moxi_works_contact_id String
contact_name String or null
first_name String or null
middle_name String or null
last_name String or null
suffix String or null
gender String or null
primary_email_address String or null
secondary_email_address String or null
primary_phone_number String or null
secondary_phone_number String or null
home_street_address String or null
home_city String or null
home_state String or null
home_zip String or null
home_country String or null
job_title String or null
occupation String or null
property_url String or null
property_mls_id String or null
property_street_address String or null
property_city String or null
property_state String or null
property_zip String or null
property_beds String or null
property_baths String or null
property_list_price String or null
property_listing_status String or null
property_photo_url String or null
search_city String or null
search_state String or null
search_zip String or null
search_min_baths String or null
search_min_beds String or null
search_min_price String or null
search_max_price String or null
search_min_sq_ft String or null
search_max_sq_ft String or null
search_min_lot_size String or null
search_max_lot_size String or null
search_min_year_built String or null
search_max_year_built String or null
search_property_types String or null
note String or null

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which this Contact is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that you are finding.

moxi_works_contact_id This is the Moxi Works Platform ID of this Contact. This will be an RFC 4122 compliant UUID.

contact_name This is the full name of the contact you are finding a Contact record for. You should format this information as first middle last. This value will be null if no data is available for this attribute.

first_name This is the first name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

middle_name This is the middle name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

last_name This is the last name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

suffix This is the generational suffix of the name of the contact associated with this Contact record. This value will be null if no data is available for this attribute. Supported suffixes are II III IV JR JR..

gender The gender of the contact. This can be male, female, m or f. No matter what is provided in the request, the response payload will return m or f. This value will be null if no data is available for this attribute.

primary_email_address This is the email address that should be used first. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

secondary_email_address This is the email address that should be used as an alternate. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

home_street_address The contact’s home address street, including number and any suite / apartment number information. This value will be null if no data is available for this attribute.

home_city The city of the contact’s home address. This value will be null if no data is available for this attribute. This value will be null if no data is available for this attribute.

home_state The state of the contact’s home address. This value will be null if no data is available for this attribute.

home_zip The zip code of the contact’s home address. This value will be null if no data is available for this attribute.

home_country The country of the contact’s home address. This value will be null if no data is available for this attribute.

job_title The contact’s professional job title. This value will be null if no data is available for this attribute.

occupation The contact’s profession. This value will be null if no data is available for this attribute.

property_url This will be a valid URL for a property of interest in your system that can be viewed by the agent. This value will be null if no data is available for this attribute.

property_mls_id This will be the MLS ID of the property of interest. This value will be null if no data is available for this attribute.

property_street_address This will be the street address of the property of interest, including number and suite/apartment number information. This value will be null if no data is available for this attribute.

property_city This will be the city in which the property of interest exists. This value will be null if no data is available for this attribute.

property_state This will be the state or province in which the property of interest exists. This value will be null if no data is available for this attribute.

property_zip This will be the postal code in which the property of interest exists. This value will be null if no data is available for this attribute.

property_beds This will be the number of bedrooms in the property of interest. This value will be null if no data is available for this attribute.

property_baths This will be the number of bathrooms in the property of interest. This value will be null if no data is available for this attribute.

property_list_price This will be the list price of the property of interest. This value will be null if no data is available for this attribute.

property_listing_status This will be the listing status of the property of interest. This can be any arbitrary string, but for best results, this should be a state like Active, Pending, Sold, Cancelled or any other human readable state that would be useful when presented to the agent. This value will be null if no data is available for this attribute.

property_photo_url This will be a valid URL to an image of the property of interest. This value will be null if no data is available for this attribute.

search_city This will be the city / locale used in the listing search criteria. This value will be null if no data is available for this attribute.

search_state This will be the state / region used in the listing search criteria. This value will be null if no data is available for this attribute.

search_zip This will be the zip / postal code used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_baths This will be the minimum bathrooms used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min beds This will be the minimum bedrooms used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_price This will be the minimum price used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_price This will be the maximum price used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_sq_ft This will be the minimum square feet of the total living area used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_sq_ft This will be the maximum square feet of the total living area used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_lot_size This will be the minimum lot size used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_lot_size This will be the maximum lot size used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_year_built This will be the minimum allowable year built used in the listing search criteria. This value will be null if no data is available for this attribute.

search_property_types This will be the property types used in the listing search criteria. This can be any arbitrary human readable string, but using recognized property types such as Condo, Single-Family, Townhouse, Land, Multifamily will provide more value to the agent. This value will be null if no data is available for this attribute.

note This is an arbitrary string giving the agent more details about the contact which would not otherwise fit into the Contact record. Any HTML formatting included will be stripped from the note attribute’s data. This value will be null if no data is available for this attribute.

Contact Index

Contact Index (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "contact_name":"buckminster fuller"
}

GET /api/contacts?agent_uuid=12345678-1234-1234-1234-1234567890ab&contact_name=buckminster%20fuller HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_contact = MoxiworksPlatform::Contact.search(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        contact_name: "buckminster fuller")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_contact = MoxiworksPlatform\Contact::search([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'contact_name' => 'buckminster fuller']);
?>

Contact Index (using moxi_works_agent_id) Example

{
  "moxi_works_agent_id":"abc123",
  "contact_name":"buckminster fuller"
}

GET /api/contacts?moxi_works_agent_id=abc123&contact_name=buckminster%20fuller HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_contact = MoxiworksPlatform::Contact.search(
        moxi_works_agent_id: "1234abcd",
        contact_name: "buckminster fuller")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_contact = MoxiworksPlatform\Contact::search([
        'moxi_works_agent_id' => '1234abcd',
        'contact_name' => 'buckminster fuller']);
?>

When searching for Contact entities using the Moxi Works platform API, format your data using the following parameters.

Contact Index Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
contact_name String 255
email_address String 255
phone_number String 255
page_number Integer 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an Contact entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Contact Index request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Contact entry is associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Contact Index request to be accepted.

contact_name The full name of the contact which you are trying to find the Contact record for.

email_address An email address associated with the Contact record. May be primary or secondary.

phone_number A phone number associated with the Contact record. May be primary or secondary.

page_number Page of Contact records to return. Use if total_pages indicates that there is more than one page of data available.

Contact Index (using agent_uuid) Response Payload Example

{
"page_number":6,
"total_pages":6,
"contacts":[{
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_contact_id": "booyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-2bad4daddead",
  "contact_name":"Firstname Middlenyme Larstnam",
  "first_name":"Firstname",
  "middle_name":"Middlenyme",
  "last_name":"Larstnam",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "me@justabout.right.here",
  "secondary_email_address": "me.too@justabout.right.here",
  "primary_phone_number": "9995551212",
  "secondary_phone_number": "(333) 555-1185",
  "home_street_address": "1234 Sesame St.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Ottoman Empire",
  "job_title": "Junior Bacon Burner",
  "occupation": "chef",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse"
},
{
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_contact_id": "fooyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-2baddadbdead",
  "contact_name": "buckminster fuller",
  "first_name":"buckminster",
  "middle_name":null,
  "last_name":"fuller",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "whatever@whatevers.right.here",
  "secondary_email_address": "me.2009@2009.whatevers.here",
  "primary_phone_number": "202 123-4567",
  "secondary_phone_number": "(444) 555-6666",
  "home_street_address": "1234 Pecan Dr.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Brovilee",
  "job_title": "Junior Cheese Head",
  "occupation": "football fan",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse"
}]
}
Contact Index (using moxi_works_agent_id) Response Payload Example

{
"page_number":6,
"total_pages":6,
"contacts":[{
  "moxi_works_agent_id": "1234abcd",
  "partner_contact_id": "booyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-2bad4daddead",
  "contact_name":"Firstname Middlenyme Larstnam",
  "first_name":"Firstname",
  "middle_name":"Middlenyme",
  "last_name":"Larstnam",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "me@justabout.right.here",
  "secondary_email_address": "me.too@justabout.right.here",
  "primary_phone_number": "9995551212",
  "secondary_phone_number": "(333) 555-1185",
  "home_street_address": "1234 Sesame St.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Ottoman Empire",
  "job_title": "Junior Bacon Burner",
  "occupation": "chef",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse"
},
{
  "moxi_works_agent_id": "1234abcd",
  "partner_contact_id": "fooyuh",
  "moxi_works_contact_id":"deadbeef-feed-face-2baddadbdead",
  "contact_name": "buckminster fuller",
  "first_name":"buckminster",
  "middle_name":null,
  "last_name":"fuller",
  "suffix":null,
  "gender": "m",
  "primary_email_address": "whatever@whatevers.right.here",
  "secondary_email_address": "me.2009@2009.whatevers.here",
  "primary_phone_number": "202 123-4567",
  "secondary_phone_number": "(444) 555-6666",
  "home_street_address": "1234 Pecan Dr.",
  "home_city": "Cityville",
  "home_state": "Stateland",
  "home_zip": "12345-6789",
  "home_country": "Brovilee",
  "job_title": "Junior Cheese Head",
  "occupation": "football fan",
  "property_url": "http://my.property.website.is/here",
  "property_mls_id": "abc123",
  "property_street_address": "2345 67th place",
  "property_city": "Townland",
  "property_state": "Statesville",
  "property_zip": "98765-4321",
  "property_beds": "18",
  "property_baths": "12.5",
  "property_list_price": "123456789",
  "property_listing_status": "Active",
  "property_photo_url": "http://property.photo.is/here.jpg",
  "search_city": "Searchland",
  "search_state": "Searchsylvania",
  "search_zip": "12345-6789",
  "search_min_beds": "2",
  "search_min_baths": "3.25",
  "search_min_price": "1234567",
  "search_max_price": "1234569",
  "search_min_sq_ft": "1234",
  "search_max_sq_ft": "1235",
  "search_min_lot_size": "3234",
  "search_max_lot_size": "3235",
  "search_min_year_built": "1388",
  "search_max_year_built": "2044",
  "search_property_types": "Condo, Single Family, Townhouse"
}]
}
Contact Index Failure Response Example
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Contact Index Response Payload

The following attributes make up the payload of the Contact response for a Index request.

Attribute Type
page_number Integer
total_pages Integer
contacts Array

page_number If there is more than one page of Contact objects to return, page_number will denote which page of responses has been returned. If this is less than the value of total_pages, there are more pages that can be returned by including the page_number parameter in your API request.

total_pages If there is more than one page of Contact objects to return, total_pages will denote how many pages of Contact objects there are to be returned fo the current query. Subsequent pages can be returned by including the page_number parameter in your API request.

contacts This array contains the payload from the request query. Any found Contact objects matching the query will be returned as Contact objects in the response.

contacts Contact Objects
Attribute Type
agent_uuid* String
moxi_works_agent_id* String
partner_contact_id String
moxi_works_contact_id String
contact_name String or null
first_name String or null
middle_name String or null
last_name String or null
suffix String or null
gender String or null
primary_email_address String or null
secondary_email_address String or null
primary_phone_number String or null
secondary_phone_number String or null
home_street_address String or null
home_city String or null
home_state String or null
home_zip String or null
home_country String or null
job_title String or null
occupation String or null
property_url String or null
property_mls_id String or null
property_street_address String or null
property_city String or null
property_state String or null
property_zip String or null
property_beds String or null
property_baths String or null
property_list_price String or null
property_listing_status String or null
property_photo_url String or null
search_city String or null
search_state String or null
search_zip String or null
search_min_baths String or null
search_min_beds String or null
search_min_price String or null
search_max_price String or null
search_min_sq_ft String or null
search_max_sq_ft String or null
search_min_lot_size String or null
search_max_lot_size String or null
search_min_year_built String or null
search_max_year_built String or null
search_property_types String or null
note String or null

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which this Contact is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

partner_contact_id This is the unique identifer you use in your system that has been associated with the Contact that you are creating.

moxi_works_contact_id This is the Moxi Works Platform ID of this Contact. This will be an RFC 4122 compliant UUID.

contact_name This is the full name of the contact you are creating a Contact record for. You should format this information as first middle last. This value will be null if no data is available for this attribute.

first_name This is the first name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

middle_name This is the middle name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

last_name This is the last name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

suffix This is the generational suffix of the name of the contact associated with this Contact record. This value will be null if no data is available for this attribute. Supported suffixes are II III IV JR JR..

gender The gender of the contact. This can be male, female, m or f. No matter what is provided in the request, the response payload will return m or f. This value will be null if no data is available for this attribute.

primary_email_address This is the email address that should be used first. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

secondary_email_address This is the email address that should be used as an alternate. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

home_street_address The contact’s home address street, including number and any suite / apartment number information. This value will be null if no data is available for this attribute.

home_city The city of the contact’s home address. This value will be null if no data is available for this attribute. This value will be null if no data is available for this attribute.

home_state The state of the contact’s home address. This value will be null if no data is available for this attribute.

home_zip The zip code of the contact’s home address. This value will be null if no data is available for this attribute.

home_country The country of the contact’s home address. This value will be null if no data is available for this attribute.

job_title The contact’s professional job title. This value will be null if no data is available for this attribute.

occupation The contact’s profession. This value will be null if no data is available for this attribute.

property_url This will be a valid URL for a property of interest in your system that can be viewed by the agent. This value will be null if no data is available for this attribute.

property_mls_id This will be the MLS ID of the property of interest. This value will be null if no data is available for this attribute.

property_street_address This will be the street address of the property of interest, including number and suite/apartment number information. This value will be null if no data is available for this attribute.

property_city This will be the city in which the property of interest exists. This value will be null if no data is available for this attribute.

property_state This will be the state or province in which the property of interest exists. This value will be null if no data is available for this attribute.

property_zip This will be the postal code in which the property of interest exists. This value will be null if no data is available for this attribute.

property_beds This will be the number of bedrooms in the property of interest. This value will be null if no data is available for this attribute.

property_baths This will be the number of bathrooms in the property of interest. This value will be null if no data is available for this attribute.

property_list_price This will be the list price of the property of interest. This value will be null if no data is available for this attribute.

property_listing_status This will be the listing status of the property of interest. This can be any arbitrary string, but for best results, this should be a state like Active, Pending, Sold, Cancelled or any other human readable state that would be useful when presented to the agent. This value will be null if no data is available for this attribute.

property_photo_url This will be a valid URL to an image of the property of interest. This value will be null if no data is available for this attribute.

search_city This will be the city / locale used in the listing search criteria. This value will be null if no data is available for this attribute.

search_state This will be the state / region used in the listing search criteria. This value will be null if no data is available for this attribute.

search_zip This will be the zip / postal code used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_baths This will be the minimum bathrooms used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min beds This will be the minimum bedrooms used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_price This will be the minimum price used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_price This will be the maximum price used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_sq_ft This will be the minimum square feet of the total living area used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_sq_ft This will be the maximum square feet of the total living area used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_lot_size This will be the minimum lot size used in the listing search criteria. This value will be null if no data is available for this attribute.

search_max_lot_size This will be the maximum lot size used in the listing search criteria. This value will be null if no data is available for this attribute.

search_min_year_built This will be the minimum allowable year built used in the listing search criteria. This value will be null if no data is available for this attribute.

search_property_types This will be the property types used in the listing search criteria. This can be any arbitrary human readable string, but using recognized property types such as Condo, Single-Family, Townhouse, Land, Multifamily will provide more value to the agent. This value will be null if no data is available for this attribute.

note This is an arbitrary string giving the agent more details about the contact which would not otherwise fit into the Contact record. Any HTML formatting included will be stripped from the note attribute’s data. This value will be null if no data is available for this attribute.

EmailCampaign

Moxi Works Platform EmailCampign entities represent email campaigns established between agents and contacts via Moxi Works.

EmailCampaign Index

When searching for EmailCampaign entities using the Moxi Works platform API, format your data using the following parameters.

EmailCampaign Index (using agent_uuid) Request Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "partner_contact_id":"mySystemsContactId"
}

GET /api/email_campaigns?moxi_works_agent_id=abc123&partner_contact_id=mySystemsContactId HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisitesa

moxi_works_email_campaigns = MoxiworksPlatform::EmailCampaign.search(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_contact_id: "mySystemsContactId")


<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_email_campaigns = MoxiworksPlatform\EmailCampaign::search([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'partner_contact_id' => 'mySystemsContactId']);

?>

EmailCampaign Index (using moxi_works_agent_id) Request Example

{
  "moxi_works_agent_id":"abc123",
  "partner_contact_id":"mySystemsContactId"
}

GET /api/email_campaigns?moxi_works_agent_id=abc123&partner_contact_id=mySystemsContactId HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisitesa

moxi_works_email_campaigns = MoxiworksPlatform::EmailCampaign.search(
        moxi_works_agent_id: "1234abcd",
        partner_contact_id: "mySystemsContactId")


<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_email_campaigns = MoxiworksPlatform\EmailCampaign::search([
        'moxi_works_agent_id' => '1234abcd',
        'partner_contact_id' => 'mySystemsContactId']);

?>
EmailCampaign Index Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
partner_contact_id String 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an EmailCampaign entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your EmailCampaign Index request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the agent which an EmailCampaign entry is associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your EmailCampaign request to be accepted.

partner_contact_id This is the unique identifer you use in your system that has been associated with the w that you are creating an EmailCampaign entry about. You should have already created the Contact record on the Moxi Works Platform using Contact Create before attempting to use your system’s contact ID to show EmailCampaign entries for the Contact. Your request will be rejected if the Contact record does not exist.

EmailCampaign Index Response Payload

The following attributes make up the payload of the EmailCampaign response for a Index request.

EmailCampaign Index (using agent_uuid) Response Payload Example
[
{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "subscription_type":"EmailSubscriptionType",
  "email_address":"subscriber@here.com",
  "subscribed_at":1467409224,
  "created_by":"agent",
  "area":"98225",
  "last_sent":0,
  "next_scheduled":0,
  "partner_contact_id":"my_contact_id",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe"
},
{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "subscription_type":"OtherEmailSubscriptionType",
  "email_address":"subscriber@there.com",
  "subscribed_at":1467409442,
  "created_by":"agent",
  "area":"12344",
  "last_sent":1468878269,
  "next_scheduled":1471470286,
  "partner_contact_id":"my_contact_id",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe"

}
]

EmailCampaign Index (using moxi_works_agent_id) Response Payload Example
[
{
  "moxi_works_agent_id":"abc123",
  "subscription_type":"EmailSubscriptionType",
  "email_address":"subscriber@here.com",
  "subscribed_at":1467409224,
  "created_by":"agent",
  "area":"98225",
  "last_sent":0,
  "next_scheduled":0,
  "partner_contact_id":"my_contact_id",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe"
},
{
  "moxi_works_agent_id":"abc123",
  "subscription_type":"OtherEmailSubscriptionType",
  "email_address":"subscriber@there.com",
  "subscribed_at":1467409442,
  "created_by":"agent",
  "area":"12344",
  "last_sent":1468878269,
  "next_scheduled":1471470286,
  "partner_contact_id":"my_contact_id",
  "moxi_works_contact_id":"babebead-feed-face-dead-beefbad4babe"
}
]

EmailCampaign Index Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Attribute Type
agent_uuid* String
moxi_works_agent_id* String
subscription_type String
email_address String
subscribed_at Integer
created_by String
area String
last_sent Integer
next_scheduled Integer

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which this EmailCampaign is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this BuyerTransaction is associated with. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

subscription_type A string representing the type of EmailSubscription is associated with the Contact for the supplied partner_contact_id. This is a unique, internally defined string per EmailSubscription type. Documentation of available subscription_type responses is outside the scope of this documentation. If you need help determining available types, contact your Moxi Works Platform representative.

email_address The email address for the EmailSubscription.

subscribed_at Unix timestamp representing when the EmailSubscription that is associated with the Contact for the supplied partner_contact_id was initiated.

created_by This is a string representing the actor responsible for the subscription initiation.

area A string representing a geographic area that the EmailSubscription regards.

last_sent This is a Unix timestamp representing the point in time that the last EmailSubscription message was sent.

next_scheduled This is a Unix timestamp representing the point in time that the next EmailSubscription message will be sent.

Event

Moxi Works Platform Event entities represent appointments, meetings or other events scheduled for an agent.

Event Create

Event Create (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "partner_event_id":"8675309e9",
  "event_subject":"meeting at Joe Seller's house",
  "event_location":"1234 Joe Seller Way Sellerville, WY 82372",
  "all_day":false,
  "send_reminder":true,
  "remind_minutes_before":15,
  "event_start":1462234227,
  "event_end":1462241468,
  "attendees":"contactIDForContactIAlreadyCreated,otherContactIDForContactIAlreadyCreated",
  "note":"noteworthy stuff that's shown to the agent"
}

POST /api/events HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


agent_uuid=12345678-1234-1234-1234-1234567890ab&partner_event_id=abc98df345&event_subject=subject&event_location=a%20location&all_day=false&event_start=1462234227&event_end=1462241468&attendees=&note=here%20is%20the%20note

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_event = MoxiworksPlatform::Event.create(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_event_id: "booyuh",
        event_subject: "the subject",
        event_location: "the location",
        all_day: false,
        send_reminder: true,
        remind_minutes_before: 15,
        event_start: 1462234227,
        event_end: 1462241468,
        attendees: [contact1ID, contact2ID],
        note: 'notable stuff'
        )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_event = MoxiworksPlatform\Event::create([
        'agent_uuid'  => '12345678-1234-1234-1234-1234567890ab',
        'partner_event_id'  => 'booyuh',
        'event_subject'  => 'the subject',
        'event_location'  => 'the location',
        'all_day'  => false,
        'send_reminder' => true,
        'remind_minutes_before' => 15,
        'event_start'  => 1462234227,
        'event_end'  => 1462241468,
        'attendees'  => null,
        'note'  => 'notable stuff']);
?>

Event Create (using moxi_works_agent_id) Example

{
  "moxi_works_agent_id":"abc123",
  "partner_event_id":"8675309e9",
  "event_subject":"meeting at Joe Seller's house",
  "event_location":"1234 Joe Seller Way Sellerville, WY 82372",
  "all_day":false,
  "send_reminder":true,
  "remind_minutes_before":15,
  "event_start":1462234227,
  "event_end":1462241468,
  "attendees":"contactIDForContactIAlreadyCreated,otherContactIDForContactIAlreadyCreated",
  "note":"noteworthy stuff that's shown to the agent"
}

POST /api/events HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


moxi_works_agent_id=abc123&partner_event_id=abc98df345&event_subject=subject&
event_location=a%20location&
all_day=false&event_start=1462234227&event_end=1462241468&
attendees=&note=here%20is%20the%20note

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_event = MoxiworksPlatform::Event.create(
        moxi_works_agent_id: "1234abcd",
        partner_event_id: "booyuh",
        event_subject: "the subject",
        event_location: "the location",
        all_day: false,
        send_reminder: true,
        remind_minutes_before: 15,
        event_start: 1462234227,
        event_end: 1462241468,
        attendees: [contact1ID, contact2ID],
        note: 'notable stuff'
        )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_event = MoxiworksPlatform\Event::create([
        'moxi_works_agent_id'  => '1234abcd',
        'partner_event_id'  => 'booyuh',
        'event_subject'  => 'the subject',
        'event_location'  => 'the location',
        'all_day'  => false,
        'send_reminder' => true,
        'remind_minutes_before' => 15,
        'event_start'  => 1462234227,
        'event_end'  => 1462241468,
        'attendees'  => null,
        'note'  => 'notable stuff']);
?>
Event Create Request Attributes

When creating an Event using the Moxi Works platform API, format your request using the following parameters.

Attribute Type Length Limit
partner_event_id String 255
agent_uuid* String 255
moxi_works_agent_id* String 255
event_subject String 255
event_location String 255
note String
send_reminder Boolean 255
remind_minutes_before Integer 255
event_start Integer 255
event_end Integer 255
all_day Boolean 255
attendees String

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

partner_event_id This is the unique identifer you use in your system that has been associated with the Event that you are creating. This data is required and must be a unique key.

agent_uuid This is the Moxi Works Platform ID of the Agent which an Event entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Event Create request to be accepted.

event_subject This is a short, descriptive, human readable phrase to be displayed to the agent which lets them know what this Event regards.

event_location This is a human readable locatition reference regarding where the event is located that will be meaningful to the agent.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Event is to be associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Event Create request to be accepted.

send_reminder Whether to send a reminder about the event to attendees before the event starts.

remind_minutes_before If send_reminder is true, this is how many minutes before the start of the event to send the reminder. Default is 15 minutes before.

event_start This is the Unix timestamp representing the start time of the Event that you are creating. This data is required and must be a valid Unix timestamp.

event_end This is the Unix timestamp representing the end time of the Event that you are creating. This data is required and must be a valid Unix timestamp.

all_day Whether the event is an all day event.

attendees This is a comma separated list of contacts that have already been added through the Moxi Works Platform API who will be present at the referenced event. (Use IDs from your system – i.e. partner_contact_id from Contact Create ).

event_location This is a human readable details about the event that will be meaningful to the agent or any details that are not otherwise represented in the structure of the Event object. Any HTML formatting included will be stripped from this attribute.

Event Create Response Payload

The following attributes make up the payload of the Event response for a Create request.

Event Create (using agent_uuid) Response Payload Example

{
  "partner_event_id": "booyuh",
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "event_subject": "event subject",
  "event_location": "event location",
  "note": "notable stuff",
  "send_reminder": true,
  "remind_minutes_before": 15,
  "event_start": 1462234227,
  "event_end": 1462241468,
  "all_day": false,
  "attendees": "Contact1ID,Contact2ID"
}
Event Create (using moxi_works_agent_id) Response Payload Example

{
  "partner_event_id": "booyuh",
  "moxi_works_agent_id": "1234abcd",
  "event_subject": "event subject",
  "event_location": "event location",
  "note": "notable stuff",
  "send_reminder": true,
  "remind_minutes_before": 15,
  "event_start": 1462234227,
  "event_end": 1462241468,
  "all_day": false,
  "attendees": "Contact1ID,Contact2ID"
}
Event Create Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Create Response Attributes
Attribute Type
partner_event_id String
agent_uuid* String
moxi_works_agent_id* String
event_subject String
event_location String
note String
send_reminder Boolean
remind_minutes_before Integer
note String
all_day Boolean
event_start Integer
event_end Integer
attendees String

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

partner_event_id This is the unique identifer you use in your system that has been associated with the Event.

agent_uuid This is the Moxi Works Platform ID of the Agent which this Event is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Event is associated with. This will be a string that may take the form of an email address, or a unique identification string.

event_subject This is a short, descriptive, human readable phrase to be displayed to the agent which lets them know what this Event regards.

event_location This is a human readable locatition reference regarding where the event is located that will be meaningful to the agent.

send_reminder Whether to send a reminder to attendees before the start of the event.

remind_minutes_before Number of minutes prior to the start of the event that attendees should be notified.

note This is a human readable note about the event that will be meaningful to the agent.

event_start This is the Unix timestamp representing the start time of the Event.

event_end This is the Unix timestamp representing the end time of the Event.

attendees This is a comma separated list of contacts that have already been added through the Moxi Works Platform API who will be present at the referenced event. (Use IDs from your system – i.e. partner_contact_id from Contact Create ).

Event Update

Event Update (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "partner_event_id":"8675309e9",
  "event_subject":"meeting at Joe Seller's house",
  "event_location":"1234 Joe Seller Way Sellerville, WY 82372",
  "all_day":false,
  "event_start":1462234227,
  "event_end":1462241468,
  "attendees":"contactIDForContactIAlreadyCreated,otherContactIDForContactIAlreadyCreated",
  "note":"noteworthy stuff that's shown to the agent"
}

PUT /api/events/[partner_event_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


agent_uuid=12345678-1234-1234-1234-1234567890ab&partner_event_id=abc98df345&
event_subject=subject&event_location=a%20location&all_day=false&
event_start=1462234227&event_end=1462241468&required_attendees=&optional_attendees=&
note=here%20is%20the%20note

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_event = MoxiworksPlatform::Event.update(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_event_id: "booyuh",
        event_subject: "the subject",
        event_location: "the location",
        all_day: false,
        event_start: 1462234227,
        event_end: 1462241468,
        required_attendees: nil,
        optional_attendees: ['Contact1ID', 'Contact2ID']
        note: 'notable stuff'
        )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_event = MoxiworksPlatform\Event::update([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'partner_event_id' => 'booyuh',
        'event_subject' => 'the subject',
        'event_location' => 'the location',
        'all_day' => false,
        'event_start' => 1462234227,
        'event_end' => 1462241468,
        'required_attendees' => null,
        'optional_attendees' => null,
        'note' => 'notable stuff']);
?>

Event Update (using moxi_works_agent_id) Example

{
  "moxi_works_agent_id":"abc123",
  "partner_event_id":"8675309e9",
  "event_subject":"meeting at Joe Seller's house",
  "event_location":"1234 Joe Seller Way Sellerville, WY 82372",
  "all_day":false,
  "event_start":1462234227,
  "event_end":1462241468,
  "attendees":"contactIDForContactIAlreadyCreated,otherContactIDForContactIAlreadyCreated",
  "note":"noteworthy stuff that's shown to the agent"
}

PUT /api/events/[partner_event_id] HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


moxi_works_agent_id=abc123&partner_event_id=abc98df345&event_subject=subject&
event_location=a%20location&
all_day=false&event_start=1462234227&event_end=1462241468&
required_attendees=&optional_attendees=&note=here%20is%20the%20note

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_event = MoxiworksPlatform::Event.update(
        moxi_works_agent_id: "1234abcd",
        partner_event_id: "booyuh",
        event_subject: "the subject",
        event_location: "the location",
        all_day: false,
        event_start: 1462234227,
        event_end: 1462241468,
        required_attendees: nil,
        optional_attendees: ['Contact1ID', 'Contact2ID']
        note: 'notable stuff'
        )

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_event = MoxiworksPlatform\Event::update([
        'moxi_works_agent_id' => '1234abcd',
        'partner_event_id' => 'booyuh',
        'event_subject' => 'the subject',
        'event_location' => 'the location',
        'all_day' => false,
        'event_start' => 1462234227,
        'event_end' => 1462241468,
        'required_attendees' => null,
        'optional_attendees' => null,
        'note' => 'notable stuff']);
?>

When creating an Event using the Moxi Works platform API, format your request using the following parameters.

Event Update Request Attributes
Attribute Type Length Limit
partner_event_id String 255
agent_uuid* String 255
moxi_works_agent_id* String 255
event_subject String 255
event_location String 255
note String
send_reminder Boolean 255
remind_minutes_before Integer 255
event_start Integer 255
event_end Integer 255
all_day Boolean 255
attendees String

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

partner_event_id This is the unique identifer you use in your system that has been associated with the Event that you are updating.

agent_uuid This is the Moxi Works Platform ID of the Agent which an Event entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Event Create request to be accepted.

event_subject This is a short, descriptive, human readable phrase to be displayed to the agent which lets them know what this Event regards.

event_location This is a human readable locatition reference regarding where the event is located that will be meaningful to the agent.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Event is to be associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Event Create request to be accepted.

send_reminder Whether to send a reminder about the event to attendees before the event starts.

remind_minutes_before If send_reminder is true, this is how many minutes before the start of the event to send the reminder. Default is 15 minutes before.

event_start This is the Unix timestamp representing the start time of the Event that you are creating. This data is required and must be a valid Unix timestamp.

event_end This is the Unix timestamp representing the end time of the Event that you are creating. This data is required and must be a valid Unix timestamp.

all_day Whether the event is an all day event.

attendees This is a comma separated list of contacts that have already been added through the Moxi Works Platform API who will be present at the referenced event. (Use IDs from your system – i.e. partner_contact_id from Contact Create ).

event_location This is a human readable details about the event that will be meaningful to the agent or any details that are not otherwise represented in the structure of the Event object. Any HTML formatting included will be stripped from this attribute.

Event Update Response Payload

The following attributes make up the payload of the Event response for a Update request.

Event Update (using agent_uuid) Response Payload Example

{
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_event_id": "booyuh",
  "event_subject": "the subject",
  "event_location": "the location",
  "all_day": false,
  "event_start": 1462234227,
  "event_end": 1462241468,
  "attendees": "Contact1ID, Contact2ID",
  "note": "notable stuff"
}
Event Update (using moxi_works_agent_id) Response Payload Example

{
  "moxi_works_agent_id": "1234abcd",
  "partner_event_id": "booyuh",
  "event_subject": "the subject",
  "event_location": "the location",
  "all_day": false,
  "event_start": 1462234227,
  "event_end": 1462241468,
  "attendees": "Contact1ID, Contact2ID",
  "note": "notable stuff"
}
Event Update Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Update Response Attributes
Attribute Type
partner_event_id String
agent_uuid* String
moxi_works_agent_id* String
event_subject String
event_location String
note String
send_reminder Boolean
remind_minutes_before Integer
note String
all_day Boolean
event_start Integer
event_end Integer
attendees String

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

partner_event_id This is the unique identifer you use in your system that has been associated with the Event.

agent_uuid This is the Moxi Works Platform ID of the Agent which this Event is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Event is associated with. This will be a string that may take the form of an email address, or a unique identification string.

event_subject This is a short, descriptive, human readable phrase to be displayed to the agent which lets them know what this Event regards.

event_location This is a human readable locatition reference regarding where the event is located that will be meaningful to the agent.

send_reminder Whether to send a reminder to attendees before the start of the event.

remind_minutes_before Number of minutes prior to the start of the event that attendees should be notified.

note This is a human readable note about the event that will be meaningful to the agent.

event_start This is the Unix timestamp representing the start time of the Event.

event_end This is the Unix timestamp representing the end time of the Event.

attendees This is a comma separated list of contacts that have already been added through the Moxi Works Platform API who will be present at the referenced event. (Use IDs from your system – i.e. partner_contact_id from Contact Create ).

Event Show

Event Show (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "partner_event_id":"8675309e9"
}

GET /api/events/[partner_event_id]?agent_uuid=12345678-1234-1234-1234-1234567890ab HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_event = MoxiworksPlatform::Event.find(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_event_id: "booyuh")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_event = MoxiworksPlatform\Event::find([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'partner_event_id' => 'booyuh']);
?>

Event Show (using agent_uuid) Example

{
  "moxi_works_agent_id":"abc123",
  "partner_event_id":"8675309e9"
}

GET /api/events/[partner_event_id]?moxi_works_agent_id=abc123 HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_event = MoxiworksPlatform::Event.find(
        moxi_works_agent_id: "1234abcd",
        partner_event_id: "booyuh")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_event = MoxiworksPlatform\Event::find([
        'moxi_works_agent_id' => '1234abcd',
        'partner_event_id' => 'booyuh']);
?>
Event Show Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
partner_event_id String 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an Event entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Event Show request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which the Event is associated with. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Event Show request to be accepted.

partner_event_id This is the unique identifer you use in your system that has been associated with the Event that you are searching for.

Event Show Response Payload

The following attributes make up the payload of the Event response for a Show request.

Event Show (using agent_uuid) Response Payload Example

{
  "partner_event_id": "booyuh",
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "event_subject": "event subject",
  "event_location": "event location",
  "note": "notable stuff",
  "send_reminder": true,
  "remind_minutes_before": 15,
  "event_start": 1462234227,
  "event_end": 1462241468,
  "all_day": false,
  "attendees": "Contact1ID,Contact2ID"
}
Event Show (using moxi_works_agent_id) Response Payload Example

{
  "partner_event_id": "booyuh",
  "moxi_works_agent_id": "1234abcd",
  "event_subject": "event subject",
  "event_location": "event location",
  "note": "notable stuff",
  "send_reminder": true,
  "remind_minutes_before": 15,
  "event_start": 1462234227,
  "event_end": 1462241468,
  "all_day": false,
  "attendees": "Contact1ID,Contact2ID"
}
Event Show Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Show Response Attributes
Attribute Type
partner_event_id String
agent_uuid* String
moxi_works_agent_id* String
event_subject String
event_location String
note String
send_reminder Boolean
remind_minutes_before Integer
note String
all_day Boolean
event_start Integer
event_end Integer
attendees String

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

partner_event_id This is the unique identifer you use in your system that has been associated with the Event.

agent_uuid This is the Moxi Works Platform ID of the Agent which this Event is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Event is associated with. This will be a string that may take the form of an email address, or a unique identification string.

event_subject This is a short, descriptive, human readable phrase to be displayed to the agent which lets them know what this Event regards.

event_location This is a human readable locatition reference regarding where the event is located that will be meaningful to the agent.

send_reminder Whether to send a reminder to attendees before the start of the event.

remind_minutes_before Number of minutes prior to the start of the event that attendees should be notified.

note This is a human readable note about the event that will be meaningful to the agent.

event_start This is the Unix timestamp representing the start time of the Event.

event_end This is the Unix timestamp representing the end time of the Event.

attendees This is a comma separated list of contacts that have already been added through the Moxi Works Platform API who will be present at the referenced event. (Use IDs from your system – i.e. partner_contact_id from Contact Create ).

Event Index

Event Index (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "date_start":1461108284,
  "date_end":1462317907
}

GET /api/events?agent_uuid=12345678-1234-1234-1234-1234567890ab&date_start=1461108284&date_end=1462317907%20fuller HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_event = MoxiworksPlatform::Event.search(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        date_start: 1462317907,
        date_end: 1461108284)

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_event = MoxiworksPlatform\Event::search([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'date_start' => 1462317907,
        'date_end' => 1461108284]);
?>

Event Index (using agent_uuid) Example

{
  "moxi_works_agent_id":"abc123",
  "date_start":1461108284,
  "date_end":1462317907
}

GET /api/events?moxi_works_agent_id=abc123&date_start=1461108284&date_end=1462317907%20fuller HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_event = MoxiworksPlatform::Event.search(
        moxi_works_agent_id: "1234abcd",
        date_start: 1462317907,
        date_end: 1461108284)

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_event = MoxiworksPlatform\Event::search([
        'moxi_works_agent_id' => '1234abcd',
        'date_start' => 1462317907,
        'date_end' => 1461108284]);
?>

When searching for Event objects using the Moxi Works platform API, format your data using the following parameters.

Event Index Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
date_start Integer 255
date_end Integer 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an Event entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Event Index request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which you are searching for associated Event objects. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Event Index request to be accepted.

date_start This is the earliest time that you are searching for an Event to be in. This data is required and must be a Unix timestamp before date_end.

date_end This is the latest time that you are searching for an Event to be in. This data is required and must be a Unix timestamp after date_start.

Event Index (using agent_uuid) Response Payload Example

[{"date":"04/19/2016",
"events": [
{
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_event_id": "waat",
  "event_subject": "dis subject",
  "event_location": "the location",
  "send_reminder": true,
  "remind_minutes_before": 15,
  "all_day": true,
  "event_start": null,
  "event_end": null,
  "attendees": "Contact1ID, Contact2ID, Contact3ID",
  "note": "more notable stuff"
},
{
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_event_id": "abcd",
  "event_subject": "mah subject",
  "event_location": "_the_ location",
  "send_reminder": true,
  "remind_minutes_before": 15,
  "all_day": false,
  "event_start": 1462234327,
  "event_end": 1462241468,
  "attendees": null,
  "note": "more notable stuff"
}
]},
{"date":"04/20/2016",
"events":[{
  "agent_uuid": "12345678-1234-1234-1234-1234567890ab",
  "partner_event_id": "booyuh",
  "event_subject": "dat subject",
  "event_location": "the other location",
  "send_reminder": false,
  "remind_minutes_before": 0,
  "all_day": false,
  "event_start": 1462234227,
  "event_end": 1462241468,
  "attendees": null,
  "note": "even more notable stuff"
}]
},
{"date":"04/21/2016",
"events":[]
}]
Event Index (using moxi_works_agent_id) Response Payload Example

[{"date":"04/19/2016",
"events": [
{
  "moxi_works_agent_id": "1234abcd",
  "partner_event_id": "waat",
  "event_subject": "dis subject",
  "event_location": "the location",
  "send_reminder": true,
  "remind_minutes_before": 15,
  "all_day": true,
  "event_start": null,
  "event_end": null,
  "attendees": "Contact1ID, Contact2ID, Contact3ID",
  "note": "more notable stuff"
},
{
  "moxi_works_agent_id": "1234abcd",
  "partner_event_id": "abcd",
  "event_subject": "mah subject",
  "event_location": "_the_ location",
  "send_reminder": true,
  "remind_minutes_before": 15,
  "all_day": false,
  "event_start": 1462234327,
  "event_end": 1462241468,
  "attendees": null,
  "note": "more notable stuff"
}
]},
{"date":"04/20/2016",
"events":[{
  "moxi_works_agent_id": "1234abcd",
  "partner_event_id": "booyuh",
  "event_subject": "dat subject",
  "event_location": "the other location",
  "send_reminder": false,
  "remind_minutes_before": 0,
  "all_day": false,
  "event_start": 1462234227,
  "event_end": 1462241468,
  "attendees": null,
  "note": "even more notable stuff"
}]
},
{"date":"04/21/2016",
"events":[]
}]
Event Index Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

The Event Index response is made up of an array of objects representing dates that span the range requested. Each object contains the following attributes.

Event Index Response Payload
Attribute Type
date String
events Array

date This is a string representing a date in MM/DD/YYYY format. Any event Event whose duration spans or falls within this day will be included in the results for this day.

events This is the payload of Event objects that fall on this day. If no Event objects span this duration, then the events array will be emtpy.

events Response Attributes

Each Event in the events array will have the following structure.

Attribute Type
partner_event_id String
agent_uuid* String
moxi_works_agent_id* String
event_subject String
event_location String
note String
send_reminder Boolean
remind_minutes_before Integer
note String
all_day Boolean
event_start Integer
event_end Integer
attendees String

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

partner_event_id This is the unique identifer you use in your system that has been associated with the Event.

agent_uuid This is the Moxi Works Platform ID of the Agent which this Event is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Event is associated with. This will be a string that may take the form of an email address, or a unique identification string.

event_subject This is a short, descriptive, human readable phrase to be displayed to the agent which lets them know what this Event regards.

event_location This is a human readable locatition reference regarding where the event is located that will be meaningful to the agent.

send_reminder Whether to send a reminder to attendees before the start of the event.

remind_minutes_before Number of minutes prior to the start of the event that attendees should be notified.

note This is a human readable note about the event that will be meaningful to the agent.

event_start This is the Unix timestamp representing the start time of the Event.

event_end This is the Unix timestamp representing the end time of the Event.

attendees This is a comma separated list of contacts that have already been added through the Moxi Works Platform API who will be present at the referenced event. (Use IDs from your system – i.e. partner_contact_id from Contact Create ).

Event Delete

Event Delete (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "partner_event_id":"MySystemsUniqueEventID"
}

DELETE /api/events/my_event_id?agent_uuid=12345678-1234-1234-1234-1234567890ab HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

success = MoxiworksPlatform::Event.delete(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        partner_event_id: "booyuh")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$success = MoxiworksPlatform\Event::delete([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'partner_event_id' => 'booyuh']);
?>

Event Delete (using moxi_works_agent_id) Example

{
  "moxi_works_agent_id":"abc123",
  "partner_event_id":"MySystemsUniqueEventID"
}

DELETE /api/events/my_event_id?moxi_works_agent_id=abc123 HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

success = MoxiworksPlatform::Event.delete(
        moxi_works_agent_id: "1234abcd",
        partner_event_id: "booyuh")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$success = MoxiworksPlatform\Event::delete([
        'moxi_works_agent_id' => '1234abcd',
        'partner_event_id' => 'booyuh']);
?>

When deleting an Event object using the Moxi Works platform API, format your data using the following parameters.

Event Delete Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
partner_event_id String 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an Event entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Event Show request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which you are searching for associated Event objects. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Event Delete request to be accepted.

partner_event_id This is the unique identifer you use in your system that has been associated with the Event. This data is required and must reference a previously created Event you have created on The Moxi Works Platform.

Event Delete Response
{
  "status": "success",
  "deleted": true
}
Event Delete Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Event Delete Response Payload

The following attributes make up the payload of the Event response for a Delete request.

Attribute Type
status String
deleted Boolean

status This indicates whether the request was successfully processed.

deleted This is the result of the action – whether the Eventobject was actually deleted.

Group

Moxi Works Platform Group entities represent groupings of an agent’s contacts.

Group Show

Group Show (using agent_uuid) Example

{
  "moxi_works_group_id":"abc123",
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab"
}
GET /api/groups/[moxi_works_group_id]?agent_uuid=12345678-1234-1234-1234-1234567890ab HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_group = MoxiworksPlatform::Group.find(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        moxi_works_group_id: "foo")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_group = MoxiworksPlatform\Group::find([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'moxi_works_group_id' => 'foo']);
?>

Group Show (using moxi_works_agent_id) Example

{
  "moxi_works_group_id":"abc123",
  "moxi_works_agent_id":"abc1234"
}
GET /api/groups/[moxi_works_group_id]?moxi_works_agent_id=abc123 HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_group = MoxiworksPlatform::Group.find(
        moxi_works_agent_id: "1234abcd",
        moxi_works_group_id: "foo")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_group = MoxiworksPlatform\Group::find([
        'moxi_works_agent_id' => '1234abcd',
        'moxi_works_group_id' => 'foo']);
?>
Group Show Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
moxi_works_group_id String 255
page_number Integer 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an Group entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Group Show request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which you are searching for associated Group objects. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Group Index request to be accepted.

moxi_works_group_id This is the name of a Group to be shown

page_number Page of contacts objects to return. Use if total_pages indicates that there is more than one page of data available.

Group Show (using agent_uuid) Response Payload Example
{
    "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
    "moxi_works_group_name":"foo",
    "moxi_works_group_id": "{4B86F74F-B8B9-4E84-AFA8-1B2BBEEF41D6}",
    "transient": true,
    "page_number":1,
    "total_pages":1,
    "contacts":[
      {
      "moxi_works_contact_id":"74284ec4-51aa-39b5-a47c-bd4a11f8ee9a",
      "contact_name":"Firstname Middlenyme Larstnam",
      "first_name":"Firstname",
      "middle_name":"Middlenyme",
      "last_name":"Larstnam",
      "suffix":null,
      "gender":"M",
      "primary_email_address":"me@justabout.right.here",
      "secondary_email_address":"me.too@justabout.right.here",
      "primary_phone_number":"9995551212",
      "secondary_phone_number":"(333) 555-1185",
      "home_street_address":"1234 Sesame St.",
      "home_city":"Cityville",
      "home_state":"Stateland",
      "home_zip":"12345-6789",
      "home_country":"Ottoman Empire",
      "job_title":"Junior Bacon Burner",
      "note": "notable stuff about Mr. Larstnam",
      "occupation":"chef"
    }
  ]
}
Group Show (using moxi_works_agent_id) Response Payload Example
{
    "moxi_works_agent_id":"1234abcd",
    "moxi_works_group_name":"foo",
    "moxi_works_group_id": "{4B86F74F-B8B9-4E84-AFA8-1B2BBEEF41D6}",
    "transient": true,
    "page_number":1,
    "total_pages":1,
    "contacts":[
      {
      "moxi_works_contact_id":"74284ec4-51aa-39b5-a47c-bd4a11f8ee9a",
      "contact_name":"Firstname Middlenyme Larstnam",
      "first_name":"Firstname",
      "middle_name":"Middlenyme",
      "last_name":"Larstnam",
      "suffix":null,
      "gender":"M",
      "primary_email_address":"me@justabout.right.here",
      "secondary_email_address":"me.too@justabout.right.here",
      "primary_phone_number":"9995551212",
      "secondary_phone_number":"(333) 555-1185",
      "home_street_address":"1234 Sesame St.",
      "home_city":"Cityville",
      "home_state":"Stateland",
      "home_zip":"12345-6789",
      "home_country":"Ottoman Empire",
      "job_title":"Junior Bacon Burner",
      "note": "notable stuff about Mr. Larstnam",
      "occupation":"chef"
    }
  ]
}
Group Show Failure Response
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Group Show Response Payload

The following attributes make up the payload of the Group response for a Show request.

Attribute Type
agent_uuid* String
moxi_works_agent_id* String
moxi_works_group_name String
moxi_works_group_id String
transient Boolean
page_number Integer
total_pages Integer
contacts Array

* Either agent_uuid or moxi_works_agent_id will be returned depending on whether it is used in the request. The response payload object’s agent identifier key will match the passed parameter.

agent_uuid This is the Moxi Works Platform ID of the Agent which this Group is associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which this Group is associated with. This will be a string that may take the form of an email address, or a unique alphanumeric identification string.

moxi_works_group_name This is a human readable string meaningful to the agent about what kind of Contact objects are in this Group.

moxi_works_group_id This is the unique identifier for this Group.

transient Whether the group ID exists beyond name change.

page_number The page number of this response set.

total_pages The total number of pages in this response set.

contacts The Contact objects in this page.

contacts Response Attributes

Each contact represented in the events array will have the following structure.

Attribute Type
moxi_works_contact_id String
contact_name String or null
first_name String or null
middle_name String or null
last_name String or null
suffix String or null
gender String or null
primary_email_address String or null
secondary_email_address String or null
primary_phone_number String or null
secondary_phone_number String or null
home_street_address String or null
home_city String or null
home_state String or null
home_zip String or null
home_country String or null
job_title String or null
note String or null
occupation String or null

moxi_works_contact_id This is the Moxi Works Platform ID of this Contact. This will be an RFC 4122 compliant UUID.

contact_name This is the full name of the contact associated with this Contact record. You should format this information as first middle last. This value will be null if no data is available for this attribute.

first_name This is the first name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

middle_name This is the middle name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

last_name This is the last name of the contact associated with this Contact record. This value will be null if no data is available for this attribute.

suffix This is the generational suffix of the name of the contact associated with this Contact record. This value will be null if no data is available for this attribute. Supported suffixes are II III IV JR JR..

gender The gender of the contact. This can be male, female, m or f. No matter what is provided in the request, the response payload will return m or f. This value will be null if no data is available for this attribute.

primary_email_address This is the email address that should be used first. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

secondary_email_address This is the email address that should be used as an alternate. If provided, the address must conform to RFC 3696. This value will be null if no data is available for this attribute.

home_street_address The contact’s home address street, including number and any suite / apartment number information. This value will be null if no data is available for this attribute.

home_city The city of the contact’s home address. This value will be null if no data is available for this attribute. This value will be null if no data is available for this attribute.

home_state The state of the contact’s home address. This value will be null if no data is available for this attribute.

home_zip The zip code of the contact’s home address. This value will be null if no data is available for this attribute.

home_country The country of the contact’s home address. This value will be null if no data is available for this attribute.

job_title The contact’s professional job title. This value will be null if no data is available for this attribute.

occupation The contact’s profession. This value will be null if no data is available for this attribute.

note This is an arbitrary string giving the agent more details about the contact which would not otherwise fit into the Contact record. This value will be null if no data is available for this attribute.

Group Index

Group Index (using agent_uuid) Example

{
  "agent_uuid":"12345678-1234-1234-1234-1234567890ab",
  "name":"foo"
}
GET /api/groups?agent_uuid=12345678-1234-1234-1234-1234567890ab&name=foo HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_groups = MoxiworksPlatform::Group.search(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab",
        name: "foo")

# or for a list of all available groups:
moxi_works_groups = MoxiworksPlatform::Group.search(
        agent_uuid: "12345678-1234-1234-1234-1234567890ab")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_groups = MoxiworksPlatform\Group::search([
        'agent_uuid' => '12345678-1234-1234-1234-1234567890ab',
        'name' => 'foo']);

# or for a list of all available groups
$moxi_works_groups = MoxiworksPlatform\Group::search([
        $agent_uuid => "12345678-1234-1234-1234-1234567890ab"]);

?>

Group Index (using moxi_works_agent_id) Example

{
  "moxi_works_agent_id":"abc123",
  "name":"foo"
}
GET /api/groups?moxi_works_agent_id=abc123&name=foo HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisitesa

moxi_works_groups = MoxiworksPlatform::Group.search(
        moxi_works_agent_id: "1234abcd",
        name: "foo")

# or for a list of all available groups:
moxi_works_groups = MoxiworksPlatform::Group.search(
        moxi_works_agent_id: "1234abcd")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_groups = MoxiworksPlatform\Group::search([
        'moxi_works_agent_id' => '1234abcd',
        'name' => 'foo']);

# or for a list of all available groups
$moxi_works_groups = MoxiworksPlatform\Group::search([
        $moxi_works_agent_id => "1234abcd"]);

?>

When searching for Group objects using the Moxi Works platform API, format your data using the following parameters.

Group Index Request Attributes
Attribute Type Length Limit
agent_uuid* String 255
moxi_works_agent_id* String 255
name String 255

* Either moxi_works_agent_id or agent_uuid must be supplied. For guidance on which Agent identifier better fits your use-case, see Agent Identifiers

Required Parameters Are In Red

agent_uuid This is the Moxi Works Platform ID of the Agent which an group entry is associated with. This will be an RFC 4122 compliant UUID. agent_uuid or moxi_works_agent_id is required and must reference a valid Moxi Works Agent ID for your Group Index request to be accepted.

moxi_works_agent_id This is the Moxi Works Platform ID of the Agent which you are searching for associated Group objects. This will be a string that may take the form of an email address, or a unique identification string. This data is required and must reference a valid Moxi Works Agent ID for your Group Index request to be accepted.

name This is the name of a Group to be searched for.

Group Index Response Payload

The following attributes make up the payload of the Group response for a Index request.

Group Index Response Payload Example

[
 {
"moxi_works_group_name": "Christmas Cards",
"moxi_works_group_id": "Christmas Cards",
"transient": true
},
 {
"moxi_works_group_name": "foo",
"moxi_works_group_id": "foo",
"transient": true
},
 {
"moxi_works_group_name": "Friends",
"moxi_works_group_id": "Friends",
"transient": true
},
]
Group Index Failure Response
See Error Handling for details about individual error codes.
{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Group Response Attributes

The Group Index response is made up of an array of Group objects. Each Group object contains the following attributes.

Attribute Type
moxi_works_group_name String
moxi_works_group_id String
transient Boolean

moxi_works_group_name This is a human readable string meaningful to the agent about what kind of Contact objects are in this Group.

moxi_works_group_id This is the unique identifier for this Group.

transient Whether the group ID exists beyond name change.

Listing

Moxi Works Platform Listing entities represent a Brokerage’s listings.

Listing Show

Listing Show Example

{
  "moxi_works_listing_id":"abc123",
  "moxi_works_company_id":"bobs_better_houses"
}

GET /api/listings/[moxi_works_listing_id]?moxi_works_company_id=bobs_better_houses HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

moxi_works_listing = MoxiworksPlatform::Listing.find(
        moxi_works_listing_id: "1234abcd",
        moxi_works_company_id: "abc123")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$moxi_works_listing = MoxiworksPlatform\Listing::find([
        'moxi_works_listing_id' => '1234abcd',
        'moxi_works_company_id' => 'abc123']);
?>

When showing Listing objects using the Moxi Works platform API, format your data using the following parameters.

Listing Show Request Attributes
Attribute Type Length Limit
moxi_works_listing_id String 255
moxi_works_company_id String 255

Required Parameters Are In Red

moxi_works_listing_id This is the Moxi Works Platform ID of the Listing which you are requesting to Show. This data is required and must reference a valid Moxi Works Listing ID for your Show request to be accepted.

moxi_works_company_id A valid Moxi Works Company ID. Use Company Endpoint to determine what moxi_works_company_id you can use.

Listing Show Response Payload Example

{
  "LotSizeAcres":0.0,
  "BathroomsFull":3,
  "BathroomsHalf":0,
  "BathroomsOneQuarter":null,
  "BathroomsPartial":null,
  "BathroomsThreeQuarter":null,
  "BathroomsTotalInteger":3,
  "BathroomsTotal":3.0,
  "BedroomsTotal":8,
  "PublicRemarks":"Publicalistically Remarkabalistically! REMARKABLE!!",
  "ModificationTimestamp":"11/01/2016",
  "InternetAddressDisplayYN":true,
  "DaysOnMarket":0,
  "ListingContractDate":"07/27/2016",
  "CreatedDate":"11/01/2016",
  "ElementarySchool":"Elementary My Dear School",
  "GarageSpaces":4,
  "WaterfrontYN":false,
  "HighSchool":"Higher Than Junior",
  "AssociationFee":null,
  "ListOfficeName":"Realty Valley United",
  "ListPrice":599000,
  "ListingID":"12323",
  "ListAgentFullName":"Bob Agentson",
  "ListAgentUUID":"8675309e9-1234-dead-beef-deadbeefdead",
  "Address":"97 Hilltop Road",
  "Address2":null,
  "City":"Montecarlo",
  "CountyOrParish":"Counting Parishes",
  "Latitude":"47.723251",
  "Longitude":"-122.171745",
  "StateOrProvince":"NV",
  "PostalCode":"87654",
  "LotSizeSquareFeet":null,
  "InternetEntireListingDisplayYN":true,
  "MiddleOrJuniorSchool":"*The* Junior High" ,
  "ListOfficeAOR":"WHATEVERS MLS",
  "PoolYN":false,
  "PropertyType":"Residential",
  "TaxAnnualAmount":13652,
  "TaxYear":2015,
  "SingleStory":false,
  "LivingArea":3640,
  "ViewYN":false,
  "YearBuilt":1989,
  "OnMarket":true,
  "Status":"active",
  "MoxiWorksListingId":"abc123",
  "PropertyFeatures":[
    {
      "PropertyFeatureName": "Kitchen Information",
      "PropertyFeatureValues": [
        "Dishwasher",
        "Microwave",
        "Oven/Range Freestanding"
      ]
      },
      {
      "PropertyFeatureName": "Roof Description",
      "PropertyFeatureValues": [
        "Comp Shingle"
      ]
      },
      {
      "PropertyFeatureName": "Number Of Stories",
      "PropertyFeatureValues": [
        "Two Story"
      ]
      },
        {
      "PropertyFeatureName": "Interior Features",
      "PropertyFeatureValues": [
        "Bath Master",
        "Broadband Internet",
        "Cable/Satellite Tv",
        "Dishwasher",
        "Microwave",
        "Oven/Range Freestanding"
      ]
    }
  ],
  "ListingImages":[
    {
      "FullURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png",
      "GalleryURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png",
      "RawURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png",
      "SmallURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png",
      "ThumbURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png"
    }
  ]
}
Listing Show Failure Response Example
See Error Handling for details about individual error codes.


{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Listing Show Response Payload

The following attributes make up the payload of the Listing response for a Show request.

Attribute Type
LotSizeAcres Float or null
BathroomsFull Integer or null
BathroomsHalf Integer or null
BathroomsOneQuarter Integer or null
BathroomsPartial Integer or null
BathroomsThreeQuarter Integer or Null
BathroomsTotalInteger Integer or null
BathroomsTotal Float or null
BedroomsTotal Integer or null
PublicRemarks String or null
ModificationTimestamp String
InternetAddressDisplayYN Boolean or null
DaysOnMarket Integer
ListingContractDate String
CreatedDate String
ElementarySchool String or null
GarageSpaces Integer or null
WaterfrontYN Boolean or null
HighSchool String or null
AssociationFee Integer or null
ListOfficeName String or null
ListPrice Integer or null
ListingID String
ListAgentFullName String
ListAgentUUID String
Address String or null
Address2 String or null
City String or null
CountyOrParish String or null
Latitude String or null
Longitude String or null
StateOrProvince String or null
PostalCode String or null
LotSizeSquareFeet Integer or Null
InternetEntireListingDisplayYN Boolean
MiddleOrJuniorSchool String or null
ListOfficeAOR String or null
PoolYN Boolean or null
PropertyType String or null
TaxAnnualAmount Integer or null
TaxYear Integer or null
SingleStory Boolean or null
LivingArea Integer or null
ViewYN Boolean or null
YearBuilt Integer or null
OnMarket Boolean or null
Status String or null
MoxiWorksListingId String
PropertyFeatures Array
ListingImages Array

LotSizeAcres This is the property size of the listing land in acres. If no data is available for this attribute, it will be null.

BathroomsFull This is the number of full bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsHalf This is the number of half bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsOneQuarter This is the number of quarter-sized bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsPartial This is the number of partial bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsThreeQuarter This is the number of three-quarter bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsTotalInteger This is the number of rooms that are bathrooms in the property. This is not a summary count of bathrooms by size. If no data is available for this attribute, it will be null.

BathroomsTotal This is the summary count of bathrooms in the property. This will be the number of quarter-bathrooms plus half-bathrooms plus three-quarter bathrooms plus full bathrooms. If no data is available for this attribute, it will be null.

BedroomsTotal This is the number of bedrooms in the property. If no data is available for this attribute, it will be null.

PublicRemarks These are human-readable notes about the property generated by the property agent. If no data is available for this attribute, it will be null.

ModificationTimestamp This is a string representing a date on which the listing data was last updated. The string format is MM/DD/YYYY. If no data is available for this attribute, it will be null.

InternetAddressDisplayYN This denotes whether the property should be displayed on a public facing website. If no data is available for this attribute, it will be null.

DaysOnMarket The number of days the listing has been on market.

ListingContractDate This is a string representing a date on which the listing contract was initiated. The string format is MM/DD/YYYY.

CreatedDate This is a string representing a date on which the Listing object was created. The string format is MM/DD/YYYY.

ElementarySchool The elementary school for the property.

GarageSpaces The number of garage spaces that are available at the property.

WaterfrontYN Whether the property is waterfront.

HighSchool The high school for the property.

AssociationFee The home owner’s association fee for the property.

ListOfficeName The name of the listing office.

ListPrice The listed price for the listing.

ListingID The MLS number for the listing.

ListAgentFullName The name of the listing agent.

ListAgentUUID A unique identifier for the listing agent. This will correspond to the uuid field of an Agent.

Address The street address of the property.

Address2 Additional street address information, for example, suite number.

City City or township the property is located in.

State State or province the property is located in.

PostalCode The zip code or postal code the property is located in.

LotSizeSquareFeet Total area of the lot.

InternetEntireListingDisplayYN Whether to display information about this listing publicly. If this is false, then the information about this listing should not be visible to the Internet.

MiddleOrJuniorSchool The middle school for the property.

ListOfficeAOR The name of the MLS which this listing is listed with.

PoolYN Whether the property has a pool.

PropertyType The type of property being listed. This can be one of Residential, Condo-Coop, Townhouse, Land, Multifamily

TaxAnnualAmount The total annual property tax.

TaxYear The tax year that the property tax in TaxAnnualAmount was assessed.

SingleStory Whether the building has one story or is multi-story.

LivingArea Total square footage of the building(s) on the property.

Title A short description of the property.

ViewYN Whether the property has a view.

YearBuilt The year the living building(s) on the property were built.

OnMarket Whether the listing is currently on-market.

Status Detailed status of the listing; whether it’s active pending

MoxiWorksListingID The unique Identifier for the listing in The Moxi Works Platform.

PropertyFeatures Any defined features about the property.

ListingImages Any images of the property.

PropertyFeature Objects

Each object in the PropertyFeatures array will have the following structure.

Attribute Type
PropertyFeatureName String
PropertyFeatureValues Array

PropertyFeatureName Human readable name associated with the feature.

PropertyFeatureValues An array of strings which are human readable values associated with the feature.

ListingImages Objects

Each object in the ListingImages array will have the following structure.

Attribute Type
ThumbURL String
SmallURL String
FullURL String
GalleryURL String
RawURL String

ThumbURL This is a valid URL that can be used for img src to a thumbnail sized representation of the image. This is the smallest size image returned in each object in the ListingImages array.

SmallURL This is a valid URL that can be used for img src to a small sized representation of the image. This is the small size image returned in each object in the ListingImages array.

FullURL This is a valid URL that can be used for img src to a medium sized representation of the image. This is the medium size image returned in each object in the ListingImages array.

GalleryURL This is a valid URL that can be used for img src to a large sized representation of the image. This is the large size image returned in each object in the ListingImages array.

RawURL This is a valid URL to the raw image as uploaded. This is the largest size image returned in each object in the ListingImages array. Due to variation in size, this image should not be considered for use when displaying images rendered in a browser.

Listing Index

Index will return a paged response of listings that have been updated since a given timestamp for a specified company. For a list of company IDs that you can request listings for, use the Company Endpoint.

Listing Index Example

Listing Objects Updated Since A Given Timestamp

{
  "moxi_works_company_id":"abc123",
  "updated_since":"1461108284"
}
GET /api/listings?moxi_works_company_id=abc123&updated_since=1461108284 HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded


##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

one_week =  defined?(Rails) ? 1.week : 604800
company_listings = MoxiworksPlatform::Listing.search(moxi_works_company_id: "abc123", updated_since: Time.now - one_week)

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$one_week = 604800;
$company_listings = MoxiworksPlatform\Listing::search(['moxi_works_company_id' => 'abc123', 'updated_since' => time() - $one_week]);
?>

Requesting Next Page of Listing Objects Updated Since A Given Timestamp

{
  "moxi_works_company_id":"abc123",
  "updated_since":"1461108284",
  "last_moxi_works_listing_id":"abc12345"
}

GET /api/listings?moxi_works_company_id=abc123&updated_since=1461108284&last_moxi_works_listing_id=abc123 HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

one_week =  defined?(Rails) ? 1.week : 604800

first_page = MoxiworksPlatform::Listing.search(moxi_works_company_id: "abc123", updated_since: Time.now - one_week)

unless first_page['final_page']
  last_listing = first_page['listings'].last
  last_listing_id = (last_listing.nil?) ? nil : last_listing.moxi_works_listing_id

  next_page = MoxiworksPlatform::Listing.search(moxi_works_company_id: "abc123",
    updated_since: Time.now - one_week, last_moxi_works_listing_id: last_listing_id)
end


# or run a block on all pages of listings with a single call

MoxiworksPlatform::Listing.search(
  moxi_works_company_id: 'abc123',
  updated_since: Time.now.to_i - one_week) { |page_of_listings| puts page_of_listings.count }


<?php
$one_week = 604800;

$first_page = MoxiworksPlatform\Listing::search(['moxi_works_company_id' => 'abc123', 'updated_since' => time() - $one_week]);

if(!$first_page['final_page']) {
  $last_listing = end(array_values($first_page['listings']));
  $last_listing_id = $last_listing->$moxi_works_listing_id;
  MoxiworksPlatform\Listing::search(['moxi_works_company_id' => 'abc123', 'updated_since' => time() - $one_week], 'last_moxi_works_listing_id' => $last_listing_id);
}

?>

When searching for Listing objects using the Moxi Works platform API, format your data using the following parameters.

Listing Index Request Attributes
Attribute Type Length Limit
moxi_works_company_id String 255
updated_since Integer 255
agent_uuid String 255
moxi_works_agent_id String 255
last_moxi_works_listing_id String 255

Required Parameters Are In Red

moxi_works_company_id A valid Moxi Works Company ID. Use Company Endpoint to determine what moxi_works_company_id you can use.

updated_since Paged responses of all Listing objects updated after this Unix timestamp will be returned in the response. If no updated_since parameter is included in the request, only Listing objects updated in the last seven days will be returned.

agent_uuid This is the Moxi Works Platform ID of the Agent which Listing objects are associated with. This will be an RFC 4122 compliant UUID.

moxi_works_agent_id Use this parameter when searching for Listing objects associated with a specific Agent. This will be a string that may take the form of an email address, or a unique identification string. This data must reference a valid Moxi Works Agent ID for your Listing Index request to be accepted.

last_listing_id If fetching a multi-page response, this should be the MoxiWorksListingId found in the last Listing object of the previously fetched page.

Listing Index Response Payload Example

{
"FinalPage":true,
"Listings": [
{
  "LotSizeAcres":0.0,
  "BathroomsFull":3,
  "BathroomsHalf":0,
  "BathroomsOneQuarter":null,
  "BathroomsPartial":null,
  "BathroomsThreeQuarter":null,
  "BathroomsTotalInteger":3,
  "BathroomsTotal":3.0,
  "BedroomsTotal":8,
  "PublicRemarks":"Publicalistically Remarkabalistically! REMARKABLE!!",
  "ModificationTimestamp":"11/01/2016",
  "InternetAddressDisplayYN":true,
  "DaysOnMarket":0,
  "ListingContractDate":"07/27/2016",
  "CreatedDate":"11/01/2016",
  "ElementarySchool":"Elementary My Dear School",
  "GarageSpaces":4,
  "WaterfrontYN":false,
  "HighSchool":"Higher Than Junior",
  "AssociationFee":null,
  "ListOfficeName":"Realty Valley United",
  "ListPrice":599000,
  "ListingID":"12323",
  "ListAgentFullName":"Bob Agentson",
  "ListAgentUUID":"8675309e9-1234-dead-beef-deadbeefdead",
  "Address":"97 Hilltop Road",
  "Address2":null,
  "City":"Montecarlo",
  "CountyOrParish":"Counting Parishes",
  "Latitude":"47.723251",
  "Longitude":"-122.171745",
  "StateOrProvince":"NV",
  "PostalCode":"87654",
  "LotSizeSquareFeet":null,
  "InternetEntireListingDisplayYN":true,
  "MiddleOrJuniorSchool":"*The* Junior High" ,
  "ListOfficeAOR":"WHATEVERS MLS",
  "PoolYN":false,
  "PropertyType":"Residential",
  "TaxAnnualAmount":13652,
  "TaxYear":2015,
  "SingleStory":false,
  "LivingArea":3640,
  "ViewYN":false,
  "YearBuilt":1989,
  "OnMarket":true,
  "Status":"active",
  "MoxiWorksListingId":"abc123",
  "PropertyFeatures":[
    {
      "PropertyFeatureName": "Kitchen Information",
      "PropertyFeatureValues": [
        "Dishwasher",
        "Microwave",
        "Oven/Range Freestanding"
      ]
      },
        {
      "PropertyFeatureName": "Roof Description",
      "PropertyFeatureValues": [
        "Comp Shingle"
      ]
      },
        {
      "PropertyFeatureName": "Number Of Stories",
      "PropertyFeatureValues": [
        "Two Story"
      ]
      },
        {
      "PropertyFeatureName": "Interior Features",
      "PropertyFeatureValues": [
        "Bath Master",
        "Broadband Internet",
        "Cable/Satellite Tv",
        "Dishwasher",
        "Microwave",
        "Oven/Range Freestanding"
      ]
    }
  ],
  "ListingImages":[
    {
      "FullURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png",
      "GalleryURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png",
      "RawURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png",
      "SmallURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png",
      "ThumbURL":"http://images.moxiworks.com/static/images/br/imagoo/default_property_image_wre-326x250.png"
    }
  ]
}
]
}
Listing Index Failure Response Example
See Error Handling for details about individual error codes.

{
  "status":"fail",
  "errorCode": xxx,
  "messages": ["messages"]
}

Listing Index Response Payload

The following attributes make up the payload of the Listing response for a Index request.

Attribute Type
FinalPage Boolean
Listings Array

FinalPage If there is another page of Listing objects available, this will be false. If you are receiving the final page of Listing objects for the query, FinalPage will be true.

Listings This is the payload object for the query. Any Listing object that matches the request query will be returned here.

Listings Objects

Each object in the Listings array will have the following structure.

Attribute Type
LotSizeAcres Float or null
BathroomsFull Integer or null
BathroomsHalf Integer or null
BathroomsOneQuarter Integer or null
BathroomsPartial Integer or null
BathroomsThreeQuarter Integer or Null
BathroomsTotalInteger Integer or null
BathroomsTotal Float or null
BedroomsTotal Integer or null
PublicRemarks String or null
ModificationTimestamp String
InternetAddressDisplayYN Boolean or null
DaysOnMarket Integer
ListingContractDate String
CreatedDate String
ElementarySchool String or null
GarageSpaces Integer or null
WaterfrontYN Boolean
HighSchool String or null
AssociationFee Integer or null
ListOfficeName String or null
ListPrice Integer or null
ListingID String
ListAgentFullName String
ListAgentUUID String
Address String or null
Address2 String or null
City String or null
CountyOrParish String or null
Latitude String or null
Longitude String or null
StateOrProvince String or null
PostalCode String or null
LotSizeSquareFeet Integer or Null
InternetEntireListingDisplayYN Boolean
MiddleOrJuniorSchool String or null
ListOfficeAOR String or null
PoolYN Boolean or null
PropertyType String or null
TaxAnnualAmount Integer or null
TaxYear Integer or null
SingleStory Boolean or null
LivingArea Integer or null
ViewYN Boolean or null
YearBuilt Integer or null
OnMarket Boolean or null
Status String or null
MoxiWorksListingId String
PropertyFeatures Array
LisingImages Array

LotSizeAcres This is the property size of the listing land in acres. If no data is available for this attribute, it will be null.

BathroomsFull This is the number of full bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsHalf This is the number of half bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsOneQuarter This is the number of quarter-sized bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsPartial This is the number of partial bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsThreeQuarter This is the number of three-quarter bathrooms in the property. If no data is available for this attribute, it will be null.

BathroomsTotalInteger This is the number of rooms that are bathrooms in the property. This is not a summary count of bathrooms by size. If no data is available for this attribute, it will be null.

BathroomsTotal This is the summary count of bathrooms in the property. This will be the number of quarter-bathrooms plus half-bathrooms plus three-quarter bathrooms plus full bathrooms. If no data is available for this attribute, it will be null.

BedroomsTotal This is the number of bedrooms in the property. If no data is available for this attribute, it will be null.

PublicRemarks These are human-readable notes about the property generated by the property agent. If no data is available for this attribute, it will be null.

ModificationTimestamp This is a string representing a date on which the listing data was last updated. The string format is MM/DD/YYYY. If no data is available for this attribute, it will be null.

InternetAddressDisplayYN This denotes whether the property should be displayed on a public facing website. If no data is available for this attribute, it will be null.

DaysOnMarket The number of days the listing has been on market.

ListingContractDate This is a string representing a date on which the listing contract was initiated. The string format is MM/DD/YYYY.

CreatedDate This is a string representing a date on which the Listing object was created. The string format is MM/DD/YYYY.

ElementarySchool The elementary school for the property.

GarageSpaces The number of garage spaces that are available at the property.

WaterfrontYN Whether the property is waterfront.

HighSchool The high school for the property.

AssociationFee The home owner’s association fee for the property.

ListOfficeName The name of the listing office.

ListPrice The listed price for the listing.

ListingID The MLS number for the listing.

ListAgentFullName The name of the listing agent.

ListAgentUUID A unique identifier for the listing agent. This will correspond to the uuid field of an Agent.

Address The street address of the property.

Address2 Additional street address information, for example, suite number.

City City or township the property is located in.

State State or province the property is located in.

PostalCode The zip code or postal code the property is located in.

LotSizeSquareFeet Total area of the lot.

InternetEntireListingDisplayYN Whether to display information about this listing publicly. If this is false, then the information about this listing should not be visible to the Internet.

MiddleOrJuniorSchool The middle school for the property.

ListOfficeAOR The name of the MLS which this listing is listed with.

PoolYN Whether the property has a pool.

PropertyType The type of property being listed. This can be one of Residential, Condo-Coop, Townhouse, Land, Multifamily

TaxAnnualAmount The total annual property tax.

TaxYear The tax year that the property tax in TaxAnnualAmount was assessed.

SingleStory Whether the building has one story or is multi-story.

LivingArea Total square footage of the building(s) on the property.

Title A short description of the property.

ViewYN Whether the property has a view.

YearBuilt The year the living building(s) on the property were built.

OnMarket Whether the listing is currently on-market.

Status Detailed status of the listing; whether it’s active pending

MoxiWorksListingID The unique Identifier for the listing in The Moxi Works Platform.

PropertyFeatures Any defined features about the property.

ListingImages Any images of the property.

PropertyFeature Objects

Each object in the PropertyFeatures array will have the following structure.

Attribute Type
PropertyFeatureName String
PropertyFeatureValues Array

PropertyFeatureName Human readable name associated with the feature.

PropertyFeatureValues An array of strings which are human readable values associated with the feature.

ListingImages Objects

Each object in the ListingImages array will have the following structure.

Attribute Type
ThumbURL String
SmallURL String
FullURL String
GalleryURL String
RawURL String

ThumbURL This is a valid URL that can be used for img src to a thumbnail sized representation of the image. This is the smallest size image returned in each object in the ListingImages array.

SmallURL This is a valid URL that can be used for img src to a small sized representation of the image. This is the small size image returned in each object in the ListingImages array.

FullURL This is a valid URL that can be used for img src to a medium sized representation of the image. This is the medium size image returned in each object in the ListingImages array.

GalleryURL This is a valid URL that can be used for img src to a large sized representation of the image. This is the large size image returned in each object in the ListingImages array.

RawURL This is a valid URL to the raw image as uploaded. This is the largest size image returned in each object in the ListingImages array. Due to variation in size, this image should not be considered for use when displaying images rendered in a browser.

Office

Moxi Works Platform Office entities represent brokerage offices.

Office Show

Office Show Example

First page of all Office objects for specified Company

GET /api/offices/deadbeef-deadbeef-feed-facedeadbeef HTTP/1.1
Host: api.moxiworks.com
Accept: application/vnd.moxi-platform+json;version=1
Authorization: Basic XNNeXAAAUZaQlF0dA==
Content-Type: application/x-www-form-urlencoded

{
  "moxi_works_office_id":"deadbeef-deadbeef-feed-facedeadbeef"
}


##### set up prerequisites once
require 'moxiworks_platform'

platform_identifier = 'abc123'

platform_secret = 'secret'

MoxiworksPlatform::Credentials.new(platform_identifier, platform_secret)
##### end prerequisites

company_offices = MoxiworksPlatform::Office.find(moxi_works_office_id: "deadbeef-deadbeef-feed-facedeadbeef")

<?php
$platform_identifier = 'abc123'; // platorm_identifier provided by Moxi Works Platform Rep
$platform_secret = 'secret'; //platform_secret provided by Moxi Works Platform Rep

$credentials = new MoxiworksPlatform\Credentials($platform_identifier, $platform_secret);

$company_offices = MoxiworksPlatform\Office::find(['moxi_works_office_id' => 'deadbeef-deadbeef-feed-facedeadbeef']);
?>
Office Show Request Attributes

When showing Office entities using the Moxi Works platform API, format your data using the following parameters.

Attribute Type Length Limit
moxi_works_office_id String 255
moxi_works_company_id String

Required Parameters Are In Red

moxi_works_office_id A valid Moxi Works Office ID. Use Office Index Endpoint for a list of all Office objects associated with a Company or use the moxi_works_office_id attribute returned in an Agent response.

moxi_works_company_id A valid Moxi Works Company ID. Use Company Endpoint to determine what moxi_works_company_id you can use.

Office Show: Success Response

  {
    "moxi_works_office_id":"feedface-dead-beef-aadf-baddeedc645",
    "id"