© Adviser Technologies Limited t/as Adviser.ai – Privacy Policy
Send a “Live Data” campaign
Requests, and Responses
These are example Campaign Query requests and responses.
“Live Data” Send (Request)
This is a POST request sent to create a fact finder with customer data. The data is specified in the request body, and in this example the adviser responsible is assigned to the fact finder.
Request Example:
curl -X POST \
-H "Authorisation: Bearer <authentication_token>" \
--data 'data=[{"adviser":"First Name Last Name","forename":"Customer First Name","surname":"Customer Last Name","email":"Customer Email Address","sms":"Customer Mobile","crmnumber":"Company Reference Number"}]&assign=adviser' \
https://adviser.ai/api/v3/company/{companyId}/campaign/add/live
- URL Endpoint: https://adviser.ai/api/v3/company/{companyId}/campaign/add/live
- Authorisation Header: Contains the token for authentication.
- Data: An array of objects with fields like {adviser}, {forename}, {surname}, {email}, {sms}, and {crmnumber}.
- URL: The endpoint URL, where {companyId} should be replaced with the actual company ID.
“Live Data” Response
After the request is successfully processed, the API returns a JSON response that includes the campaign ID, results of the data entries, and any failed rows.
{
"campaign_id": "XXXXX",
"results": {
"XXXXX": {
"adviser": "First Name Last Name",
"reference": "Company Reference Number",
"surname": "Customer Last Name",
"forename": "Customer First Name",
"email": "Customer Email Address",
"sms": "Customer Mobile",
"leadstatus": "",
"leadgenerated_datetime": null
}
},
"badrows": []
}
- campaign_id: The unique identifier for the newly created campaign.
- results: An object containing the details of successfully created records. Each key corresponds to an identifier, and the value contains information such as adviser name, customer details, etc.
- badrows: A list of any rows that failed to process, along with reasons for the failure. In the example provided, {badrows} is empty, indicating all entries were successfully processed.
This API workflow allows for the creation of fact finder with customer data, while also providing detailed feedback on the operation’s success and any issues encountered.