How can we help? How can we help?

Create Buyer Lead using the Website API

MRI Box and Dice MRI Box and Dice

Summary

Learn how to create buyer enquiries in Box+Dice using the Website API, including how to retrieve listing and consultant IDs and submit enquiry details correctly.


How it works

The Website API allows external websites and portals to submit buyer enquiries directly into the Box+Dice CRM.

To create a buyer enquiry successfully, you must first identify:

  • The sales_listings_id, and
  • The consultant_id associated with the listing

These values are required unless they are already provided in the Portal Upload XML (AgentPoint.XML feed format only).

To create a buyer enquiry, you will need first to find the sales_listings_id if this information is not sent in the Portal Upload XML

AND

the consultant_id of the listing, both can be found in the endpoint list-all-sales-listings

Required enquiry details include:

  • Run the sales_listings endpoint to collect all sales listings in the CRM
  • Run the enquiries endpoint, ensuring you have added and filled out the body details correctly
    • "listing_id":,
    • "consultant_id":,
    • "contact_name": "",
    • "contact_email": "",
    • "contact_phone": "",
    • "message": ""
cURL Example
curl --location --request GET 'https://beta.boxdice.com.au/website_api/sales_listings?after=1737597916.0_110836
--header 'Authorization: Api-Key token=XXXXXXXXXXXXXXXXXXXXXb16f' \
--header 'Content-Type: application/json' \
Postman example
CRM example 

Once the sales_listings_id and consultant_id are acquired, you can now create the enquiry.

cURL example
curl --location 'https://beta.boxdice.com.au/website_api/enquiries' \
--header 'Authorization: Api-Key token=XXXXXXXXXXXXXXb16f' \
--header 'Content-Type: application/json' \
--data-raw '
{
"enquiry": {
"listing_id": 123,
"consultant_id": 6,
"contact_name": "Peter F.",
"contact_email": "peter@example.com",
"contact_phone": "0444123456",
"message": "I would like to get an indication of price"
}
}'
Postman example

CRM example

The Box+Dice API follows a two-step interaction model designed to ensure up-to-date and consistent data access. 

To begin, clients must initiate a GET request to retrieve and store relevant information from the appropriate endpoint. This data—such as IDs or entity details—is then cached or saved by the client application for future use.

Many subsequent API calls require referencing this previously retrieved data. For example, actions like posting an enquiry or updating a listing may require an agent ID or listing ID obtained during the initial GET request.