Skip to main content
PATCH
/
coa
/
api
/
transaction
/
{id}
Partial Update Chart Transaction
curl --request PATCH \
  --url https://api.meetcampfire.com/coa/api/transaction/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "account": 123,
  "tax_rate": 123,
  "apply_both_sides": false,
  "transaction_match_id": 123,
  "debit_amount": 0,
  "credit_amount": 0,
  "debit_amount_book": 0,
  "credit_amount_book": 0,
  "debit_amount_native": 0,
  "credit_amount_native": 0,
  "currency": "<string>",
  "exchange_rate": 0,
  "exchange_rate_book": 0,
  "posted_at": "2023-12-25",
  "merchant_name": "<string>",
  "bank_description": "<string>",
  "tag_ids": [
    0
  ],
  "tag_group_ids": [
    0
  ],
  "note": "<string>",
  "receipt_url": "<string>",
  "external_id": "<string>",
  "needs_review": true,
  "draft_matches": null,
  "last_lam_prediction_attempt": "2023-11-07T05:31:56Z",
  "entity": 123,
  "source_entity": 123,
  "parent_bank_transaction": 123,
  "vendor": 123,
  "department": 123,
  "last_modified_by": 123
}
'
import requests

url = "https://api.meetcampfire.com/coa/api/transaction/{id}"

payload = {
    "account": 123,
    "tax_rate": 123,
    "apply_both_sides": False,
    "transaction_match_id": 123,
    "debit_amount": 0,
    "credit_amount": 0,
    "debit_amount_book": 0,
    "credit_amount_book": 0,
    "debit_amount_native": 0,
    "credit_amount_native": 0,
    "currency": "<string>",
    "exchange_rate": 0,
    "exchange_rate_book": 0,
    "posted_at": "2023-12-25",
    "merchant_name": "<string>",
    "bank_description": "<string>",
    "tag_ids": [0],
    "tag_group_ids": [0],
    "note": "<string>",
    "receipt_url": "<string>",
    "external_id": "<string>",
    "needs_review": True,
    "draft_matches": None,
    "last_lam_prediction_attempt": "2023-11-07T05:31:56Z",
    "entity": 123,
    "source_entity": 123,
    "parent_bank_transaction": 123,
    "vendor": 123,
    "department": 123,
    "last_modified_by": 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({
    account: 123,
    tax_rate: 123,
    apply_both_sides: false,
    transaction_match_id: 123,
    debit_amount: 0,
    credit_amount: 0,
    debit_amount_book: 0,
    credit_amount_book: 0,
    debit_amount_native: 0,
    credit_amount_native: 0,
    currency: '<string>',
    exchange_rate: 0,
    exchange_rate_book: 0,
    posted_at: '2023-12-25',
    merchant_name: '<string>',
    bank_description: '<string>',
    tag_ids: [0],
    tag_group_ids: [0],
    note: '<string>',
    receipt_url: '<string>',
    external_id: '<string>',
    needs_review: true,
    draft_matches: null,
    last_lam_prediction_attempt: '2023-11-07T05:31:56Z',
    entity: 123,
    source_entity: 123,
    parent_bank_transaction: 123,
    vendor: 123,
    department: 123,
    last_modified_by: 123
  })
};

fetch('https://api.meetcampfire.com/coa/api/transaction/{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.meetcampfire.com/coa/api/transaction/{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([
    'account' => 123,
    'tax_rate' => 123,
    'apply_both_sides' => false,
    'transaction_match_id' => 123,
    'debit_amount' => 0,
    'credit_amount' => 0,
    'debit_amount_book' => 0,
    'credit_amount_book' => 0,
    'debit_amount_native' => 0,
    'credit_amount_native' => 0,
    'currency' => '<string>',
    'exchange_rate' => 0,
    'exchange_rate_book' => 0,
    'posted_at' => '2023-12-25',
    'merchant_name' => '<string>',
    'bank_description' => '<string>',
    'tag_ids' => [
        0
    ],
    'tag_group_ids' => [
        0
    ],
    'note' => '<string>',
    'receipt_url' => '<string>',
    'external_id' => '<string>',
    'needs_review' => true,
    'draft_matches' => null,
    'last_lam_prediction_attempt' => '2023-11-07T05:31:56Z',
    'entity' => 123,
    'source_entity' => 123,
    'parent_bank_transaction' => 123,
    'vendor' => 123,
    'department' => 123,
    'last_modified_by' => 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/transaction/{id}"

	payload := strings.NewReader("{\n  \"account\": 123,\n  \"tax_rate\": 123,\n  \"apply_both_sides\": false,\n  \"transaction_match_id\": 123,\n  \"debit_amount\": 0,\n  \"credit_amount\": 0,\n  \"debit_amount_book\": 0,\n  \"credit_amount_book\": 0,\n  \"debit_amount_native\": 0,\n  \"credit_amount_native\": 0,\n  \"currency\": \"<string>\",\n  \"exchange_rate\": 0,\n  \"exchange_rate_book\": 0,\n  \"posted_at\": \"2023-12-25\",\n  \"merchant_name\": \"<string>\",\n  \"bank_description\": \"<string>\",\n  \"tag_ids\": [\n    0\n  ],\n  \"tag_group_ids\": [\n    0\n  ],\n  \"note\": \"<string>\",\n  \"receipt_url\": \"<string>\",\n  \"external_id\": \"<string>\",\n  \"needs_review\": true,\n  \"draft_matches\": null,\n  \"last_lam_prediction_attempt\": \"2023-11-07T05:31:56Z\",\n  \"entity\": 123,\n  \"source_entity\": 123,\n  \"parent_bank_transaction\": 123,\n  \"vendor\": 123,\n  \"department\": 123,\n  \"last_modified_by\": 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/transaction/{id}")
  .header("Authorization", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"account\": 123,\n  \"tax_rate\": 123,\n  \"apply_both_sides\": false,\n  \"transaction_match_id\": 123,\n  \"debit_amount\": 0,\n  \"credit_amount\": 0,\n  \"debit_amount_book\": 0,\n  \"credit_amount_book\": 0,\n  \"debit_amount_native\": 0,\n  \"credit_amount_native\": 0,\n  \"currency\": \"<string>\",\n  \"exchange_rate\": 0,\n  \"exchange_rate_book\": 0,\n  \"posted_at\": \"2023-12-25\",\n  \"merchant_name\": \"<string>\",\n  \"bank_description\": \"<string>\",\n  \"tag_ids\": [\n    0\n  ],\n  \"tag_group_ids\": [\n    0\n  ],\n  \"note\": \"<string>\",\n  \"receipt_url\": \"<string>\",\n  \"external_id\": \"<string>\",\n  \"needs_review\": true,\n  \"draft_matches\": null,\n  \"last_lam_prediction_attempt\": \"2023-11-07T05:31:56Z\",\n  \"entity\": 123,\n  \"source_entity\": 123,\n  \"parent_bank_transaction\": 123,\n  \"vendor\": 123,\n  \"department\": 123,\n  \"last_modified_by\": 123\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.meetcampfire.com/coa/api/transaction/{id}")

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  \"account\": 123,\n  \"tax_rate\": 123,\n  \"apply_both_sides\": false,\n  \"transaction_match_id\": 123,\n  \"debit_amount\": 0,\n  \"credit_amount\": 0,\n  \"debit_amount_book\": 0,\n  \"credit_amount_book\": 0,\n  \"debit_amount_native\": 0,\n  \"credit_amount_native\": 0,\n  \"currency\": \"<string>\",\n  \"exchange_rate\": 0,\n  \"exchange_rate_book\": 0,\n  \"posted_at\": \"2023-12-25\",\n  \"merchant_name\": \"<string>\",\n  \"bank_description\": \"<string>\",\n  \"tag_ids\": [\n    0\n  ],\n  \"tag_group_ids\": [\n    0\n  ],\n  \"note\": \"<string>\",\n  \"receipt_url\": \"<string>\",\n  \"external_id\": \"<string>\",\n  \"needs_review\": true,\n  \"draft_matches\": null,\n  \"last_lam_prediction_attempt\": \"2023-11-07T05:31:56Z\",\n  \"entity\": 123,\n  \"source_entity\": 123,\n  \"parent_bank_transaction\": 123,\n  \"vendor\": 123,\n  \"department\": 123,\n  \"last_modified_by\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "is_deleted": false,
  "deleted_at": "2023-11-07T05:31:56Z",
  "entity_name": "<string>",
  "entity_currency": "<string>",
  "account_name": "<string>",
  "account_number": "<string>",
  "vendor_name": "<string>",
  "vendor_id": "<string>",
  "department_name": "<string>",
  "department_code": "<string>",
  "parent_department_name": "<string>",
  "parent_department": 123,
  "tags": [
    {}
  ],
  "journal": 123,
  "journal_order": "<string>",
  "journal_memo": "<string>",
  "journal_type": "<string>",
  "intercompany_journal": 123,
  "created_automatically": true,
  "journal_attachments": [
    {
      "id": 123,
      "customer": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "created_by": 123,
      "created_by_name": "<string>",
      "created_by_email": "<string>",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "url": "<string>",
      "s3_path": "<string>",
      "app": "<string>",
      "model": "<string>",
      "is_deleted": false,
      "deleted_at": "2023-11-07T05:31:56Z",
      "s3_content_type": "<string>",
      "s3_content_length": 1073741823,
      "object_id": 1073741823
    }
  ],
  "journal_type_name": "<string>",
  "invoice": "<string>",
  "bill": "<string>",
  "date_month": "<string>",
  "date_year": "<string>",
  "balance_after_transaction": 123,
  "bank_account": "<string>",
  "bank_account_name": "<string>",
  "last_modified_by_name": "<string>",
  "account_type": "<string>",
  "account_subtype": "<string>",
  "parent_account_name": "<string>",
  "files": "<string>",
  "invoice_id": 123,
  "invoice_number": "<string>",
  "bill_id": 123,
  "bill_number": "<string>",
  "file_names": "<string>",
  "has_matches": true,
  "has_ai": true,
  "has_rules": true,
  "has_merges": true,
  "has_fixed_asset_rule_matches": true,
  "primary_action_type": "<string>",
  "suggested_account": 123,
  "suggested_account_name": "<string>",
  "suggested_account_number": "<string>",
  "amount": 0,
  "amount_native": 0,
  "amount_book": 0,
  "amortization_schedule": [
    {
      "journal_entry_order": "<string>",
      "date": "2023-12-25",
      "amount": 0,
      "customer": 123,
      "id": 123,
      "posted": true,
      "transaction": 123,
      "bill_line": 123,
      "journal_entry": 123
    }
  ],
  "linked_amortizations": [
    {}
  ],
  "created_fixed_assets": [
    {}
  ],
  "reconciliation_report": "<string>",
  "opposing_account_name": "<string>",
  "opposing_account_number": "<string>",
  "transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "balance_before_transaction": 0,
  "created_at": "2023-11-07T05:31:56Z",
  "last_modified_at": "2023-11-07T05:31:56Z",
  "customer": 123,
  "entity": 123,
  "account": 123,
  "debit_amount": 0,
  "credit_amount": 0,
  "debit_amount_book": 0,
  "credit_amount_book": 0,
  "debit_amount_native": 0,
  "credit_amount_native": 0,
  "currency": "<string>",
  "exchange_rate": 0,
  "exchange_rate_book": 0,
  "posted_at": "2023-12-25",
  "merchant_name": "<string>",
  "bank_description": "<string>",
  "tag_ids": [
    0
  ],
  "tag_group_ids": [
    0
  ],
  "note": "<string>",
  "receipt_url": "<string>",
  "external_id": "<string>",
  "needs_review": true,
  "draft_matches": null,
  "last_lam_prediction_attempt": "2023-11-07T05:31:56Z",
  "source_entity": 123,
  "parent_bank_transaction": 123,
  "vendor": 123,
  "department": 123,
  "last_modified_by": 123
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Path Parameters

id
integer
required

Body

account
integer | null
tax_rate
integer | null
write-only
apply_both_sides
boolean
default:false
write-only
transaction_match_id
integer | null
write-only
debit_amount
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
credit_amount
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
debit_amount_book
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
credit_amount_book
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
debit_amount_native
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
credit_amount_native
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
currency
string
Maximum string length: 3
exchange_rate
number<double> | null
Required range: -100000000000000 < x < 100000000000000
exchange_rate_book
number<double> | null
Required range: -100000000000000 < x < 100000000000000
posted_at
string<date> | null
merchant_name
string | null
bank_description
string | null
tag_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
tag_group_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
note
string | null
receipt_url
string<uri> | null
Maximum string length: 512
external_id
string | null
needs_review
boolean
draft_matches
unknown
last_lam_prediction_attempt
string<date-time> | null
entity
integer
source_entity
integer | null
parent_bank_transaction
integer | null
vendor
integer | null
department
integer | null
last_modified_by
integer | null

Response

200 - application/json
id
integer
required
read-only
is_deleted
boolean
default:false
required
read-only
deleted_at
string<date-time> | null
required
read-only
entity_name
string
required
read-only
entity_currency
string
required
read-only
account_name
string | null
required
read-only

Combines account number and name in the format "number - name"

account_number
string
required
read-only
vendor_name
string
required
read-only

Name of the linked Campfire Vendor object. Distinct from merchant_name, which is free text stored directly on the transaction and not linked to a Campfire object.

vendor_id
string
required
read-only
department_name
string
required
read-only
department_code
string
required
read-only
parent_department_name
string
required
read-only
parent_department
integer
required
read-only
tags
object[]
required
read-only
journal
integer
required
read-only
journal_order
string
required
read-only
journal_memo
string
required
read-only
journal_type
string
required
read-only
intercompany_journal
integer
required
read-only
created_automatically
boolean
required
read-only
journal_attachments
object[]
required
read-only
journal_type_name
string | null
required
read-only
invoice
string | null
required
read-only
bill
string | null
required
read-only
date_month
string | null
required
read-only

Two-digit month (MM) derived from posted_at, the transaction date.

date_year
string | null
required
read-only

Four-digit year (YYYY) derived from posted_at, the transaction date.

balance_after_transaction
number<double>
required
read-only
bank_account
string
required
read-only
bank_account_name
string
required
read-only
last_modified_by_name
string
required
read-only
account_type
string
required
read-only
account_subtype
string
required
read-only
parent_account_name
string
required
read-only
files
string
required
read-only
invoice_id
integer | null
required
read-only
invoice_number
string | null
required
read-only
bill_id
integer | null
required
read-only
bill_number
string | null
required
read-only
file_names
string
required
read-only
has_matches
boolean
required
read-only
has_ai
boolean
required
read-only
has_rules
boolean
required
read-only
has_merges
boolean
required
read-only
has_fixed_asset_rule_matches
boolean
required
read-only
primary_action_type
string
required
read-only
suggested_account
integer | null
required
read-only
suggested_account_name
string | null
required
read-only
suggested_account_number
string | null
required
read-only
amount
number<double>
required
read-only

Amount in consolidated currency (the currency of the root entity).

Required range: -1000000000000000000 < x < 1000000000000000000
amount_native
number<double>
required
read-only

Amount in the currency the transaction was originally created in.

Required range: -1000000000000000000 < x < 1000000000000000000
amount_book
number<double>
required
read-only

Amount in the currency of the entity this transaction belongs to.

Required range: -1000000000000000000 < x < 1000000000000000000
amortization_schedule
object[]
required
read-only
linked_amortizations
object[]
required
read-only
created_fixed_assets
object[]
required
read-only

Return all fixed assets this transaction is linked to — via the legacy purchase_transaction FK (reverse: created_fixed_assets) AND the new purchase_transactions M2M (reverse: linked_fixed_assets). Dual-write keeps the FK target in the M2M, but using both covers any pre-backfill drift and surfaces non-primary M2M-only links (e.g. the secondary txns in a multi-txn fixed asset, or a split-resized txn).

reconciliation_report
string
required
read-only
opposing_account_name
string
required
read-only
opposing_account_number
string
required
read-only
transaction_id
string<uuid>
required
read-only
balance_before_transaction
number<double> | null
required
read-only
Required range: -1000000000000000000 < x < 1000000000000000000
created_at
string<date-time>
required
read-only
last_modified_at
string<date-time>
required
read-only
customer
integer
required
read-only
entity
integer
required
account
integer | null
debit_amount
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
credit_amount
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
debit_amount_book
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
credit_amount_book
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
debit_amount_native
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
credit_amount_native
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
currency
string
Maximum string length: 3
exchange_rate
number<double> | null
Required range: -100000000000000 < x < 100000000000000
exchange_rate_book
number<double> | null
Required range: -100000000000000 < x < 100000000000000
posted_at
string<date> | null
merchant_name
string | null
bank_description
string | null
tag_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
tag_group_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
note
string | null
receipt_url
string<uri> | null
Maximum string length: 512
external_id
string | null
needs_review
boolean
draft_matches
unknown
last_lam_prediction_attempt
string<date-time> | null
source_entity
integer | null
parent_bank_transaction
integer | null
vendor
integer | null
department
integer | null
last_modified_by
integer | null