Cloudcheck KYB API1.0

Overview

The Cloudcheck KYB API service enables a reporting entity to integrate the Cloudcheck KYB service into its website. This allows the reporting entity to search for entities (e.g. NZ Limited Company, NZ Co-operative Company), as well as analyse a company's directors and shareholders, without the customer leaving the reporting entity’s website.

Depending on the company structure, an analysis can be complex and can take several minutes to complete. For this reason the analysis is an asynchronous process. The request is sent in one request and the results are retreived in a separate request.

Entities

Path /tree/entities/ Method GET

Search for entities. There are various types of entities, such as a NZ Limited Company, NZ Unlimited Company, NZ Co-operative Company, etc.

Parameter Required Description
key true

Your API Key.

signature true

An HMAC SHA-256 signature of request data for call validation. See details on generating a request signature.

nonce true

A single-use key generated for this request. Note that each nonce may only be used once for each access key.

timestamp true

The system timestamp when the request was created in milliseconds since the Epoch (timezone independent). Note Unix time is in seconds and will need to be multiplied by 1000. Requests with old timestamps will be rejected.

searchTerm true

The entity that you are searching for. A maximum of 50 entities are returned by this API so make it as specific as possible.

entityStatus false

Comma-separated list of entity status that you are interested in. Possible values are: Registered, InLiquidation, VoluntaryAdministration, InReceivership, InStatutoryAdministration, Inactive, Removed and Closed. The default is Registered.

Response

Example

Request

Path /tree/request/ Method POST

Request an Cloudcheck KYB analysis on a company. The analysis is an asynchronous process. This request returns a token that is used to lookup the result at a later time.

Parameter Required Description
key true

Your API Key.

signature true

An HMAC SHA-256 signature of request data for call validation. See details on generating a request signature.

nonce true

A single-use key generated for this request. Note that each nonce may only be used once for each access key.

timestamp true

The system timestamp when the request was created in milliseconds since the Epoch (timezone independent). Note Unix time is in seconds and will need to be multiplied by 1000. Requests with old timestamps will be rejected.

data true

A JSON string containing the company to be analysed.

Request

The company to be analysed must be supplied as a JSON object, included in the POST as the data parameter. All the request parameters need to be included in the signature generation, and the request signed with the private key provided to you. The company name and NZBN were returned in the Entities response.

Please note all these parameters must be posted as URL encoded form data. As such, the request should contain a Content-Type header of application/x-www-form-urlencoded.

The callbackUrl is optional but highly recommended and should be set to a URL on your servers. The KYB analysis is an asynchronous process. When a KYB request is made a response is returned immediately, however this response does not contain the results of the analysis. When the analysis completes Cloudcheck makes an HTTP GET call to the callbackUrl. This call contains information that identifies the request. Your code should then call the result API to fetch the KYB result. Include the protocol at the start of the URL (https:// or http://).

Example

Response

Example

Result

Path /tree/result/ Method GET

Fetch the results of the analysis. Depending on the complexity of the company being analysed, the response may not be available for several minutes. You may need to call this API more than once if the status comes back as PENDING. Please wait at least 5 seconds between calls in this scenario.

Parameter Required Description
key true

Your API Key.

signature true

An HMAC SHA-256 signature of request data for call validation. See details on generating a request signature.

nonce true

A single-use key generated for this request. Note that each nonce may only be used once for each access key.

timestamp true

The system timestamp when the request was created in milliseconds since the Epoch (timezone independent). Note Unix time is in seconds and will need to be multiplied by 1000. Requests with old timestamps will be rejected.

token true

A token used to retrieve results that was passed back in the analysis request.

Response

Example

Result PDF

Path /tree/result/pdf/ Method GET

Once analysis is complete, you can optionally download a Cloudcheck KYB generated PDF of the results.

Parameter Required Description
key true

Your API Key.

signature true

An HMAC SHA-256 signature of request data for call validation. See details on generating a request signature.

nonce true

A single-use key generated for this request. Note that each nonce may only be used once for each access key.

timestamp true

The system timestamp when the request was created in milliseconds since the Epoch (timezone independent). Note Unix time is in seconds and will need to be multiplied by 1000. Requests with old timestamps will be rejected.

token true

A token used to retrieve results that was passed back in the analysis request.

Response

This method will either return a PDF file or a JSON object with an error message. You should check the response Content-Type to determine which you have received.