curl --request PUT \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/bank-transactions/{transactionId}/metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "Transaction_Metadata",
"memo": "Example memo to associate with a transaction",
"reference_number": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
}
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}/bank-transactions/{transactionId}/metadata"
payload = {
"type": "Transaction_Metadata",
"memo": "Example memo to associate with a transaction",
"reference_number": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
}
}
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({
type: 'Transaction_Metadata',
memo: 'Example memo to associate with a transaction',
reference_number: '<string>',
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vendor_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
metadata: {
custom_field: 'value',
'any valid json': 'below 1kb',
nested: {'meaning of life': 42, array: []}
}
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}/bank-transactions/{transactionId}/metadata', 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}/bank-transactions/{transactionId}/metadata",
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([
'type' => 'Transaction_Metadata',
'memo' => 'Example memo to associate with a transaction',
'reference_number' => '<string>',
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vendor_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'metadata' => [
'custom_field' => 'value',
'any valid json' => 'below 1kb',
'nested' => [
'meaning of life' => 42,
'array' => [
]
]
]
]),
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}/bank-transactions/{transactionId}/metadata"
payload := strings.NewReader("{\n \"type\": \"Transaction_Metadata\",\n \"memo\": \"Example memo to associate with a transaction\",\n \"reference_number\": \"<string>\",\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"metadata\": {\n \"custom_field\": \"value\",\n \"any valid json\": \"below 1kb\",\n \"nested\": {\n \"meaning of life\": 42,\n \"array\": []\n }\n }\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}/bank-transactions/{transactionId}/metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"Transaction_Metadata\",\n \"memo\": \"Example memo to associate with a transaction\",\n \"reference_number\": \"<string>\",\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"metadata\": {\n \"custom_field\": \"value\",\n \"any valid json\": \"below 1kb\",\n \"nested\": {\n \"meaning of life\": 42,\n \"array\": []\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}/bank-transactions/{transactionId}/metadata")
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 \"type\": \"Transaction_Metadata\",\n \"memo\": \"Example memo to associate with a transaction\",\n \"reference_number\": \"<string>\",\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"metadata\": {\n \"custom_field\": \"value\",\n \"any valid json\": \"below 1kb\",\n \"nested\": {\n \"meaning of life\": 42,\n \"array\": []\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "Transaction_Metadata",
"memo": "Example memo to associate with a transaction",
"reference_number": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
}
}
}{
"type": "InvalidParameters",
"description": "<string>",
"error_enum": "InvalidPayload",
"meta": {}
}Update transaction metadata
Replaces the metadata associated with the provided bank transaction id. Include customer_id and vendor_id to set or keep those associations. Omit either field, or send null, to clear it.
curl --request PUT \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/bank-transactions/{transactionId}/metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "Transaction_Metadata",
"memo": "Example memo to associate with a transaction",
"reference_number": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
}
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}/bank-transactions/{transactionId}/metadata"
payload = {
"type": "Transaction_Metadata",
"memo": "Example memo to associate with a transaction",
"reference_number": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
}
}
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({
type: 'Transaction_Metadata',
memo: 'Example memo to associate with a transaction',
reference_number: '<string>',
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vendor_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
metadata: {
custom_field: 'value',
'any valid json': 'below 1kb',
nested: {'meaning of life': 42, array: []}
}
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}/bank-transactions/{transactionId}/metadata', 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}/bank-transactions/{transactionId}/metadata",
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([
'type' => 'Transaction_Metadata',
'memo' => 'Example memo to associate with a transaction',
'reference_number' => '<string>',
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vendor_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'metadata' => [
'custom_field' => 'value',
'any valid json' => 'below 1kb',
'nested' => [
'meaning of life' => 42,
'array' => [
]
]
]
]),
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}/bank-transactions/{transactionId}/metadata"
payload := strings.NewReader("{\n \"type\": \"Transaction_Metadata\",\n \"memo\": \"Example memo to associate with a transaction\",\n \"reference_number\": \"<string>\",\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"metadata\": {\n \"custom_field\": \"value\",\n \"any valid json\": \"below 1kb\",\n \"nested\": {\n \"meaning of life\": 42,\n \"array\": []\n }\n }\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}/bank-transactions/{transactionId}/metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"Transaction_Metadata\",\n \"memo\": \"Example memo to associate with a transaction\",\n \"reference_number\": \"<string>\",\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"metadata\": {\n \"custom_field\": \"value\",\n \"any valid json\": \"below 1kb\",\n \"nested\": {\n \"meaning of life\": 42,\n \"array\": []\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}/bank-transactions/{transactionId}/metadata")
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 \"type\": \"Transaction_Metadata\",\n \"memo\": \"Example memo to associate with a transaction\",\n \"reference_number\": \"<string>\",\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"metadata\": {\n \"custom_field\": \"value\",\n \"any valid json\": \"below 1kb\",\n \"nested\": {\n \"meaning of life\": 42,\n \"array\": []\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "Transaction_Metadata",
"memo": "Example memo to associate with a transaction",
"reference_number": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
}
}
}{
"type": "InvalidParameters",
"description": "<string>",
"error_enum": "InvalidPayload",
"meta": {}
}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 that the transaction to update the metadata for belongs to.
The UUID of the bank transaction to update metadata for.
Body
Contains metadata associated with a transaction, including an optional memo, customer, and vendor.
Resource type. Value will be Transaction_Metadata.
"Transaction_Metadata"
Optional memo field for adding notes or additional information about the transaction.
"Example memo to associate with a transaction"
Any (typically user-visible) identifier you would like to associate with the bank transaction. Can be used to filter when listing bank transactions.
Layer customer ID to associate with the bank transaction. Send null to clear the customer.
Layer vendor ID to associate with the bank transaction. Send null to clear the vendor.
Arbitrary custom metadata in JSON format with a size limit of 1KB.
{
"custom_field": "value",
"any valid json": "below 1kb",
"nested": { "meaning of life": 42, "array": [] }
}
Response
Contains metadata associated with a transaction, including an optional memo, customer, and vendor.
Show child attributes
Show child attributes