Business Management
Update a Business
Scopes: business:update
PATCH
/
v0
/
business
/
{business_id}
Update a Business
curl --request PATCH \
--url https://api.sandbox.getasset.com/v0/business/{business_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "New Roofing Pros",
"status": "active",
"onboarding_date": "2023-12-25",
"external_id": "1234567890",
"phone_number": "<string>",
"canada_gst_registered": true
}
'import requests
url = "https://api.sandbox.getasset.com/v0/business/{business_id}"
payload = {
"name": "New Roofing Pros",
"status": "active",
"onboarding_date": "2023-12-25",
"external_id": "1234567890",
"phone_number": "<string>",
"canada_gst_registered": True
}
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({
name: 'New Roofing Pros',
status: 'active',
onboarding_date: '2023-12-25',
external_id: '1234567890',
phone_number: '<string>',
canada_gst_registered: true
})
};
fetch('https://api.sandbox.getasset.com/v0/business/{business_id}', 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.sandbox.getasset.com/v0/business/{business_id}",
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([
'name' => 'New Roofing Pros',
'status' => 'active',
'onboarding_date' => '2023-12-25',
'external_id' => '1234567890',
'phone_number' => '<string>',
'canada_gst_registered' => true
]),
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://api.sandbox.getasset.com/v0/business/{business_id}"
payload := strings.NewReader("{\n \"name\": \"New Roofing Pros\",\n \"status\": \"active\",\n \"onboarding_date\": \"2023-12-25\",\n \"external_id\": \"1234567890\",\n \"phone_number\": \"<string>\",\n \"canada_gst_registered\": true\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://api.sandbox.getasset.com/v0/business/{business_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Roofing Pros\",\n \"status\": \"active\",\n \"onboarding_date\": \"2023-12-25\",\n \"external_id\": \"1234567890\",\n \"phone_number\": \"<string>\",\n \"canada_gst_registered\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.getasset.com/v0/business/{business_id}")
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 \"name\": \"New Roofing Pros\",\n \"status\": \"active\",\n \"onboarding_date\": \"2023-12-25\",\n \"external_id\": \"1234567890\",\n \"phone_number\": \"<string>\",\n \"canada_gst_registered\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"tenant_id": "<string>",
"name": "<string>",
"industry": "Roofing Contractors",
"entries_start": "2023-11-07T05:31:56Z",
"fiscal_year": "<string>",
"external_id": "<string>",
"id": "<string>",
"status": "active",
"onboarding_date": "2023-12-25",
"plan": "managed",
"assigned_bookkeeper": "<string>",
"phone_number": "<string>",
"country": "united_states",
"region": "california",
"canada_gst_registered": true,
"canada_tax_status": "itc_eligible"
}
}{
"error": "<string>",
"data": "<unknown>"
}{
"error": "<string>",
"data": "<unknown>"
}{
"error": "<string>",
"data": "<unknown>"
}{
"message": "string",
"data": "string"
}{
"error": "<string>",
"data": "<unknown>"
}{
"error": "<string>",
"data": "<unknown>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The id of the business
Example:
"biz_GA6EG2qFxA97NZHtxeLPUy"
Body
application/json
The updated name of the Business
Maximum string length:
255Example:
"New Roofing Pros"
The updated status of the Business
Available options:
active, inactive Example:
"active"
The date the business was onboarded
The updated external ID of the Business
Maximum string length:
255Example:
"1234567890"
Phone number for MMS receipt ingestion in E.164 format. Pass null to clear.
The updated region of the Business, such as a state or province. Pass null to clear.
Available options:
alberta, british_columbia, manitoba, new_brunswick, newfoundland_and_labrador, northwest_territories, nova_scotia, nunavut, ontario, prince_edward_island, quebec, saskatchewan, yukon Whether the Business is registered for GST/HST. Pass null to clear.
The Canadian tax status of the Business. Pass null to clear.
Available options:
itc_eligible, exempt Response
Successful Response
Show child attributes
Show child attributes
⌘I
Update a Business
curl --request PATCH \
--url https://api.sandbox.getasset.com/v0/business/{business_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "New Roofing Pros",
"status": "active",
"onboarding_date": "2023-12-25",
"external_id": "1234567890",
"phone_number": "<string>",
"canada_gst_registered": true
}
'import requests
url = "https://api.sandbox.getasset.com/v0/business/{business_id}"
payload = {
"name": "New Roofing Pros",
"status": "active",
"onboarding_date": "2023-12-25",
"external_id": "1234567890",
"phone_number": "<string>",
"canada_gst_registered": True
}
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({
name: 'New Roofing Pros',
status: 'active',
onboarding_date: '2023-12-25',
external_id: '1234567890',
phone_number: '<string>',
canada_gst_registered: true
})
};
fetch('https://api.sandbox.getasset.com/v0/business/{business_id}', 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.sandbox.getasset.com/v0/business/{business_id}",
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([
'name' => 'New Roofing Pros',
'status' => 'active',
'onboarding_date' => '2023-12-25',
'external_id' => '1234567890',
'phone_number' => '<string>',
'canada_gst_registered' => true
]),
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://api.sandbox.getasset.com/v0/business/{business_id}"
payload := strings.NewReader("{\n \"name\": \"New Roofing Pros\",\n \"status\": \"active\",\n \"onboarding_date\": \"2023-12-25\",\n \"external_id\": \"1234567890\",\n \"phone_number\": \"<string>\",\n \"canada_gst_registered\": true\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://api.sandbox.getasset.com/v0/business/{business_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Roofing Pros\",\n \"status\": \"active\",\n \"onboarding_date\": \"2023-12-25\",\n \"external_id\": \"1234567890\",\n \"phone_number\": \"<string>\",\n \"canada_gst_registered\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.getasset.com/v0/business/{business_id}")
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 \"name\": \"New Roofing Pros\",\n \"status\": \"active\",\n \"onboarding_date\": \"2023-12-25\",\n \"external_id\": \"1234567890\",\n \"phone_number\": \"<string>\",\n \"canada_gst_registered\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"tenant_id": "<string>",
"name": "<string>",
"industry": "Roofing Contractors",
"entries_start": "2023-11-07T05:31:56Z",
"fiscal_year": "<string>",
"external_id": "<string>",
"id": "<string>",
"status": "active",
"onboarding_date": "2023-12-25",
"plan": "managed",
"assigned_bookkeeper": "<string>",
"phone_number": "<string>",
"country": "united_states",
"region": "california",
"canada_gst_registered": true,
"canada_tax_status": "itc_eligible"
}
}{
"error": "<string>",
"data": "<unknown>"
}{
"error": "<string>",
"data": "<unknown>"
}{
"error": "<string>",
"data": "<unknown>"
}{
"message": "string",
"data": "string"
}{
"error": "<string>",
"data": "<unknown>"
}{
"error": "<string>",
"data": "<unknown>"
}