Update the compliance questionnaire
curl --request PATCH \
--url https://production.hifi.com/v3/users/{userId}/compliance/questionnaire \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employmentStatus": "<string>",
"expectedMonthlyTransactionVolume": "<string>",
"expectedMonthlyTransactionCount": "<string>",
"primaryPurpose": "<string>",
"primaryPurposeDetails": "<string>",
"highRiskActivities": [
"<string>"
],
"sourceOfFunds": "<string>",
"sourceOfFundsDetails": "<string>",
"actsOnBehalfOfThirdParty": true,
"actsOnBehalfOfThirdPartyDetails": "<string>"
}
'import requests
url = "https://production.hifi.com/v3/users/{userId}/compliance/questionnaire"
payload = {
"employmentStatus": "<string>",
"expectedMonthlyTransactionVolume": "<string>",
"expectedMonthlyTransactionCount": "<string>",
"primaryPurpose": "<string>",
"primaryPurposeDetails": "<string>",
"highRiskActivities": ["<string>"],
"sourceOfFunds": "<string>",
"sourceOfFundsDetails": "<string>",
"actsOnBehalfOfThirdParty": True,
"actsOnBehalfOfThirdPartyDetails": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
employmentStatus: '<string>',
expectedMonthlyTransactionVolume: '<string>',
expectedMonthlyTransactionCount: '<string>',
primaryPurpose: '<string>',
primaryPurposeDetails: '<string>',
highRiskActivities: ['<string>'],
sourceOfFunds: '<string>',
sourceOfFundsDetails: '<string>',
actsOnBehalfOfThirdParty: true,
actsOnBehalfOfThirdPartyDetails: '<string>'
})
};
fetch('https://production.hifi.com/v3/users/{userId}/compliance/questionnaire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.hifi.com/v3/users/{userId}/compliance/questionnaire",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'employmentStatus' => '<string>',
'expectedMonthlyTransactionVolume' => '<string>',
'expectedMonthlyTransactionCount' => '<string>',
'primaryPurpose' => '<string>',
'primaryPurposeDetails' => '<string>',
'highRiskActivities' => [
'<string>'
],
'sourceOfFunds' => '<string>',
'sourceOfFundsDetails' => '<string>',
'actsOnBehalfOfThirdParty' => true,
'actsOnBehalfOfThirdPartyDetails' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://production.hifi.com/v3/users/{userId}/compliance/questionnaire"
payload := strings.NewReader("{\n \"employmentStatus\": \"<string>\",\n \"expectedMonthlyTransactionVolume\": \"<string>\",\n \"expectedMonthlyTransactionCount\": \"<string>\",\n \"primaryPurpose\": \"<string>\",\n \"primaryPurposeDetails\": \"<string>\",\n \"highRiskActivities\": [\n \"<string>\"\n ],\n \"sourceOfFunds\": \"<string>\",\n \"sourceOfFundsDetails\": \"<string>\",\n \"actsOnBehalfOfThirdParty\": true,\n \"actsOnBehalfOfThirdPartyDetails\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://production.hifi.com/v3/users/{userId}/compliance/questionnaire")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employmentStatus\": \"<string>\",\n \"expectedMonthlyTransactionVolume\": \"<string>\",\n \"expectedMonthlyTransactionCount\": \"<string>\",\n \"primaryPurpose\": \"<string>\",\n \"primaryPurposeDetails\": \"<string>\",\n \"highRiskActivities\": [\n \"<string>\"\n ],\n \"sourceOfFunds\": \"<string>\",\n \"sourceOfFundsDetails\": \"<string>\",\n \"actsOnBehalfOfThirdParty\": true,\n \"actsOnBehalfOfThirdPartyDetails\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/users/{userId}/compliance/questionnaire")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"employmentStatus\": \"<string>\",\n \"expectedMonthlyTransactionVolume\": \"<string>\",\n \"expectedMonthlyTransactionCount\": \"<string>\",\n \"primaryPurpose\": \"<string>\",\n \"primaryPurposeDetails\": \"<string>\",\n \"highRiskActivities\": [\n \"<string>\"\n ],\n \"sourceOfFunds\": \"<string>\",\n \"sourceOfFundsDetails\": \"<string>\",\n \"actsOnBehalfOfThirdParty\": true,\n \"actsOnBehalfOfThirdPartyDetails\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"employmentStatus": "<string>",
"expectedMonthlyTransactionVolume": "<string>",
"expectedMonthlyTransactionCount": "<string>",
"primaryPurpose": "<string>",
"primaryPurposeDetails": "<string>",
"highRiskActivities": [
"<string>"
],
"sourceOfFunds": "<string>",
"sourceOfFundsDetails": "<string>",
"actsOnBehalfOfThirdParty": true,
"actsOnBehalfOfThirdPartyDetails": "<string>"
}{
"type": "VALIDATION_ERROR",
"message": "One or more fields are invalid or missing.",
"fields": [
{
"code": "invalid_value",
"message": "Must be a valid email address",
"field": "email"
}
]
}{
"type": "UNAUTHORIZED",
"message": "Authentication required"
}{
"type": "RESOURCE_NOT_FOUND",
"message": "<string>",
"fields": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Compliance
Update the compliance questionnaire
Update the compliance questionnaire for a user. The accepted fields depend on whether the user is an individual or a business. All fields are optional on update — only the fields you provide are changed.
PATCH
/
v3
/
users
/
{userId}
/
compliance
/
questionnaire
Update the compliance questionnaire
curl --request PATCH \
--url https://production.hifi.com/v3/users/{userId}/compliance/questionnaire \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employmentStatus": "<string>",
"expectedMonthlyTransactionVolume": "<string>",
"expectedMonthlyTransactionCount": "<string>",
"primaryPurpose": "<string>",
"primaryPurposeDetails": "<string>",
"highRiskActivities": [
"<string>"
],
"sourceOfFunds": "<string>",
"sourceOfFundsDetails": "<string>",
"actsOnBehalfOfThirdParty": true,
"actsOnBehalfOfThirdPartyDetails": "<string>"
}
'import requests
url = "https://production.hifi.com/v3/users/{userId}/compliance/questionnaire"
payload = {
"employmentStatus": "<string>",
"expectedMonthlyTransactionVolume": "<string>",
"expectedMonthlyTransactionCount": "<string>",
"primaryPurpose": "<string>",
"primaryPurposeDetails": "<string>",
"highRiskActivities": ["<string>"],
"sourceOfFunds": "<string>",
"sourceOfFundsDetails": "<string>",
"actsOnBehalfOfThirdParty": True,
"actsOnBehalfOfThirdPartyDetails": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
employmentStatus: '<string>',
expectedMonthlyTransactionVolume: '<string>',
expectedMonthlyTransactionCount: '<string>',
primaryPurpose: '<string>',
primaryPurposeDetails: '<string>',
highRiskActivities: ['<string>'],
sourceOfFunds: '<string>',
sourceOfFundsDetails: '<string>',
actsOnBehalfOfThirdParty: true,
actsOnBehalfOfThirdPartyDetails: '<string>'
})
};
fetch('https://production.hifi.com/v3/users/{userId}/compliance/questionnaire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.hifi.com/v3/users/{userId}/compliance/questionnaire",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'employmentStatus' => '<string>',
'expectedMonthlyTransactionVolume' => '<string>',
'expectedMonthlyTransactionCount' => '<string>',
'primaryPurpose' => '<string>',
'primaryPurposeDetails' => '<string>',
'highRiskActivities' => [
'<string>'
],
'sourceOfFunds' => '<string>',
'sourceOfFundsDetails' => '<string>',
'actsOnBehalfOfThirdParty' => true,
'actsOnBehalfOfThirdPartyDetails' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://production.hifi.com/v3/users/{userId}/compliance/questionnaire"
payload := strings.NewReader("{\n \"employmentStatus\": \"<string>\",\n \"expectedMonthlyTransactionVolume\": \"<string>\",\n \"expectedMonthlyTransactionCount\": \"<string>\",\n \"primaryPurpose\": \"<string>\",\n \"primaryPurposeDetails\": \"<string>\",\n \"highRiskActivities\": [\n \"<string>\"\n ],\n \"sourceOfFunds\": \"<string>\",\n \"sourceOfFundsDetails\": \"<string>\",\n \"actsOnBehalfOfThirdParty\": true,\n \"actsOnBehalfOfThirdPartyDetails\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://production.hifi.com/v3/users/{userId}/compliance/questionnaire")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employmentStatus\": \"<string>\",\n \"expectedMonthlyTransactionVolume\": \"<string>\",\n \"expectedMonthlyTransactionCount\": \"<string>\",\n \"primaryPurpose\": \"<string>\",\n \"primaryPurposeDetails\": \"<string>\",\n \"highRiskActivities\": [\n \"<string>\"\n ],\n \"sourceOfFunds\": \"<string>\",\n \"sourceOfFundsDetails\": \"<string>\",\n \"actsOnBehalfOfThirdParty\": true,\n \"actsOnBehalfOfThirdPartyDetails\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/users/{userId}/compliance/questionnaire")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"employmentStatus\": \"<string>\",\n \"expectedMonthlyTransactionVolume\": \"<string>\",\n \"expectedMonthlyTransactionCount\": \"<string>\",\n \"primaryPurpose\": \"<string>\",\n \"primaryPurposeDetails\": \"<string>\",\n \"highRiskActivities\": [\n \"<string>\"\n ],\n \"sourceOfFunds\": \"<string>\",\n \"sourceOfFundsDetails\": \"<string>\",\n \"actsOnBehalfOfThirdParty\": true,\n \"actsOnBehalfOfThirdPartyDetails\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"employmentStatus": "<string>",
"expectedMonthlyTransactionVolume": "<string>",
"expectedMonthlyTransactionCount": "<string>",
"primaryPurpose": "<string>",
"primaryPurposeDetails": "<string>",
"highRiskActivities": [
"<string>"
],
"sourceOfFunds": "<string>",
"sourceOfFundsDetails": "<string>",
"actsOnBehalfOfThirdParty": true,
"actsOnBehalfOfThirdPartyDetails": "<string>"
}{
"type": "VALIDATION_ERROR",
"message": "One or more fields are invalid or missing.",
"fields": [
{
"code": "invalid_value",
"message": "Must be a valid email address",
"field": "email"
}
]
}{
"type": "UNAUTHORIZED",
"message": "Authentication required"
}{
"type": "RESOURCE_NOT_FOUND",
"message": "<string>",
"fields": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the user.
Pattern:
^user_[A-Za-z0-9]+$Body
application/json
- Option 1
- Option 2
Pattern:
^[\x20-\x7E\n]*$Response
Compliance questionnaire.
- Option 1
- Option 2
Pattern:
^[\x20-\x7E\n]*$⌘I