All client information is stored under the tenant of the API_KEY owner. Furthermore, all changes to client information are tracked and archived, so that client data can be retrieved at any particular point in time.
This is done to enable input comparisons between times different quotes are generated, and even for Errors and Omission (E&O) tracking purposes.
{ "clientId": "220c4020-7f20-4a16-ba51-d0945804dd83", "clientName": "Business Name", "clientType": "COMMERCIAL", "locationCode": "HQ", "clientData": [ { "qid": "client.name.first", "answer": "Bob", "answeredDate": "2020-12-14T20:28:00.369Z" }, { "qid": "client.name.last", "answer": "Smith", "answeredDate": "2020-12-14T20:28:00.369Z" }, { "qid": "location.office.count", "answer": "2", "answeredDate": "2020-12-14T20:27:51.959Z" }, { "qid": "city", "loopQIDPath": "location.office[0]", "answer": "New York", "answeredDate": "2020-12-14T20:27:56.812Z" }, { "qid": "city", "loopQIDPath": "location.office[1]", "answer": "Chicago", "answeredDate": "2020-12-14T20:27:56.812Z" } ]}
clientId
: Each client is assigned a unique clientId. IfclientId
is specified, then it is expected that you are attempting to update an existing client. If a specified client is not found using thisclientId
a 404:Not Found error is returned.clientType
: Specify if client isCOMMERCIAL
orPERSONAL
locationCode
: If your organization uses locationCodes, this is where you can specify it for a clientclientData
: Array of answer dataqid
: Question identifier (qid) as per question APIanswer
: Answer for the questionanswerDate
: ISO-8601 formatted timestamp of when the answer was savedloopQIDPath
: If this answer is for a question inside a loop, then this field will show the qid(s) and index in the array where it was answered.
Save client data
PUT: https://api.dais.com/ioi/v1/client
Post all client data to this endpoint to save it. If clientId
is not specified, it is assumed you are creating a new client. If it is specified, and a client with that id exists, then data provided will clobber any existing data for that client.
Retrieve the latest client data
GET: https://api.dais.com/ioi/v1/client/{client_id}
Get client data by specifying a clientId
. If client is not found, HTTP 404 is returned.
Retrieve data from a specific point in time
GET: https://api.dais.com/ioi/v1/client/{client_id}/datetime/{date}
To get the state of client data at a specific point in time, specify date
in ISO-8601 format (i.e. 2020-12-14T20:27:56.812Z
)