curl --request POST \
--url https://api.meetcampfire.com/coa/api/v1/credit-memo \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"tags": [
{
"id": "7736",
"name": "Other"
}
],
"product": "3679",
"product_name": "Annual Subscription",
"account": "169208",
"account_name": "Subscription fees",
"department": "35",
"department_name": "Engineering",
"description": "Credit for overpayment on annual subscription",
"amount": 1000.23
}
],
"entity": "54",
"entity_name": "Top Level",
"entity_currency": "USD",
"currency": "USD",
"client": "33973",
"client_name": "Client A",
"credit_memo_date": "2025-07-01",
"exchange_rate_book": 1,
"exchange_rate": 1,
"credit_account": "41905",
"credit_account_name": "5230 - Cloud Credits",
"message_on_credit_memo": "Credit memo for annual subscription overpayment. Thank you for your business."
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/credit-memo"
payload = {
"lines": [
{
"tags": [
{
"id": "7736",
"name": "Other"
}
],
"product": "3679",
"product_name": "Annual Subscription",
"account": "169208",
"account_name": "Subscription fees",
"department": "35",
"department_name": "Engineering",
"description": "Credit for overpayment on annual subscription",
"amount": 1000.23
}
],
"entity": "54",
"entity_name": "Top Level",
"entity_currency": "USD",
"currency": "USD",
"client": "33973",
"client_name": "Client A",
"credit_memo_date": "2025-07-01",
"exchange_rate_book": 1,
"exchange_rate": 1,
"credit_account": "41905",
"credit_account_name": "5230 - Cloud Credits",
"message_on_credit_memo": "Credit memo for annual subscription overpayment. Thank you for your business."
}
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({
lines: [
{
tags: [{id: '7736', name: 'Other'}],
product: '3679',
product_name: 'Annual Subscription',
account: '169208',
account_name: 'Subscription fees',
department: '35',
department_name: 'Engineering',
description: 'Credit for overpayment on annual subscription',
amount: 1000.23
}
],
entity: '54',
entity_name: 'Top Level',
entity_currency: 'USD',
currency: 'USD',
client: '33973',
client_name: 'Client A',
credit_memo_date: '2025-07-01',
exchange_rate_book: 1,
exchange_rate: 1,
credit_account: '41905',
credit_account_name: '5230 - Cloud Credits',
message_on_credit_memo: 'Credit memo for annual subscription overpayment. Thank you for your business.'
})
};
fetch('https://api.meetcampfire.com/coa/api/v1/credit-memo', 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/credit-memo",
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([
'lines' => [
[
'tags' => [
[
'id' => '7736',
'name' => 'Other'
]
],
'product' => '3679',
'product_name' => 'Annual Subscription',
'account' => '169208',
'account_name' => 'Subscription fees',
'department' => '35',
'department_name' => 'Engineering',
'description' => 'Credit for overpayment on annual subscription',
'amount' => 1000.23
]
],
'entity' => '54',
'entity_name' => 'Top Level',
'entity_currency' => 'USD',
'currency' => 'USD',
'client' => '33973',
'client_name' => 'Client A',
'credit_memo_date' => '2025-07-01',
'exchange_rate_book' => 1,
'exchange_rate' => 1,
'credit_account' => '41905',
'credit_account_name' => '5230 - Cloud Credits',
'message_on_credit_memo' => 'Credit memo for annual subscription overpayment. Thank you for your business.'
]),
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/credit-memo"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"tags\": [\n {\n \"id\": \"7736\",\n \"name\": \"Other\"\n }\n ],\n \"product\": \"3679\",\n \"product_name\": \"Annual Subscription\",\n \"account\": \"169208\",\n \"account_name\": \"Subscription fees\",\n \"department\": \"35\",\n \"department_name\": \"Engineering\",\n \"description\": \"Credit for overpayment on annual subscription\",\n \"amount\": 1000.23\n }\n ],\n \"entity\": \"54\",\n \"entity_name\": \"Top Level\",\n \"entity_currency\": \"USD\",\n \"currency\": \"USD\",\n \"client\": \"33973\",\n \"client_name\": \"Client A\",\n \"credit_memo_date\": \"2025-07-01\",\n \"exchange_rate_book\": 1,\n \"exchange_rate\": 1,\n \"credit_account\": \"41905\",\n \"credit_account_name\": \"5230 - Cloud Credits\",\n \"message_on_credit_memo\": \"Credit memo for annual subscription overpayment. Thank you for your business.\"\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/credit-memo")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"tags\": [\n {\n \"id\": \"7736\",\n \"name\": \"Other\"\n }\n ],\n \"product\": \"3679\",\n \"product_name\": \"Annual Subscription\",\n \"account\": \"169208\",\n \"account_name\": \"Subscription fees\",\n \"department\": \"35\",\n \"department_name\": \"Engineering\",\n \"description\": \"Credit for overpayment on annual subscription\",\n \"amount\": 1000.23\n }\n ],\n \"entity\": \"54\",\n \"entity_name\": \"Top Level\",\n \"entity_currency\": \"USD\",\n \"currency\": \"USD\",\n \"client\": \"33973\",\n \"client_name\": \"Client A\",\n \"credit_memo_date\": \"2025-07-01\",\n \"exchange_rate_book\": 1,\n \"exchange_rate\": 1,\n \"credit_account\": \"41905\",\n \"credit_account_name\": \"5230 - Cloud Credits\",\n \"message_on_credit_memo\": \"Credit memo for annual subscription overpayment. Thank you for your business.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/credit-memo")
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 \"lines\": [\n {\n \"tags\": [\n {\n \"id\": \"7736\",\n \"name\": \"Other\"\n }\n ],\n \"product\": \"3679\",\n \"product_name\": \"Annual Subscription\",\n \"account\": \"169208\",\n \"account_name\": \"Subscription fees\",\n \"department\": \"35\",\n \"department_name\": \"Engineering\",\n \"description\": \"Credit for overpayment on annual subscription\",\n \"amount\": 1000.23\n }\n ],\n \"entity\": \"54\",\n \"entity_name\": \"Top Level\",\n \"entity_currency\": \"USD\",\n \"currency\": \"USD\",\n \"client\": \"33973\",\n \"client_name\": \"Client A\",\n \"credit_memo_date\": \"2025-07-01\",\n \"exchange_rate_book\": 1,\n \"exchange_rate\": 1,\n \"credit_account\": \"41905\",\n \"credit_account_name\": \"5230 - Cloud Credits\",\n \"message_on_credit_memo\": \"Credit memo for annual subscription overpayment. Thank you for your business.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 4258,
"lines": [
{
"id": 5449,
"account_number": "4107",
"account_name": "4107 - Subscription fees",
"product_name": "Annual Subscription",
"department_name": "Engineering",
"tags": [
{
"id": 7736,
"parent_name": null,
"parent": null,
"name": "Other",
"created_at": "2025-06-18T21:09:34+00:00",
"last_modified_at": "2025-06-18T21:09:34+00:00",
"group": null
}
],
"description": "Credit for overpayment on annual subscription",
"amount": 1000.23,
"created_at": "2025-07-25T21:04:38+00:00",
"last_modified_at": "2025-07-25T21:04:38+00:00",
"product": 3679,
"account": 169208,
"department": 35
}
],
"payments": [],
"total_amount": 1000.23,
"amount_used": 0,
"amount_remaining": 1000.23,
"entity_name": "Top Level",
"entity_currency": "USD",
"client_name": "Client A",
"credit_account_name": "5230 - Cloud Credits",
"attachments": [],
"credit_memo_number": "CM-0000008",
"voided_date": null,
"ref_number": null,
"credit_memo_date": "2025-07-01",
"applied_date": null,
"message_on_credit_memo": "Credit memo for annual subscription overpayment. Thank you for your business.",
"application_status": "open",
"currency": "USD",
"exchange_rate": 1,
"exchange_rate_book": 1,
"created_at": "2025-07-25T21:04:38+00:00",
"last_modified_at": "2025-07-25T21:04:38+00:00",
"customer": 2,
"entity": 54,
"client": 33973,
"credit_account": 41905,
"journal_entry": 7491953,
"contract": null,
"voided_journal_entry": null
}Create Credit Memo
Creates a new accounting credit memo with line items and automatic journal entry generation.
This endpoint allows for comprehensive credit memo creation with:
- Multiple line items with different products, accounts, amounts, and departmental allocations
- Automatic journal entry creation following double-entry bookkeeping principles
- Multi-currency support with exchange rate handling
- Client and entity relationship management
- Contract associations for revenue recognition tracking
- Product-based line item categorization with tax handling
- Tag-based transaction categorization and reporting
curl --request POST \
--url https://api.meetcampfire.com/coa/api/v1/credit-memo \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"tags": [
{
"id": "7736",
"name": "Other"
}
],
"product": "3679",
"product_name": "Annual Subscription",
"account": "169208",
"account_name": "Subscription fees",
"department": "35",
"department_name": "Engineering",
"description": "Credit for overpayment on annual subscription",
"amount": 1000.23
}
],
"entity": "54",
"entity_name": "Top Level",
"entity_currency": "USD",
"currency": "USD",
"client": "33973",
"client_name": "Client A",
"credit_memo_date": "2025-07-01",
"exchange_rate_book": 1,
"exchange_rate": 1,
"credit_account": "41905",
"credit_account_name": "5230 - Cloud Credits",
"message_on_credit_memo": "Credit memo for annual subscription overpayment. Thank you for your business."
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/credit-memo"
payload = {
"lines": [
{
"tags": [
{
"id": "7736",
"name": "Other"
}
],
"product": "3679",
"product_name": "Annual Subscription",
"account": "169208",
"account_name": "Subscription fees",
"department": "35",
"department_name": "Engineering",
"description": "Credit for overpayment on annual subscription",
"amount": 1000.23
}
],
"entity": "54",
"entity_name": "Top Level",
"entity_currency": "USD",
"currency": "USD",
"client": "33973",
"client_name": "Client A",
"credit_memo_date": "2025-07-01",
"exchange_rate_book": 1,
"exchange_rate": 1,
"credit_account": "41905",
"credit_account_name": "5230 - Cloud Credits",
"message_on_credit_memo": "Credit memo for annual subscription overpayment. Thank you for your business."
}
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({
lines: [
{
tags: [{id: '7736', name: 'Other'}],
product: '3679',
product_name: 'Annual Subscription',
account: '169208',
account_name: 'Subscription fees',
department: '35',
department_name: 'Engineering',
description: 'Credit for overpayment on annual subscription',
amount: 1000.23
}
],
entity: '54',
entity_name: 'Top Level',
entity_currency: 'USD',
currency: 'USD',
client: '33973',
client_name: 'Client A',
credit_memo_date: '2025-07-01',
exchange_rate_book: 1,
exchange_rate: 1,
credit_account: '41905',
credit_account_name: '5230 - Cloud Credits',
message_on_credit_memo: 'Credit memo for annual subscription overpayment. Thank you for your business.'
})
};
fetch('https://api.meetcampfire.com/coa/api/v1/credit-memo', 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/credit-memo",
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([
'lines' => [
[
'tags' => [
[
'id' => '7736',
'name' => 'Other'
]
],
'product' => '3679',
'product_name' => 'Annual Subscription',
'account' => '169208',
'account_name' => 'Subscription fees',
'department' => '35',
'department_name' => 'Engineering',
'description' => 'Credit for overpayment on annual subscription',
'amount' => 1000.23
]
],
'entity' => '54',
'entity_name' => 'Top Level',
'entity_currency' => 'USD',
'currency' => 'USD',
'client' => '33973',
'client_name' => 'Client A',
'credit_memo_date' => '2025-07-01',
'exchange_rate_book' => 1,
'exchange_rate' => 1,
'credit_account' => '41905',
'credit_account_name' => '5230 - Cloud Credits',
'message_on_credit_memo' => 'Credit memo for annual subscription overpayment. Thank you for your business.'
]),
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/credit-memo"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"tags\": [\n {\n \"id\": \"7736\",\n \"name\": \"Other\"\n }\n ],\n \"product\": \"3679\",\n \"product_name\": \"Annual Subscription\",\n \"account\": \"169208\",\n \"account_name\": \"Subscription fees\",\n \"department\": \"35\",\n \"department_name\": \"Engineering\",\n \"description\": \"Credit for overpayment on annual subscription\",\n \"amount\": 1000.23\n }\n ],\n \"entity\": \"54\",\n \"entity_name\": \"Top Level\",\n \"entity_currency\": \"USD\",\n \"currency\": \"USD\",\n \"client\": \"33973\",\n \"client_name\": \"Client A\",\n \"credit_memo_date\": \"2025-07-01\",\n \"exchange_rate_book\": 1,\n \"exchange_rate\": 1,\n \"credit_account\": \"41905\",\n \"credit_account_name\": \"5230 - Cloud Credits\",\n \"message_on_credit_memo\": \"Credit memo for annual subscription overpayment. Thank you for your business.\"\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/credit-memo")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"tags\": [\n {\n \"id\": \"7736\",\n \"name\": \"Other\"\n }\n ],\n \"product\": \"3679\",\n \"product_name\": \"Annual Subscription\",\n \"account\": \"169208\",\n \"account_name\": \"Subscription fees\",\n \"department\": \"35\",\n \"department_name\": \"Engineering\",\n \"description\": \"Credit for overpayment on annual subscription\",\n \"amount\": 1000.23\n }\n ],\n \"entity\": \"54\",\n \"entity_name\": \"Top Level\",\n \"entity_currency\": \"USD\",\n \"currency\": \"USD\",\n \"client\": \"33973\",\n \"client_name\": \"Client A\",\n \"credit_memo_date\": \"2025-07-01\",\n \"exchange_rate_book\": 1,\n \"exchange_rate\": 1,\n \"credit_account\": \"41905\",\n \"credit_account_name\": \"5230 - Cloud Credits\",\n \"message_on_credit_memo\": \"Credit memo for annual subscription overpayment. Thank you for your business.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/credit-memo")
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 \"lines\": [\n {\n \"tags\": [\n {\n \"id\": \"7736\",\n \"name\": \"Other\"\n }\n ],\n \"product\": \"3679\",\n \"product_name\": \"Annual Subscription\",\n \"account\": \"169208\",\n \"account_name\": \"Subscription fees\",\n \"department\": \"35\",\n \"department_name\": \"Engineering\",\n \"description\": \"Credit for overpayment on annual subscription\",\n \"amount\": 1000.23\n }\n ],\n \"entity\": \"54\",\n \"entity_name\": \"Top Level\",\n \"entity_currency\": \"USD\",\n \"currency\": \"USD\",\n \"client\": \"33973\",\n \"client_name\": \"Client A\",\n \"credit_memo_date\": \"2025-07-01\",\n \"exchange_rate_book\": 1,\n \"exchange_rate\": 1,\n \"credit_account\": \"41905\",\n \"credit_account_name\": \"5230 - Cloud Credits\",\n \"message_on_credit_memo\": \"Credit memo for annual subscription overpayment. Thank you for your business.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 4258,
"lines": [
{
"id": 5449,
"account_number": "4107",
"account_name": "4107 - Subscription fees",
"product_name": "Annual Subscription",
"department_name": "Engineering",
"tags": [
{
"id": 7736,
"parent_name": null,
"parent": null,
"name": "Other",
"created_at": "2025-06-18T21:09:34+00:00",
"last_modified_at": "2025-06-18T21:09:34+00:00",
"group": null
}
],
"description": "Credit for overpayment on annual subscription",
"amount": 1000.23,
"created_at": "2025-07-25T21:04:38+00:00",
"last_modified_at": "2025-07-25T21:04:38+00:00",
"product": 3679,
"account": 169208,
"department": 35
}
],
"payments": [],
"total_amount": 1000.23,
"amount_used": 0,
"amount_remaining": 1000.23,
"entity_name": "Top Level",
"entity_currency": "USD",
"client_name": "Client A",
"credit_account_name": "5230 - Cloud Credits",
"attachments": [],
"credit_memo_number": "CM-0000008",
"voided_date": null,
"ref_number": null,
"credit_memo_date": "2025-07-01",
"applied_date": null,
"message_on_credit_memo": "Credit memo for annual subscription overpayment. Thank you for your business.",
"application_status": "open",
"currency": "USD",
"exchange_rate": 1,
"exchange_rate_book": 1,
"created_at": "2025-07-25T21:04:38+00:00",
"last_modified_at": "2025-07-25T21:04:38+00:00",
"customer": 2,
"entity": 54,
"client": 33973,
"credit_account": 41905,
"journal_entry": 7491953,
"contract": null,
"voided_journal_entry": null
}Body
Show child attributes
Show child attributes
Revenue contract to link this credit memo to at creation.
credit_memo- Credit Memooverpayment- Overpayment
credit_memo, overpayment 120open- Openpartially_used- Partially Usedused- Usedvoided- Voided
open, partially_used, used, voided 3-100000000000000 < x < 100000000000000-100000000000000 < x < 100000000000000When true, no tax is calculated through, and no transaction is created in, the entity's tax connection for this credit memo. Set at creation; cannot be changed.
250250Sum of all line item amounts
-1000000000000000000 < x < 1000000000000000000Sum of all non-voided payment amounts
-1000000000000000000 < x < 1000000000000000000-2147483648 <= x <= 2147483647Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Calculate amount remaining from database fields
Combines account number and name in the format "number - name"
Show child attributes
Show child attributes
ID of the negation transaction in Anrok for this credit memo
Revenue contract to link this credit memo to at creation.
credit_memo- Credit Memooverpayment- Overpayment
credit_memo, overpayment 120open- Openpartially_used- Partially Usedused- Usedvoided- Voided
open, partially_used, used, voided 3-100000000000000 < x < 100000000000000-100000000000000 < x < 100000000000000When true, no tax is calculated through, and no transaction is created in, the entity's tax connection for this credit memo. Set at creation; cannot be changed.
250250Sum of all line item amounts
-1000000000000000000 < x < 1000000000000000000Sum of all non-voided payment amounts
-1000000000000000000 < x < 1000000000000000000-2147483648 <= x <= 2147483647