Client Data
New clients are assigned to the authenticated organization. Updating an existing client first checks access to that client's profile.
The API retrieves answers for a specified product, either at the latest state or at a requested timestamp. Historical retrieval applies to the answer data; profile fields such as the client's name, type, status, and location code come from the current profile.
{
"clientId": "<UUID of the client ID>",
"clientName": "<Client name>",
"clientType": "COMMERCIAL",
"locationCode": "<Location code>",
"clientData": {
"client.name": {
"type": "ANSWER",
"answer": "<Answer for client.name>",
"qid": "client.name"
},
"client.phoneNumber": {
"type": "ANSWER",
"answer": "<Answer for client.phoneNumber>",
"qid": "client.phoneNumber"
},
"client.industry.naics": {
"type": "ANSWER",
"answer": "<Answer for client.industry.naics>",
"qid": "client.industry.naics"
},
"<Address loop question ID>": {
"type": "LOOP",
"qid": "<Address loop question ID>",
"iterations": [
{
"iterationId": "<UUID of the loop iteration ID>",
"answers": {
"client.name": {
"type": "ANSWER",
"qid": "client.name",
"answer": "<Answer for client.name>"
},
"client.industry.naics": {
"type": "ANSWER",
"qid": "client.industry.naics",
"answer": "<Answer for client.industry.naics>"
},
"client.address1": {
"type": "ANSWER",
"qid": "client.address1",
"answer": "<Answer for client.address1>"
},
"client.city": {
"type": "ANSWER",
"qid": "client.city",
"answer": "<Answer for client.city>"
},
"client.state": {
"type": "ANSWER",
"qid": "client.state",
"answer": "<Answer for client.state>"
},
"client.zipcode": {
"type": "ANSWER",
"qid": "client.zipcode",
"answer": "<Answer for client.zipcode>"
},
"client.phoneNumber": {
"type": "ANSWER",
"qid": "client.phoneNumber",
"answer": "<Answer for client.phoneNumber>"
},
"client.email": {
"type": "ANSWER",
"qid": "client.email",
"answer": "<Answer for client.email>"
},
"client.website": {
"type": "ANSWER",
"qid": "client.website",
"answer": ""
},
"client.contact.phoneNumber": {
"type": "ANSWER",
"qid": "client.contact.phoneNumber",
"answer": "<Answer for client.contact.phoneNumber>"
},
"client.contact.name": {
"type": "ANSWER",
"qid": "client.contact.name",
"answer": "<Answer for client.contact.name>"
}
}
}
]
}
}
}
clientId: Each client is assigned a unique clientId. IfclientIdis specified, then it is expected that an existing client is being updated. If a specified client is not found using thisclientIda 404:Not Found error is returned.clientType: Specify if client isCOMMERCIALorPERSONALlocationCode: If your organization uses locationCodes, this is where you can specify it for a clientclientStatus: Client status,LEADorCLIENTintakeLoopIterationIdsToDelete: Optional array of loop iteration UUIDs to remove, including their child answersclientData: Object mapping each QID to its answer or loop dataqid: Question identifier (qid) as per question APIanswer: Answer for the questiontype: Specify if element is LOOP or ANSWER
Reserved QIDs#
The following QIDs are reserved for common client information. Use the product's question configuration to determine which values to collect; a client may not have an answer for every QID.
client.name
client.industry.naics
client.address1
client.address2
client.city
client.state
client.zipcode
client.phoneNumber
client.email
client.website
client.contact.name
client.contact.phoneNumber
Save client data#
PUT https://api.{ENV}.dais.com/ioi/v3/client
curl --location --request PUT 'https://api.{ENV}.dais.com/ioi/v3/client' \
--header 'Authorization: Basic <Base64-encoded API key and secret>' \
--header 'Content-Type: application/json' \
--data-raw '{
"clientId": "<UUID of the client ID>",
"clientName": "<Client name>",
"clientType": "COMMERCIAL",
"locationCode": "<Location code>",
"clientData": {
"<Question ID>": {
"type": "ANSWER",
"answer": "<Answer>",
"qid": "<Question ID>"
}
}
}'
Send client data to this endpoint to save it. Omit clientId to create a client, or provide an existing clientId to update that client. For explicit removal of loop iterations, use intakeLoopIterationIdsToDelete.
The successful response contains the saved profile's clientId, clientType, clientName, locationCode, and clientStatus. It does not return the saved answers; use the retrieval endpoint below to read clientData.
The GET_QUOTES event can also create or update client information using its intake payload; see the GET_QUOTES reference.
Retrieve latest client data#
GET 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/<UUID of the client ID>/product/<UUID of the product ID>' \
--header 'Authorization: Basic <Base64-encoded API key and secret>'
Get client data by specifying a clientId. If client is not found, HTTP 404 is returned.
Retrieve data from specific point in time#
GET 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/<UUID of the client ID>/product/<UUID of the product ID>/datetime/<ISO 8601 date-time with offset>' \
--header 'Authorization: Basic <Base64-encoded API key and secret>'
To retrieve product answers at a specific point in time, specify date in ISO-8601 format (for example, 2020-12-14T20:27:56.812Z). Only clientData uses this timestamp; the other profile fields reflect the current client profile.