curl --request PUT \
--url https://sandbox.layerfi.com/v1/businesses/{businessId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"legal_name": "<string>",
"phone_number": "<string>",
"sms_enabled": true,
"sms_categorization_start_date": "2023-11-07T05:31:56Z",
"activation_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"unit_ids": [
{
"unit_id": "<string>",
"account_name": "My Unit account",
"opening_balance_init_to_zero": true,
"opening_balance_do_not_init": true
}
],
"internal_bank_account_ids": [
{
"unit_id": "<string>",
"account_name": "My Unit account",
"opening_balance_init_to_zero": true,
"opening_balance_do_not_init": true
}
],
"plaid_items": [
{
"item_id": "<string>",
"access_token": "<string>",
"sync_transactions": true,
"institution_plaid_id": "<string>"
}
],
"plaid_processor_tokens": [
{
"processor_token": "<string>"
}
],
"stripe_connect_accounts": [
{
"stripe_id": "<string>"
}
],
"free_trial_ends_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}"
payload = {
"legal_name": "<string>",
"phone_number": "<string>",
"sms_enabled": True,
"sms_categorization_start_date": "2023-11-07T05:31:56Z",
"activation_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"unit_ids": [
{
"unit_id": "<string>",
"account_name": "My Unit account",
"opening_balance_init_to_zero": True,
"opening_balance_do_not_init": True
}
],
"internal_bank_account_ids": [
{
"unit_id": "<string>",
"account_name": "My Unit account",
"opening_balance_init_to_zero": True,
"opening_balance_do_not_init": True
}
],
"plaid_items": [
{
"item_id": "<string>",
"access_token": "<string>",
"sync_transactions": True,
"institution_plaid_id": "<string>"
}
],
"plaid_processor_tokens": [{ "processor_token": "<string>" }],
"stripe_connect_accounts": [{ "stripe_id": "<string>" }],
"free_trial_ends_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
legal_name: '<string>',
phone_number: '<string>',
sms_enabled: true,
sms_categorization_start_date: '2023-11-07T05:31:56Z',
activation_at: '2023-11-07T05:31:56Z',
archived_at: '2023-11-07T05:31:56Z',
unit_ids: [
{
unit_id: '<string>',
account_name: 'My Unit account',
opening_balance_init_to_zero: true,
opening_balance_do_not_init: true
}
],
internal_bank_account_ids: [
{
unit_id: '<string>',
account_name: 'My Unit account',
opening_balance_init_to_zero: true,
opening_balance_do_not_init: true
}
],
plaid_items: [
{
item_id: '<string>',
access_token: '<string>',
sync_transactions: true,
institution_plaid_id: '<string>'
}
],
plaid_processor_tokens: [{processor_token: '<string>'}],
stripe_connect_accounts: [{stripe_id: '<string>'}],
free_trial_ends_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}', 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://sandbox.layerfi.com/v1/businesses/{businessId}",
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([
'legal_name' => '<string>',
'phone_number' => '<string>',
'sms_enabled' => true,
'sms_categorization_start_date' => '2023-11-07T05:31:56Z',
'activation_at' => '2023-11-07T05:31:56Z',
'archived_at' => '2023-11-07T05:31:56Z',
'unit_ids' => [
[
'unit_id' => '<string>',
'account_name' => 'My Unit account',
'opening_balance_init_to_zero' => true,
'opening_balance_do_not_init' => true
]
],
'internal_bank_account_ids' => [
[
'unit_id' => '<string>',
'account_name' => 'My Unit account',
'opening_balance_init_to_zero' => true,
'opening_balance_do_not_init' => true
]
],
'plaid_items' => [
[
'item_id' => '<string>',
'access_token' => '<string>',
'sync_transactions' => true,
'institution_plaid_id' => '<string>'
]
],
'plaid_processor_tokens' => [
[
'processor_token' => '<string>'
]
],
'stripe_connect_accounts' => [
[
'stripe_id' => '<string>'
]
],
'free_trial_ends_at' => '2023-11-07T05:31:56Z'
]),
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://sandbox.layerfi.com/v1/businesses/{businessId}"
payload := strings.NewReader("{\n \"legal_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sms_enabled\": true,\n \"sms_categorization_start_date\": \"2023-11-07T05:31:56Z\",\n \"activation_at\": \"2023-11-07T05:31:56Z\",\n \"archived_at\": \"2023-11-07T05:31:56Z\",\n \"unit_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"internal_bank_account_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"plaid_items\": [\n {\n \"item_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"sync_transactions\": true,\n \"institution_plaid_id\": \"<string>\"\n }\n ],\n \"plaid_processor_tokens\": [\n {\n \"processor_token\": \"<string>\"\n }\n ],\n \"stripe_connect_accounts\": [\n {\n \"stripe_id\": \"<string>\"\n }\n ],\n \"free_trial_ends_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox.layerfi.com/v1/businesses/{businessId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"legal_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sms_enabled\": true,\n \"sms_categorization_start_date\": \"2023-11-07T05:31:56Z\",\n \"activation_at\": \"2023-11-07T05:31:56Z\",\n \"archived_at\": \"2023-11-07T05:31:56Z\",\n \"unit_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"internal_bank_account_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"plaid_items\": [\n {\n \"item_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"sync_transactions\": true,\n \"institution_plaid_id\": \"<string>\"\n }\n ],\n \"plaid_processor_tokens\": [\n {\n \"processor_token\": \"<string>\"\n }\n ],\n \"stripe_connect_accounts\": [\n {\n \"stripe_id\": \"<string>\"\n }\n ],\n \"free_trial_ends_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legal_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sms_enabled\": true,\n \"sms_categorization_start_date\": \"2023-11-07T05:31:56Z\",\n \"activation_at\": \"2023-11-07T05:31:56Z\",\n \"archived_at\": \"2023-11-07T05:31:56Z\",\n \"unit_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"internal_bank_account_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"plaid_items\": [\n {\n \"item_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"sync_transactions\": true,\n \"institution_plaid_id\": \"<string>\"\n }\n ],\n \"plaid_processor_tokens\": [\n {\n \"processor_token\": \"<string>\"\n }\n ],\n \"stripe_connect_accounts\": [\n {\n \"stripe_id\": \"<string>\"\n }\n ],\n \"free_trial_ends_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "Business",
"external_id": "test-acme-id",
"legal_name": "ACME LLC",
"tin": "<string>",
"industry": "<string>",
"phone_number": "+16504651359",
"naics_code": "484110",
"sms_enabled": true,
"sms_stopped": true,
"sms_categorization_start_date": "2023-11-07T05:31:56Z",
"activation_at": "2023-11-07T05:31:56Z",
"imported_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"unit_accounts": [
{
"id": "111111",
"importedAt": "2023-11-07T05:31:56Z"
}
],
"plaid_items": [
{
"layer_item_id": "550e8400-e29b-41d4-a716-446655440000",
"accessToken": "access-sandbox-a67d0be8-abcd-1234-5678-14fc7bc65366",
"institution": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"layer_id": "550e8400-e29b-41d4-a716-446655440000",
"plaid_institution_id": "ins_1",
"name": "Bank of America",
"logo": "iVBORw0KGgoAAAANSUhEUgAAAJgAAACYCAMAAAAvHNATAAAA6lBMVEUAAAD////////////////////////////////////////////////////////////////////////////////qUmn74ubnNVD4xc398fLlJkT1qLTf4+zpRFzrYHb509rvfY7xjJuAkLTzmqfxi5vzmai/x9lBWY7v8fXtb4LjGDftboIhPXwBIWkRL3P3t8D2t8HsYHbvfo7P1ePzmqigrMeQnr3oRF1RZphhdaGQn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S7Qb9XNdvBwLWs8vpo33JHXig9Rv8G+MxS+LqktYUAAAAASUVORK5CYII="
},
"itemId": "V3jvONy9xbroJVaRnm6oiAqVMv5Qz3TrNyLdL",
"syncTransactions": true
}
],
"plaid_processor_tokens": [
{
"layer_processor_token_id": "550e8400-e29b-41d4-a716-446655440000",
"processor_token": "processor-sandbox-d8e791d1-1234-9876-a207-69acca316045"
}
],
"previously_imported": true,
"stripe_connect_accounts": [
{}
],
"default_locale": "en-US",
"free_trial_ends_at": "2023-11-07T05:31:56Z"
}
}Update business
Updates the business associated with the provided business id. Note that all fields are optional and can be omitted.
curl --request PUT \
--url https://sandbox.layerfi.com/v1/businesses/{businessId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"legal_name": "<string>",
"phone_number": "<string>",
"sms_enabled": true,
"sms_categorization_start_date": "2023-11-07T05:31:56Z",
"activation_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"unit_ids": [
{
"unit_id": "<string>",
"account_name": "My Unit account",
"opening_balance_init_to_zero": true,
"opening_balance_do_not_init": true
}
],
"internal_bank_account_ids": [
{
"unit_id": "<string>",
"account_name": "My Unit account",
"opening_balance_init_to_zero": true,
"opening_balance_do_not_init": true
}
],
"plaid_items": [
{
"item_id": "<string>",
"access_token": "<string>",
"sync_transactions": true,
"institution_plaid_id": "<string>"
}
],
"plaid_processor_tokens": [
{
"processor_token": "<string>"
}
],
"stripe_connect_accounts": [
{
"stripe_id": "<string>"
}
],
"free_trial_ends_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}"
payload = {
"legal_name": "<string>",
"phone_number": "<string>",
"sms_enabled": True,
"sms_categorization_start_date": "2023-11-07T05:31:56Z",
"activation_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"unit_ids": [
{
"unit_id": "<string>",
"account_name": "My Unit account",
"opening_balance_init_to_zero": True,
"opening_balance_do_not_init": True
}
],
"internal_bank_account_ids": [
{
"unit_id": "<string>",
"account_name": "My Unit account",
"opening_balance_init_to_zero": True,
"opening_balance_do_not_init": True
}
],
"plaid_items": [
{
"item_id": "<string>",
"access_token": "<string>",
"sync_transactions": True,
"institution_plaid_id": "<string>"
}
],
"plaid_processor_tokens": [{ "processor_token": "<string>" }],
"stripe_connect_accounts": [{ "stripe_id": "<string>" }],
"free_trial_ends_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
legal_name: '<string>',
phone_number: '<string>',
sms_enabled: true,
sms_categorization_start_date: '2023-11-07T05:31:56Z',
activation_at: '2023-11-07T05:31:56Z',
archived_at: '2023-11-07T05:31:56Z',
unit_ids: [
{
unit_id: '<string>',
account_name: 'My Unit account',
opening_balance_init_to_zero: true,
opening_balance_do_not_init: true
}
],
internal_bank_account_ids: [
{
unit_id: '<string>',
account_name: 'My Unit account',
opening_balance_init_to_zero: true,
opening_balance_do_not_init: true
}
],
plaid_items: [
{
item_id: '<string>',
access_token: '<string>',
sync_transactions: true,
institution_plaid_id: '<string>'
}
],
plaid_processor_tokens: [{processor_token: '<string>'}],
stripe_connect_accounts: [{stripe_id: '<string>'}],
free_trial_ends_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}', 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://sandbox.layerfi.com/v1/businesses/{businessId}",
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([
'legal_name' => '<string>',
'phone_number' => '<string>',
'sms_enabled' => true,
'sms_categorization_start_date' => '2023-11-07T05:31:56Z',
'activation_at' => '2023-11-07T05:31:56Z',
'archived_at' => '2023-11-07T05:31:56Z',
'unit_ids' => [
[
'unit_id' => '<string>',
'account_name' => 'My Unit account',
'opening_balance_init_to_zero' => true,
'opening_balance_do_not_init' => true
]
],
'internal_bank_account_ids' => [
[
'unit_id' => '<string>',
'account_name' => 'My Unit account',
'opening_balance_init_to_zero' => true,
'opening_balance_do_not_init' => true
]
],
'plaid_items' => [
[
'item_id' => '<string>',
'access_token' => '<string>',
'sync_transactions' => true,
'institution_plaid_id' => '<string>'
]
],
'plaid_processor_tokens' => [
[
'processor_token' => '<string>'
]
],
'stripe_connect_accounts' => [
[
'stripe_id' => '<string>'
]
],
'free_trial_ends_at' => '2023-11-07T05:31:56Z'
]),
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://sandbox.layerfi.com/v1/businesses/{businessId}"
payload := strings.NewReader("{\n \"legal_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sms_enabled\": true,\n \"sms_categorization_start_date\": \"2023-11-07T05:31:56Z\",\n \"activation_at\": \"2023-11-07T05:31:56Z\",\n \"archived_at\": \"2023-11-07T05:31:56Z\",\n \"unit_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"internal_bank_account_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"plaid_items\": [\n {\n \"item_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"sync_transactions\": true,\n \"institution_plaid_id\": \"<string>\"\n }\n ],\n \"plaid_processor_tokens\": [\n {\n \"processor_token\": \"<string>\"\n }\n ],\n \"stripe_connect_accounts\": [\n {\n \"stripe_id\": \"<string>\"\n }\n ],\n \"free_trial_ends_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox.layerfi.com/v1/businesses/{businessId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"legal_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sms_enabled\": true,\n \"sms_categorization_start_date\": \"2023-11-07T05:31:56Z\",\n \"activation_at\": \"2023-11-07T05:31:56Z\",\n \"archived_at\": \"2023-11-07T05:31:56Z\",\n \"unit_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"internal_bank_account_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"plaid_items\": [\n {\n \"item_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"sync_transactions\": true,\n \"institution_plaid_id\": \"<string>\"\n }\n ],\n \"plaid_processor_tokens\": [\n {\n \"processor_token\": \"<string>\"\n }\n ],\n \"stripe_connect_accounts\": [\n {\n \"stripe_id\": \"<string>\"\n }\n ],\n \"free_trial_ends_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legal_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sms_enabled\": true,\n \"sms_categorization_start_date\": \"2023-11-07T05:31:56Z\",\n \"activation_at\": \"2023-11-07T05:31:56Z\",\n \"archived_at\": \"2023-11-07T05:31:56Z\",\n \"unit_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"internal_bank_account_ids\": [\n {\n \"unit_id\": \"<string>\",\n \"account_name\": \"My Unit account\",\n \"opening_balance_init_to_zero\": true,\n \"opening_balance_do_not_init\": true\n }\n ],\n \"plaid_items\": [\n {\n \"item_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"sync_transactions\": true,\n \"institution_plaid_id\": \"<string>\"\n }\n ],\n \"plaid_processor_tokens\": [\n {\n \"processor_token\": \"<string>\"\n }\n ],\n \"stripe_connect_accounts\": [\n {\n \"stripe_id\": \"<string>\"\n }\n ],\n \"free_trial_ends_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "Business",
"external_id": "test-acme-id",
"legal_name": "ACME LLC",
"tin": "<string>",
"industry": "<string>",
"phone_number": "+16504651359",
"naics_code": "484110",
"sms_enabled": true,
"sms_stopped": true,
"sms_categorization_start_date": "2023-11-07T05:31:56Z",
"activation_at": "2023-11-07T05:31:56Z",
"imported_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"unit_accounts": [
{
"id": "111111",
"importedAt": "2023-11-07T05:31:56Z"
}
],
"plaid_items": [
{
"layer_item_id": "550e8400-e29b-41d4-a716-446655440000",
"accessToken": "access-sandbox-a67d0be8-abcd-1234-5678-14fc7bc65366",
"institution": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"layer_id": "550e8400-e29b-41d4-a716-446655440000",
"plaid_institution_id": "ins_1",
"name": "Bank of America",
"logo": "iVBORw0KGgoAAAANSUhEUgAAAJgAAACYCAMAAAAvHNATAAAA6lBMVEUAAAD////////////////////////////////////////////////////////////////////////////////qUmn74ubnNVD4xc398fLlJkT1qLTf4+zpRFzrYHb509rvfY7xjJuAkLTzmqfxi5vzmai/x9lBWY7v8fXtb4LjGDftboIhPXwBIWkRL3P3t8D2t8HsYHbvfo7P1ePzmqigrMeQnr3oRF1RZphhdaGQnb0xS4Wfq8dgdKHuboL609lwgqtgdaFwgqqvutCfrMevudCQnr5BWY/pQ11RZpeQnb70qLRRZ5f98fO30r7oAAAAFHRSTlMA3yDvv0AQn2DPcFCAoJAwf4+vXxXsOc8AAAYDSURBVHhe7ZwHcus4EESZo5L9h1nROfvnvDmn+19nvevvoqimQAKgRFTtvguwa7pnIEIgNFmM0DtwLV/X6V903bLcQWCPtR4ZB65v0jZ8N7B7EGUHFmhCTCvYZ+kc+8Ck1uhuqO0FUNWM6e7cVGdikhC6Z+yyWK5J4ri7kmZbJIllKyILsbo21ABZShjqTKhDJo7WEaFOnaJ73ZTrkAAV/AxNAhQomnNAO+JAKmmGTjtDl7DzmUk7xBS2c0I7ZiIWL5d2jiuiy6c94BuqxB5bQBVdqEwVXahMFV2oTA1diN52EfBpz/jtlLm0d1zhea/AGuBRLzxrDL5JvWA2tKYDDalIax5QbxwoEjAkVGOyIqajxgRDDhUxEgmbOlKxzpxQ7wxqk08KYKiRfMRSpGCIDcIsIiVLZpMkWfEyn13eZ9Il67Rg6Sq6+kJ0+o1cybpM2PN5frVG8jKVKVm3LZku31W0XQprcztvybiIqnWL5ddyT6hIUXSabnbAfF1bVMSS418nXrLVY6zyFxsPz6p1E7DUlJgVacQqTFwk65Zyl80WjX4cXW0yO61qS6/XhXMOkJH2hMmf88cBAXWDsuWXRSYc/5BESK+TTW0v7quGz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wLE7Fxm3Z7tt0mWv67hdVwMAw+2SQctv+/+LKBN8jyPSR5b3cOTWDJFTugqWTJX4SPNyIB6Z6D0sXkkpJ7xtC0cKpV85lquyueMoSJGIiPqjZHSn5ip/1Ee4ikSMGSgyMhHhrR3hkp87I/4GsBozf8/FNcN9T/5V/+SBPWvlUAMv5eP/RWZZ0NHE2HQ47xn4/V8PY76Fwohzoh2xMjR5PD0ndgYatIYO+jOQyiXEkXTQ60jnE4HxwDK1Z+f6t8LaNn/mQse0VC1bhI1RDvUhMh3jj00uVWNbG0vhEOdS5Wj7Y9xy6t9e7p3eOhv1+S7Qb9XNdvBwLWs8vpo33JHXig9Rv8G+MxS+LqktYUAAAAASUVORK5CYII="
},
"itemId": "V3jvONy9xbroJVaRnm6oiAqVMv5Qz3TrNyLdL",
"syncTransactions": true
}
],
"plaid_processor_tokens": [
{
"layer_processor_token_id": "550e8400-e29b-41d4-a716-446655440000",
"processor_token": "processor-sandbox-d8e791d1-1234-9876-a207-69acca316045"
}
],
"previously_imported": true,
"stripe_connect_accounts": [
{}
],
"default_locale": "en-US",
"free_trial_ends_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Content-Type must be set to application/json.
Path Parameters
The UUID of the business to update.
Body
Which United States state the business is incorporated in.
AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, PR, RI, SC, SD, TN, TX, UT, VT, VI, VA, WA, WV, WI, WY Which country the business is incorporated in.
AF, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IL, IT, JM, JP, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, ME, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RS, RW, SH, KN, LC, PM, VC, WS, SM, ST, SA, SN, SC, SL, SG, SK, SI, SB, SO, ZA, GS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW Type of the business.
SOLE_PROP, C_CORP, LLC, S_CORP, PARTNERSHIP, NON_PROFIT, TRUST The activation timestamp represents the time at which Layer should begin displaying accounting data. Data before this time will not be displayed to users. This field is important for businesses migrating over from other accounting platforms. Defaults to Jan 1 of the current year.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
List of plaid items to connect to this business. If the business already has plaid items associated with it, they will be removed and replaced with the items in this list.
Parameters for specifying a Plaid item when creating or updating a business. Either provide item_id and access_token to create a new item, or provide id to reference an existing Plaid item by its Layer ID. Referencing by id is only supported when updating a business, not when creating one.
- New Plaid item
- Existing Plaid item by Layer ID
Show child attributes
Show child attributes
List of plaid processor tokens to connect to this business. If the business already has plaid processor tokens associated with it, they will be removed and replaced with the tokens in this list.
Parameters for specifying a Plaid processor token when creating or updating a business. Either provide processor_token to create a new token, or provide id to reference an existing processor token by its Layer ID. Referencing by id is only supported when updating a business, not when creating one.
- New Plaid processor token
- Existing processor token by Layer ID
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The date and time when the business's free trial ends.
Default locale used to localize the business's content, such as SMS messages.
en-US, fr-CA Response
Show child attributes
Show child attributes