Skip to main content
PATCH
/
coa
/
api
/
chart-account-settings
Partially Update Chart Account Settings
curl --request PATCH \
  --url https://api.meetcampfire.com/coa/api/chart-account-settings \
  --header 'Authorization: <api-key>' \
  --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,
  "split_invoice_payments_by_line": true,
  "split_eliminations_by_department": 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,
  "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,
  "bad_debt_account": 123,
  "dispute_expense_account": 123,
  "dispute_reinstatement_account": 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,
"split_invoice_payments_by_line": True,
"split_eliminations_by_department": 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,
"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,
"bad_debt_account": 123,
"dispute_expense_account": 123,
"dispute_reinstatement_account": 123
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', '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,
split_invoice_payments_by_line: true,
split_eliminations_by_department: 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,
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,
bad_debt_account: 123,
dispute_expense_account: 123,
dispute_reinstatement_account: 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,
'split_invoice_payments_by_line' => true,
'split_eliminations_by_department' => 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,
'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,
'bad_debt_account' => 123,
'dispute_expense_account' => 123,
'dispute_reinstatement_account' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 \"split_invoice_payments_by_line\": true,\n \"split_eliminations_by_department\": 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 \"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 \"bad_debt_account\": 123,\n \"dispute_expense_account\": 123,\n \"dispute_reinstatement_account\": 123\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "<api-key>")
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("Authorization", "<api-key>")
.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 \"split_invoice_payments_by_line\": true,\n \"split_eliminations_by_department\": 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 \"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 \"bad_debt_account\": 123,\n \"dispute_expense_account\": 123,\n \"dispute_reinstatement_account\": 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["Authorization"] = '<api-key>'
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 \"split_invoice_payments_by_line\": true,\n \"split_eliminations_by_department\": 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 \"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 \"bad_debt_account\": 123,\n \"dispute_expense_account\": 123,\n \"dispute_reinstatement_account\": 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>",
  "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>",
  "bad_debt_account_name_and_number": "<string>",
  "dispute_expense_account_name_and_number": "<string>",
  "dispute_reinstatement_account_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,
  "split_invoice_payments_by_line": true,
  "split_eliminations_by_department": 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,
  "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,
  "bad_debt_account": 123,
  "dispute_expense_account": 123,
  "dispute_reinstatement_account": 123
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Body

recognize_discounts_as_contra_revenue
boolean

When enabled, recognized discounts post to the discount account instead of netting into revenue.

enable_mid_month_convention
boolean

When enabled, fixed assets placed in service after the threshold day will begin depreciation the following month (full-month depreciation only)

mid_month_threshold
integer

Day of month threshold (0-31). Assets placed in service AFTER this day will start depreciation the following month

Required range: 0 <= x <= 31
use_whole_month_accounting_for_prepaids
boolean

When enabled, prepaid amortizations will use whole-month accounting (no proration of first/last months)

split_invoice_payments_by_line
boolean | null

When enabled, invoice payments will be split by line items

split_eliminations_by_department
boolean

When enabled, elimination entries are broken out by department in addition to account and entity

uncategorized
integer | null
accounts_payable
integer | null
accounts_receivable
integer | null
deferred_revenue
integer | null
accrued_revenue
integer | null
unrealized_gain_loss
integer | null
realized_gain_loss
integer | null
rounding_account
integer | null
unapplied_credits
integer | null
unapplied_debits
integer | null
unbilled_revenue
integer | null
default_clearing
integer | null
discount_account
integer | null
accrued_discount_account
integer | null
unbilled_discount_account
integer | null
refund_account
integer | null
processing_fees
integer | null
platform_fees
integer | null

Account for Stripe platform/subscription fees. Falls back to processing_fees if not set.

deferred_processing_fees
integer | null
tax_account
integer | null
payout_account
integer | null
cta_account
integer | null
oci_translation_account
integer | null
fixed_asset_disposal
integer | null
bad_debt_account
integer | null
dispute_expense_account
integer | null

Account for dispute withdrawals (debit) and dispute reinstatement reversals (credit). Falls back to bad_debt_account if not set.

dispute_reinstatement_account
integer | null

Account credited when a dispute is reinstated (won). Falls back to dispute_expense_account if not set.

Response

200 - application/json
id
integer
required
read-only
uncategorized_name_and_number
string
required
read-only
accounts_payable_name_and_number
string
required
read-only
accounts_receivable_name_and_number
string
required
read-only
deferred_revenue_name_and_number
string
required
read-only
accrued_revenue_name_and_number
string
required
read-only
unrealized_gain_loss_name_and_number
string
required
read-only
realized_gain_loss_name_and_number
string
required
read-only
rounding_account_name_and_number
string
required
read-only
unapplied_credits_name_and_number
string
required
read-only
unapplied_debits_name_and_number
string
required
read-only
unbilled_revenue_name_and_number
string
required
read-only
default_clearing_name_and_number
string
required
read-only
discount_account_name_and_number
string
required
read-only
accrued_discount_account_name_and_number
string
required
read-only
unbilled_discount_account_name_and_number
string
required
read-only
refund_account_name_and_number
string
required
read-only
processing_fees_name_and_number
string
required
read-only
platform_fees_name_and_number
string
required
read-only
deferred_processing_fees_name_and_number
string
required
read-only
tax_account_name_and_number
string
required
read-only
payout_account_name_and_number
string
required
read-only
cta_account_name_and_number
string
required
read-only
oci_translation_account_name_and_number
string
required
read-only
fixed_asset_disposal_name_and_number
string
required
read-only
bad_debt_account_name_and_number
string
required
read-only
dispute_expense_account_name_and_number
string
required
read-only
dispute_reinstatement_account_name_and_number
string
required
read-only
customer
integer
required
read-only
recognize_discounts_as_contra_revenue
boolean

When enabled, recognized discounts post to the discount account instead of netting into revenue.

enable_mid_month_convention
boolean

When enabled, fixed assets placed in service after the threshold day will begin depreciation the following month (full-month depreciation only)

mid_month_threshold
integer

Day of month threshold (0-31). Assets placed in service AFTER this day will start depreciation the following month

Required range: 0 <= x <= 31
use_whole_month_accounting_for_prepaids
boolean

When enabled, prepaid amortizations will use whole-month accounting (no proration of first/last months)

split_invoice_payments_by_line
boolean | null

When enabled, invoice payments will be split by line items

split_eliminations_by_department
boolean

When enabled, elimination entries are broken out by department in addition to account and entity

uncategorized
integer | null
accounts_payable
integer | null
accounts_receivable
integer | null
deferred_revenue
integer | null
accrued_revenue
integer | null
unrealized_gain_loss
integer | null
realized_gain_loss
integer | null
rounding_account
integer | null
unapplied_credits
integer | null
unapplied_debits
integer | null
unbilled_revenue
integer | null
default_clearing
integer | null
discount_account
integer | null
accrued_discount_account
integer | null
unbilled_discount_account
integer | null
refund_account
integer | null
processing_fees
integer | null
platform_fees
integer | null

Account for Stripe platform/subscription fees. Falls back to processing_fees if not set.

deferred_processing_fees
integer | null
tax_account
integer | null
payout_account
integer | null
cta_account
integer | null
oci_translation_account
integer | null
fixed_asset_disposal
integer | null
bad_debt_account
integer | null
dispute_expense_account
integer | null

Account for dispute withdrawals (debit) and dispute reinstatement reversals (credit). Falls back to bad_debt_account if not set.

dispute_reinstatement_account
integer | null

Account credited when a dispute is reinstated (won). Falls back to dispute_expense_account if not set.