Resources
API Reference
Lead creation object
Note:
The following object includes all possible keys in the lead creation object.
{
"organizationID": "",
// locatorID, locationSearch are only needed if creating a lead without and organizationID
"locatorID": "",
"locationSearch": {
"searchText": "",
// postalCode is only needed for territory locators
"postalCode": ""
},
// Example of Lead form Content
"content": {
"name": "John Smith",
"email": "john.smith@aol.com",
"phone": "(555) 867-5309",
"postalCode": "90210"
},
// Example of Lead form Content
"typeKey": "getintouch-example",
"typeLabel": "Get in Touch"
}
| Property | Type | Description |
|---|---|---|
| organizationID | string | The PowerChord ID for an organization. This associates a Lead to an organization. |
| locatorID | string | Required if no organization is specified. This is what specifies which locator (locatorSettings) configuration will be used to assign dealer by location. |
| locationSearch | object (location search) | Used to auto-assign a Lead to a location and organization (if organizationID> is empty) |
| content | object | A Key/Value object of the lead form submission content |
| typeKey | string | Required. Machine-readable key used to categorize the lead. |
| typeLabel | string | Required. Human-readable label used to categorize the lead. |
| status | string | Optionally set the status of the lead. Defaults to open. |
locationSearch Object
| Property | Type | Description |
|---|---|---|
| searchText | string | If supplied (and lat/long are empty), searchText will be used to geocode an address and create the lat/long. Even if address info is supplied here, the atomic address fields should also be sent in the contact data |
| postalCode | string | Only for region and territory logic based locator searches! Used to find a location assigned to the postalCode |
Response Codes
| Code | Description |
|---|---|
201 - Created | Lead Successfully created |
400 - Bad Request | Check error message for details to correct |
403 - Not Authorized | Invalid Auth Token or Auth Token missing from request |
201 - Created
{
"leadID": "< ID of the lead record created >",
"assignedOrganizationID": "< ID of the organization the lead is assigned to >",
"assignedLocationName": "< Name of the location the lead is assigned to >"
}
400 - Bad Request
If you get a 400 - Bad Request then check the message for details to correct.
Message: locatorID is required when no organization is specified
{ "message": "locatorID is required when no organization is specified" }
Message: No locations found to assign to the lead
{ "message": "No locations found to assign to the lead" }
PowerChord Developer