curl --request POST \
--url https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/ \
--header 'Content-Type: application/json' \
--data '
{
"void_date": "2023-12-25"
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/"
payload = { "void_date": "2023-12-25" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({void_date: '2023-12-25'})
};
fetch('https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/', 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/invoice/{invoice_id}/void/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'void_date' => '2023-12-25'
]),
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/invoice/{invoice_id}/void/"
payload := strings.NewReader("{\n \"void_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/")
.header("Content-Type", "application/json")
.body("{\n \"void_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"void_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"overage_amount": "<string>",
"lines": [
{
"id": 123,
"product_name": "<string>",
"product_bundle_name": "<string>",
"stripe_product_id": "<string>",
"product_is_taxable": true,
"anrok_item_id": "<string>",
"sphere_item_id": "<string>",
"tags": [
{}
],
"department_name": "<string>",
"department_code": "<string>",
"withholding_tax_rate_name": "<string>",
"withholding_tax_rate_value": 123,
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"customer": 123,
"service_date": "2023-12-25",
"description": "<string>",
"charge_type": "prepaid_commit",
"quantity": 0,
"rate": 0,
"currency": "<string>",
"amount": 0,
"tax": 0,
"tax_description": "<string>",
"entity_use_code": "<string>",
"discount": 0,
"discount_percentage": 0,
"discount_amount": 0,
"tag_ids": [
0
],
"tag_group_ids": [
0
],
"product": 123,
"product_bundle": 123,
"withholding_tax_rate": 123,
"department": 123
}
],
"emails": [
{}
],
"payments": [
{
"id": 123,
"credit_memo": "<string>",
"payment_transaction_bank_description": "<string>",
"payment_journal_entry_order": "<string>",
"payment_intercompany_journal": "<string>",
"voided_journal_entry_order": "<string>",
"withheld_amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment_type": "CREDIT_MEMO",
"external_id": "<string>",
"last_modified_at": "2023-11-07T05:31:56Z",
"customer": 123,
"invoice": 123,
"currency": "<string>",
"amount": 0,
"payment_date": "2023-12-25",
"voided_date": "2023-12-25",
"source": "STRIPE",
"payment_journal_entry": 123,
"payment_transaction": 123,
"fx_gain_loss_realized_transaction": 123,
"payment_term_discount_transaction": 123,
"voided_journal_entry": 123,
"payment_transactions": [
123
]
}
],
"related_journal_entries": [
{
"id": 123,
"journal_entry": 123,
"journal_entry_order": "<string>",
"journal_entry_date": "2023-12-25",
"journal_entry_memo": "<string>",
"type": "reclassification",
"created_at": "2023-11-07T05:31:56Z"
}
],
"payment_journal_entries": [
123
],
"journal_entry_intercompany": "<string>",
"client_name": "<string>",
"client_campfire_id": "<string>",
"client_email": "<string>",
"anrok_customer_id": "<string>",
"client_invoice_message": "<string>",
"client_use_stripe_auto_bill": true,
"client_is_reseller": true,
"public_invoice_payment_url": "<string>",
"status": "<string>",
"past_due_days": 123,
"entity_name": "<string>",
"entity_currency": "<string>",
"entity_invoice_message": "<string>",
"total_amount": 0,
"amount_paid": 0,
"amount_due": 123,
"withholding_info": {},
"contract_name": "<string>",
"revenue_contract": 123,
"revenue_contract_name": "<string>",
"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
}
],
"stripe_connection_name": "<string>",
"stripe_connection_entity": 123,
"stripe_connection_billing_portal_enabled": true,
"avalara_connection_name": "<string>",
"avalara_connection_company": "<string>",
"tax_rate_name": "<string>",
"tax_rate_value": 0,
"payment_term_name": "<string>",
"voided_journal_entry_order": 123,
"contract_custom_fields": [
{}
],
"last_modified_at": "2023-11-07T05:31:56Z",
"is_deleted": false,
"deleted_at": "2023-11-07T05:31:56Z",
"auto_sent_at": "2023-11-07T05:31:56Z",
"invoice_date": "2023-12-25",
"due_date": "2023-12-25",
"sent_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"last_sent_at": "2023-11-07T05:31:56Z",
"customer": 123,
"entity": 123,
"bad_debt_journal_entry": 123,
"journal_entry": 123,
"ar_account": 123,
"voided_journal_entry": 123,
"entity_transfer_journal_entry": 123,
"invoice_number": "<string>",
"item_date": "2023-12-25",
"auto_send_invoice": true,
"auto_send_invoice_at": "2023-12-25",
"reminder_sent_dates": "<unknown>",
"pre_due_reminder_sent_dates": "<unknown>",
"billing_address": "<string>",
"billing_addressee": "<string>",
"shipping_address": "<string>",
"shipping_addressee": "<string>",
"terms": "custom",
"ref_number": "<string>",
"purchase_order_number": "<string>",
"shipping_date": "2023-12-25",
"paid_date": "2023-12-25",
"uncollectible_date": "2023-12-25",
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"location_of_sale": "<string>",
"message_on_invoice": "<string>",
"ita_allocation_number": "<string>",
"payment_status": "draft",
"anrok_transaction_id": "<string>",
"warning_message": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"integration_id": "<string>",
"integration_context": null,
"vat_number": "<string>",
"discount": 0,
"payment_term_applied_discount": 0,
"use_stripe_auto_bill": true,
"stripe_payment_link_id": "<string>",
"stripe_payment_intent_id": "<string>",
"stripe_invoice_id": "<string>",
"stripe_pdf_url": "<string>",
"stripe_payment_link": "<string>",
"source": "<string>",
"source_id": "<string>",
"is_migrated": true,
"voided_date": "2023-12-25",
"invoice_labels": null,
"invoice_language": "<string>",
"chat_id": -1,
"client": 123,
"payment_term": 123,
"contract": 123,
"avalara_connection": 123,
"sphere_connection": 123,
"anrok_connection": 123,
"tax_rate": 123,
"stripe_connection": 123,
"source_file": 123
}Void Invoice
Void an existing invoice.
This creates a reversing journal entry to void the invoice by reversing all debit and credit amounts. The invoice status will be updated to reflect the void.
curl --request POST \
--url https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/ \
--header 'Content-Type: application/json' \
--data '
{
"void_date": "2023-12-25"
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/"
payload = { "void_date": "2023-12-25" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({void_date: '2023-12-25'})
};
fetch('https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/', 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/invoice/{invoice_id}/void/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'void_date' => '2023-12-25'
]),
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/invoice/{invoice_id}/void/"
payload := strings.NewReader("{\n \"void_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/")
.header("Content-Type", "application/json")
.body("{\n \"void_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/invoice/{invoice_id}/void/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"void_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"overage_amount": "<string>",
"lines": [
{
"id": 123,
"product_name": "<string>",
"product_bundle_name": "<string>",
"stripe_product_id": "<string>",
"product_is_taxable": true,
"anrok_item_id": "<string>",
"sphere_item_id": "<string>",
"tags": [
{}
],
"department_name": "<string>",
"department_code": "<string>",
"withholding_tax_rate_name": "<string>",
"withholding_tax_rate_value": 123,
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"customer": 123,
"service_date": "2023-12-25",
"description": "<string>",
"charge_type": "prepaid_commit",
"quantity": 0,
"rate": 0,
"currency": "<string>",
"amount": 0,
"tax": 0,
"tax_description": "<string>",
"entity_use_code": "<string>",
"discount": 0,
"discount_percentage": 0,
"discount_amount": 0,
"tag_ids": [
0
],
"tag_group_ids": [
0
],
"product": 123,
"product_bundle": 123,
"withholding_tax_rate": 123,
"department": 123
}
],
"emails": [
{}
],
"payments": [
{
"id": 123,
"credit_memo": "<string>",
"payment_transaction_bank_description": "<string>",
"payment_journal_entry_order": "<string>",
"payment_intercompany_journal": "<string>",
"voided_journal_entry_order": "<string>",
"withheld_amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment_type": "CREDIT_MEMO",
"external_id": "<string>",
"last_modified_at": "2023-11-07T05:31:56Z",
"customer": 123,
"invoice": 123,
"currency": "<string>",
"amount": 0,
"payment_date": "2023-12-25",
"voided_date": "2023-12-25",
"source": "STRIPE",
"payment_journal_entry": 123,
"payment_transaction": 123,
"fx_gain_loss_realized_transaction": 123,
"payment_term_discount_transaction": 123,
"voided_journal_entry": 123,
"payment_transactions": [
123
]
}
],
"related_journal_entries": [
{
"id": 123,
"journal_entry": 123,
"journal_entry_order": "<string>",
"journal_entry_date": "2023-12-25",
"journal_entry_memo": "<string>",
"type": "reclassification",
"created_at": "2023-11-07T05:31:56Z"
}
],
"payment_journal_entries": [
123
],
"journal_entry_intercompany": "<string>",
"client_name": "<string>",
"client_campfire_id": "<string>",
"client_email": "<string>",
"anrok_customer_id": "<string>",
"client_invoice_message": "<string>",
"client_use_stripe_auto_bill": true,
"client_is_reseller": true,
"public_invoice_payment_url": "<string>",
"status": "<string>",
"past_due_days": 123,
"entity_name": "<string>",
"entity_currency": "<string>",
"entity_invoice_message": "<string>",
"total_amount": 0,
"amount_paid": 0,
"amount_due": 123,
"withholding_info": {},
"contract_name": "<string>",
"revenue_contract": 123,
"revenue_contract_name": "<string>",
"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
}
],
"stripe_connection_name": "<string>",
"stripe_connection_entity": 123,
"stripe_connection_billing_portal_enabled": true,
"avalara_connection_name": "<string>",
"avalara_connection_company": "<string>",
"tax_rate_name": "<string>",
"tax_rate_value": 0,
"payment_term_name": "<string>",
"voided_journal_entry_order": 123,
"contract_custom_fields": [
{}
],
"last_modified_at": "2023-11-07T05:31:56Z",
"is_deleted": false,
"deleted_at": "2023-11-07T05:31:56Z",
"auto_sent_at": "2023-11-07T05:31:56Z",
"invoice_date": "2023-12-25",
"due_date": "2023-12-25",
"sent_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"last_sent_at": "2023-11-07T05:31:56Z",
"customer": 123,
"entity": 123,
"bad_debt_journal_entry": 123,
"journal_entry": 123,
"ar_account": 123,
"voided_journal_entry": 123,
"entity_transfer_journal_entry": 123,
"invoice_number": "<string>",
"item_date": "2023-12-25",
"auto_send_invoice": true,
"auto_send_invoice_at": "2023-12-25",
"reminder_sent_dates": "<unknown>",
"pre_due_reminder_sent_dates": "<unknown>",
"billing_address": "<string>",
"billing_addressee": "<string>",
"shipping_address": "<string>",
"shipping_addressee": "<string>",
"terms": "custom",
"ref_number": "<string>",
"purchase_order_number": "<string>",
"shipping_date": "2023-12-25",
"paid_date": "2023-12-25",
"uncollectible_date": "2023-12-25",
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"location_of_sale": "<string>",
"message_on_invoice": "<string>",
"ita_allocation_number": "<string>",
"payment_status": "draft",
"anrok_transaction_id": "<string>",
"warning_message": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"integration_id": "<string>",
"integration_context": null,
"vat_number": "<string>",
"discount": 0,
"payment_term_applied_discount": 0,
"use_stripe_auto_bill": true,
"stripe_payment_link_id": "<string>",
"stripe_payment_intent_id": "<string>",
"stripe_invoice_id": "<string>",
"stripe_pdf_url": "<string>",
"stripe_payment_link": "<string>",
"source": "<string>",
"source_id": "<string>",
"is_migrated": true,
"voided_date": "2023-12-25",
"invoice_labels": null,
"invoice_language": "<string>",
"chat_id": -1,
"client": 123,
"payment_term": 123,
"contract": 123,
"avalara_connection": 123,
"sphere_connection": 123,
"anrok_connection": 123,
"tax_rate": 123,
"stripe_connection": 123,
"source_file": 123
}Path Parameters
ID of the invoice to void
Body
Response
Expose a stable two-decimal overage total on invoice serializers.
Invoice-currency overage before tax, as a two-decimal string.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
-1000000000000000000 < x < 1000000000000000000-1000000000000000000 < x < 1000000000000000000Withholding context for the invoice's entity.
estimated_withholding_amount covers only the remaining amount due (null once
fully paid); withheld_to_date is the signed sum of posted withholding, so
actuals replace the estimate as receipts come in. Certificate-based schemes
estimate from the entity certificate's rate (falling back to the scheme
default); rules-based schemes sum each line's selected rate over the line
amount, scaled by the remaining-due proportion.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
-1000000 < x < 1000000Show child attributes
Show child attributes
Accounts Receivable account for this invoice. Populated for single-AR and migrated invoices. NULL for multi-AR invoices (aging uses ChartTransactions instead).
Dictionary tracking when reminders were sent for each day overdue (e.g., {'5': '2024-01-15', '10': '2024-01-20'})
Dictionary tracking when pre-due reminders were sent for each day before due date (e.g., {'3': '2024-01-10', '7': '2024-01-06'})
255255custom- 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 1201209^\d{9}$draft- Draftopen- Opensent- Sentpartial- Partially Paidpaid- Paiduncollectible- Uncollectiblevoided- Voided
draft, open, sent, partial, paid, uncollectible, voided ID of the transaction in Anrok (set when transaction is created)
2553-100000000000000 < x < 100000000000000-100000000000000 < x < 100000000000000250250Discount amount for the invoice
-1000000000000000000 < x < 1000000000000000000Discount amount applied based on payment term early payment discount
-1000000000000000000 < x < 1000000000000000000500500500500500250True for invoices imported via opening balance migration (no finalization JE).
10-2147483648 <= x <= 2147483647