Overview
Receives a lead and queues it to be processed by RiTA.
Endpoint URL
POST https://api.ritabyaire.com/leads
Request Parameters (Body)
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Full name of the lead sender. If provided then firstName and lastName are inferred. |
firstName | string | Yes | First name of the lead sender. If provided it always overwrites the firstName inferred from the name field. |
lastName | string | Yes | Last name of the lead sender. If provided it always overwrites the lastName inferred from the name field. |
phone | string | Yes | Mobile phone of the lead sender. |
email | string | Yes | Email of the lead sender. |
source | string | No | The lead source, eg. "Website Enquiries". Defaults to the name of the API Key. |
type | string | Yes | Enum: "Buyer Enquiry", "Tenant Enquiry", "Buyer Inspection", "Tenant Inspection", "Appraisal", "General", "Finance", "Investor" |
externalId | string | Yes | A unique, arbitrary ID used to allow lead tracking between systems. |
comments | string | No | The enquiry text, or request. |
allocation | string | No | The allocation of a lead. eg. An office name or a suburb. |
date | string <date-time> | No | The date of the enquiry/walk-in/lead. Defaults to time received. (ISO8601 format) |
property | object | No | The property relating to the lead. eg. The address to appraise for an appraisal lead. |
leadAssignee | object | No | |
listing | object | No |
Example Request Payload
{
"name": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"email": "string",
"source": "string",
"type": "Buyer Enquiry",
"externalId": "string",
"comments": "string",
"allocation": "string",
"date": "2019-08-24T14:15:22Z",
"property": {
"unit": "string",
"streetNumber": "string",
"streetName": "string",
"suburb": "string",
"state": "string",
"postCode": "string"
},
"leadAssignee": {
"email": "string",
"crmUserId": "string"
},
"listing": {
"advertisedAddress": "string",
"listingId": "string",
"portalId": "string",
"listingUrl": "string"
}
}Expected Response
200 OK - Lead saved and processing queued.
{
"message": "string",
"data": {
"leadId": "string"
}
}