Create EDD Responses
POST
https://api.sfox.com/v1/enterprise/eddq/responses
Submit a user's responses to an EDD request.
Request
All required prompts must be answered. Excluding a response to a required prompt in your request will result in an error response and responses included in your request will not be recorded/must be re-submitted in a new request.
For EDD prompts with response_type
= File-Upload
prompts, you will submit the file name only in this request. You will submit the file itself either via a Submit Documents request or SFTP.
response
must be set to the file name excluding the extension (e.g. .jpg
, .pdf
) For example, if you are submitting a document with file name por_file.png
, you would set the response
= por_file
.
Body Parameters
user_id
required
string
The unique user ID of the user that you will be submitting responses for.
prompts
required
string
The list of prompts applicable to the requested EDDQ.
ddq_prompt_id
required
string
response
required
string
The response from your end user.
optional_free_form
string
The optional response from your end user if optional_free_form
= true
Example Requests
{
"user_id": "${USER_ID}",
"prompts": {
"1": { "response": "hello"},
"2": { "response": "hello"},
"3": { "response": "hello"},
"4": { "response": "hello"},
"5": { "response": "hello"},
"4": { "response": "hello", "optional_free_form":"hello world"},
"52": {"response": "id_file"},
"53": {"response": "por_file"}
}
}
{
"user_id":"${USER_ID}",
"prompts": {
"6": { "response": "hello"},
"7": { "response": "hello"},
"8": { "response": "Custody of Virtual Currency"},
"9": { "response": "hello"},
"10": { "response": "hello"},
"12": { "response": "hello"},
"13": { "response": "hello"},
"14": { "response": "hello"},
"15": { "response": "hello"},
"16": { "response": "hello"},
"17": { "response": "hello"},
"19": { "response": "Yes"},
"20": { "response": "No"},
"21": { "response": "Yes", "optional_free_form":"hello world"},
"22": { "response": "Yes"},
"23": { "response": "Yes"},
"24": { "response": "Yes"},
"25": { "response": "hello world"},
"26": { "response": "hello world"},
"27": { "response": "Yes"},
"28": { "response": "Yes"},
"29": { "response": "Yes"},
"30": { "response": "No"},
"31": { "response": "Yes"},
"32": { "response": "Yes"},
"33": { "response": "Yes"},
"34": { "response": "Yes"},
"35": { "response": "Yes"},
"36": { "response": "Yes"},
"37": { "response": "Yes"},
"38": { "response": "Yes"},
"39": { "response": "Yes"},
"40": { "response": "Yes"},
"41": { "response": "Yes"},
"42": { "response": "Yes"},
"43": { "response": "Yes"},
"44": { "response": "Yes"},
"45": { "response": "Yes"},
"46": { "response": "Yes"},
"47": { "response": "Yes"},
"48": { "response": "Yes"},
"49": { "response": "Yes"},
"50": { "response": "Yes"},
"54": { "response": "formation_documents_file"},
"55": {"response":"principal_place_of_business_file"}
}
}
curl -X POST \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${ENTERPRISE_API_KEY}" \
--data '{
"user_id": "${USER_ID}",
"prompts": {
"1": {"response": "${Response to prompt ID 1}"},
"2": {"response": "${Response to prompt ID 2}"},
"3": {"response": "${Response to prompt ID 3}"},
"52": {"response": "${filename1}"},
"53": {"response": "${filename2}"}
}
}' \
'https://api.sfox.com/v1/enterprise/eddq/responses'
const axios = require('axios');
let data = JSON.stringify({
"user_id": "${USER_ID}",
"prompts": {
"1": {"response": "${Response to prompt ID 1}"},
"2": {"response": "${Response to prompt ID 2}"},
"3": {"response": "${Response to prompt ID 3}"},
"52": {"response": "${filename1}"},
"53": {"response": "${filename2}"}
}
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.sfox.com/v1/enterprise/eddq/responses',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.ENTERPRISE_API_KEY}`,
},
data : data
};
axios.request(config)
.then((response) => {
console.log(response.status);
console.log(response.data);
})
.catch((error) => {
console.log(error.response.status);
console.log(error.response.data);
});
import requests
import os
data = {
"user_id": "${USER_ID}",
"prompts": {
"1": {"response": "${Response to prompt ID 1}"},
"2": {"response": "${Response to prompt ID 2}"},
"3": {"response": "${Response to prompt ID 3}"},
"52": {"response": "${filename1}"},
"53": {"response": "${filename2}"}
}
}
response = requests.post(
'https://api.sfox.com/v1/enterprise/eddq/responses',
headers={
'Authorization': f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
},
json=data
)
print(response.status_code)
print(response.json())
Response
Last updated