Client Data
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": { "client.name": { "type": "ANSWER", "answer": "Business Name", "qid": "client.name" }, "client.phoneNumber": { "type": "ANSWER", "answer": "3121234567", "qid": "client.phoneNumber" } "client.industry.naics": { "type": "ANSWER", "answer": "451130", "qid": "client.industry.naics" }, "addresses": { "type": "LOOP", "qid": "addresses", "iterations": [ { "iterationId": "f4c41c8d-ffb6-4883-902b-ab6357fc1a54", "answers": { "client.address1": { "type": "ANSWER", "answer": "123 Main St", "qid": "client.address1" }, "client.city": { "type": "ANSWER", "answer": "Chicago", "qid": "client.city" }, "client.state": { "type": "ANSWER", "answer": "IL", "qid": "client.state" }, "client.zipCode": { "type": "ANSWER", "answer": "60089", "qid": "client.zipCode" } } } ] } }}
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 questiontype
: Specify if element is LOOP or ANSWER
#
Save client dataPUT: https://api.{ENV}.dais.com/ioi/v3/client
curl --location --request PUT 'https://api.{ENV}.dais.com/ioi/v3/client' \--header 'Authorization: Basic <yourAuthHere>' \--header 'Content-Type: application/json' \--data-raw '{ "clientId": "<clientId>", "clientName": "<clientName>", "clientType": "COMMERCIAL", "locationCode": "<locationCode>", "clientData": { "<qid>": { "type": "ANSWER", "answer": "<answer>", "qid": "<qid>" }}'
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 latest client dataGET: https://api.{ENV}.dais.com/ioi/v3/client/{client_id}/product/{product_id}
curl --location --request GET 'https://api.{ENV}.dais.com/ioi/v3/client/<clientId>/product/<productId>' \--header 'Authorization: Basic <yourAuthHere>'
Get client data by specifying a clientId
. If client is not found, HTTP 404 is returned.
#
Retrieve data from specific point in timeGET: https://api.{ENV}.dais.com/ioi/v3/client/{client_id}/product/{product_id}/datetime/{date}
curl --location --request GET 'https://api.{ENV}.dais.com/ioi/v3/client/<clientId>/product/<productId>/datetime/<date>' \--header 'Authorization: Basic <yourAuthHere>'
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
)