Skip to main content
POST
/
_api
/
accounts
/
{accountId}
/
benefiting-persons
Create benefiting person
curl --request POST \
  --url https://dev.go.simplytokenized.com/_api/accounts/{accountId}/benefiting-persons \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "firstname": "<string>",
  "lastname": "<string>",
  "street": "<string>",
  "zip": "<string>",
  "state": "<string>",
  "city": "<string>",
  "country": "<string>"
}
'
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstname: '<string>',
lastname: '<string>',
street: '<string>',
zip: '<string>',
state: '<string>',
city: '<string>',
country: '<string>'
})
};

fetch('https://dev.go.simplytokenized.com/_api/accounts/{accountId}/benefiting-persons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://dev.go.simplytokenized.com/_api/accounts/{accountId}/benefiting-persons"

payload = {
"firstname": "<string>",
"lastname": "<string>",
"street": "<string>",
"zip": "<string>",
"state": "<string>",
"city": "<string>",
"country": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://dev.go.simplytokenized.com/_api/accounts/{accountId}/benefiting-persons",
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([
'firstname' => '<string>',
'lastname' => '<string>',
'street' => '<string>',
'zip' => '<string>',
'state' => '<string>',
'city' => '<string>',
'country' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://dev.go.simplytokenized.com/_api/accounts/{accountId}/benefiting-persons"

payload := strings.NewReader("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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://dev.go.simplytokenized.com/_api/accounts/{accountId}/benefiting-persons")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://dev.go.simplytokenized.com/_api/accounts/{accountId}/benefiting-persons")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "firstname": "<string>",
  "lastname": "<string>",
  "street": "<string>",
  "zip": "<string>",
  "state": "<string>",
  "city": "<string>",
  "country": "<string>"
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}

Authorizations

Authorization
string
header
required

Bearer access token from POST /_api/auth

Path Parameters

accountId
string<uuid>
required

accountId identifier

Body

application/json
firstname
string
required
Required string length: 1 - 100
lastname
string
required
Required string length: 1 - 100
street
string
required
Required string length: 1 - 200
zip
string
required
Required string length: 1 - 20
state
string
required
Required string length: 1 - 100
city
string
required
Required string length: 1 - 100
country
string
required
Required string length: 2

Response

Created

id
string<uuid>
required
firstname
string
required
lastname
string
required
street
string
required
zip
string
required
state
string
required
city
string
required
country
string
required