Appearance
EDD
APLYiD's Enhanced Due Diligence (EDD) streamlines the onboarding of complex customers, ensuring thorough compliance with KYC/KYB regulations. The platform supports global document capture, accessing data from over 16,000 ID documents and 2.5 million PEP & Sanctions records worldwide.
POST
Create a new EDD Case
API
Description: Create a new case
Endpoint: POST /api/v4/outsource_cases
Properties:
Property | Type | Required | Notes |
---|---|---|---|
reference | String | false | Case reference. A name to recognise the case |
String | true | Must be in valid email format. | |
firstname | String | false | |
lastname | String | false | |
legal_name | String | false | |
contact_phone | String | false | Must be in valid format |
tax_number | String | false | |
address_line_1 | String | false | |
address_line_2 | String | false | |
suburb | String | false | |
state | String | false | |
postcode | String | false | |
country_code | String | false | ISO 3166-1 alpha-3 code: "NZL", "AUS" |
property_details | Text | false | |
deadline | datetime | false | |
entity_type | enum | true | can only be one of the following values: individual_joint, trust, company, estate, partnership, registered_charity, incorporated_society, other |
comment | Text | false | |
should_send_email | Boolean | false | By default, an email is sent to the primary contact when a case is created. If this setting is set to false, no email will be sent. |
Sample Response:
json
{
"metadata": {
"api_version": "v4",
"request_id": "5f7c8471-6bf7-471b-8800-e3aac6ef573d"
},
"type": "outsource_case",
"id": 27,
"status": "active",
"process_status": "created",
"reference": "TEST",
"comment": "test",
"transaction_id": "wsr5EDoruBbh9YJ9",
"created_by": "Lionel Weissnat",
"created_at": "2024-09-16T11:01:14.774+12:00",
"updated_at": "2024-09-16T11:01:14.965+12:00",
"deadline": null,
"completed_note": null,
"on_hold": false,
"assignee_fullname": null,
"case_number": "EDD-0000027",
"entity": {
"legal_name": "TEST-API",
"tax_number": "",
"entity_type": "individual_joint",
"entity_type_label": "Ind/joint"
},
"primary_contact": {
"firstname": "John",
"lastname": "Doe",
"email": "test@gmail.com",
"contact_phone": "61412312312",
"formatted_contact_phone": "+61 412 312 312"
},
"property": {
"address_line_1": "",
"address_line_2": "",
"suburb": "",
"state": "",
"postcode": "",
"country_code": "AUS",
"details": ""
},
"status_updates": [],
"checklist_items": [],
"assets": []
}
GET
Fetch case details
API
Description: Fetch details about a created case
Endpoint: GET /api/v4/outsource_cases/:id
|
Sample Response:
json
{
"metadata": {
"api_version": "v4",
"request_id": "1897418d-f759-4000-996d-f5a6c8758bb0"
},
"type": "outsource_case",
"id": 27,
"status": "active",
"process_status": "created",
"reference": "TEST",
"comment": "test",
"transaction_id": "wsr5EDoruBbh9YJ9",
"created_by": "Lionel Weissnat",
"created_at": "2024-09-16T11:01:14.774+12:00",
"updated_at": "2024-09-16T11:01:14.965+12:00",
"deadline": null,
"completed_note": null,
"on_hold": false,
"assignee_fullname": null,
"case_number": "EDD-0000027",
"entity": {
"legal_name": "TEST-API",
"tax_number": "",
"entity_type": "individual_joint",
"entity_type_label": "Ind/joint"
},
"primary_contact": {
"firstname": "John",
"lastname": "Doe",
"email": "test@gmail.com",
"contact_phone": "61412312312",
"formatted_contact_phone": "+61 412 312 312"
},
"property": {
"address_line_1": "",
"address_line_2": "",
"suburb": "",
"state": "",
"postcode": "",
"country_code": "AUS",
"details": ""
},
"status_updates": [],
"checklist_items": [],
"assets": [
{
"id": 53,
"file_name": "bailee",
"file_ext": "jpeg",
"download_url": "{download-url-link}",
"uploaded_by": "Lionel Weissnat",
"updated_at": "2024-09-16T12:17:09.000+12:00"
}
]
}
PATCH
Update status of a case
API
Description: Update case's process status
Endpoint: POST /api/v4/outsource_cases/:id/status
NOTE
This PATCH call can only be used when EDD is enabled in SaaS mode. If you are using EDD as an outsource service, this call cannot be used.
Properties:
Property | Type | Required | Notes |
---|---|---|---|
process_status | String | true | Only a value from this list is accepted: created, gathering_info, in_review, completed |
POST
Upload a file
API
Description: Upload and attach a single file to a case
Endpoint: POST /api/v4/outsource_cases/:id/upload
Properties:
Property | Type | Required | Notes |
---|---|---|---|
file | File | true | The file to be uploaded. This should be sent as part of a multipart form data request. Only a single file can be uploaded, file size must be less than 10MB and one of the png, jpeg, txt, pdf format |
NOTE
Pay attention to Content-Type
value in the headers that it must be set to multipart/form-data
.
Refer to the examples below for more information.
Web hook case completed event
Once your web hook is configured and enabled you will receive events for every outsource case, regardless of whether the case was created via API or via our web application.
In order to see how to configure your web hook, see here
The payload being sent by POST to your web hook is defined as follows:
json
// Basic JSON event structure posted to web hook
{
"event": "case_completed",
"reference": "MY_FIRST_CASE",
"external_id": "{external-id}",
"phone_number": "+6412345678",
"transaction_id": "{transaction-id}",
"verification": null,
"message": null,
}
Property | Description |
---|---|
event | Type of event (see list of all possible events below) |
reference | The reference (friendly name) you provided when creating the verification |
external_id | The external_id (your system’s object ID) you provided when creating the verification |
phone_number | The mobile phone number we sent the SMS message to (if applicable) Note: The value will be in international format, now with a leading “+” symbol |
transaction_id | APLYiD’s unique identifier for the verification |
verification | Verification result. This is only set when the event is completed or updated |
message | Error message or additional information |
APLYiD will notify your system whenever a case completed event occurs on your case:
Examples
js
const http = require('axios')
http.post('https://integration.aplyid.com/api/v4/outsource_cases', {
firstname: "John",
lastname: "Doe",
contact_phone: "64021123123",
email: "test@example.com",
reference: "TEST-API",
legal_name: "APLYiD LTD",
tax_number: "123123123",
entity_type: "individual_joint",
comment: "This is a brief explanation",
address_line_1: "22 Pollen Street",
address_line_2: "",
suburb: "Grey Lynn",
state: "Auckland",
country_code: "NZL",
postcode: "1021",
property_details: "This is the details of the property",
deadline: "2024-07-30T14:00:00.000Z"
}, {
headers: {
'Aply-API-Key': 'YOUR_API_KEY',
'Aply-Date': 'YOUR_DATE',
'Aply-Signature': 'YOUR_GENERATED_SIGNATURE'
}
}).then(response => {
// Do some stuff
}).catch(error => {
console.log(error.response.data.message)
})
js
const http = require('axios')
http.patch('https://integration.aplyid.com/api/v4/outsource_cases/123/status', {
process_status: "gathering_info",
}, {
headers: {
'Aply-API-Key': 'YOUR_API_KEY',
'Aply-Date': 'YOUR_DATE',
'Aply-Signature': 'YOUR_GENERATED_SIGNATURE'
}
}).then(response => {
// Do some stuff
}).catch(error => {
console.log(error.response.data.message)
})
js
const formData = new FormData();
formData.append('file', actualFile); // 'actualFile' is the file object
http.post('https://integration.aplyid.com/api/v4/outsource_cases/123/upload', formData, {
headers: {
'Content-Type': 'multipart/form-data',
'Aply-API-Key': 'YOUR_API_KEY',
'Aply-Date': 'YOUR_DATE',
'Aply-Signature': 'YOUR_GENERATED_SIGNATURE'
}
});
Error Codes
401 Unauthorized
json
{
"error_code": "AUTH_FAILED",
"message": "Bad credentials"
}
403 Forbidden
json
// Not subscribed to the EDD product
{
"error_code" : "FORBIDDEN",
"message" : "You're not authorized to access this resource"
}
422 Unprocessable Entity
json
// For validation failures
{
"error_code" : "NOT_CREATED",
"message" : "Contact phone is invalid"
}
422 Unprocessable Entity
json
{
"error_code" : "VALIDATION_FAILED",
"message" : "Process status is not included in the list"
}
400 Bad Request
json
{
"error_code" : "NO_FILE_UPLOADED",
"message" : "No file uploaded"
}
400 Bad Request
json
{
"error_code": "FILE_SIZE_TOO_BIG",
"message": "File size is bigger than 10MB"
}
500 Internal Server Error
json
{
"error_code": "ASSET_FAILED",
"message": "Failed to upload asset"
}