Patch update customer
curl --request PATCH \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"memo": "<string>",
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
]
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId}"
payload = {
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"memo": "<string>",
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
individual_name: '<string>',
company_name: '<string>',
email: '<string>',
mobile_phone: '<string>',
office_phone: '<string>',
address_string: '<string>',
memo: '<string>',
tags: [
{
key: 'department',
value: 'sales',
dimension_display_name: 'Department',
value_display_name: 'Sales Department'
}
]
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId}', 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}/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'individual_name' => '<string>',
'company_name' => '<string>',
'email' => '<string>',
'mobile_phone' => '<string>',
'office_phone' => '<string>',
'address_string' => '<string>',
'memo' => '<string>',
'tags' => [
[
'key' => 'department',
'value' => 'sales',
'dimension_display_name' => 'Department',
'value_display_name' => 'Sales Department'
]
]
]),
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}/customers/{customerId}"
payload := strings.NewReader("{\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_string\": \"<string>\",\n \"memo\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"department\",\n \"value\": \"sales\",\n \"dimension_display_name\": \"Department\",\n \"value_display_name\": \"Sales Department\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_string\": \"<string>\",\n \"memo\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"department\",\n \"value\": \"sales\",\n \"dimension_display_name\": \"Department\",\n \"value_display_name\": \"Sales Department\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_string\": \"<string>\",\n \"memo\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"department\",\n \"value\": \"sales\",\n \"dimension_display_name\": \"Department\",\n \"value_display_name\": \"Sales Department\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "CustomerData",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "31415926535",
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"memo": "<string>",
"status": "ACTIVE",
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dimension_display_name": "<string>",
"value_display_name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
]
}
}Customers
Patch update customer
Patch (partially) updates an existing customer.
PATCH
/
v1
/
businesses
/
{businessId}
/
customers
/
{customerId}
Patch update customer
curl --request PATCH \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"memo": "<string>",
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
]
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId}"
payload = {
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"memo": "<string>",
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
individual_name: '<string>',
company_name: '<string>',
email: '<string>',
mobile_phone: '<string>',
office_phone: '<string>',
address_string: '<string>',
memo: '<string>',
tags: [
{
key: 'department',
value: 'sales',
dimension_display_name: 'Department',
value_display_name: 'Sales Department'
}
]
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId}', 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}/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'individual_name' => '<string>',
'company_name' => '<string>',
'email' => '<string>',
'mobile_phone' => '<string>',
'office_phone' => '<string>',
'address_string' => '<string>',
'memo' => '<string>',
'tags' => [
[
'key' => 'department',
'value' => 'sales',
'dimension_display_name' => 'Department',
'value_display_name' => 'Sales Department'
]
]
]),
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}/customers/{customerId}"
payload := strings.NewReader("{\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_string\": \"<string>\",\n \"memo\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"department\",\n \"value\": \"sales\",\n \"dimension_display_name\": \"Department\",\n \"value_display_name\": \"Sales Department\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_string\": \"<string>\",\n \"memo\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"department\",\n \"value\": \"sales\",\n \"dimension_display_name\": \"Department\",\n \"value_display_name\": \"Sales Department\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"individual_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile_phone\": \"<string>\",\n \"office_phone\": \"<string>\",\n \"address_string\": \"<string>\",\n \"memo\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"department\",\n \"value\": \"sales\",\n \"dimension_display_name\": \"Department\",\n \"value_display_name\": \"Sales Department\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "CustomerData",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "31415926535",
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"memo": "<string>",
"status": "ACTIVE",
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dimension_display_name": "<string>",
"value_display_name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The UUID of the business the customer belongs to.
The UUID of the customer to update.
Body
application/json
Parameters for updating a customer. All fields are optional.
Full name of the individual customer or contact at a corporate customer.
Name of the company customer.
Email address of the customer.
Mobile phone number of the customer.
Office phone number of the customer.
Address of the customer.
Memo for any text you would like to associate with the customer (for example, to display to end users).
Status of the customer. Possible values: ACTIVE, ARCHIVED.
Available options:
ACTIVE, ARCHIVED Show child attributes
Show child attributes
Response
200 - application/json
Customer updated successfully.
Show child attributes
Show child attributes
āI