Update a case
To update a case, you must first get the ID of the customer the case belongs to. You will have received this ID when you created the case.
You can then update the case by sending a POST request to the following endpoint:
https://platform.arva-ai.com/api/v0/customer/update
In the request body, you can provide a patch for the user-provided information, websites and file uploads to update the case. The fields you provide here will depend on which checks you have enabled for the agent. Each time you provide an update, the case will be re-evaluated and an outcome returned.
curl -X POST "https://platform.arva-ai.com/api/v0/customer/update" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: multipart/form-data" \
-F "customerId=<CUSTOMER_ID>" \
# The fields you provide here will depend on which checks you have enabled for the agent
-F 'userInfoPatch={
"dba": <string>,
"natureOfBusiness": <string>,
"operatingAddress": <string>,
"tin": <string>,
"people": [{
"firstName": <string>,
"lastName": <string>,
"address": <string>,
"isApplicant": <boolean>,
"isOfficer": <boolean>,
"isOwner": <boolean>,
"ownershipPercentage": <number>
}],
"ownershipStructure": {
<string>: [{
"name": <string>,
"type": <'Individual' | 'Company'>,
"numberOfShares": <number>
}]
}
}' \
# E.g. Company website, LinkedIn, etc.
-F "websites=<ARRAY_OF_USER_WEBSITE_URLS>" \
# E.g. Certificate of Incorporation, CP-575 letter, etc.
-F "file=@<FILE_1_PATH>" \
-F "file=@<FILE_2_PATH>"
npm i @arva-ai/sdk
import { Arva } from '@arva-ai/sdk'
const client = new Arva(
<string> // Your API key
)
const customer = await client.customers.update({
id: <string>, // The ID of the customer
userInfoPatch: {
// The fields you provide here will depend on which checks you have enabled for the agent
'dba': <string>,
'natureOfBusiness': <string>,
'operatingAddress': <string>,
'tin': <string>,
'people': [{
'firstName': <string>,
'lastName': <string>,
'address': <string>,
'isApplicant': <boolean>,
'isOfficer': <boolean>,
'isOwner': <boolean>,
'ownershipPercentage': <number>
}],
'ownershipStructure': {
<string>: [{
'name': <string>,
'type': <'Individual' | 'Company'>,
'numberOfShares': <number>
}]
}
},
websites: <string[]>,
files: <File[]>
})
import json
import requests
import os
from requests_toolbelt import MultipartEncoder
user_info_patch = {
# The fields you provide here will depend on which checks you have enabled for the agent
'dba': <string>,
'natureOfBusiness': <string>,
'operatingAddress': <string>,
'tin': <string>,
'people': [{
'firstName': <string>,
'lastName': <string>,
'address': <string>,
'isApplicant': <boolean>,
'isOfficer': <boolean>,
'isOwner': <boolean>,
'ownershipPercentage': <number>
}],
'ownershipStructure': {
<string>: [{
'name': <string>,
'type': <'Individual' | 'Company'>,
'numberOfShares': <number>
}]
}
}
websites = <string[]>
file_paths = <string[]>
files = [open(fp, 'rb') for fp in file_paths]
file_tuples = [('file', (os.path.basename(f.name), f, 'application/pdf')) for f in files]
mp_encoder = MultipartEncoder(
fields=[
('customerId', customerId),
('user_info_patch', json.dumps(user_info_patch)),
('websites', json.dumps(websites)),
] + file_tuples
)
verdict = requests.post(
url,
headers={
'Authorization': 'Bearer ' + apiKey,
'Content-Type': mp_encoder.content_type
},
data=mp_encoder,
)
pip install arva-sdk
from arva import Arva
client = Arva(
api_key=<string>
)
user_info_patch = {
# The fields you provide here will depend on which checks you have enabled for the agent
'dba': <string>,
'natureOfBusiness': <string>,
'operatingAddress': <string>,
'tin': <string>,
'people': [{
'firstName': <string>,
'lastName': <string>,
'address': <string>,
'isApplicant': <boolean>,
'isOfficer': <boolean>,
'isOwner': <boolean>,
'ownershipPercentage': <number>
}],
'ownershipStructure': {
<string>: [{
'name': <string>,
'type': <'Individual' | 'Company'>,
'numberOfShares': <number>
}]
}
}
websites = <string[]>
file_paths = <string[]>
files = [open(fp, 'rb') for fp in file_paths]
verdict = client.customers.update(
id=<string>
user_info_patch=user_info_patch,
websites=websites,
files=files
)
If the request is successful, the response from the API will be an object with the following schema:
{
id: string // customer ID
name: string
state: string | undefined
createdAt: Date
verdict: 'ACCEPT' | 'REJECT' | 'REQUEST_INFORMATION' | 'PENDING'
riskLevel: 'HIGH' | 'MEDIUM' | 'LOW' | undefined
periodicReviewYears: number | undefined // undefined unless the verdict is ACCEPT
rfi: string | undefined // undefined unless the verdict is REQUEST_INFORMATION
requiresManualReview: boolean
checks: {
type: string
verdict: 'ACCEPT' | 'REJECT' | 'REQUEST_INFORMATION' | 'PENDING'
riskLevel: 'HIGH' | 'MEDIUM' | 'LOW' | undefined // undefined unless the verdict is ACCEPT
reason: string
periodicReviewYears: number | undefined // undefined unless the verdict is ACCEPT
requiresManualReview: boolean
proofs: Proof[]
}[]
}
Where:
type Proof = {
id: string
type: 'DOCUMENT' | 'WEBSITE'
inferredType: string
name: string
url: string
}
type RegistryResult = {
registeredName: string
jurisdictionCode: string
identifier: string
type: string
status: string
inactive: boolean
dateOfCreation: string
isForeign: boolean
registryName: string
registryUrl: string
directors: Director[]
ultimateBeneficialOwners: UltimateBeneficialOwner[]
}
type TinResult = {
match: boolean
}
type ScreeningResult = {
hits: {
matchingName: string
names: string[]
lists: {
name: string
identifier: string
url: string
countryCodes: string[]
dateAdded: string
}[]
}[]
}
Next, see how you can submit a manual review of the case.