1.1.9 • Published 11 months ago

@complycube/api v1.1.9

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

ComplyCube Node.js Library

Version Downloads Dependencies Try on RunKit

The official Node.js library for integrating with the ComplyCube API.

ComplyCube enables you to automate your AML/KYC workflows effortlessly.

Documentation can be found at https://docs.complycube.com.

Installation

Using npm:

npm install @complycube/api

Using Yarn:

yarn add @complycube/api

Getting Started

Require the package:

const { ComplyCube } = require("@complycube/api");

Configure with your API key:

const complycube = new ComplyCube({
  apiKey: process.env.COMPLYCUBE_API_KEY
});

Using with async/await (in an async function):

try {
  const client = await complycube.client.create({
    type: "person",
    email: "jane.doe@example.com",
    personDetails: {
      firstName: "Jane",
      lastName: "Doe"
    }
  });

  const check = await complycube.check.create(client.id, {
    type: "standard_screening_check"
  });

  return check;
} catch (error) {
  if (error instanceof ComplyCubeApiError) {
    // An error response was returned by the ComplyCube API.
    console.log(error.message);
    console.log(error.type);
  } else {
    console.log(error.message);
  }
}

Using with promises:

complycube.client
  .create({
    type: "person",
    email: "jane.doe@example.com",
    personDetails: {
      firstName: "Jane",
      lastName: "Doe"
    }
  })
  .then(client =>
    complycube.check.create(client.id, {
      type: "standard_screening_check"
    })
  )
  .then(check =>
    // Handle successfully created check.
  )
  .catch(error => {
    // Handle error.
  });

Response format

All responses will be JavaScript objects.

const client = await complycube.client.create({
  type: "person",
  email: "jane.doe@example.com",
  personDetails: {
    firstName: "Jane",
    lastName: "Doe"
  }
});

console.log(client);
{
  "id": "<CLIENT_ID>",
  "type": "person",
  "email": "jane.doe@example.com",
  "personDetails": {
      "firstName": "Jane",
      "lastName": "Doe"
  },
  "createdAt": "2023-01-01T00:00:00.000Z",
  "updatedAt": "2023-01-01T00:00:00.000Z"
}

More Documentation

More documentation and code examples can be found at https://docs.complycube.com.

Further information on ComplyCube can be found at https://www.complycube.com.

1.1.9

11 months ago

1.1.8

1 year ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago