Create Customer
POSThttps://api.cleverhub.co/api/v2/customers
Request
- application/json
Body
Customer's email
Customer's first name
Customer's last name
Customer's middle name
Customer date of birth format 'yyyy-mm-dd'
Customer's phone
+61-412345678
Customer's Gender
Possible values: [male
, female
, other
]
male
The primary name of an address's street.
The secondary name of an address's street.
Name of an address's city or town.
The address's postcode
The address's state / province / country. When country is US, CA, or AU, this field is required and must be a valid state/province code for that country (e.g., CA for California, NSW for New South Wales, ON for Ontario).
ISO 3166-1 alpha-2 country code.
Customer type. Allowed values: individual
, organization
. If provided, must be one of the valid types.
Possible values: [individual
, organization
]
organization
Registration number. Required when type
is organization
.
10242424
identity objectrequired
Responses
- 200
- 400
- 401
- 422
Created
- application/json
- Schema
- Example (auto)
- Example
Schema
{
"uuid": "string",
"email": "string"
}
{
"uuid": "customer_clever12234",
"email": "JohnDoe@mail.com"
}
Bad Request
Unauthorized
- application/json
- Schema
- Example (auto)
- Example
Schema
errors object
{
"errors": {
"code": "string",
"message": "string"
}
}
{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}
Unprocessable Entity
- application/json
- Schema
- Example (auto)
- Example
Schema
errors object
{
"errors": {
"amount": "string"
}
}
{
"errors": {
"amount": "can't be blank"
}
}
Authorization: app-id
name: app-idtype: apiKeydescription: The app-id is registered and secured inside Hello Clever system and only required when client has initiated or in the middle of the transaction.in: header
name: secret-keytype: apiKeydescription: The secret-key is our client's secret of the source. Required if a publishable key is used to retrieve the source.in: header
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.cleverhub.co/api/v2/customers");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var content = new StringContent("{\n \"email\": \"string\",\n \"first_name\": \"string\",\n \"last_name\": \"string\",\n \"middle_name\": \"string\",\n \"dob\": \"2024-04-16\",\n \"gender\": \"male\",\n \"phone\": \"+61-1234523\",\n \"street\": \"string\",\n \"street2\": \"string\",\n \"city\": \"string\",\n \"postal_code\": \"string\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"type\": \"organization\",\n \"reg_no\": \"10242424\",\n \"identity\": {\n \"issue_country\": \"US\",\n \"document_number\": \"string\",\n \"issue_date\": \"2024-04-16\",\n \"expiry_date\": \"2024-04-16\",\n \"id_doc_type\": \"Passport\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());