Add or update relationships for an organization
curl --request PUT \
--url https://api.uat.frankie.one/v2/organizations/{entityId}/relationships \
--header 'Content-Type: application/json' \
--header 'X-Frankie-CustomerID: <x-frankie-customerid>' \
--header 'api_key: <api-key>' \
--data '
{
"entityRelationships": [
{
"entity": {
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"relationships": [
{
"type": "OFFICIAL",
"role": {
"code": "DR",
"description": "Director"
}
}
]
}
]
}
'import requests
url = "https://api.uat.frankie.one/v2/organizations/{entityId}/relationships"
payload = { "entityRelationships": [
{
"entity": { "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" },
"relationships": [
{
"type": "OFFICIAL",
"role": {
"code": "DR",
"description": "Director"
}
}
]
}
] }
headers = {
"api_key": "<api-key>",
"X-Frankie-CustomerID": "<x-frankie-customerid>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
api_key: '<api-key>',
'X-Frankie-CustomerID': '<x-frankie-customerid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
entityRelationships: [
{
entity: {entityId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'},
relationships: [{type: 'OFFICIAL', role: {code: 'DR', description: 'Director'}}]
}
]
})
};
fetch('https://api.uat.frankie.one/v2/organizations/{entityId}/relationships', 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.uat.frankie.one/v2/organizations/{entityId}/relationships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'entityRelationships' => [
[
'entity' => [
'entityId' => '3fa85f64-5717-4562-b3fc-2c963f66afa6'
],
'relationships' => [
[
'type' => 'OFFICIAL',
'role' => [
'code' => 'DR',
'description' => 'Director'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Frankie-CustomerID: <x-frankie-customerid>",
"api_key: <api-key>"
],
]);
$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.uat.frankie.one/v2/organizations/{entityId}/relationships"
payload := strings.NewReader("{\n \"entityRelationships\": [\n {\n \"entity\": {\n \"entityId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n },\n \"relationships\": [\n {\n \"type\": \"OFFICIAL\",\n \"role\": {\n \"code\": \"DR\",\n \"description\": \"Director\"\n }\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("X-Frankie-CustomerID", "<x-frankie-customerid>")
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.put("https://api.uat.frankie.one/v2/organizations/{entityId}/relationships")
.header("api_key", "<api-key>")
.header("X-Frankie-CustomerID", "<x-frankie-customerid>")
.header("Content-Type", "application/json")
.body("{\n \"entityRelationships\": [\n {\n \"entity\": {\n \"entityId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n },\n \"relationships\": [\n {\n \"type\": \"OFFICIAL\",\n \"role\": {\n \"code\": \"DR\",\n \"description\": \"Director\"\n }\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uat.frankie.one/v2/organizations/{entityId}/relationships")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api_key"] = '<api-key>'
request["X-Frankie-CustomerID"] = '<x-frankie-customerid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityRelationships\": [\n {\n \"entity\": {\n \"entityId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n },\n \"relationships\": [\n {\n \"type\": \"OFFICIAL\",\n \"role\": {\n \"code\": \"DR\",\n \"description\": \"Director\"\n }\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85",
"entityRelationships": [
{
"entity": {
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityType": "INDIVIDUAL"
},
"relationships": [
{
"type": "OFFICIAL",
"role": {
"code": "DR",
"description": "Director"
},
"sourceId": "<string>"
}
]
}
]
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}Organization Relationships
Add or update relationships for an organization
Add or update a list of entity relationships for an organization. This will not modify any relationships (ie officials) from other (non-manual) sources. Relationships added with this operation can only be updated the same way.
PUT
/
v2
/
organizations
/
{entityId}
/
relationships
Add or update relationships for an organization
curl --request PUT \
--url https://api.uat.frankie.one/v2/organizations/{entityId}/relationships \
--header 'Content-Type: application/json' \
--header 'X-Frankie-CustomerID: <x-frankie-customerid>' \
--header 'api_key: <api-key>' \
--data '
{
"entityRelationships": [
{
"entity": {
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"relationships": [
{
"type": "OFFICIAL",
"role": {
"code": "DR",
"description": "Director"
}
}
]
}
]
}
'import requests
url = "https://api.uat.frankie.one/v2/organizations/{entityId}/relationships"
payload = { "entityRelationships": [
{
"entity": { "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" },
"relationships": [
{
"type": "OFFICIAL",
"role": {
"code": "DR",
"description": "Director"
}
}
]
}
] }
headers = {
"api_key": "<api-key>",
"X-Frankie-CustomerID": "<x-frankie-customerid>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
api_key: '<api-key>',
'X-Frankie-CustomerID': '<x-frankie-customerid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
entityRelationships: [
{
entity: {entityId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'},
relationships: [{type: 'OFFICIAL', role: {code: 'DR', description: 'Director'}}]
}
]
})
};
fetch('https://api.uat.frankie.one/v2/organizations/{entityId}/relationships', 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.uat.frankie.one/v2/organizations/{entityId}/relationships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'entityRelationships' => [
[
'entity' => [
'entityId' => '3fa85f64-5717-4562-b3fc-2c963f66afa6'
],
'relationships' => [
[
'type' => 'OFFICIAL',
'role' => [
'code' => 'DR',
'description' => 'Director'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Frankie-CustomerID: <x-frankie-customerid>",
"api_key: <api-key>"
],
]);
$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.uat.frankie.one/v2/organizations/{entityId}/relationships"
payload := strings.NewReader("{\n \"entityRelationships\": [\n {\n \"entity\": {\n \"entityId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n },\n \"relationships\": [\n {\n \"type\": \"OFFICIAL\",\n \"role\": {\n \"code\": \"DR\",\n \"description\": \"Director\"\n }\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("X-Frankie-CustomerID", "<x-frankie-customerid>")
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.put("https://api.uat.frankie.one/v2/organizations/{entityId}/relationships")
.header("api_key", "<api-key>")
.header("X-Frankie-CustomerID", "<x-frankie-customerid>")
.header("Content-Type", "application/json")
.body("{\n \"entityRelationships\": [\n {\n \"entity\": {\n \"entityId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n },\n \"relationships\": [\n {\n \"type\": \"OFFICIAL\",\n \"role\": {\n \"code\": \"DR\",\n \"description\": \"Director\"\n }\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uat.frankie.one/v2/organizations/{entityId}/relationships")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api_key"] = '<api-key>'
request["X-Frankie-CustomerID"] = '<x-frankie-customerid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityRelationships\": [\n {\n \"entity\": {\n \"entityId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n },\n \"relationships\": [\n {\n \"type\": \"OFFICIAL\",\n \"role\": {\n \"code\": \"DR\",\n \"description\": \"Director\"\n }\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85",
"entityRelationships": [
{
"entity": {
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityType": "INDIVIDUAL"
},
"relationships": [
{
"type": "OFFICIAL",
"role": {
"code": "DR",
"description": "Director"
},
"sourceId": "<string>"
}
]
}
]
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}{
"errorCode": "<string>",
"errorMsg": "<string>",
"details": [
{
"issue": "<string>",
"issueLocation": "<string>",
"issueType": "<string>"
}
],
"requestId": "01HN9XHZN6MGXM9JXG50K59Q85"
}Headers
Open string that can be used to define the "channel" the request comes in from. It can potentially be used in routing and risk calculations upon request. Default values that can be used are: api portal smartui Any alphanumeric string is supported though. Anything over 64 characters will be truncated.
Body
application/json
List of entities and their relationships with an organization
Was this page helpful?