API Reference
Log inSign up
v.1.7.2
v.1.7.2
  • Introduction
  • Integration
  • Sandbox and Live
  • Authentication
  • Rate Limits
  • Service Quota
  • Errors
  • Pagination
  • Filtering
  • Versioning
  • Core resources
  • Clients
    • Create a client
    • Get a client
    • Update a client
    • Delete a client
    • List clients
    • Filtering clients
  • Addresses
    • Create an address
    • Get an address
    • Update an address
    • Delete an address
    • List addresses
    • Filtering addresses
  • Documents
    • Create a document
    • Get a document
    • Update a document
    • Upload image attachment
    • Download image attachment
    • Delete image attachment
    • Delete a document
    • List documents
    • Filtering documents
  • Live Photos
    • Upload a live photo
    • Get a live photo
    • Download live photo
    • Delete a live photo
    • List live photos
  • Checks
    • Create a check
    • Get a check
    • Update a check
    • Validate check outcome
    • List checks
    • Filtering checks
  • Risk Profile
    • Get a risk profile
  • Check types
    • AML Screening Check
    • Document Check
    • Identity Check
  • Other Resources
    • Webhooks
      • Create a webhook
      • Get a webhook
      • Update a webhook
      • Delete a webhook
      • List webhooks
      • Filtering webhooks
    • Reports
      • Generate a client report
      • Generate a check report
    • SDK Tokens
      • Generate a token
    • Team Members
      • Get a team member
      • List team members
      • Filtering team members
    • Audit Logs
      • Get an audit log
      • List audit logs
      • Filtering audit logs
Powered by GitBook
On this page
  • Create a client
  • The personDetails object
  • The companyDetails object
  • Example request

Was this helpful?

  1. Clients

Create a client

Create a client

POST https://api.complycube.com/v1/clients

Creates a new client.

Headers

Name
Type
Description

Content-Type

string

The content-type must always be set to application/json.

Authorization

string

The API live or test key

Request Body

Name
Type
Description

type

string

The type of client. Valid values are: 1. person 2. company

email

string

The client's email address.

mobile

string

The client's mobile number.

telephone

string

The client's telephone number.

externalId

string

A unique identifier that you can associate with the client. For example, this can be the client ID in your system.

joinedDate

string

The date and time when the client was registered with you. This is relevant for users that migrate existing customers. The format is YYYY-MM-DD.

personDetails

object

Primary details for a client of type person. This is required when the type is person.

companyDetails

object

Primary details for a client of type company. This is required when the type is company.

{
    "id": "5eb04fcd0f3e360008035eb1",
    "type": "person",
    "email": "john.doe@example.com",
    "mobile": "+12 345678910",
    "telephone": "+12 345678910",
    "joinedDate": "2020-01-01",
    "personDetails": {
        "firstName": "John",
        "lastName": "Doe",
        "dob": "1990-01-01",
        "nationality": "GB"
    },
    "createdAt": "2020-01-04T17:24:29.146Z",
    "updatedAt": "2020-01-04T17:24:29.146Z"
}
{
    "type": "invalid_request",
    "message": "'type' should be equal to one of the allowed values: person,company",
    "param": "type"
}

The personDetails object

Attribute

Type

Optionality

Description

firstName

string

Required

The client's first name.

middleName

string

Optional

The client's middle name.

lastName

string

Required

The client's last name.

dob

string

Optional

The client's date of birth. The format is YYYY-MM-DD.

gender

string

Optional

The client's gender. Valid values include:

  1. male

  2. female

  3. other

nationality

string

Optional

birthCountry

string

Optional

The companyDetails object

Attribute

Type

Optionality

Description

name

string

Required

The client's name.

website

string

Optional

The client's website.

registrationNumber

string

Optional

The client's registration or incorporation number.

incorporationCountry

string

Optional

incorporationType

string

Optional

The client's incorporation type. Valid values include:

  1. sole_proprietorship

  2. private_limited_company

  3. public_limited_company

  4. limited_partnership

  5. holding_company

  6. non_government_organisation

  7. statutory_company

  8. subsidiary_company

  9. unlimited_partnership

  10. charitable_incorporated_organisation

  11. chartered_company

Example request

curl -X POST https://api.complycube.com/v1/clients \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          	"type": "person",
						"email": "john.doe@example.com",
						"mobile": "+12 345678910",
						"telephone": "+12 345678910",
						"joinedDate": "2020-01-01",
						"personDetails":{
							"firstName": "John",
							"lastName" :"Doe",
							"dob": "1990-01-01",
							"nationality": "GB"
						}
        }'
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

const client = await complycube.client.create({
  type: "person",
  email: "john.doe@example.com",
  mobile: "+12 345678910",
  telephone: "+12 345678910",
  joinedDate: "2020-01-01",
  personDetails: {
    firstName: "John",
    lastName: "Doe",
    dob: "1990-01-01",
    nationality: "GB"
  }
});
from complycube import ComplyCubeClient
cc_api = ComplyCubeClient(api_key='<YOUR API KEY>')

new_client = {
    'type':'person',
    'email':'a@b.com',
    'personDetails': {
        'firstName':'John',
        'lastName':'Smith'
    }
}

client = cc_api.clients.create(**new_client)
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR API KEY>');
$result = $ccapi->clients()->create(['type' => 'person',
                                     'email' => 'john@doe.com',
                                     'personDetails' => ['firstName' => 'John',
                                                         'lastName' => 'Doe']]);

PreviousClientsNextGet a client

Last updated 4 years ago

Was this helpful?

The client's nationality. This will be the .

The client's birth country. This will be the .

The client's incorporation country. This will be the .

two-letter country ISO code
two-letter country ISO code
two-letter country ISO code