curl --request PUT \
--url https://api.meetcampfire.com/coa/api/v1/invoice/{id}/ \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"invoice": 123,
"service_date": "2023-12-25",
"description": "<string>",
"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
}
],
"invoice_date": "2023-12-25",
"due_date": "2023-12-25",
"entity": 123,
"invoice_number": "<string>",
"revenue_transactions": [
123
],
"revenue_contract_invoice": 123,
"item_date": "2023-12-25",
"migrated_journal_id": 123,
"department": 123,
"department_name": "<string>",
"tags": [
123
],
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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>",
"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>",
"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
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/invoice/{id}/"
payload = {
"lines": [
{
"invoice": 123,
"service_date": "2023-12-25",
"description": "<string>",
"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
}
],
"invoice_date": "2023-12-25",
"due_date": "2023-12-25",
"entity": 123,
"invoice_number": "<string>",
"revenue_transactions": [123],
"revenue_contract_invoice": 123,
"item_date": "2023-12-25",
"migrated_journal_id": 123,
"department": 123,
"department_name": "<string>",
"tags": [123],
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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>",
"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>",
"anrok_transaction_id": "<string>",
"warning_message": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"integration_id": "<string>",
"integration_context": None,
"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": None,
"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
}
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: [
{
invoice: 123,
service_date: '2023-12-25',
description: '<string>',
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
}
],
invoice_date: '2023-12-25',
due_date: '2023-12-25',
entity: 123,
invoice_number: '<string>',
revenue_transactions: [123],
revenue_contract_invoice: 123,
item_date: '2023-12-25',
migrated_journal_id: 123,
department: 123,
department_name: '<string>',
tags: [123],
chat_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
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>',
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>',
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
})
};
fetch('https://api.meetcampfire.com/coa/api/v1/invoice/{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/invoice/{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' => [
[
'invoice' => 123,
'service_date' => '2023-12-25',
'description' => '<string>',
'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
]
],
'invoice_date' => '2023-12-25',
'due_date' => '2023-12-25',
'entity' => 123,
'invoice_number' => '<string>',
'revenue_transactions' => [
123
],
'revenue_contract_invoice' => 123,
'item_date' => '2023-12-25',
'migrated_journal_id' => 123,
'department' => 123,
'department_name' => '<string>',
'tags' => [
123
],
'chat_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'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>',
'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>',
'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
]),
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/{id}/"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"invoice\": 123,\n \"service_date\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"rate\": 0,\n \"currency\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"entity_use_code\": \"<string>\",\n \"discount\": 0,\n \"discount_percentage\": 0,\n \"discount_amount\": 0,\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"product\": 123,\n \"product_bundle\": 123,\n \"withholding_tax_rate\": 123,\n \"department\": 123\n }\n ],\n \"invoice_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"invoice_number\": \"<string>\",\n \"revenue_transactions\": [\n 123\n ],\n \"revenue_contract_invoice\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"department\": 123,\n \"department_name\": \"<string>\",\n \"tags\": [\n 123\n ],\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"auto_send_invoice\": true,\n \"auto_send_invoice_at\": \"2023-12-25\",\n \"reminder_sent_dates\": \"<unknown>\",\n \"pre_due_reminder_sent_dates\": \"<unknown>\",\n \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"ref_number\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"shipping_date\": \"2023-12-25\",\n \"paid_date\": \"2023-12-25\",\n \"uncollectible_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"location_of_sale\": \"<string>\",\n \"message_on_invoice\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"anrok_transaction_id\": \"<string>\",\n \"warning_message\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"integration_id\": \"<string>\",\n \"integration_context\": null,\n \"vat_number\": \"<string>\",\n \"discount\": 0,\n \"payment_term_applied_discount\": 0,\n \"use_stripe_auto_bill\": true,\n \"stripe_payment_link_id\": \"<string>\",\n \"stripe_payment_intent_id\": \"<string>\",\n \"stripe_invoice_id\": \"<string>\",\n \"stripe_pdf_url\": \"<string>\",\n \"stripe_payment_link\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"is_migrated\": true,\n \"voided_date\": \"2023-12-25\",\n \"invoice_labels\": null,\n \"invoice_language\": \"<string>\",\n \"chat_id\": -1,\n \"client\": 123,\n \"payment_term\": 123,\n \"contract\": 123,\n \"avalara_connection\": 123,\n \"sphere_connection\": 123,\n \"anrok_connection\": 123,\n \"tax_rate\": 123,\n \"stripe_connection\": 123,\n \"source_file\": 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/invoice/{id}/")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"invoice\": 123,\n \"service_date\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"rate\": 0,\n \"currency\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"entity_use_code\": \"<string>\",\n \"discount\": 0,\n \"discount_percentage\": 0,\n \"discount_amount\": 0,\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"product\": 123,\n \"product_bundle\": 123,\n \"withholding_tax_rate\": 123,\n \"department\": 123\n }\n ],\n \"invoice_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"invoice_number\": \"<string>\",\n \"revenue_transactions\": [\n 123\n ],\n \"revenue_contract_invoice\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"department\": 123,\n \"department_name\": \"<string>\",\n \"tags\": [\n 123\n ],\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"auto_send_invoice\": true,\n \"auto_send_invoice_at\": \"2023-12-25\",\n \"reminder_sent_dates\": \"<unknown>\",\n \"pre_due_reminder_sent_dates\": \"<unknown>\",\n \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"ref_number\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"shipping_date\": \"2023-12-25\",\n \"paid_date\": \"2023-12-25\",\n \"uncollectible_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"location_of_sale\": \"<string>\",\n \"message_on_invoice\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"anrok_transaction_id\": \"<string>\",\n \"warning_message\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"integration_id\": \"<string>\",\n \"integration_context\": null,\n \"vat_number\": \"<string>\",\n \"discount\": 0,\n \"payment_term_applied_discount\": 0,\n \"use_stripe_auto_bill\": true,\n \"stripe_payment_link_id\": \"<string>\",\n \"stripe_payment_intent_id\": \"<string>\",\n \"stripe_invoice_id\": \"<string>\",\n \"stripe_pdf_url\": \"<string>\",\n \"stripe_payment_link\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"is_migrated\": true,\n \"voided_date\": \"2023-12-25\",\n \"invoice_labels\": null,\n \"invoice_language\": \"<string>\",\n \"chat_id\": -1,\n \"client\": 123,\n \"payment_term\": 123,\n \"contract\": 123,\n \"avalara_connection\": 123,\n \"sphere_connection\": 123,\n \"anrok_connection\": 123,\n \"tax_rate\": 123,\n \"stripe_connection\": 123,\n \"source_file\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/invoice/{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 \"invoice\": 123,\n \"service_date\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"rate\": 0,\n \"currency\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"entity_use_code\": \"<string>\",\n \"discount\": 0,\n \"discount_percentage\": 0,\n \"discount_amount\": 0,\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"product\": 123,\n \"product_bundle\": 123,\n \"withholding_tax_rate\": 123,\n \"department\": 123\n }\n ],\n \"invoice_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"invoice_number\": \"<string>\",\n \"revenue_transactions\": [\n 123\n ],\n \"revenue_contract_invoice\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"department\": 123,\n \"department_name\": \"<string>\",\n \"tags\": [\n 123\n ],\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"auto_send_invoice\": true,\n \"auto_send_invoice_at\": \"2023-12-25\",\n \"reminder_sent_dates\": \"<unknown>\",\n \"pre_due_reminder_sent_dates\": \"<unknown>\",\n \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"ref_number\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"shipping_date\": \"2023-12-25\",\n \"paid_date\": \"2023-12-25\",\n \"uncollectible_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"location_of_sale\": \"<string>\",\n \"message_on_invoice\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"anrok_transaction_id\": \"<string>\",\n \"warning_message\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"integration_id\": \"<string>\",\n \"integration_context\": null,\n \"vat_number\": \"<string>\",\n \"discount\": 0,\n \"payment_term_applied_discount\": 0,\n \"use_stripe_auto_bill\": true,\n \"stripe_payment_link_id\": \"<string>\",\n \"stripe_payment_intent_id\": \"<string>\",\n \"stripe_invoice_id\": \"<string>\",\n \"stripe_pdf_url\": \"<string>\",\n \"stripe_payment_link\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"is_migrated\": true,\n \"voided_date\": \"2023-12-25\",\n \"invoice_labels\": null,\n \"invoice_language\": \"<string>\",\n \"chat_id\": -1,\n \"client\": 123,\n \"payment_term\": 123,\n \"contract\": 123,\n \"avalara_connection\": 123,\n \"sphere_connection\": 123,\n \"anrok_connection\": 123,\n \"tax_rate\": 123,\n \"stripe_connection\": 123,\n \"source_file\": 123\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
}Update Invoice
Performs a complete update of an existing accounting invoice using PUT semantics.
This endpoint allows full replacement of invoice data including:
- Complete invoice metadata update (dates, amounts, terms, client, entity)
- Full line item replacement with new products, quantities, rates, and tax calculations
- Journal entry recalculation and update with new accounting transactions
- Exchange rate updates for multi-currency invoices
Important Notes:
- This is a full replacement operation - all invoice data will be updated
- Missing fields in the request will be set to null or default values
- Existing line items will be completely replaced with the new line items
- Journal entries will be updated to reflect all changes
curl --request PUT \
--url https://api.meetcampfire.com/coa/api/v1/invoice/{id}/ \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"invoice": 123,
"service_date": "2023-12-25",
"description": "<string>",
"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
}
],
"invoice_date": "2023-12-25",
"due_date": "2023-12-25",
"entity": 123,
"invoice_number": "<string>",
"revenue_transactions": [
123
],
"revenue_contract_invoice": 123,
"item_date": "2023-12-25",
"migrated_journal_id": 123,
"department": 123,
"department_name": "<string>",
"tags": [
123
],
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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>",
"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>",
"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
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/invoice/{id}/"
payload = {
"lines": [
{
"invoice": 123,
"service_date": "2023-12-25",
"description": "<string>",
"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
}
],
"invoice_date": "2023-12-25",
"due_date": "2023-12-25",
"entity": 123,
"invoice_number": "<string>",
"revenue_transactions": [123],
"revenue_contract_invoice": 123,
"item_date": "2023-12-25",
"migrated_journal_id": 123,
"department": 123,
"department_name": "<string>",
"tags": [123],
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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>",
"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>",
"anrok_transaction_id": "<string>",
"warning_message": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"integration_id": "<string>",
"integration_context": None,
"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": None,
"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
}
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: [
{
invoice: 123,
service_date: '2023-12-25',
description: '<string>',
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
}
],
invoice_date: '2023-12-25',
due_date: '2023-12-25',
entity: 123,
invoice_number: '<string>',
revenue_transactions: [123],
revenue_contract_invoice: 123,
item_date: '2023-12-25',
migrated_journal_id: 123,
department: 123,
department_name: '<string>',
tags: [123],
chat_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
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>',
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>',
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
})
};
fetch('https://api.meetcampfire.com/coa/api/v1/invoice/{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/invoice/{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' => [
[
'invoice' => 123,
'service_date' => '2023-12-25',
'description' => '<string>',
'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
]
],
'invoice_date' => '2023-12-25',
'due_date' => '2023-12-25',
'entity' => 123,
'invoice_number' => '<string>',
'revenue_transactions' => [
123
],
'revenue_contract_invoice' => 123,
'item_date' => '2023-12-25',
'migrated_journal_id' => 123,
'department' => 123,
'department_name' => '<string>',
'tags' => [
123
],
'chat_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'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>',
'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>',
'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
]),
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/{id}/"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"invoice\": 123,\n \"service_date\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"rate\": 0,\n \"currency\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"entity_use_code\": \"<string>\",\n \"discount\": 0,\n \"discount_percentage\": 0,\n \"discount_amount\": 0,\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"product\": 123,\n \"product_bundle\": 123,\n \"withholding_tax_rate\": 123,\n \"department\": 123\n }\n ],\n \"invoice_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"invoice_number\": \"<string>\",\n \"revenue_transactions\": [\n 123\n ],\n \"revenue_contract_invoice\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"department\": 123,\n \"department_name\": \"<string>\",\n \"tags\": [\n 123\n ],\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"auto_send_invoice\": true,\n \"auto_send_invoice_at\": \"2023-12-25\",\n \"reminder_sent_dates\": \"<unknown>\",\n \"pre_due_reminder_sent_dates\": \"<unknown>\",\n \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"ref_number\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"shipping_date\": \"2023-12-25\",\n \"paid_date\": \"2023-12-25\",\n \"uncollectible_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"location_of_sale\": \"<string>\",\n \"message_on_invoice\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"anrok_transaction_id\": \"<string>\",\n \"warning_message\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"integration_id\": \"<string>\",\n \"integration_context\": null,\n \"vat_number\": \"<string>\",\n \"discount\": 0,\n \"payment_term_applied_discount\": 0,\n \"use_stripe_auto_bill\": true,\n \"stripe_payment_link_id\": \"<string>\",\n \"stripe_payment_intent_id\": \"<string>\",\n \"stripe_invoice_id\": \"<string>\",\n \"stripe_pdf_url\": \"<string>\",\n \"stripe_payment_link\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"is_migrated\": true,\n \"voided_date\": \"2023-12-25\",\n \"invoice_labels\": null,\n \"invoice_language\": \"<string>\",\n \"chat_id\": -1,\n \"client\": 123,\n \"payment_term\": 123,\n \"contract\": 123,\n \"avalara_connection\": 123,\n \"sphere_connection\": 123,\n \"anrok_connection\": 123,\n \"tax_rate\": 123,\n \"stripe_connection\": 123,\n \"source_file\": 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/invoice/{id}/")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"invoice\": 123,\n \"service_date\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"rate\": 0,\n \"currency\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"entity_use_code\": \"<string>\",\n \"discount\": 0,\n \"discount_percentage\": 0,\n \"discount_amount\": 0,\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"product\": 123,\n \"product_bundle\": 123,\n \"withholding_tax_rate\": 123,\n \"department\": 123\n }\n ],\n \"invoice_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"invoice_number\": \"<string>\",\n \"revenue_transactions\": [\n 123\n ],\n \"revenue_contract_invoice\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"department\": 123,\n \"department_name\": \"<string>\",\n \"tags\": [\n 123\n ],\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"auto_send_invoice\": true,\n \"auto_send_invoice_at\": \"2023-12-25\",\n \"reminder_sent_dates\": \"<unknown>\",\n \"pre_due_reminder_sent_dates\": \"<unknown>\",\n \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"ref_number\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"shipping_date\": \"2023-12-25\",\n \"paid_date\": \"2023-12-25\",\n \"uncollectible_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"location_of_sale\": \"<string>\",\n \"message_on_invoice\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"anrok_transaction_id\": \"<string>\",\n \"warning_message\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"integration_id\": \"<string>\",\n \"integration_context\": null,\n \"vat_number\": \"<string>\",\n \"discount\": 0,\n \"payment_term_applied_discount\": 0,\n \"use_stripe_auto_bill\": true,\n \"stripe_payment_link_id\": \"<string>\",\n \"stripe_payment_intent_id\": \"<string>\",\n \"stripe_invoice_id\": \"<string>\",\n \"stripe_pdf_url\": \"<string>\",\n \"stripe_payment_link\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"is_migrated\": true,\n \"voided_date\": \"2023-12-25\",\n \"invoice_labels\": null,\n \"invoice_language\": \"<string>\",\n \"chat_id\": -1,\n \"client\": 123,\n \"payment_term\": 123,\n \"contract\": 123,\n \"avalara_connection\": 123,\n \"sphere_connection\": 123,\n \"anrok_connection\": 123,\n \"tax_rate\": 123,\n \"stripe_connection\": 123,\n \"source_file\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/invoice/{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 \"invoice\": 123,\n \"service_date\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"rate\": 0,\n \"currency\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"entity_use_code\": \"<string>\",\n \"discount\": 0,\n \"discount_percentage\": 0,\n \"discount_amount\": 0,\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"product\": 123,\n \"product_bundle\": 123,\n \"withholding_tax_rate\": 123,\n \"department\": 123\n }\n ],\n \"invoice_date\": \"2023-12-25\",\n \"due_date\": \"2023-12-25\",\n \"entity\": 123,\n \"invoice_number\": \"<string>\",\n \"revenue_transactions\": [\n 123\n ],\n \"revenue_contract_invoice\": 123,\n \"item_date\": \"2023-12-25\",\n \"migrated_journal_id\": 123,\n \"department\": 123,\n \"department_name\": \"<string>\",\n \"tags\": [\n 123\n ],\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"auto_send_invoice\": true,\n \"auto_send_invoice_at\": \"2023-12-25\",\n \"reminder_sent_dates\": \"<unknown>\",\n \"pre_due_reminder_sent_dates\": \"<unknown>\",\n \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"ref_number\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"shipping_date\": \"2023-12-25\",\n \"paid_date\": \"2023-12-25\",\n \"uncollectible_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"location_of_sale\": \"<string>\",\n \"message_on_invoice\": \"<string>\",\n \"ita_allocation_number\": \"<string>\",\n \"anrok_transaction_id\": \"<string>\",\n \"warning_message\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"integration_id\": \"<string>\",\n \"integration_context\": null,\n \"vat_number\": \"<string>\",\n \"discount\": 0,\n \"payment_term_applied_discount\": 0,\n \"use_stripe_auto_bill\": true,\n \"stripe_payment_link_id\": \"<string>\",\n \"stripe_payment_intent_id\": \"<string>\",\n \"stripe_invoice_id\": \"<string>\",\n \"stripe_pdf_url\": \"<string>\",\n \"stripe_payment_link\": \"<string>\",\n \"source\": \"<string>\",\n \"source_id\": \"<string>\",\n \"is_migrated\": true,\n \"voided_date\": \"2023-12-25\",\n \"invoice_labels\": null,\n \"invoice_language\": \"<string>\",\n \"chat_id\": -1,\n \"client\": 123,\n \"payment_term\": 123,\n \"contract\": 123,\n \"avalara_connection\": 123,\n \"sphere_connection\": 123,\n \"anrok_connection\": 123,\n \"tax_rate\": 123,\n \"stripe_connection\": 123,\n \"source_file\": 123\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
Body
Expose a stable two-decimal overage total on invoice serializers.
Show child attributes
Show child attributes
Write-only. Revenue transaction IDs to link to this invoice. This field is never included in responses.
Contract billing-schedule invoice to link this AR invoice to at creation.
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 <= 2147483647Response
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