HOME / COMMUNITY Switch to knowledge base

Creating Clients with API

#1

I’m having trouble working with the api as the documentation doesn’t have complete examples. The first thing I need to do is create a client, I clicked on the try it out button in the api docs and the example doesn’t work when I click execute.

This is the example form data

“status=UNVERIFIED&auto_import_pscs=False&name=TEST COMPANY&type=ltd-by-shares&company_number=01234567&reference=ABC123&risk_level=low&first_name=example”

and the response is

{
  "code": 400,
  "error": {
    "type": "request_error",
    "message": "Request data is invalid",
    "data": [
      {
        "field": "status",
        "message": "The status field is required."
      },
      {
        "field": "trading_address",
        "message": "A trading_address > country_code must be supplied"
      }
    ]
  }
}

I dont know where to begin as the status field is there. A full valid example of creating a customer would be helpful.

#2

I’ve managed to get this working, heres the postman setting incase it helps anyone else

#3

Hi @mark

Apologies for the delayed response with this one.

We’ll certainly take the feedback on board regarding the API docs and will discuss this internally for ways to improve it.

I’m also glad to hear you managed to get this working now.

Out of curiosity, are you just playing around with Postman for the moment, or are you looking to implement this into a project? We may be able to provide an SDK to help with this, depending on the coding language you’re using.

#4

I’m just evaluating your solution at the moment, I’m integrating it into a c# web application. I think I’ve managed to get everything working now but it was a bit difficult without full examples as I wasn’t sure exactly what was supposed to be in the posts.

I sent you an email asking now to send the KYC request to a user but I noticed it now under the clients end points. The only thing I haven’t been able to do in the api so far is see if a client is a PEP or on the sanction list, presumably you haven’t implemented this yet in the API if I’m wrong I’d be interested to know exactly where that is.

#5

Hi Mark,

The examples supplied in the API docs are limited as you say. That said for each method you should be able to examine the entire model which describes all mandatory and optional fields along with their respective types.

We developed a C# app internally that we’re actively using to handle AML for our sister company (A Company Formation Agency). If you get stuck with anything specific just let me know.

#6

Unfortunately this isn’t available at the moment, but we can certainly see about adding this in the future.

I’ll see if we can get a workable library for you to use for C# to try and make things a bit easier.

#7

OK, thanks for all the help. I appreciate it

1 Like