This article will describe the process of receiving leads through the Xzazu API.
To be able to receive leads through the Xzazu API you will need the following from your lead supplier:
- The suppliers Xzazu subdomain. https://client.xzazu.com => client.
- A “API delivery method” API key.
Authentication
The Xzazu Api uses ApiKey\Subdomain authentication for every request. To start integration between Your app and Xzazu the user needs to supply both their subdomain and api key.
The following headers need to be supplied for every Api call:
api_key
subdomain
The authentication can be tested by calling the following action on the Xzazu Api:
GET https://api.xzazu.com/v1/User/Me
If authentication is successful a user object will be returned:
{ "Name":"YOURCOMPANY", "Type": "ReceiveOutbound" }
Receiving leads
To receive leads from the Xzazu API issue the following command:
GET https://api.xzazu.com/v1/OutboundLead/Receive
A list of outbound leads will be returned in the property OutboundLeads of the object returned.
Example:
{ "OutboundLeads":[ { "LeadId":"1234OL0000001", "LeadScore":512, "Categories":[ "Category 1" ], "VerticalId":1, "Vertical":"Vertical", "ContractId":1, "Fields":[ { "Name":"First Name", "Value":"Chivan" }, { "Name":"Number", "Value":12 }, { "Name":"Date", "Value":"2019-03-26T13:46:12.088Z" } ], "Date":"2019-03-26T13:46:12.088Z" } ] }
Leads will only be returned once by the API so the same lead is not returned over and over again. If you need a lead to be returned again (resend) by the API, ask your supplier to resend the lead to the “Api delivery method”.
Although the result set is always the same field values vary based on their type. Please refer to the table below for all field types possible.
Field Types
FieldType |
Description |
Validation Properties |
Post Value Sample |
Note |
Text |
json string |
MinLength (int) (optional) |
“Text/n/r” |
standard json escaping of characters |
LongText |
json string |
MinLength (int) (optional) |
“Text/n/r” |
standard json escaping of characters |
Date |
"yyyy-MM-dd" |
MinValue (date) (optional) |
"2012-04-23" |
|
DateAndTime |
"yyyy-MM-ddTHH:mm:ss:uuuZ" in UTC |
MinValue (date) (optional) |
"2012-04-23T18:25:43.511Z" |
|
Number |
decimal integer |
MinValue (int) (optional) |
2 |
|
Decimal |
decimal notation with . And optional exponential value |
MinValue (decimal) (optional) |
2953.145 0,134E-05 |
|
Boolean |
true or false in small letters without quotation marks |
|
true |
|
Choice |
json string from choice options |
Choices (array of string) (always) |
"choice1" |
standard json escaping of characters |
MultipleChoice |
json array from choice options |
Choices (array of string) (always) |
["choice1","choice2"] |
standard json escaping of characters |
List |
json array |
|
["item1","item2"] |
standard json escaping of characters |
Monetary |
decimal notation with . without currency symbol |
MinValue (decimal) (optional) ISOCurrencyCode (string) (always) |
23.14 |
|
Geo |
Object containing Latitude, Longitude and optional PointDescription as json string |
|
{"Latitude":51.917827,"Longitude":4.484873, "PointDescription":"Some address"} |
standard json escaping of characters |
|
json string |
MinLength (int) (optional) |
standard json escaping of characters |
|
PhoneNumber |
json string suggested: + country code notation without spacing |
MinLength (int) (optional) |
"+31107371647" |
standard json escaping of characters |
URL |
object with value containing URL and optional Link Text |
MinLength (int) (optional) |
{"Url":"http://www.xzazu.com","LinkText":"Xzazu"} |
standard json escaping of characters |