curl --request PUT \
--url https://api.meetcampfire.com/coa/api/v1/bill/{id}/ \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"account": 123,
"id": 123,
"bill": 123,
"description": "<string>",
"amount": 0,
"tax": 0,
"tax_description": "<string>",
"source": "<string>",
"source_id": "<string>",
"currency": "<string>",
"tax_rate": 123,
"bill_customer": 123,
"department": 123
}
],
"bill_number": "<string>",
"bill_date": "2023-12-25",
"due_date": "2023-12-25",
"entity": 123,
"vendor": 123,
"item_date": "2023-12-25",
"migrated_journal_id": 123,
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mailing_address": "<string>",
"paid_date": "2023-12-25",
"message_on_bill": "<string>",
"ita_allocation_number": "<string>",
"source_id": "<string>",
"source": "<string>",
"source_bill_data": null,
"external_ramp_id": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"chat_id": -1,
"payment_term": 123,
"journal_entry": 123,
"source_file": 123,
"tax_rate": 123,
"ap_account": 123,
"voided_journal_entry": 123
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/bill/{id}/"
payload = {
"lines": [
{
"account": 123,
"id": 123,
"bill": 123,
"description": "<string>",
"amount": 0,
"tax": 0,
"tax_description": "<string>",
"source": "<string>",
"source_id": "<string>",
"currency": "<string>",
"tax_rate": 123,
"bill_customer": 123,
"department": 123
}
],
"bill_number": "<string>",
"bill_date": "2023-12-25",
"due_date": "2023-12-25",
"entity": 123,
"vendor": 123,
"item_date": "2023-12-25",
"migrated_journal_id": 123,
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mailing_address": "<string>",
"paid_date": "2023-12-25",
"message_on_bill": "<string>",
"ita_allocation_number": "<string>",
"source_id": "<string>",
"source": "<string>",
"source_bill_data": None,
"external_ramp_id": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"chat_id": -1,
"payment_term": 123,
"journal_entry": 123,
"source_file": 123,
"tax_rate": 123,
"ap_account": 123,
"voided_journal_entry": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
lines: [
{
account: 123,
id: 123,
bill: 123,
description: '<string>',
amount: 0,
tax: 0,
tax_description: '<string>',
source: '<string>',
source_id: '<string>',
currency: '<string>',
tax_rate: 123,
bill_customer: 123,
department: 123
}
],
bill_number: '<string>',
bill_date: '2023-12-25',
due_date: '2023-12-25',
entity: 123,
vendor: 123,
item_date: '2023-12-25',
migrated_journal_id: 123,
chat_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mailing_address: '<string>',
paid_date: '2023-12-25',
message_on_bill: '<string>',
ita_allocation_number: '<string>',
source_id: '<string>',
source: '<string>',
source_bill_data: null,
external_ramp_id: '<string>',
currency: '<string>',
exchange_rate: 0,
exchange_rate_book: 0,
chat_id: -1,
payment_term: 123,
journal_entry: 123,
source_file: 123,
tax_rate: 123,
ap_account: 123,
voided_journal_entry: 123
})
};
fetch('https://api.meetcampfire.com/coa/api/v1/bill/{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/v1/bill/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'lines' => [
[
'account' => 123,
'id' => 123,
'bill' => 123,
'description' => '<string>',
'amount' => 0,
'tax' => 0,
'tax_description' => '<string>',
'source' => '<string>',
'source_id' => '<string>',
'currency' => '<string>',
'tax_rate' => 123,
'bill_customer' => 123,
'department' => 123
]
],
'bill_number' => '<string>',
'bill_date' => '2023-12-25',
'due_date' => '2023-12-25',
'entity' => 123,
'vendor' => 123,
'item_date' => '2023-12-25',
'migrated_journal_id' => 123,
'chat_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'mailing_address' => '<string>',
'paid_date' => '2023-12-25',
'message_on_bill' => '<string>',
'ita_allocation_number' => '<string>',
'source_id' => '<string>',
'source' => '<string>',
'source_bill_data' => null,
'external_ramp_id' => '<string>',
'currency' => '<string>',
'exchange_rate' => 0,
'exchange_rate_book' => 0,
'chat_id' => -1,
'payment_term' => 123,
'journal_entry' => 123,
'source_file' => 123,
'tax_rate' => 123,
'ap_account' => 123,
'voided_journal_entry' => 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/v1/bill/{id}/"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"account\": 123,\n \"id\": 123,\n \"bill\": 123,\n \"description\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"tax_rate\": 123,\n \"bill_customer\": 123,\n \"department\": 123\n }\n ],\n \"bill_number\": \"<string>\",\n \"bill_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"vendor\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailing_address\": \"<string>\",\n \"paid_date\": \"2023-12-25\",\n \"message_on_bill\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"source_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_bill_data\": null,\n \"external_ramp_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"chat_id\": -1,\n \"payment_term\": 123,\n \"journal_entry\": 123,\n \"source_file\": 123,\n \"tax_rate\": 123,\n \"ap_account\": 123,\n \"voided_journal_entry\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.meetcampfire.com/coa/api/v1/bill/{id}/")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"account\": 123,\n \"id\": 123,\n \"bill\": 123,\n \"description\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"tax_rate\": 123,\n \"bill_customer\": 123,\n \"department\": 123\n }\n ],\n \"bill_number\": \"<string>\",\n \"bill_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"vendor\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailing_address\": \"<string>\",\n \"paid_date\": \"2023-12-25\",\n \"message_on_bill\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"source_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_bill_data\": null,\n \"external_ramp_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"chat_id\": -1,\n \"payment_term\": 123,\n \"journal_entry\": 123,\n \"source_file\": 123,\n \"tax_rate\": 123,\n \"ap_account\": 123,\n \"voided_journal_entry\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/bill/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lines\": [\n {\n \"account\": 123,\n \"id\": 123,\n \"bill\": 123,\n \"description\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"tax_rate\": 123,\n \"bill_customer\": 123,\n \"department\": 123\n }\n ],\n \"bill_number\": \"<string>\",\n \"bill_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"vendor\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailing_address\": \"<string>\",\n \"paid_date\": \"2023-12-25\",\n \"message_on_bill\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"source_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_bill_data\": null,\n \"external_ramp_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"chat_id\": -1,\n \"payment_term\": 123,\n \"journal_entry\": 123,\n \"source_file\": 123,\n \"tax_rate\": 123,\n \"ap_account\": 123,\n \"voided_journal_entry\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 31894,
"lines": [
{
"id": 298627,
"account_number": "6700",
"account_name": "6700 - Office Expenses",
"department_name": "Engineering",
"bill_customer_name": "ABC Bead Supply",
"tags": [
{
"id": 8355,
"group_name": "Projects",
"parent_name": null,
"parent": null,
"name": "Project A",
"created_at": "2025-07-17T16:21:02+0000",
"last_modified_at": "2025-07-17T16:21:02+0000",
"group": 727
}
],
"amortization_schedule": [],
"description": "Updated Large Expense Line",
"amount": 12000,
"tax": 0,
"tax_description": null,
"source": null,
"source_id": null,
"currency": "USD",
"created_at": "2025-07-25T14:30:15+0000",
"last_modified_at": "2025-07-25T14:30:15+0000",
"account": 2622,
"bill_customer": 34182,
"department": 35
},
{
"id": 298628,
"account_number": "5000",
"account_name": "5000 - Cost of Goods Sold",
"department_name": "Sales",
"bill_customer_name": "ABC Bead Supply",
"tags": [],
"amortization_schedule": [],
"description": "Additional inventory purchase",
"amount": 3000,
"tax": 0,
"tax_description": null,
"source": null,
"source_id": null,
"currency": "USD",
"created_at": "2025-07-25T14:30:15+0000",
"last_modified_at": "2025-07-25T14:30:15+0000",
"account": 2600,
"bill_customer": 34182,
"department": 36
}
],
"payments": [
{
"id": 5234,
"amount": 5400,
"payment_date": "2025-08-15",
"currency": "USD",
"payment_transaction_bank_description": "ACH Transfer",
"payment_journal_entry_order": "JE-2025-001345",
"voided_journal_entry_order": null,
"created_at": "2025-08-15T14:22:33+0000",
"payment_journal_entry": 7491960,
"payment_transaction": 12345678,
"voided_journal_entry": null,
"source": "BANK_IMPORT"
}
],
"payment_journal_entries": [
7491960
],
"status": "partially_paid",
"past_due_days": null,
"entity_name": "Top Level",
"entity_currency": "USD",
"vendor_name": "ABC Bead Supply",
"attachments": [],
"total_amount": 15000,
"amount_due": 9600,
"amount_paid": 5400,
"item_date": "2025-08-01",
"voided_date": null,
"voided_journal_entry_order": null,
"search_vector": null,
"search_text": null,
"mailing_address": "1234 Campground Road. San Francisco CA 98765",
"terms": null,
"bill_number": "1234567",
"bill_date": "2025-08-01",
"due_date": "2025-09-15",
"paid_date": null,
"message_on_bill": "Updated large expense with additional items",
"source_id": null,
"source": null,
"payment_status": "partial",
"currency": "USD",
"exchange_rate": 1,
"exchange_rate_book": 1,
"created_at": "2025-07-25T04:24:32+0000",
"last_modified_at": "2025-07-25T14:30:15+0000",
"entity": 54,
"vendor": 34182,
"payment_term": 1236,
"payment_term_name": "Net 45",
"journal_entry": 7491951,
"source_file": null,
"tax_rate": null,
"voided_journal_entry": null
}Update Accounting Bill
Update an existing accounting bill with complete replacement of all data including line items and metadata.
This endpoint performs a full update (PUT) of an accounting bill with:
- Complete replacement of all bill data including vendor, entity, dates, and terms
- Full replacement of all line items with new account assignments, amounts, and descriptions
- Automatic recalculation of journal entries and accounting transactions
- Preservation of payment history while updating balances and amounts due
- Validation of all referenced accounts, vendors, entities, and departments
- Automatic exchange rate updates for multi-currency bills
- Custom field updates and attachment management
curl --request PUT \
--url https://api.meetcampfire.com/coa/api/v1/bill/{id}/ \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"account": 123,
"id": 123,
"bill": 123,
"description": "<string>",
"amount": 0,
"tax": 0,
"tax_description": "<string>",
"source": "<string>",
"source_id": "<string>",
"currency": "<string>",
"tax_rate": 123,
"bill_customer": 123,
"department": 123
}
],
"bill_number": "<string>",
"bill_date": "2023-12-25",
"due_date": "2023-12-25",
"entity": 123,
"vendor": 123,
"item_date": "2023-12-25",
"migrated_journal_id": 123,
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mailing_address": "<string>",
"paid_date": "2023-12-25",
"message_on_bill": "<string>",
"ita_allocation_number": "<string>",
"source_id": "<string>",
"source": "<string>",
"source_bill_data": null,
"external_ramp_id": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"chat_id": -1,
"payment_term": 123,
"journal_entry": 123,
"source_file": 123,
"tax_rate": 123,
"ap_account": 123,
"voided_journal_entry": 123
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/bill/{id}/"
payload = {
"lines": [
{
"account": 123,
"id": 123,
"bill": 123,
"description": "<string>",
"amount": 0,
"tax": 0,
"tax_description": "<string>",
"source": "<string>",
"source_id": "<string>",
"currency": "<string>",
"tax_rate": 123,
"bill_customer": 123,
"department": 123
}
],
"bill_number": "<string>",
"bill_date": "2023-12-25",
"due_date": "2023-12-25",
"entity": 123,
"vendor": 123,
"item_date": "2023-12-25",
"migrated_journal_id": 123,
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mailing_address": "<string>",
"paid_date": "2023-12-25",
"message_on_bill": "<string>",
"ita_allocation_number": "<string>",
"source_id": "<string>",
"source": "<string>",
"source_bill_data": None,
"external_ramp_id": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"chat_id": -1,
"payment_term": 123,
"journal_entry": 123,
"source_file": 123,
"tax_rate": 123,
"ap_account": 123,
"voided_journal_entry": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
lines: [
{
account: 123,
id: 123,
bill: 123,
description: '<string>',
amount: 0,
tax: 0,
tax_description: '<string>',
source: '<string>',
source_id: '<string>',
currency: '<string>',
tax_rate: 123,
bill_customer: 123,
department: 123
}
],
bill_number: '<string>',
bill_date: '2023-12-25',
due_date: '2023-12-25',
entity: 123,
vendor: 123,
item_date: '2023-12-25',
migrated_journal_id: 123,
chat_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mailing_address: '<string>',
paid_date: '2023-12-25',
message_on_bill: '<string>',
ita_allocation_number: '<string>',
source_id: '<string>',
source: '<string>',
source_bill_data: null,
external_ramp_id: '<string>',
currency: '<string>',
exchange_rate: 0,
exchange_rate_book: 0,
chat_id: -1,
payment_term: 123,
journal_entry: 123,
source_file: 123,
tax_rate: 123,
ap_account: 123,
voided_journal_entry: 123
})
};
fetch('https://api.meetcampfire.com/coa/api/v1/bill/{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/v1/bill/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'lines' => [
[
'account' => 123,
'id' => 123,
'bill' => 123,
'description' => '<string>',
'amount' => 0,
'tax' => 0,
'tax_description' => '<string>',
'source' => '<string>',
'source_id' => '<string>',
'currency' => '<string>',
'tax_rate' => 123,
'bill_customer' => 123,
'department' => 123
]
],
'bill_number' => '<string>',
'bill_date' => '2023-12-25',
'due_date' => '2023-12-25',
'entity' => 123,
'vendor' => 123,
'item_date' => '2023-12-25',
'migrated_journal_id' => 123,
'chat_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'mailing_address' => '<string>',
'paid_date' => '2023-12-25',
'message_on_bill' => '<string>',
'ita_allocation_number' => '<string>',
'source_id' => '<string>',
'source' => '<string>',
'source_bill_data' => null,
'external_ramp_id' => '<string>',
'currency' => '<string>',
'exchange_rate' => 0,
'exchange_rate_book' => 0,
'chat_id' => -1,
'payment_term' => 123,
'journal_entry' => 123,
'source_file' => 123,
'tax_rate' => 123,
'ap_account' => 123,
'voided_journal_entry' => 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/v1/bill/{id}/"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"account\": 123,\n \"id\": 123,\n \"bill\": 123,\n \"description\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"tax_rate\": 123,\n \"bill_customer\": 123,\n \"department\": 123\n }\n ],\n \"bill_number\": \"<string>\",\n \"bill_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"vendor\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailing_address\": \"<string>\",\n \"paid_date\": \"2023-12-25\",\n \"message_on_bill\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"source_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_bill_data\": null,\n \"external_ramp_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"chat_id\": -1,\n \"payment_term\": 123,\n \"journal_entry\": 123,\n \"source_file\": 123,\n \"tax_rate\": 123,\n \"ap_account\": 123,\n \"voided_journal_entry\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.meetcampfire.com/coa/api/v1/bill/{id}/")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"account\": 123,\n \"id\": 123,\n \"bill\": 123,\n \"description\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"tax_rate\": 123,\n \"bill_customer\": 123,\n \"department\": 123\n }\n ],\n \"bill_number\": \"<string>\",\n \"bill_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"vendor\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailing_address\": \"<string>\",\n \"paid_date\": \"2023-12-25\",\n \"message_on_bill\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"source_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_bill_data\": null,\n \"external_ramp_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"chat_id\": -1,\n \"payment_term\": 123,\n \"journal_entry\": 123,\n \"source_file\": 123,\n \"tax_rate\": 123,\n \"ap_account\": 123,\n \"voided_journal_entry\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/bill/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lines\": [\n {\n \"account\": 123,\n \"id\": 123,\n \"bill\": 123,\n \"description\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"tax_rate\": 123,\n \"bill_customer\": 123,\n \"department\": 123\n }\n ],\n \"bill_number\": \"<string>\",\n \"bill_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"vendor\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailing_address\": \"<string>\",\n \"paid_date\": \"2023-12-25\",\n \"message_on_bill\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"source_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_bill_data\": null,\n \"external_ramp_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"chat_id\": -1,\n \"payment_term\": 123,\n \"journal_entry\": 123,\n \"source_file\": 123,\n \"tax_rate\": 123,\n \"ap_account\": 123,\n \"voided_journal_entry\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 31894,
"lines": [
{
"id": 298627,
"account_number": "6700",
"account_name": "6700 - Office Expenses",
"department_name": "Engineering",
"bill_customer_name": "ABC Bead Supply",
"tags": [
{
"id": 8355,
"group_name": "Projects",
"parent_name": null,
"parent": null,
"name": "Project A",
"created_at": "2025-07-17T16:21:02+0000",
"last_modified_at": "2025-07-17T16:21:02+0000",
"group": 727
}
],
"amortization_schedule": [],
"description": "Updated Large Expense Line",
"amount": 12000,
"tax": 0,
"tax_description": null,
"source": null,
"source_id": null,
"currency": "USD",
"created_at": "2025-07-25T14:30:15+0000",
"last_modified_at": "2025-07-25T14:30:15+0000",
"account": 2622,
"bill_customer": 34182,
"department": 35
},
{
"id": 298628,
"account_number": "5000",
"account_name": "5000 - Cost of Goods Sold",
"department_name": "Sales",
"bill_customer_name": "ABC Bead Supply",
"tags": [],
"amortization_schedule": [],
"description": "Additional inventory purchase",
"amount": 3000,
"tax": 0,
"tax_description": null,
"source": null,
"source_id": null,
"currency": "USD",
"created_at": "2025-07-25T14:30:15+0000",
"last_modified_at": "2025-07-25T14:30:15+0000",
"account": 2600,
"bill_customer": 34182,
"department": 36
}
],
"payments": [
{
"id": 5234,
"amount": 5400,
"payment_date": "2025-08-15",
"currency": "USD",
"payment_transaction_bank_description": "ACH Transfer",
"payment_journal_entry_order": "JE-2025-001345",
"voided_journal_entry_order": null,
"created_at": "2025-08-15T14:22:33+0000",
"payment_journal_entry": 7491960,
"payment_transaction": 12345678,
"voided_journal_entry": null,
"source": "BANK_IMPORT"
}
],
"payment_journal_entries": [
7491960
],
"status": "partially_paid",
"past_due_days": null,
"entity_name": "Top Level",
"entity_currency": "USD",
"vendor_name": "ABC Bead Supply",
"attachments": [],
"total_amount": 15000,
"amount_due": 9600,
"amount_paid": 5400,
"item_date": "2025-08-01",
"voided_date": null,
"voided_journal_entry_order": null,
"search_vector": null,
"search_text": null,
"mailing_address": "1234 Campground Road. San Francisco CA 98765",
"terms": null,
"bill_number": "1234567",
"bill_date": "2025-08-01",
"due_date": "2025-09-15",
"paid_date": null,
"message_on_bill": "Updated large expense with additional items",
"source_id": null,
"source": null,
"payment_status": "partial",
"currency": "USD",
"exchange_rate": 1,
"exchange_rate_book": 1,
"created_at": "2025-07-25T04:24:32+0000",
"last_modified_at": "2025-07-25T14:30:15+0000",
"entity": 54,
"vendor": 34182,
"payment_term": 1236,
"payment_term_name": "Net 45",
"journal_entry": 7491951,
"source_file": null,
"tax_rate": null,
"voided_journal_entry": null
}Path Parameters
^\d+$Body
Show child attributes
Show child attributes
120custom- Customnet_5- Net 5net_7- Net 7net_10- Net 10net_15- Net 15net_20- Net 20net_30- Net 30net_40- Net 40net_45- Net 45net_60- Net 60net_90- Net 90net_105- Net 105net_120- Net 120due_on_receipt- Due on Receipt
custom, net_5, net_7, net_10, net_15, net_20, net_30, net_40, net_45, net_60, net_90, net_105, net_120, due_on_receipt 9^\d{9}$Israel tax compliance: bill classification type
other- Otherequipment- Equipment
other, equipment 250partial- Partially Paidopen- Openpaid- Paidpayment_not_found- Payment Not Foundpayment_pending- Payment Pendingvoided- Voided
partial, open, paid, payment_not_found, payment_pending, voided 3-100000000000000 < x < 100000000000000-100000000000000 < x < 100000000000000inclusive- Inclusiveexclusive- Exclusive
inclusive, exclusive BILL- BillPAYROLL- PayrollREIMBURSEMENT- Reimbursement
BILL, PAYROLL, REIMBURSEMENT -2147483648 <= x <= 2147483647Payment term for this bill
Accounts Payable account for this bill
Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Return AP account name with number in 'number - name' format, similar to name_and_number.
Show child attributes
Show child attributes
-1000000000000000000 < x < 1000000000000000000-1000000000000000000 < x < 1000000000000000000Navan data region (US/EU) for a Navan-sourced bill, else None.
Mirrors ramp_use_sandbox: the frontend builds the "Open in Navan" deep
link from source_id and uses this to pick the web-app host
(US -> app.navan.com, EU -> app-fra.navan.com). Navan bills carry no FK to
their connection, so the region is resolved per customer and memoized to
avoid an N+1 lookup across a bill list.
Withholding context for the bill's entity (AP side).
estimated_withholding_amount covers only the remaining amount due (null once
fully paid); withheld_to_date is the signed sum of posted withholding (AP legs
are credits, reversals debits), so actuals replace the estimate as payments post.
Certificate-based schemes estimate from the vendor certificate's rate valid today
(falling back to the scheme default).
Show child attributes
Show child attributes
120custom- Customnet_5- Net 5net_7- Net 7net_10- Net 10net_15- Net 15net_20- Net 20net_30- Net 30net_40- Net 40net_45- Net 45net_60- Net 60net_90- Net 90net_105- Net 105net_120- Net 120due_on_receipt- Due on Receipt
custom, net_5, net_7, net_10, net_15, net_20, net_30, net_40, net_45, net_60, net_90, net_105, net_120, due_on_receipt 9^\d{9}$Israel tax compliance: bill classification type
other- Otherequipment- Equipment
other, equipment 250partial- Partially Paidopen- Openpaid- Paidpayment_not_found- Payment Not Foundpayment_pending- Payment Pendingvoided- Voided
partial, open, paid, payment_not_found, payment_pending, voided 3-100000000000000 < x < 100000000000000-100000000000000 < x < 100000000000000inclusive- Inclusiveexclusive- Exclusive
inclusive, exclusive BILL- BillPAYROLL- PayrollREIMBURSEMENT- Reimbursement
BILL, PAYROLL, REIMBURSEMENT -2147483648 <= x <= 2147483647Payment term for this bill
Accounts Payable account for this bill