Post Customer Information
curl --request POST \
--url https://api.sandbox.sardine.ai/v1/customers \
--header 'Content-Type: application/json' \
--data '
{
"flow": "login, onboarding,kyc-ssn",
"sessionKey": "555fdc5c-8694-4345-b724-14454f320484",
"customer": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"taxId": "778131234",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-08-15",
"address": {
"street1": "1 Main St",
"city": "Okhlahoma",
"regionCode": "OK",
"postalCode": "70438",
"countryCode": "US"
},
"transaction": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAtMillis": 1616822241000,
"amount": 1000,
"itemCategory": "crypto",
"actionType": "buy",
"currencyCode": "USD",
"paymentMethod": {
"type": "crypto",
"bank": {
"accountNumber": "123456789",
"routingNumber": "1298751331",
"accountType": "checking",
"balance": 1000,
"balanceCurrencyCode": "USD"
}
}
},
"emailAddress": "user@example.com",
"isEmailVerified": true,
"phone": "+17342321234",
"isPhoneVerified": true,
"createdAtMills": 0,
"personalInfo": [
{
"source": "id_verification",
"firstName": "John",
"lastName": "Doe",
"address": {
"street1": "1 Main St",
"city": "Okhlahoma",
"regionCode": "OK",
"postalCode": "70438",
"countryCode": "US"
},
"dateOfBirth": "1980-07-15"
}
]
}
}
'import requests
url = "https://api.sandbox.sardine.ai/v1/customers"
payload = {
"flow": "login, onboarding,kyc-ssn",
"sessionKey": "555fdc5c-8694-4345-b724-14454f320484",
"customer": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"taxId": "778131234",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-08-15",
"address": {
"street1": "1 Main St",
"city": "Okhlahoma",
"regionCode": "OK",
"postalCode": "70438",
"countryCode": "US"
},
"transaction": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAtMillis": 1616822241000,
"amount": 1000,
"itemCategory": "crypto",
"actionType": "buy",
"currencyCode": "USD",
"paymentMethod": {
"type": "crypto",
"bank": {
"accountNumber": "123456789",
"routingNumber": "1298751331",
"accountType": "checking",
"balance": 1000,
"balanceCurrencyCode": "USD"
}
}
},
"emailAddress": "user@example.com",
"isEmailVerified": True,
"phone": "+17342321234",
"isPhoneVerified": True,
"createdAtMills": 0,
"personalInfo": [
{
"source": "id_verification",
"firstName": "John",
"lastName": "Doe",
"address": {
"street1": "1 Main St",
"city": "Okhlahoma",
"regionCode": "OK",
"postalCode": "70438",
"countryCode": "US"
},
"dateOfBirth": "1980-07-15"
}
]
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
flow: 'login, onboarding,kyc-ssn',
sessionKey: '555fdc5c-8694-4345-b724-14454f320484',
customer: {
id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
taxId: '778131234',
firstName: 'John',
lastName: 'Doe',
dateOfBirth: '1990-08-15',
address: {
street1: '1 Main St',
city: 'Okhlahoma',
regionCode: 'OK',
postalCode: '70438',
countryCode: 'US'
},
transaction: {
id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
createdAtMillis: 1616822241000,
amount: 1000,
itemCategory: 'crypto',
actionType: 'buy',
currencyCode: 'USD',
paymentMethod: {
type: 'crypto',
bank: {
accountNumber: '123456789',
routingNumber: '1298751331',
accountType: 'checking',
balance: 1000,
balanceCurrencyCode: 'USD'
}
}
},
emailAddress: 'user@example.com',
isEmailVerified: true,
phone: '+17342321234',
isPhoneVerified: true,
createdAtMills: 0,
personalInfo: [
{
source: 'id_verification',
firstName: 'John',
lastName: 'Doe',
address: {
street1: '1 Main St',
city: 'Okhlahoma',
regionCode: 'OK',
postalCode: '70438',
countryCode: 'US'
},
dateOfBirth: '1980-07-15'
}
]
}
})
};
fetch('https://api.sandbox.sardine.ai/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.sardine.ai/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flow' => 'login, onboarding,kyc-ssn',
'sessionKey' => '555fdc5c-8694-4345-b724-14454f320484',
'customer' => [
'id' => '497f6eca-6276-4993-bfeb-53cbbbba6f08',
'taxId' => '778131234',
'firstName' => 'John',
'lastName' => 'Doe',
'dateOfBirth' => '1990-08-15',
'address' => [
'street1' => '1 Main St',
'city' => 'Okhlahoma',
'regionCode' => 'OK',
'postalCode' => '70438',
'countryCode' => 'US'
],
'transaction' => [
'id' => '497f6eca-6276-4993-bfeb-53cbbbba6f08',
'createdAtMillis' => 1616822241000,
'amount' => 1000,
'itemCategory' => 'crypto',
'actionType' => 'buy',
'currencyCode' => 'USD',
'paymentMethod' => [
'type' => 'crypto',
'bank' => [
'accountNumber' => '123456789',
'routingNumber' => '1298751331',
'accountType' => 'checking',
'balance' => 1000,
'balanceCurrencyCode' => 'USD'
]
]
],
'emailAddress' => 'user@example.com',
'isEmailVerified' => true,
'phone' => '+17342321234',
'isPhoneVerified' => true,
'createdAtMills' => 0,
'personalInfo' => [
[
'source' => 'id_verification',
'firstName' => 'John',
'lastName' => 'Doe',
'address' => [
'street1' => '1 Main St',
'city' => 'Okhlahoma',
'regionCode' => 'OK',
'postalCode' => '70438',
'countryCode' => 'US'
],
'dateOfBirth' => '1980-07-15'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.sardine.ai/v1/customers"
payload := strings.NewReader("{\n \"flow\": \"login, onboarding,kyc-ssn\",\n \"sessionKey\": \"555fdc5c-8694-4345-b724-14454f320484\",\n \"customer\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"taxId\": \"778131234\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-08-15\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"transaction\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"createdAtMillis\": 1616822241000,\n \"amount\": 1000,\n \"itemCategory\": \"crypto\",\n \"actionType\": \"buy\",\n \"currencyCode\": \"USD\",\n \"paymentMethod\": {\n \"type\": \"crypto\",\n \"bank\": {\n \"accountNumber\": \"123456789\",\n \"routingNumber\": \"1298751331\",\n \"accountType\": \"checking\",\n \"balance\": 1000,\n \"balanceCurrencyCode\": \"USD\"\n }\n }\n },\n \"emailAddress\": \"user@example.com\",\n \"isEmailVerified\": true,\n \"phone\": \"+17342321234\",\n \"isPhoneVerified\": true,\n \"createdAtMills\": 0,\n \"personalInfo\": [\n {\n \"source\": \"id_verification\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"dateOfBirth\": \"1980-07-15\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.sardine.ai/v1/customers")
.header("Content-Type", "application/json")
.body("{\n \"flow\": \"login, onboarding,kyc-ssn\",\n \"sessionKey\": \"555fdc5c-8694-4345-b724-14454f320484\",\n \"customer\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"taxId\": \"778131234\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-08-15\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"transaction\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"createdAtMillis\": 1616822241000,\n \"amount\": 1000,\n \"itemCategory\": \"crypto\",\n \"actionType\": \"buy\",\n \"currencyCode\": \"USD\",\n \"paymentMethod\": {\n \"type\": \"crypto\",\n \"bank\": {\n \"accountNumber\": \"123456789\",\n \"routingNumber\": \"1298751331\",\n \"accountType\": \"checking\",\n \"balance\": 1000,\n \"balanceCurrencyCode\": \"USD\"\n }\n }\n },\n \"emailAddress\": \"user@example.com\",\n \"isEmailVerified\": true,\n \"phone\": \"+17342321234\",\n \"isPhoneVerified\": true,\n \"createdAtMills\": 0,\n \"personalInfo\": [\n {\n \"source\": \"id_verification\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"dateOfBirth\": \"1980-07-15\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.sardine.ai/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"flow\": \"login, onboarding,kyc-ssn\",\n \"sessionKey\": \"555fdc5c-8694-4345-b724-14454f320484\",\n \"customer\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"taxId\": \"778131234\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-08-15\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"transaction\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"createdAtMillis\": 1616822241000,\n \"amount\": 1000,\n \"itemCategory\": \"crypto\",\n \"actionType\": \"buy\",\n \"currencyCode\": \"USD\",\n \"paymentMethod\": {\n \"type\": \"crypto\",\n \"bank\": {\n \"accountNumber\": \"123456789\",\n \"routingNumber\": \"1298751331\",\n \"accountType\": \"checking\",\n \"balance\": 1000,\n \"balanceCurrencyCode\": \"USD\"\n }\n }\n },\n \"emailAddress\": \"user@example.com\",\n \"isEmailVerified\": true,\n \"phone\": \"+17342321234\",\n \"isPhoneVerified\": true,\n \"createdAtMills\": 0,\n \"personalInfo\": [\n {\n \"source\": \"id_verification\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"dateOfBirth\": \"1980-07-15\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"sessionKey": "string",
"level": "string",
"status": "string",
"customer": {
"score": 0,
"level": "string",
"signals": [
{
"key": "string",
"value": "string"
}
]
},
"transaction": {
"level": "string",
"amlLevel": "string",
"indemnification": {
"decision": "string",
"instantLimit": 0,
"holdAmount": 0,
"verificationCode": "string"
}
},
"checkpoints": {
"customer": {
"customerPurchaseLevel": {
"value": "string",
"ruleIds": [
{}
]
},
"emailLevel": {
"value": "string",
"ruleIds": [
{}
]
},
"historicalLevel": {
"value": "string",
"ruleIds": [
{}
]
},
"riskLevel": {
"value": "string",
"ruleIds": [
{}
]
}
}
}
}Customers
Post Customer Information
Send User information to Sardine to store theie information and create a risk profile
POST
/
customers
Post Customer Information
curl --request POST \
--url https://api.sandbox.sardine.ai/v1/customers \
--header 'Content-Type: application/json' \
--data '
{
"flow": "login, onboarding,kyc-ssn",
"sessionKey": "555fdc5c-8694-4345-b724-14454f320484",
"customer": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"taxId": "778131234",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-08-15",
"address": {
"street1": "1 Main St",
"city": "Okhlahoma",
"regionCode": "OK",
"postalCode": "70438",
"countryCode": "US"
},
"transaction": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAtMillis": 1616822241000,
"amount": 1000,
"itemCategory": "crypto",
"actionType": "buy",
"currencyCode": "USD",
"paymentMethod": {
"type": "crypto",
"bank": {
"accountNumber": "123456789",
"routingNumber": "1298751331",
"accountType": "checking",
"balance": 1000,
"balanceCurrencyCode": "USD"
}
}
},
"emailAddress": "user@example.com",
"isEmailVerified": true,
"phone": "+17342321234",
"isPhoneVerified": true,
"createdAtMills": 0,
"personalInfo": [
{
"source": "id_verification",
"firstName": "John",
"lastName": "Doe",
"address": {
"street1": "1 Main St",
"city": "Okhlahoma",
"regionCode": "OK",
"postalCode": "70438",
"countryCode": "US"
},
"dateOfBirth": "1980-07-15"
}
]
}
}
'import requests
url = "https://api.sandbox.sardine.ai/v1/customers"
payload = {
"flow": "login, onboarding,kyc-ssn",
"sessionKey": "555fdc5c-8694-4345-b724-14454f320484",
"customer": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"taxId": "778131234",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-08-15",
"address": {
"street1": "1 Main St",
"city": "Okhlahoma",
"regionCode": "OK",
"postalCode": "70438",
"countryCode": "US"
},
"transaction": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAtMillis": 1616822241000,
"amount": 1000,
"itemCategory": "crypto",
"actionType": "buy",
"currencyCode": "USD",
"paymentMethod": {
"type": "crypto",
"bank": {
"accountNumber": "123456789",
"routingNumber": "1298751331",
"accountType": "checking",
"balance": 1000,
"balanceCurrencyCode": "USD"
}
}
},
"emailAddress": "user@example.com",
"isEmailVerified": True,
"phone": "+17342321234",
"isPhoneVerified": True,
"createdAtMills": 0,
"personalInfo": [
{
"source": "id_verification",
"firstName": "John",
"lastName": "Doe",
"address": {
"street1": "1 Main St",
"city": "Okhlahoma",
"regionCode": "OK",
"postalCode": "70438",
"countryCode": "US"
},
"dateOfBirth": "1980-07-15"
}
]
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
flow: 'login, onboarding,kyc-ssn',
sessionKey: '555fdc5c-8694-4345-b724-14454f320484',
customer: {
id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
taxId: '778131234',
firstName: 'John',
lastName: 'Doe',
dateOfBirth: '1990-08-15',
address: {
street1: '1 Main St',
city: 'Okhlahoma',
regionCode: 'OK',
postalCode: '70438',
countryCode: 'US'
},
transaction: {
id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
createdAtMillis: 1616822241000,
amount: 1000,
itemCategory: 'crypto',
actionType: 'buy',
currencyCode: 'USD',
paymentMethod: {
type: 'crypto',
bank: {
accountNumber: '123456789',
routingNumber: '1298751331',
accountType: 'checking',
balance: 1000,
balanceCurrencyCode: 'USD'
}
}
},
emailAddress: 'user@example.com',
isEmailVerified: true,
phone: '+17342321234',
isPhoneVerified: true,
createdAtMills: 0,
personalInfo: [
{
source: 'id_verification',
firstName: 'John',
lastName: 'Doe',
address: {
street1: '1 Main St',
city: 'Okhlahoma',
regionCode: 'OK',
postalCode: '70438',
countryCode: 'US'
},
dateOfBirth: '1980-07-15'
}
]
}
})
};
fetch('https://api.sandbox.sardine.ai/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.sardine.ai/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flow' => 'login, onboarding,kyc-ssn',
'sessionKey' => '555fdc5c-8694-4345-b724-14454f320484',
'customer' => [
'id' => '497f6eca-6276-4993-bfeb-53cbbbba6f08',
'taxId' => '778131234',
'firstName' => 'John',
'lastName' => 'Doe',
'dateOfBirth' => '1990-08-15',
'address' => [
'street1' => '1 Main St',
'city' => 'Okhlahoma',
'regionCode' => 'OK',
'postalCode' => '70438',
'countryCode' => 'US'
],
'transaction' => [
'id' => '497f6eca-6276-4993-bfeb-53cbbbba6f08',
'createdAtMillis' => 1616822241000,
'amount' => 1000,
'itemCategory' => 'crypto',
'actionType' => 'buy',
'currencyCode' => 'USD',
'paymentMethod' => [
'type' => 'crypto',
'bank' => [
'accountNumber' => '123456789',
'routingNumber' => '1298751331',
'accountType' => 'checking',
'balance' => 1000,
'balanceCurrencyCode' => 'USD'
]
]
],
'emailAddress' => 'user@example.com',
'isEmailVerified' => true,
'phone' => '+17342321234',
'isPhoneVerified' => true,
'createdAtMills' => 0,
'personalInfo' => [
[
'source' => 'id_verification',
'firstName' => 'John',
'lastName' => 'Doe',
'address' => [
'street1' => '1 Main St',
'city' => 'Okhlahoma',
'regionCode' => 'OK',
'postalCode' => '70438',
'countryCode' => 'US'
],
'dateOfBirth' => '1980-07-15'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.sardine.ai/v1/customers"
payload := strings.NewReader("{\n \"flow\": \"login, onboarding,kyc-ssn\",\n \"sessionKey\": \"555fdc5c-8694-4345-b724-14454f320484\",\n \"customer\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"taxId\": \"778131234\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-08-15\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"transaction\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"createdAtMillis\": 1616822241000,\n \"amount\": 1000,\n \"itemCategory\": \"crypto\",\n \"actionType\": \"buy\",\n \"currencyCode\": \"USD\",\n \"paymentMethod\": {\n \"type\": \"crypto\",\n \"bank\": {\n \"accountNumber\": \"123456789\",\n \"routingNumber\": \"1298751331\",\n \"accountType\": \"checking\",\n \"balance\": 1000,\n \"balanceCurrencyCode\": \"USD\"\n }\n }\n },\n \"emailAddress\": \"user@example.com\",\n \"isEmailVerified\": true,\n \"phone\": \"+17342321234\",\n \"isPhoneVerified\": true,\n \"createdAtMills\": 0,\n \"personalInfo\": [\n {\n \"source\": \"id_verification\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"dateOfBirth\": \"1980-07-15\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.sardine.ai/v1/customers")
.header("Content-Type", "application/json")
.body("{\n \"flow\": \"login, onboarding,kyc-ssn\",\n \"sessionKey\": \"555fdc5c-8694-4345-b724-14454f320484\",\n \"customer\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"taxId\": \"778131234\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-08-15\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"transaction\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"createdAtMillis\": 1616822241000,\n \"amount\": 1000,\n \"itemCategory\": \"crypto\",\n \"actionType\": \"buy\",\n \"currencyCode\": \"USD\",\n \"paymentMethod\": {\n \"type\": \"crypto\",\n \"bank\": {\n \"accountNumber\": \"123456789\",\n \"routingNumber\": \"1298751331\",\n \"accountType\": \"checking\",\n \"balance\": 1000,\n \"balanceCurrencyCode\": \"USD\"\n }\n }\n },\n \"emailAddress\": \"user@example.com\",\n \"isEmailVerified\": true,\n \"phone\": \"+17342321234\",\n \"isPhoneVerified\": true,\n \"createdAtMills\": 0,\n \"personalInfo\": [\n {\n \"source\": \"id_verification\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"dateOfBirth\": \"1980-07-15\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.sardine.ai/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"flow\": \"login, onboarding,kyc-ssn\",\n \"sessionKey\": \"555fdc5c-8694-4345-b724-14454f320484\",\n \"customer\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"taxId\": \"778131234\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-08-15\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"transaction\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"createdAtMillis\": 1616822241000,\n \"amount\": 1000,\n \"itemCategory\": \"crypto\",\n \"actionType\": \"buy\",\n \"currencyCode\": \"USD\",\n \"paymentMethod\": {\n \"type\": \"crypto\",\n \"bank\": {\n \"accountNumber\": \"123456789\",\n \"routingNumber\": \"1298751331\",\n \"accountType\": \"checking\",\n \"balance\": 1000,\n \"balanceCurrencyCode\": \"USD\"\n }\n }\n },\n \"emailAddress\": \"user@example.com\",\n \"isEmailVerified\": true,\n \"phone\": \"+17342321234\",\n \"isPhoneVerified\": true,\n \"createdAtMills\": 0,\n \"personalInfo\": [\n {\n \"source\": \"id_verification\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"address\": {\n \"street1\": \"1 Main St\",\n \"city\": \"Okhlahoma\",\n \"regionCode\": \"OK\",\n \"postalCode\": \"70438\",\n \"countryCode\": \"US\"\n },\n \"dateOfBirth\": \"1980-07-15\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"sessionKey": "string",
"level": "string",
"status": "string",
"customer": {
"score": 0,
"level": "string",
"signals": [
{
"key": "string",
"value": "string"
}
]
},
"transaction": {
"level": "string",
"amlLevel": "string",
"indemnification": {
"decision": "string",
"instantLimit": 0,
"holdAmount": 0,
"verificationCode": "string"
}
},
"checkpoints": {
"customer": {
"customerPurchaseLevel": {
"value": "string",
"ruleIds": [
{}
]
},
"emailLevel": {
"value": "string",
"ruleIds": [
{}
]
},
"historicalLevel": {
"value": "string",
"ruleIds": [
{}
]
},
"riskLevel": {
"value": "string",
"ruleIds": [
{}
]
}
}
}
}Body
application/json
Response
200 - application/json
OK
Minimum string length:
1Example:
"280CBF35-B4B0-4193-A111"
This is the ONLY field that a merchant needs to use to make decision on fraud. This field is set by our rules and the main rule is the rule using our "customer score" model.
Available options:
low, medium, high, very_high Minimum string length:
1Available options:
Success, Failure Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I