Create an entity
Note on API URL
The example below is setup for the demo environment. For prod and other environments you will need to change the URL.
#!/bin/bash
CUSTOMER_ID="your customer id"
API_KEY="your api key"
curl --request POST \
--url https://api.demo.frankiefinancial.io/compliance/v1.2/entity \
--header "Accept: application/json" \
--header "X-Frankie-CustomerID: $CUSTOMER_ID" \
--header "api_key: $API_KEY" \
--header "Content-Type: application/json" \
--data '
{
"entity": {
"addresses": [
{
"country": "AUS"
}
],
"dateOfBirth": {
"dateOfBirth": "1999-11-12",
"country": "AUS"
},
"gender": "F",
"name": {
"familyName": "TESTTWELVE",
"middleName": "H",
"givenName": "JUDY",
"displayName" : "JUDY H TESTTWELVE"
}
}
}'
package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.demo.frankiefinancial.io/compliance/v1.2/entity"
customerID := "your customer id"
apiKey := "your api key"
var jsonStr = []byte(`{
"entity": {
"addresses": [
{
"country": "AUS"
}
],
"dateOfBirth": {
"dateOfBirth": "1999-11-12",
"country": "AUS"
},
"gender": "F",
"name": {
"familyName": "TESTTWELVE",
"middleName": "H",
"givenName": "JUDY",
"displayName" : "JUDY H TESTTWELVE"
}
}
}`)
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")
req.Header.Set("X-Frankie-CustomerID", customerID)
req.Header.Set("api_key", apiKey)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("response Status:", resp.Status)
fmt.Println("response Headers:", resp.Header)
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println("response Body:", string(body))
}
const https = require("https");
const customerID = "your customer id";
const apiKey = "your api key";
const payload = JSON.stringify({
entity: {
addresses: [
{
country: "AUS",
},
],
dateOfBirth: {
dateOfBirth: "1999-11-12",
country: "AUS",
},
gender: "F",
name: {
familyName: "TESTTWELVE",
middleName: "H",
givenName: "JUDY",
displayName: "JUDY H TESTTWELVE",
},
},
});
const options = {
hostname: "api.demo.frankiefinancial.io",
port: 443,
path: "/compliance/v1.2/entity",
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
"X-Frankie-CustomerID": customerID,
api_key: apiKey,
},
};
const req = https.request(options, (res) => {
console.log(`statusCode: ${res.statusCode}`);
res.on("data", (d) => {
process.stdout.write(d);
});
});
req.on("error", (error) => {
console.error(error);
});
req.write(payload);
req.end();
import requests
import json
url = "https://api.demo.frankiefinancial.io/compliance/v1.2/entity"
customerID = "your customer id"
apiKey = "your api key"
headers = {
"Content-Type": "application/json; charset=utf-8",
"Accept": "application/json",
"X-Frankie-CustomerID": customerID,
"api_key": apiKey
}
data = {
"entity": {
"addresses": [
{
"country": "AUS",
},
],
"dateOfBirth": {
"dateOfBirth": "1999-11-12",
"country": "AUS",
},
"gender": "F",
"name": {
"familyName": "TESTTWELVE",
"middleName": "H",
"givenName": "JUDY",
"displayName": "JUDY H TESTTWELVE",
},
},
}
response = requests.post(url, headers=headers, json=data)
print("Status Code", response.status_code)
print("JSON Response ", response.json())
Updated 11 days ago
Did this page help you?