curl --request PATCH \
--url https://api.meetcampfire.com/coa/api/chart-account-settings \
--header 'Content-Type: application/json' \
--data '
{
"recognize_discounts_as_contra_revenue": true,
"enable_mid_month_convention": true,
"mid_month_threshold": 15,
"use_whole_month_accounting_for_prepaids": true,
"mid_month_threshold_for_prepaids": 16,
"split_invoice_payments_by_line": true,
"split_eliminations_by_department": true,
"fold_retained_earnings": true,
"uncategorized": 123,
"accounts_payable": 123,
"accounts_receivable": 123,
"deferred_revenue": 123,
"accrued_revenue": 123,
"unrealized_gain_loss": 123,
"realized_gain_loss": 123,
"rounding_account": 123,
"unapplied_credits": 123,
"unapplied_debits": 123,
"unbilled_revenue": 123,
"fallback_revenue": 123,
"default_clearing": 123,
"discount_account": 123,
"accrued_discount_account": 123,
"unbilled_discount_account": 123,
"refund_account": 123,
"processing_fees": 123,
"platform_fees": 123,
"deferred_processing_fees": 123,
"tax_account": 123,
"payout_account": 123,
"cta_account": 123,
"oci_translation_account": 123,
"fixed_asset_disposal": 123,
"fixed_asset_impairment_loss": 123,
"bad_debt_account": 123,
"dispute_expense_account": 123,
"dispute_reinstatement_account": 123,
"retained_earnings": 123
}
'import requests
url = "https://api.meetcampfire.com/coa/api/chart-account-settings"
payload = {
"recognize_discounts_as_contra_revenue": True,
"enable_mid_month_convention": True,
"mid_month_threshold": 15,
"use_whole_month_accounting_for_prepaids": True,
"mid_month_threshold_for_prepaids": 16,
"split_invoice_payments_by_line": True,
"split_eliminations_by_department": True,
"fold_retained_earnings": True,
"uncategorized": 123,
"accounts_payable": 123,
"accounts_receivable": 123,
"deferred_revenue": 123,
"accrued_revenue": 123,
"unrealized_gain_loss": 123,
"realized_gain_loss": 123,
"rounding_account": 123,
"unapplied_credits": 123,
"unapplied_debits": 123,
"unbilled_revenue": 123,
"fallback_revenue": 123,
"default_clearing": 123,
"discount_account": 123,
"accrued_discount_account": 123,
"unbilled_discount_account": 123,
"refund_account": 123,
"processing_fees": 123,
"platform_fees": 123,
"deferred_processing_fees": 123,
"tax_account": 123,
"payout_account": 123,
"cta_account": 123,
"oci_translation_account": 123,
"fixed_asset_disposal": 123,
"fixed_asset_impairment_loss": 123,
"bad_debt_account": 123,
"dispute_expense_account": 123,
"dispute_reinstatement_account": 123,
"retained_earnings": 123
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
recognize_discounts_as_contra_revenue: true,
enable_mid_month_convention: true,
mid_month_threshold: 15,
use_whole_month_accounting_for_prepaids: true,
mid_month_threshold_for_prepaids: 16,
split_invoice_payments_by_line: true,
split_eliminations_by_department: true,
fold_retained_earnings: true,
uncategorized: 123,
accounts_payable: 123,
accounts_receivable: 123,
deferred_revenue: 123,
accrued_revenue: 123,
unrealized_gain_loss: 123,
realized_gain_loss: 123,
rounding_account: 123,
unapplied_credits: 123,
unapplied_debits: 123,
unbilled_revenue: 123,
fallback_revenue: 123,
default_clearing: 123,
discount_account: 123,
accrued_discount_account: 123,
unbilled_discount_account: 123,
refund_account: 123,
processing_fees: 123,
platform_fees: 123,
deferred_processing_fees: 123,
tax_account: 123,
payout_account: 123,
cta_account: 123,
oci_translation_account: 123,
fixed_asset_disposal: 123,
fixed_asset_impairment_loss: 123,
bad_debt_account: 123,
dispute_expense_account: 123,
dispute_reinstatement_account: 123,
retained_earnings: 123
})
};
fetch('https://api.meetcampfire.com/coa/api/chart-account-settings', 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.meetcampfire.com/coa/api/chart-account-settings",
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([
'recognize_discounts_as_contra_revenue' => true,
'enable_mid_month_convention' => true,
'mid_month_threshold' => 15,
'use_whole_month_accounting_for_prepaids' => true,
'mid_month_threshold_for_prepaids' => 16,
'split_invoice_payments_by_line' => true,
'split_eliminations_by_department' => true,
'fold_retained_earnings' => true,
'uncategorized' => 123,
'accounts_payable' => 123,
'accounts_receivable' => 123,
'deferred_revenue' => 123,
'accrued_revenue' => 123,
'unrealized_gain_loss' => 123,
'realized_gain_loss' => 123,
'rounding_account' => 123,
'unapplied_credits' => 123,
'unapplied_debits' => 123,
'unbilled_revenue' => 123,
'fallback_revenue' => 123,
'default_clearing' => 123,
'discount_account' => 123,
'accrued_discount_account' => 123,
'unbilled_discount_account' => 123,
'refund_account' => 123,
'processing_fees' => 123,
'platform_fees' => 123,
'deferred_processing_fees' => 123,
'tax_account' => 123,
'payout_account' => 123,
'cta_account' => 123,
'oci_translation_account' => 123,
'fixed_asset_disposal' => 123,
'fixed_asset_impairment_loss' => 123,
'bad_debt_account' => 123,
'dispute_expense_account' => 123,
'dispute_reinstatement_account' => 123,
'retained_earnings' => 123
]),
CURLOPT_HTTPHEADER => [
"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.meetcampfire.com/coa/api/chart-account-settings"
payload := strings.NewReader("{\n \"recognize_discounts_as_contra_revenue\": true,\n \"enable_mid_month_convention\": true,\n \"mid_month_threshold\": 15,\n \"use_whole_month_accounting_for_prepaids\": true,\n \"mid_month_threshold_for_prepaids\": 16,\n \"split_invoice_payments_by_line\": true,\n \"split_eliminations_by_department\": true,\n \"fold_retained_earnings\": true,\n \"uncategorized\": 123,\n \"accounts_payable\": 123,\n \"accounts_receivable\": 123,\n \"deferred_revenue\": 123,\n \"accrued_revenue\": 123,\n \"unrealized_gain_loss\": 123,\n \"realized_gain_loss\": 123,\n \"rounding_account\": 123,\n \"unapplied_credits\": 123,\n \"unapplied_debits\": 123,\n \"unbilled_revenue\": 123,\n \"fallback_revenue\": 123,\n \"default_clearing\": 123,\n \"discount_account\": 123,\n \"accrued_discount_account\": 123,\n \"unbilled_discount_account\": 123,\n \"refund_account\": 123,\n \"processing_fees\": 123,\n \"platform_fees\": 123,\n \"deferred_processing_fees\": 123,\n \"tax_account\": 123,\n \"payout_account\": 123,\n \"cta_account\": 123,\n \"oci_translation_account\": 123,\n \"fixed_asset_disposal\": 123,\n \"fixed_asset_impairment_loss\": 123,\n \"bad_debt_account\": 123,\n \"dispute_expense_account\": 123,\n \"dispute_reinstatement_account\": 123,\n \"retained_earnings\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.meetcampfire.com/coa/api/chart-account-settings")
.header("Content-Type", "application/json")
.body("{\n \"recognize_discounts_as_contra_revenue\": true,\n \"enable_mid_month_convention\": true,\n \"mid_month_threshold\": 15,\n \"use_whole_month_accounting_for_prepaids\": true,\n \"mid_month_threshold_for_prepaids\": 16,\n \"split_invoice_payments_by_line\": true,\n \"split_eliminations_by_department\": true,\n \"fold_retained_earnings\": true,\n \"uncategorized\": 123,\n \"accounts_payable\": 123,\n \"accounts_receivable\": 123,\n \"deferred_revenue\": 123,\n \"accrued_revenue\": 123,\n \"unrealized_gain_loss\": 123,\n \"realized_gain_loss\": 123,\n \"rounding_account\": 123,\n \"unapplied_credits\": 123,\n \"unapplied_debits\": 123,\n \"unbilled_revenue\": 123,\n \"fallback_revenue\": 123,\n \"default_clearing\": 123,\n \"discount_account\": 123,\n \"accrued_discount_account\": 123,\n \"unbilled_discount_account\": 123,\n \"refund_account\": 123,\n \"processing_fees\": 123,\n \"platform_fees\": 123,\n \"deferred_processing_fees\": 123,\n \"tax_account\": 123,\n \"payout_account\": 123,\n \"cta_account\": 123,\n \"oci_translation_account\": 123,\n \"fixed_asset_disposal\": 123,\n \"fixed_asset_impairment_loss\": 123,\n \"bad_debt_account\": 123,\n \"dispute_expense_account\": 123,\n \"dispute_reinstatement_account\": 123,\n \"retained_earnings\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/chart-account-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"recognize_discounts_as_contra_revenue\": true,\n \"enable_mid_month_convention\": true,\n \"mid_month_threshold\": 15,\n \"use_whole_month_accounting_for_prepaids\": true,\n \"mid_month_threshold_for_prepaids\": 16,\n \"split_invoice_payments_by_line\": true,\n \"split_eliminations_by_department\": true,\n \"fold_retained_earnings\": true,\n \"uncategorized\": 123,\n \"accounts_payable\": 123,\n \"accounts_receivable\": 123,\n \"deferred_revenue\": 123,\n \"accrued_revenue\": 123,\n \"unrealized_gain_loss\": 123,\n \"realized_gain_loss\": 123,\n \"rounding_account\": 123,\n \"unapplied_credits\": 123,\n \"unapplied_debits\": 123,\n \"unbilled_revenue\": 123,\n \"fallback_revenue\": 123,\n \"default_clearing\": 123,\n \"discount_account\": 123,\n \"accrued_discount_account\": 123,\n \"unbilled_discount_account\": 123,\n \"refund_account\": 123,\n \"processing_fees\": 123,\n \"platform_fees\": 123,\n \"deferred_processing_fees\": 123,\n \"tax_account\": 123,\n \"payout_account\": 123,\n \"cta_account\": 123,\n \"oci_translation_account\": 123,\n \"fixed_asset_disposal\": 123,\n \"fixed_asset_impairment_loss\": 123,\n \"bad_debt_account\": 123,\n \"dispute_expense_account\": 123,\n \"dispute_reinstatement_account\": 123,\n \"retained_earnings\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uncategorized_name_and_number": "<string>",
"accounts_payable_name_and_number": "<string>",
"accounts_receivable_name_and_number": "<string>",
"deferred_revenue_name_and_number": "<string>",
"accrued_revenue_name_and_number": "<string>",
"unrealized_gain_loss_name_and_number": "<string>",
"realized_gain_loss_name_and_number": "<string>",
"rounding_account_name_and_number": "<string>",
"unapplied_credits_name_and_number": "<string>",
"unapplied_debits_name_and_number": "<string>",
"unbilled_revenue_name_and_number": "<string>",
"fallback_revenue_name_and_number": "<string>",
"default_clearing_name_and_number": "<string>",
"discount_account_name_and_number": "<string>",
"accrued_discount_account_name_and_number": "<string>",
"unbilled_discount_account_name_and_number": "<string>",
"refund_account_name_and_number": "<string>",
"processing_fees_name_and_number": "<string>",
"platform_fees_name_and_number": "<string>",
"deferred_processing_fees_name_and_number": "<string>",
"tax_account_name_and_number": "<string>",
"payout_account_name_and_number": "<string>",
"cta_account_name_and_number": "<string>",
"oci_translation_account_name_and_number": "<string>",
"fixed_asset_disposal_name_and_number": "<string>",
"fixed_asset_impairment_loss_name_and_number": "<string>",
"bad_debt_account_name_and_number": "<string>",
"dispute_expense_account_name_and_number": "<string>",
"dispute_reinstatement_account_name_and_number": "<string>",
"retained_earnings_name_and_number": "<string>",
"customer": 123,
"recognize_discounts_as_contra_revenue": true,
"enable_mid_month_convention": true,
"mid_month_threshold": 15,
"use_whole_month_accounting_for_prepaids": true,
"mid_month_threshold_for_prepaids": 16,
"split_invoice_payments_by_line": true,
"split_eliminations_by_department": true,
"fold_retained_earnings": true,
"uncategorized": 123,
"accounts_payable": 123,
"accounts_receivable": 123,
"deferred_revenue": 123,
"accrued_revenue": 123,
"unrealized_gain_loss": 123,
"realized_gain_loss": 123,
"rounding_account": 123,
"unapplied_credits": 123,
"unapplied_debits": 123,
"unbilled_revenue": 123,
"fallback_revenue": 123,
"default_clearing": 123,
"discount_account": 123,
"accrued_discount_account": 123,
"unbilled_discount_account": 123,
"refund_account": 123,
"processing_fees": 123,
"platform_fees": 123,
"deferred_processing_fees": 123,
"tax_account": 123,
"payout_account": 123,
"cta_account": 123,
"oci_translation_account": 123,
"fixed_asset_disposal": 123,
"fixed_asset_impairment_loss": 123,
"bad_debt_account": 123,
"dispute_expense_account": 123,
"dispute_reinstatement_account": 123,
"retained_earnings": 123
}Partially Update Chart Account Settings
Partially update the default chart accounts to be used across the platform. Each input is the id to an existing chart account.
curl --request PATCH \
--url https://api.meetcampfire.com/coa/api/chart-account-settings \
--header 'Content-Type: application/json' \
--data '
{
"recognize_discounts_as_contra_revenue": true,
"enable_mid_month_convention": true,
"mid_month_threshold": 15,
"use_whole_month_accounting_for_prepaids": true,
"mid_month_threshold_for_prepaids": 16,
"split_invoice_payments_by_line": true,
"split_eliminations_by_department": true,
"fold_retained_earnings": true,
"uncategorized": 123,
"accounts_payable": 123,
"accounts_receivable": 123,
"deferred_revenue": 123,
"accrued_revenue": 123,
"unrealized_gain_loss": 123,
"realized_gain_loss": 123,
"rounding_account": 123,
"unapplied_credits": 123,
"unapplied_debits": 123,
"unbilled_revenue": 123,
"fallback_revenue": 123,
"default_clearing": 123,
"discount_account": 123,
"accrued_discount_account": 123,
"unbilled_discount_account": 123,
"refund_account": 123,
"processing_fees": 123,
"platform_fees": 123,
"deferred_processing_fees": 123,
"tax_account": 123,
"payout_account": 123,
"cta_account": 123,
"oci_translation_account": 123,
"fixed_asset_disposal": 123,
"fixed_asset_impairment_loss": 123,
"bad_debt_account": 123,
"dispute_expense_account": 123,
"dispute_reinstatement_account": 123,
"retained_earnings": 123
}
'import requests
url = "https://api.meetcampfire.com/coa/api/chart-account-settings"
payload = {
"recognize_discounts_as_contra_revenue": True,
"enable_mid_month_convention": True,
"mid_month_threshold": 15,
"use_whole_month_accounting_for_prepaids": True,
"mid_month_threshold_for_prepaids": 16,
"split_invoice_payments_by_line": True,
"split_eliminations_by_department": True,
"fold_retained_earnings": True,
"uncategorized": 123,
"accounts_payable": 123,
"accounts_receivable": 123,
"deferred_revenue": 123,
"accrued_revenue": 123,
"unrealized_gain_loss": 123,
"realized_gain_loss": 123,
"rounding_account": 123,
"unapplied_credits": 123,
"unapplied_debits": 123,
"unbilled_revenue": 123,
"fallback_revenue": 123,
"default_clearing": 123,
"discount_account": 123,
"accrued_discount_account": 123,
"unbilled_discount_account": 123,
"refund_account": 123,
"processing_fees": 123,
"platform_fees": 123,
"deferred_processing_fees": 123,
"tax_account": 123,
"payout_account": 123,
"cta_account": 123,
"oci_translation_account": 123,
"fixed_asset_disposal": 123,
"fixed_asset_impairment_loss": 123,
"bad_debt_account": 123,
"dispute_expense_account": 123,
"dispute_reinstatement_account": 123,
"retained_earnings": 123
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
recognize_discounts_as_contra_revenue: true,
enable_mid_month_convention: true,
mid_month_threshold: 15,
use_whole_month_accounting_for_prepaids: true,
mid_month_threshold_for_prepaids: 16,
split_invoice_payments_by_line: true,
split_eliminations_by_department: true,
fold_retained_earnings: true,
uncategorized: 123,
accounts_payable: 123,
accounts_receivable: 123,
deferred_revenue: 123,
accrued_revenue: 123,
unrealized_gain_loss: 123,
realized_gain_loss: 123,
rounding_account: 123,
unapplied_credits: 123,
unapplied_debits: 123,
unbilled_revenue: 123,
fallback_revenue: 123,
default_clearing: 123,
discount_account: 123,
accrued_discount_account: 123,
unbilled_discount_account: 123,
refund_account: 123,
processing_fees: 123,
platform_fees: 123,
deferred_processing_fees: 123,
tax_account: 123,
payout_account: 123,
cta_account: 123,
oci_translation_account: 123,
fixed_asset_disposal: 123,
fixed_asset_impairment_loss: 123,
bad_debt_account: 123,
dispute_expense_account: 123,
dispute_reinstatement_account: 123,
retained_earnings: 123
})
};
fetch('https://api.meetcampfire.com/coa/api/chart-account-settings', 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.meetcampfire.com/coa/api/chart-account-settings",
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([
'recognize_discounts_as_contra_revenue' => true,
'enable_mid_month_convention' => true,
'mid_month_threshold' => 15,
'use_whole_month_accounting_for_prepaids' => true,
'mid_month_threshold_for_prepaids' => 16,
'split_invoice_payments_by_line' => true,
'split_eliminations_by_department' => true,
'fold_retained_earnings' => true,
'uncategorized' => 123,
'accounts_payable' => 123,
'accounts_receivable' => 123,
'deferred_revenue' => 123,
'accrued_revenue' => 123,
'unrealized_gain_loss' => 123,
'realized_gain_loss' => 123,
'rounding_account' => 123,
'unapplied_credits' => 123,
'unapplied_debits' => 123,
'unbilled_revenue' => 123,
'fallback_revenue' => 123,
'default_clearing' => 123,
'discount_account' => 123,
'accrued_discount_account' => 123,
'unbilled_discount_account' => 123,
'refund_account' => 123,
'processing_fees' => 123,
'platform_fees' => 123,
'deferred_processing_fees' => 123,
'tax_account' => 123,
'payout_account' => 123,
'cta_account' => 123,
'oci_translation_account' => 123,
'fixed_asset_disposal' => 123,
'fixed_asset_impairment_loss' => 123,
'bad_debt_account' => 123,
'dispute_expense_account' => 123,
'dispute_reinstatement_account' => 123,
'retained_earnings' => 123
]),
CURLOPT_HTTPHEADER => [
"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.meetcampfire.com/coa/api/chart-account-settings"
payload := strings.NewReader("{\n \"recognize_discounts_as_contra_revenue\": true,\n \"enable_mid_month_convention\": true,\n \"mid_month_threshold\": 15,\n \"use_whole_month_accounting_for_prepaids\": true,\n \"mid_month_threshold_for_prepaids\": 16,\n \"split_invoice_payments_by_line\": true,\n \"split_eliminations_by_department\": true,\n \"fold_retained_earnings\": true,\n \"uncategorized\": 123,\n \"accounts_payable\": 123,\n \"accounts_receivable\": 123,\n \"deferred_revenue\": 123,\n \"accrued_revenue\": 123,\n \"unrealized_gain_loss\": 123,\n \"realized_gain_loss\": 123,\n \"rounding_account\": 123,\n \"unapplied_credits\": 123,\n \"unapplied_debits\": 123,\n \"unbilled_revenue\": 123,\n \"fallback_revenue\": 123,\n \"default_clearing\": 123,\n \"discount_account\": 123,\n \"accrued_discount_account\": 123,\n \"unbilled_discount_account\": 123,\n \"refund_account\": 123,\n \"processing_fees\": 123,\n \"platform_fees\": 123,\n \"deferred_processing_fees\": 123,\n \"tax_account\": 123,\n \"payout_account\": 123,\n \"cta_account\": 123,\n \"oci_translation_account\": 123,\n \"fixed_asset_disposal\": 123,\n \"fixed_asset_impairment_loss\": 123,\n \"bad_debt_account\": 123,\n \"dispute_expense_account\": 123,\n \"dispute_reinstatement_account\": 123,\n \"retained_earnings\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.meetcampfire.com/coa/api/chart-account-settings")
.header("Content-Type", "application/json")
.body("{\n \"recognize_discounts_as_contra_revenue\": true,\n \"enable_mid_month_convention\": true,\n \"mid_month_threshold\": 15,\n \"use_whole_month_accounting_for_prepaids\": true,\n \"mid_month_threshold_for_prepaids\": 16,\n \"split_invoice_payments_by_line\": true,\n \"split_eliminations_by_department\": true,\n \"fold_retained_earnings\": true,\n \"uncategorized\": 123,\n \"accounts_payable\": 123,\n \"accounts_receivable\": 123,\n \"deferred_revenue\": 123,\n \"accrued_revenue\": 123,\n \"unrealized_gain_loss\": 123,\n \"realized_gain_loss\": 123,\n \"rounding_account\": 123,\n \"unapplied_credits\": 123,\n \"unapplied_debits\": 123,\n \"unbilled_revenue\": 123,\n \"fallback_revenue\": 123,\n \"default_clearing\": 123,\n \"discount_account\": 123,\n \"accrued_discount_account\": 123,\n \"unbilled_discount_account\": 123,\n \"refund_account\": 123,\n \"processing_fees\": 123,\n \"platform_fees\": 123,\n \"deferred_processing_fees\": 123,\n \"tax_account\": 123,\n \"payout_account\": 123,\n \"cta_account\": 123,\n \"oci_translation_account\": 123,\n \"fixed_asset_disposal\": 123,\n \"fixed_asset_impairment_loss\": 123,\n \"bad_debt_account\": 123,\n \"dispute_expense_account\": 123,\n \"dispute_reinstatement_account\": 123,\n \"retained_earnings\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/chart-account-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"recognize_discounts_as_contra_revenue\": true,\n \"enable_mid_month_convention\": true,\n \"mid_month_threshold\": 15,\n \"use_whole_month_accounting_for_prepaids\": true,\n \"mid_month_threshold_for_prepaids\": 16,\n \"split_invoice_payments_by_line\": true,\n \"split_eliminations_by_department\": true,\n \"fold_retained_earnings\": true,\n \"uncategorized\": 123,\n \"accounts_payable\": 123,\n \"accounts_receivable\": 123,\n \"deferred_revenue\": 123,\n \"accrued_revenue\": 123,\n \"unrealized_gain_loss\": 123,\n \"realized_gain_loss\": 123,\n \"rounding_account\": 123,\n \"unapplied_credits\": 123,\n \"unapplied_debits\": 123,\n \"unbilled_revenue\": 123,\n \"fallback_revenue\": 123,\n \"default_clearing\": 123,\n \"discount_account\": 123,\n \"accrued_discount_account\": 123,\n \"unbilled_discount_account\": 123,\n \"refund_account\": 123,\n \"processing_fees\": 123,\n \"platform_fees\": 123,\n \"deferred_processing_fees\": 123,\n \"tax_account\": 123,\n \"payout_account\": 123,\n \"cta_account\": 123,\n \"oci_translation_account\": 123,\n \"fixed_asset_disposal\": 123,\n \"fixed_asset_impairment_loss\": 123,\n \"bad_debt_account\": 123,\n \"dispute_expense_account\": 123,\n \"dispute_reinstatement_account\": 123,\n \"retained_earnings\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uncategorized_name_and_number": "<string>",
"accounts_payable_name_and_number": "<string>",
"accounts_receivable_name_and_number": "<string>",
"deferred_revenue_name_and_number": "<string>",
"accrued_revenue_name_and_number": "<string>",
"unrealized_gain_loss_name_and_number": "<string>",
"realized_gain_loss_name_and_number": "<string>",
"rounding_account_name_and_number": "<string>",
"unapplied_credits_name_and_number": "<string>",
"unapplied_debits_name_and_number": "<string>",
"unbilled_revenue_name_and_number": "<string>",
"fallback_revenue_name_and_number": "<string>",
"default_clearing_name_and_number": "<string>",
"discount_account_name_and_number": "<string>",
"accrued_discount_account_name_and_number": "<string>",
"unbilled_discount_account_name_and_number": "<string>",
"refund_account_name_and_number": "<string>",
"processing_fees_name_and_number": "<string>",
"platform_fees_name_and_number": "<string>",
"deferred_processing_fees_name_and_number": "<string>",
"tax_account_name_and_number": "<string>",
"payout_account_name_and_number": "<string>",
"cta_account_name_and_number": "<string>",
"oci_translation_account_name_and_number": "<string>",
"fixed_asset_disposal_name_and_number": "<string>",
"fixed_asset_impairment_loss_name_and_number": "<string>",
"bad_debt_account_name_and_number": "<string>",
"dispute_expense_account_name_and_number": "<string>",
"dispute_reinstatement_account_name_and_number": "<string>",
"retained_earnings_name_and_number": "<string>",
"customer": 123,
"recognize_discounts_as_contra_revenue": true,
"enable_mid_month_convention": true,
"mid_month_threshold": 15,
"use_whole_month_accounting_for_prepaids": true,
"mid_month_threshold_for_prepaids": 16,
"split_invoice_payments_by_line": true,
"split_eliminations_by_department": true,
"fold_retained_earnings": true,
"uncategorized": 123,
"accounts_payable": 123,
"accounts_receivable": 123,
"deferred_revenue": 123,
"accrued_revenue": 123,
"unrealized_gain_loss": 123,
"realized_gain_loss": 123,
"rounding_account": 123,
"unapplied_credits": 123,
"unapplied_debits": 123,
"unbilled_revenue": 123,
"fallback_revenue": 123,
"default_clearing": 123,
"discount_account": 123,
"accrued_discount_account": 123,
"unbilled_discount_account": 123,
"refund_account": 123,
"processing_fees": 123,
"platform_fees": 123,
"deferred_processing_fees": 123,
"tax_account": 123,
"payout_account": 123,
"cta_account": 123,
"oci_translation_account": 123,
"fixed_asset_disposal": 123,
"fixed_asset_impairment_loss": 123,
"bad_debt_account": 123,
"dispute_expense_account": 123,
"dispute_reinstatement_account": 123,
"retained_earnings": 123
}Body
When enabled, recognized discounts post to the discount account instead of netting into revenue.
When enabled, fixed assets placed in service after the threshold day will begin depreciation the following month (full-month depreciation only)
Day of month threshold (0-31). Assets placed in service AFTER this day will start depreciation the following month
0 <= x <= 31When enabled, prepaid amortizations will use whole-month accounting (no proration of first/last months)
Day of month threshold (1-31), or blank to disable. Whole-month prepaid amortizations starting AFTER this day begin their schedule the following month; the end date is unchanged
1 <= x <= 31When enabled, invoice payments will be split by line items
When enabled, elimination entries are broken out by department in addition to account and entity
When enabled, the Retained Earnings account's directly posted balances combine with the calculated retained earnings into a single line on the balance sheet and trial balance.
Revenue account for contract obligations whose product carries no revenue account.
Account for Stripe platform/subscription fees. Falls back to processing_fees if not set.
Account for dispute withdrawals (debit) and dispute reinstatement reversals (credit). Falls back to bad_debt_account if not set.
Account credited when a dispute is reinstated (won). Falls back to dispute_expense_account if not set.
Equity account that holds a migrated opening Retained Earnings balance. When folding is enabled, its directly posted balances combine with the calculated retained earnings into a single line on reports.
Response
When enabled, recognized discounts post to the discount account instead of netting into revenue.
When enabled, fixed assets placed in service after the threshold day will begin depreciation the following month (full-month depreciation only)
Day of month threshold (0-31). Assets placed in service AFTER this day will start depreciation the following month
0 <= x <= 31When enabled, prepaid amortizations will use whole-month accounting (no proration of first/last months)
Day of month threshold (1-31), or blank to disable. Whole-month prepaid amortizations starting AFTER this day begin their schedule the following month; the end date is unchanged
1 <= x <= 31When enabled, invoice payments will be split by line items
When enabled, elimination entries are broken out by department in addition to account and entity
When enabled, the Retained Earnings account's directly posted balances combine with the calculated retained earnings into a single line on the balance sheet and trial balance.
Revenue account for contract obligations whose product carries no revenue account.
Account for Stripe platform/subscription fees. Falls back to processing_fees if not set.
Account for dispute withdrawals (debit) and dispute reinstatement reversals (credit). Falls back to bad_debt_account if not set.
Account credited when a dispute is reinstated (won). Falls back to dispute_expense_account if not set.
Equity account that holds a migrated opening Retained Earnings balance. When folding is enabled, its directly posted balances combine with the calculated retained earnings into a single line on reports.