Create an Account Application
curl --request POST \
--url https://api.treasuryprime.com/apply/account_application \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"account_product_id": "apt_11gqk87qmrax",
"deposit_id": "adpt_01d5w6xx0tvs",
"person_applications": [
{
"id": "apsn_01d5w6yaa6vt",
"roles": [
"owner",
"signer"
]
}
],
"primary_person_application_id": "apsn_01d5w6yaa6vt"
}
'import requests
url = "https://api.treasuryprime.com/apply/account_application"
payload = {
"account_product_id": "apt_11gqk87qmrax",
"deposit_id": "adpt_01d5w6xx0tvs",
"person_applications": [
{
"id": "apsn_01d5w6yaa6vt",
"roles": ["owner", "signer"]
}
],
"primary_person_application_id": "apsn_01d5w6yaa6vt"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_product_id: 'apt_11gqk87qmrax',
deposit_id: 'adpt_01d5w6xx0tvs',
person_applications: [{id: 'apsn_01d5w6yaa6vt', roles: ['owner', 'signer']}],
primary_person_application_id: 'apsn_01d5w6yaa6vt'
})
};
fetch('https://api.treasuryprime.com/apply/account_application', 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.treasuryprime.com/apply/account_application",
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([
'account_product_id' => 'apt_11gqk87qmrax',
'deposit_id' => 'adpt_01d5w6xx0tvs',
'person_applications' => [
[
'id' => 'apsn_01d5w6yaa6vt',
'roles' => [
'owner',
'signer'
]
]
],
'primary_person_application_id' => 'apsn_01d5w6yaa6vt'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.treasuryprime.com/apply/account_application"
payload := strings.NewReader("{\n \"account_product_id\": \"apt_11gqk87qmrax\",\n \"deposit_id\": \"adpt_01d5w6xx0tvs\",\n \"person_applications\": [\n {\n \"id\": \"apsn_01d5w6yaa6vt\",\n \"roles\": [\n \"owner\",\n \"signer\"\n ]\n }\n ],\n \"primary_person_application_id\": \"apsn_01d5w6yaa6vt\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.treasuryprime.com/apply/account_application")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"account_product_id\": \"apt_11gqk87qmrax\",\n \"deposit_id\": \"adpt_01d5w6xx0tvs\",\n \"person_applications\": [\n {\n \"id\": \"apsn_01d5w6yaa6vt\",\n \"roles\": [\n \"owner\",\n \"signer\"\n ]\n }\n ],\n \"primary_person_application_id\": \"apsn_01d5w6yaa6vt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/apply/account_application")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_product_id\": \"apt_11gqk87qmrax\",\n \"deposit_id\": \"adpt_01d5w6xx0tvs\",\n \"person_applications\": [\n {\n \"id\": \"apsn_01d5w6yaa6vt\",\n \"roles\": [\n \"owner\",\n \"signer\"\n ]\n }\n ],\n \"primary_person_application_id\": \"apsn_01d5w6yaa6vt\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": null,
"account_number_reservation_id": null,
"account_product_id": "apt_11gqk87qmrax",
"bankdata": null,
"business_application_id": null,
"created_at": "2019-03-15T11:55:14Z",
"deposit_id": "adpt_01d5w6xx0tvs",
"id": "aact_01d5w6xb72vr",
"person_applications": [
{
"id": "apsn_01d5w6yaa6vt",
"roles": [
"owner",
"signer"
]
}
],
"primary_person_application_id": "apsn_01d5w6yaa6vt",
"status": "submitted",
"updated_at": "2019-03-15T11:55:14Z",
"userdata": null
}Account Application
Create an Account Application
POST
/
apply
/
account_application
Create an Account Application
curl --request POST \
--url https://api.treasuryprime.com/apply/account_application \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"account_product_id": "apt_11gqk87qmrax",
"deposit_id": "adpt_01d5w6xx0tvs",
"person_applications": [
{
"id": "apsn_01d5w6yaa6vt",
"roles": [
"owner",
"signer"
]
}
],
"primary_person_application_id": "apsn_01d5w6yaa6vt"
}
'import requests
url = "https://api.treasuryprime.com/apply/account_application"
payload = {
"account_product_id": "apt_11gqk87qmrax",
"deposit_id": "adpt_01d5w6xx0tvs",
"person_applications": [
{
"id": "apsn_01d5w6yaa6vt",
"roles": ["owner", "signer"]
}
],
"primary_person_application_id": "apsn_01d5w6yaa6vt"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_product_id: 'apt_11gqk87qmrax',
deposit_id: 'adpt_01d5w6xx0tvs',
person_applications: [{id: 'apsn_01d5w6yaa6vt', roles: ['owner', 'signer']}],
primary_person_application_id: 'apsn_01d5w6yaa6vt'
})
};
fetch('https://api.treasuryprime.com/apply/account_application', 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.treasuryprime.com/apply/account_application",
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([
'account_product_id' => 'apt_11gqk87qmrax',
'deposit_id' => 'adpt_01d5w6xx0tvs',
'person_applications' => [
[
'id' => 'apsn_01d5w6yaa6vt',
'roles' => [
'owner',
'signer'
]
]
],
'primary_person_application_id' => 'apsn_01d5w6yaa6vt'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.treasuryprime.com/apply/account_application"
payload := strings.NewReader("{\n \"account_product_id\": \"apt_11gqk87qmrax\",\n \"deposit_id\": \"adpt_01d5w6xx0tvs\",\n \"person_applications\": [\n {\n \"id\": \"apsn_01d5w6yaa6vt\",\n \"roles\": [\n \"owner\",\n \"signer\"\n ]\n }\n ],\n \"primary_person_application_id\": \"apsn_01d5w6yaa6vt\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.treasuryprime.com/apply/account_application")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"account_product_id\": \"apt_11gqk87qmrax\",\n \"deposit_id\": \"adpt_01d5w6xx0tvs\",\n \"person_applications\": [\n {\n \"id\": \"apsn_01d5w6yaa6vt\",\n \"roles\": [\n \"owner\",\n \"signer\"\n ]\n }\n ],\n \"primary_person_application_id\": \"apsn_01d5w6yaa6vt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/apply/account_application")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_product_id\": \"apt_11gqk87qmrax\",\n \"deposit_id\": \"adpt_01d5w6xx0tvs\",\n \"person_applications\": [\n {\n \"id\": \"apsn_01d5w6yaa6vt\",\n \"roles\": [\n \"owner\",\n \"signer\"\n ]\n }\n ],\n \"primary_person_application_id\": \"apsn_01d5w6yaa6vt\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": null,
"account_number_reservation_id": null,
"account_product_id": "apt_11gqk87qmrax",
"bankdata": null,
"business_application_id": null,
"created_at": "2019-03-15T11:55:14Z",
"deposit_id": "adpt_01d5w6xx0tvs",
"id": "aact_01d5w6xb72vr",
"person_applications": [
{
"id": "apsn_01d5w6yaa6vt",
"roles": [
"owner",
"signer"
]
}
],
"primary_person_application_id": "apsn_01d5w6yaa6vt",
"status": "submitted",
"updated_at": "2019-03-15T11:55:14Z",
"userdata": null
}Authorizations
basicAuthapiKey
Body
application/json
The apply.account-application to create
Response
200 - application/json
The apply.account-application created
Was this page helpful?