Skip to main content
PATCH
/
v1
/
businesses
/
{businessId}
/
tax-estimates
/
profile
Update tax profile
curl --request PATCH \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/tax-estimates/profile \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "Tax_Profile",
  "tax_country_code": "US",
  "us_configuration": {
    "federal": {
      "annual_w2_income": 123,
      "tip_income": 123,
      "overtime_income": 123,
      "withholding": {
        "use_custom_withholding": true,
        "amount": 123
      }
    },
    "state": {
      "tax_state": "CA",
      "num_exemptions": 123,
      "withholding": {
        "use_custom_withholding": true,
        "amount": 123
      }
    },
    "deductions": {
      "home_office": {
        "use_home_office_deduction": true,
        "home_office_area": 123
      },
      "vehicle": {
        "use_mileage_deduction": false,
        "vehicle_business_percent": 123,
        "mileage": {
          "use_user_estimated_business_mileage": true,
          "user_estimated_business_mileage": 123
        }
      }
    },
    "business_estimates": {
      "expenses": {
        "use_user_estimated_business_expenses": true,
        "user_estimated_business_expenses": 123
      },
      "revenue": {
        "use_user_estimated_business_revenue": true,
        "user_estimated_business_revenue": 123
      }
    }
  },
  "ca_configuration": {},
  "user_has_saved_tax_profile": true
}
'
import requests

url = "https://sandbox.layerfi.com/v1/businesses/{businessId}/tax-estimates/profile"

payload = {
"type": "Tax_Profile",
"tax_country_code": "US",
"us_configuration": {
"federal": {
"annual_w2_income": 123,
"tip_income": 123,
"overtime_income": 123,
"withholding": {
"use_custom_withholding": True,
"amount": 123
}
},
"state": {
"tax_state": "CA",
"num_exemptions": 123,
"withholding": {
"use_custom_withholding": True,
"amount": 123
}
},
"deductions": {
"home_office": {
"use_home_office_deduction": True,
"home_office_area": 123
},
"vehicle": {
"use_mileage_deduction": False,
"vehicle_business_percent": 123,
"mileage": {
"use_user_estimated_business_mileage": True,
"user_estimated_business_mileage": 123
}
}
},
"business_estimates": {
"expenses": {
"use_user_estimated_business_expenses": True,
"user_estimated_business_expenses": 123
},
"revenue": {
"use_user_estimated_business_revenue": True,
"user_estimated_business_revenue": 123
}
}
},
"ca_configuration": {},
"user_has_saved_tax_profile": 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({
type: 'Tax_Profile',
tax_country_code: 'US',
us_configuration: {
federal: {
annual_w2_income: 123,
tip_income: 123,
overtime_income: 123,
withholding: {use_custom_withholding: true, amount: 123}
},
state: {
tax_state: 'CA',
num_exemptions: 123,
withholding: {use_custom_withholding: true, amount: 123}
},
deductions: {
home_office: {use_home_office_deduction: true, home_office_area: 123},
vehicle: {
use_mileage_deduction: false,
vehicle_business_percent: 123,
mileage: {
use_user_estimated_business_mileage: true,
user_estimated_business_mileage: 123
}
}
},
business_estimates: {
expenses: {
use_user_estimated_business_expenses: true,
user_estimated_business_expenses: 123
},
revenue: {
use_user_estimated_business_revenue: true,
user_estimated_business_revenue: 123
}
}
},
ca_configuration: {},
user_has_saved_tax_profile: true
})
};

fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}/tax-estimates/profile', 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}/tax-estimates/profile",
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([
'type' => 'Tax_Profile',
'tax_country_code' => 'US',
'us_configuration' => [
'federal' => [
'annual_w2_income' => 123,
'tip_income' => 123,
'overtime_income' => 123,
'withholding' => [
'use_custom_withholding' => true,
'amount' => 123
]
],
'state' => [
'tax_state' => 'CA',
'num_exemptions' => 123,
'withholding' => [
'use_custom_withholding' => true,
'amount' => 123
]
],
'deductions' => [
'home_office' => [
'use_home_office_deduction' => true,
'home_office_area' => 123
],
'vehicle' => [
'use_mileage_deduction' => false,
'vehicle_business_percent' => 123,
'mileage' => [
'use_user_estimated_business_mileage' => true,
'user_estimated_business_mileage' => 123
]
]
],
'business_estimates' => [
'expenses' => [
'use_user_estimated_business_expenses' => true,
'user_estimated_business_expenses' => 123
],
'revenue' => [
'use_user_estimated_business_revenue' => true,
'user_estimated_business_revenue' => 123
]
]
],
'ca_configuration' => [

],
'user_has_saved_tax_profile' => 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://sandbox.layerfi.com/v1/businesses/{businessId}/tax-estimates/profile"

payload := strings.NewReader("{\n \"type\": \"Tax_Profile\",\n \"tax_country_code\": \"US\",\n \"us_configuration\": {\n \"federal\": {\n \"annual_w2_income\": 123,\n \"tip_income\": 123,\n \"overtime_income\": 123,\n \"withholding\": {\n \"use_custom_withholding\": true,\n \"amount\": 123\n }\n },\n \"state\": {\n \"tax_state\": \"CA\",\n \"num_exemptions\": 123,\n \"withholding\": {\n \"use_custom_withholding\": true,\n \"amount\": 123\n }\n },\n \"deductions\": {\n \"home_office\": {\n \"use_home_office_deduction\": true,\n \"home_office_area\": 123\n },\n \"vehicle\": {\n \"use_mileage_deduction\": false,\n \"vehicle_business_percent\": 123,\n \"mileage\": {\n \"use_user_estimated_business_mileage\": true,\n \"user_estimated_business_mileage\": 123\n }\n }\n },\n \"business_estimates\": {\n \"expenses\": {\n \"use_user_estimated_business_expenses\": true,\n \"user_estimated_business_expenses\": 123\n },\n \"revenue\": {\n \"use_user_estimated_business_revenue\": true,\n \"user_estimated_business_revenue\": 123\n }\n }\n },\n \"ca_configuration\": {},\n \"user_has_saved_tax_profile\": 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://sandbox.layerfi.com/v1/businesses/{businessId}/tax-estimates/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"Tax_Profile\",\n \"tax_country_code\": \"US\",\n \"us_configuration\": {\n \"federal\": {\n \"annual_w2_income\": 123,\n \"tip_income\": 123,\n \"overtime_income\": 123,\n \"withholding\": {\n \"use_custom_withholding\": true,\n \"amount\": 123\n }\n },\n \"state\": {\n \"tax_state\": \"CA\",\n \"num_exemptions\": 123,\n \"withholding\": {\n \"use_custom_withholding\": true,\n \"amount\": 123\n }\n },\n \"deductions\": {\n \"home_office\": {\n \"use_home_office_deduction\": true,\n \"home_office_area\": 123\n },\n \"vehicle\": {\n \"use_mileage_deduction\": false,\n \"vehicle_business_percent\": 123,\n \"mileage\": {\n \"use_user_estimated_business_mileage\": true,\n \"user_estimated_business_mileage\": 123\n }\n }\n },\n \"business_estimates\": {\n \"expenses\": {\n \"use_user_estimated_business_expenses\": true,\n \"user_estimated_business_expenses\": 123\n },\n \"revenue\": {\n \"use_user_estimated_business_revenue\": true,\n \"user_estimated_business_revenue\": 123\n }\n }\n },\n \"ca_configuration\": {},\n \"user_has_saved_tax_profile\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}/tax-estimates/profile")

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 \"type\": \"Tax_Profile\",\n \"tax_country_code\": \"US\",\n \"us_configuration\": {\n \"federal\": {\n \"annual_w2_income\": 123,\n \"tip_income\": 123,\n \"overtime_income\": 123,\n \"withholding\": {\n \"use_custom_withholding\": true,\n \"amount\": 123\n }\n },\n \"state\": {\n \"tax_state\": \"CA\",\n \"num_exemptions\": 123,\n \"withholding\": {\n \"use_custom_withholding\": true,\n \"amount\": 123\n }\n },\n \"deductions\": {\n \"home_office\": {\n \"use_home_office_deduction\": true,\n \"home_office_area\": 123\n },\n \"vehicle\": {\n \"use_mileage_deduction\": false,\n \"vehicle_business_percent\": 123,\n \"mileage\": {\n \"use_user_estimated_business_mileage\": true,\n \"user_estimated_business_mileage\": 123\n }\n }\n },\n \"business_estimates\": {\n \"expenses\": {\n \"use_user_estimated_business_expenses\": true,\n \"user_estimated_business_expenses\": 123\n },\n \"revenue\": {\n \"use_user_estimated_business_revenue\": true,\n \"user_estimated_business_revenue\": 123\n }\n }\n },\n \"ca_configuration\": {},\n \"user_has_saved_tax_profile\": true\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "type": "Tax_Profile",
    "tax_country_code": "US",
    "us_configuration": {
      "federal": {
        "annual_w2_income": 123,
        "tip_income": 123,
        "overtime_income": 123,
        "withholding": {
          "use_custom_withholding": true,
          "amount": 123
        }
      },
      "state": {
        "tax_state": "CA",
        "num_exemptions": 123,
        "withholding": {
          "use_custom_withholding": true,
          "amount": 123
        }
      },
      "deductions": {
        "home_office": {
          "use_home_office_deduction": true,
          "home_office_area": 123
        },
        "vehicle": {
          "use_mileage_deduction": false,
          "vehicle_business_percent": 123,
          "mileage": {
            "use_user_estimated_business_mileage": true,
            "user_estimated_business_mileage": 123
          }
        }
      },
      "business_estimates": {
        "expenses": {
          "use_user_estimated_business_expenses": true,
          "user_estimated_business_expenses": 123
        },
        "revenue": {
          "use_user_estimated_business_revenue": true,
          "user_estimated_business_revenue": 123
        }
      }
    },
    "ca_configuration": {},
    "user_has_saved_tax_profile": true
  }
}
{
"description": "<string>",
"meta": {}
}
{
"description": "<string>",
"meta": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json.

Path Parameters

businessId
string<uuid>
required

The UUID of the business.

Body

application/json

Tax profile configuration for a business.

type
string

Resource type.

Example:

"Tax_Profile"

tax_country_code
string | null

The ISO 3166-1 alpha-2 country code.

Pattern: ^[A-Z]{2}$
Example:

"US"

us_configuration
object | null

US-specific tax configuration.

ca_configuration
object | null

Canadian-specific tax configuration (future use).

user_has_saved_tax_profile
boolean

Whether the user has explicitly saved their tax profile configuration.

Response

Tax profile updated successfully.

data
object
required

Tax profile configuration for a business.