curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"year": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"include_general_ledger": true,
"include_account_transactions": true
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets"
payload = {
"year": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"include_general_ledger": True,
"include_account_transactions": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
year: 123,
start_date: '2023-11-07T05:31:56Z',
end_date: '2023-11-07T05:31:56Z',
include_general_ledger: true,
include_account_transactions: true
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets', 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}/reports/tax-packets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'year' => 123,
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'include_general_ledger' => true,
'include_account_transactions' => 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}/reports/tax-packets"
payload := strings.NewReader("{\n \"year\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"include_general_ledger\": true,\n \"include_account_transactions\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"year\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"include_general_ledger\": true,\n \"include_account_transactions\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"year\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"include_general_ledger\": true,\n \"include_account_transactions\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"business_id": "<string>",
"year": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"status": "PENDING",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"download_urls": {
"profit_and_loss": "<string>",
"general_ledger": "<string>",
"account_transactions": "<string>"
}
}""""Create tax packet
Creates a new tax packet request for generating comprehensive tax reporting documents including P&L reports, general ledger details, and account transactions.
curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"year": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"include_general_ledger": true,
"include_account_transactions": true
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets"
payload = {
"year": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"include_general_ledger": True,
"include_account_transactions": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
year: 123,
start_date: '2023-11-07T05:31:56Z',
end_date: '2023-11-07T05:31:56Z',
include_general_ledger: true,
include_account_transactions: true
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets', 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}/reports/tax-packets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'year' => 123,
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'include_general_ledger' => true,
'include_account_transactions' => 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}/reports/tax-packets"
payload := strings.NewReader("{\n \"year\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"include_general_ledger\": true,\n \"include_account_transactions\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"year\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"include_general_ledger\": true,\n \"include_account_transactions\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/tax-packets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"year\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"include_general_ledger\": true,\n \"include_account_transactions\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"business_id": "<string>",
"year": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"status": "PENDING",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"download_urls": {
"profit_and_loss": "<string>",
"general_ledger": "<string>",
"account_transactions": "<string>"
}
}""""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 create the tax packet for
Body
Tax year for the packet (alternative to start_date/end_date)
Start date for custom date range (alternative to year)
End date for custom date range (alternative to year)
Whether to include general ledger details
Whether to include account transaction details
Response
Tax packet request created successfully
Unique identifier for the tax packet request
Business ID the tax packet belongs to
Tax year for the packet
Start date of the tax packet period
End date of the tax packet period
Status of the tax packet generation
PENDING, PROCESSING, COMPLETED, FAILED When the tax packet request was created
When the tax packet generation was completed
Download URLs for tax packet components
Show child attributes
Show child attributes