Campfire Accounts Receivable API
Operations related to invoicing and the AR subledger
Operations related to invoicing and the AR subledger
openapi: 3.0.3
info:
title: Campfire Developer APIs Accounts Payable Accounts Receivable API
version: 1.0.0
description: '## Introduction
Campfire''s developer APIs offer granular access to Campfire''s core accounting,
revenue recognition, and financial data features.
These APIs are designed to be used by developers to build custom integrations,
automate workflows, and perform any other programmatic operations.
'
servers:
- url: https://api.meetcampfire.com
description: Production server
tags:
- name: Accounts Receivable
description: Operations related to invoicing and the AR subledger
paths:
/coa/api/v1/credit-memo:
get:
operationId: coa_api_v1_credit_memo_list
description: "\n Retrieves a paginated list of accounting credit memos with comprehensive filtering and sorting capabilities.\n\n This endpoint provides a powerful interface for browsing and searching credit memos with:\n - Advanced filtering by date ranges, status, clients, entities, and contracts\n - Full-text search across credit memo numbers, messages, and client names\n - Flexible sorting by multiple fields including amounts and relationships\n - Optimized performance with efficient database queries and pagination\n - Complete credit memo details including line items, payment status, and accounting relationships\n\n **Key Features:**\n - Date range filtering for credit memo creation and application dates\n - Status-based filtering (open, partially_used, used, voided)\n - Client and entity-based filtering with hierarchical client support\n - Contract association filtering for revenue recognition workflows\n - Full-text search capabilities across key fields\n\n **Query Parameters:**\n - `start_date`, `end_date`: Filter by credit memo date range\n - `status`: Filter by application status (open, partially_used, used, voided)\n - `q`: Full-text search across credit memo number, message, and client name\n - `client`: Filter by specific client IDs (supports multiple values)\n - `entity`: Filter by specific entity IDs (supports multiple values)\n - `contract`: Filter by specific contract IDs (supports multiple values)\n - `sort`: Sort by various fields (credit_memo_date, client_name, total_amount, etc.)\n - `limit`, `offset`: Pagination controls for large result sets\n "
summary: List Credit Memos
parameters:
- in: query
name: client
schema:
type: array
items:
type: integer
description: Filter by client IDs (can specify multiple)
- in: query
name: contract
schema:
type: array
items:
type: integer
description: Filter by contract IDs (can specify multiple)
- in: query
name: end_date
schema:
type: string
description: Filter credit memos created on or before this date (YYYY-MM-DD format)
- in: query
name: entity
schema:
type: array
items:
type: integer
description: Filter by entity IDs (can specify multiple)
- in: query
name: limit
schema:
type: integer
description: Number of results to return per page
- in: query
name: offset
schema:
type: integer
description: Number of results to skip for pagination
- in: query
name: q
schema:
type: string
description: Search credit memo numbers, messages, and client names
- in: query
name: sort
schema:
type: string
enum:
- -amount_used
- -client_name
- -credit_memo_date
- -credit_memo_number
- -total_amount
- amount_used
- client_name
- credit_memo_date
- credit_memo_number
- total_amount
description: Sort results by field (prefix with - for descending)
- in: query
name: start_date
schema:
type: string
description: Filter credit memos created on or after this date (YYYY-MM-DD format)
- in: query
name: status
schema:
type: string
enum:
- open
- partially_used
- used
- voided
description: Filter by application status
tags:
- Accounts Receivable
security:
- knoxApiToken: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedAccountingCreditMemoList'
examples:
CreditMemosListResponse:
value:
count: 123
next: http://api.example.org/accounts/?offset=400&limit=100
previous: http://api.example.org/accounts/?offset=200&limit=100
results:
- count: 150
next: http://api.example.com/credit-memos/?limit=20&offset=20
previous: null
results:
- 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+0000
last_modified_at: 2025-06-18T21:09:34+0000
group: null
description: Credit for overpayment on annual subscription
amount: 1000.23
created_at: 2025-07-25T21:04:38+0000
last_modified_at: 2025-07-25T21:04:38+0000
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+0000
last_modified_at: 2025-07-25T21:04:38+0000
customer: 2
entity: 54
client: 33973
credit_account: 41905
journal_entry: 7491953
contract: null
voided_journal_entry: null
summary: Credit Memos List Response
description: ''
post:
operationId: coa_api_v1_credit_memo_create
description: "\n Creates a new accounting credit memo with line items and automatic journal entry generation.\n\n This endpoint allows for comprehensive credit memo creation with:\n - Multiple line items with different products, accounts, amounts, and departmental allocations\n - Automatic journal entry creation following double-entry bookkeeping principles\n - Multi-currency support with exchange rate handling\n - Client and entity relationship management\n - Contract associations for revenue recognition tracking\n - Product-based line item categorization with tax handling\n - Tag-based transaction categorization and reporting\n "
summary: Create Credit Memo
tags:
- Accounts Receivable
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
examples:
CreateCreditMemoRequest:
value:
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.
summary: Create Credit Memo Request
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
multipart/form-data:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
required: true
security:
- knoxApiToken: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
examples:
CreateCreditMemoResponse:
value:
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+0000
last_modified_at: 2025-06-18T21:09:34+0000
group: null
description: Credit for overpayment on annual subscription
amount: 1000.23
created_at: 2025-07-25T21:04:38+0000
last_modified_at: 2025-07-25T21:04:38+0000
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+0000
last_modified_at: 2025-07-25T21:04:38+0000
customer: 2
entity: 54
client: 33973
credit_account: 41905
journal_entry: 7491953
contract: null
voided_journal_entry: null
summary: Create Credit Memo Response
description: ''
/coa/api/v1/credit-memo/{credit_memo_id}/mark-used:
post:
operationId: coa_api_v1_credit_memo_mark_used_create
description: "Mark a credit memo as used by linking to an existing transaction.\n\n The transaction's debit amount will be recategorized to A/R to clear the credit memo.\n The credit memo's status will be updated to \"used\" or \"partially_used\" based on\n the amount applied vs the total amount."
summary: Mark Credit Memo as Used
parameters:
- in: path
name: credit_memo_id
schema:
type: integer
description: ID of the credit memo to mark as used
required: true
tags:
- Accounts Receivable
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MarkCreditMemoUsed'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/MarkCreditMemoUsed'
multipart/form-data:
schema:
$ref: '#/components/schemas/MarkCreditMemoUsed'
required: true
security:
- knoxApiToken: []
responses:
'200':
content:
application/json:
schema:
description: Credit memo marked as used successfully
description: ''
/coa/api/v1/credit-memo/{credit_memo_id}/payment/{payment_id}/void:
post:
operationId: coa_api_v1_credit_memo_payment_void_create
description: "Void a credit memo 'mark used' payment by creating a reversing journal entry.\n\n This creates a reversing JE that credits the A/R account and debits Uncategorized,\n then marks the payment as voided."
summary: Void Credit Memo Used Payment
parameters:
- in: path
name: credit_memo_id
schema:
type: integer
description: ID of the credit memo
required: true
- in: path
name: payment_id
schema:
type: integer
description: ID of the payment to void
required: true
tags:
- Accounts Receivable
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VoidPayment'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/VoidPayment'
multipart/form-data:
schema:
$ref: '#/components/schemas/VoidPayment'
security:
- knoxApiToken: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditMemoPayment'
description: ''
delete:
operationId: coa_api_v1_credit_memo_payment_void_destroy
description: "Remove a credit memo 'mark used' payment application.\n\n This recategorizes the transaction back to Uncategorized and deletes the payment record."
summary: Delete Credit Memo Used Payment
parameters:
- in: path
name: credit_memo_id
schema:
type: integer
description: ID of the credit memo
required: true
- in: path
name: payment_id
schema:
type: integer
description: ID of the payment to delete
required: true
tags:
- Accounts Receivable
security:
- knoxApiToken: []
responses:
'204':
description: No response body
/coa/api/v1/credit-memo/{credit_memo_id}/reopen/:
post:
operationId: coa_api_v1_credit_memo_reopen_create
description: "Reopen a voided credit memo.\n\n This removes the void date and void journal entry, and sets the credit memo status back to open.\n The voiding journal entry will be deleted to reverse the void operation."
summary: Reopen Voided Credit Memo
parameters:
- in: path
name: credit_memo_id
schema:
type: integer
description: ID of the voided credit memo to reopen
required: true
tags:
- Accounts Receivable
security:
- knoxApiToken: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
description: ''
/coa/api/v1/credit-memo/{credit_memo_id}/void/:
post:
operationId: coa_api_v1_credit_memo_void_create
description: "Void an existing credit memo.\n\n This creates a reversing journal entry to void the credit memo by reversing all debit and credit amounts.\n The credit memo status will be updated to reflect the void."
summary: Void Credit Memo
parameters:
- in: path
name: credit_memo_id
schema:
type: integer
description: ID of the credit memo to void
required: true
tags:
- Accounts Receivable
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VoidCreditMemoRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/VoidCreditMemoRequest'
multipart/form-data:
schema:
$ref: '#/components/schemas/VoidCreditMemoRequest'
required: true
security:
- knoxApiToken: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
description: ''
/coa/api/v1/credit-memo/{id}:
get:
operationId: coa_api_v1_credit_memo_retrieve
description: "\n Retrieves a single accounting credit memo with complete details including line items, payments, and accounting relationships.\n\n This endpoint provides comprehensive credit memo information with:\n - Complete credit memo metadata (dates, amounts, status, currency, terms)\n - All associated line items with product details, account information, and departmental allocations\n - Payment application history with journal entry references and transaction details\n - Client and entity information with relationship details\n - Contract associations for revenue recognition and reporting\n - File attachments and supporting documentation\n - Journal entry references for accounting audit trails and compliance\n "
summary: Retrieve Credit Memo
parameters:
- in: path
name: id
schema:
type: integer
required: true
tags:
- Accounts Receivable
security:
- knoxApiToken: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
examples:
CreditMemoDetailsResponse:
value:
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+0000
last_modified_at: 2025-06-18T21:09:34+0000
group: null
description: Credit for overpayment on annual subscription
amount: 1000.23
created_at: 2025-07-25T21:04:38+0000
last_modified_at: 2025-07-25T21:04:38+0000
product: 3679
account: 169208
department: 35
payments:
- id: 2205
payment_journal_entry: 7495832
payment_journal_entry_order: JE-0007823
payment_transaction: 19485762
amount: 500.0
payment_date: '2025-07-15'
created_at: 2025-07-15T14:30:22+0000
last_modified_at: 2025-07-15T14:30:22+0000
voided_date: null
voided_journal_entry: null
invoice:
id: 47892
invoice_number: INV-0000512
total_amount: 1000.23
amount_used: 500.0
amount_remaining: 500.23
entity_name: Top Level
entity_currency: USD
client_name: Client A
contract_name: Annual Service Agreement 2025
credit_account_name: 5230 - Cloud Credits
attachments:
- id: 15643
name: credit_memo_supporting_docs.pdf
file_size: 245760
content_type: application/pdf
created_at: 2025-07-01T10:15:33+0000
last_modified_at: 2025-07-01T10:15:33+0000
credit_memo_number: CM-0000008
voided_date: null
voided_journal_entry_order: null
ref_number: REF-2025-0087
credit_memo_date: '2025-07-01'
applied_date: '2025-07-15'
message_on_credit_memo: Credit memo for annual subscription overpayment. Thank you for your business.
application_status: partially_used
currency: USD
exchange_rate: 1
exchange_rate_book: 1
created_at: 2025-07-25T21:04:38+0000
last_modified_at: 2025-07-15T14:30:22+0000
customer: 2
entity: 54
client: 33973
credit_account: 41905
journal_entry: 7491953
contract: 1892
voided_journal_entry: null
summary: Credit Memo Details Response
description: ''
put:
operationId: coa_api_v1_credit_memo_update
description: "\n Performs a complete update of an existing accounting credit memo using PUT semantics.\n\n This endpoint allows full replacement of credit memo data including:\n - Complete credit memo metadata update (dates, amounts, client, entity, currency)\n - Full line item replacement with new products, accounts, amounts, and departmental allocations\n - Journal entry recalculation and update with new accounting transactions\n - Exchange rate updates for multi-currency credit memos\n - Contract and reference number association updates\n - Custom field updates and modifications\n\n **Important Notes:**\n - This is a full replacement operation - all credit memo data will be updated\n - Missing fields in the request will be set to null or default values\n - Existing line items will be completely replaced with the new line items\n - Journal entries will be updated to reflect all changes\n "
summary: Update Credit Memo
parameters:
- in: path
name: id
schema:
type: integer
required: true
tags:
- Accounts Receivable
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
examples:
UpdateCreditMemoRequest:
value:
lines:
- tags:
- id: '7736'
name: Other
product: '3679'
product_name: Annual Subscription
account: '169208'
account_name: Subscription fees
department: '35'
department_name: Engineering
description: Updated credit for subscription overpayment
amount: 1250.5
- tags: []
product: '3680'
product_name: Professional Services
account: '169209'
account_name: Service Revenue
department: '36'
department_name: Sales
description: Additional credit for services
amount: 500.0
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: Updated credit memo for subscription overpayment and additional services. Thank you for your business.
ref_number: REF-2025-0087-UPDATED
summary: Update Credit Memo Request
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
multipart/form-data:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
required: true
security:
- knoxApiToken: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
examples:
UpdateCreditMemoResponse:
value:
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+0000
last_modified_at: 2025-06-18T21:09:34+0000
group: null
description: Updated credit for subscription overpayment
amount: 1250.5
created_at: 2025-07-25T21:04:38+0000
last_modified_at: 2025-07-25T22:15:12+0000
product: 3679
account: 169208
department: 35
- id: 5450
account_number: '4108'
account_name: 4108 - Service Revenue
product_name: Professional Services
department_name: Sales
tags: []
description: Additional credit for services
amount: 500.0
created_at: 2025-07-25T22:15:12+0000
last_modified_at: 2025-07-25T22:15:12+0000
product: 3680
account: 169209
department: 36
payments: []
total_amount: 1750.5
amount_used: 0
amount_remaining: 1750.5
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: REF-2025-0087-UPDATED
credit_memo_date: '2025-07-01'
applied_date: null
message_on_credit_memo: Updated credit memo for subscription overpayment and additional services. Thank you for your business.
application_status: open
currency: USD
exchange_rate: 1
exchange_rate_book: 1
created_at: 2025-07-25T21:04:38+0000
last_modified_at: 2025-07-25T22:15:12+0000
customer: 2
entity: 54
client: 33973
credit_account: 41905
journal_entry: 7491953
contract: null
voided_journal_entry: null
summary: Update Credit Memo Response
description: ''
patch:
operationId: coa_api_v1_credit_memo_partial_update
description: "\n Performs a partial update of an existing accounting credit memo using PATCH semantics.\n\n This endpoint allows selective modification of credit memo fields without requiring\n a complete credit memo replacement. You can update specific aspects of the credit memo while\n leaving other fields unchanged.\n\n **Updatable Fields:**\n - Credit memo metadata (dates, messages, descriptions, client, entity, currency)\n - Line items (amounts, accounts, descriptions, departments, products)\n - Reference numbers and contract associations\n - Exchange rates and currency information\n - Custom fields and additional metadata\n - Application status and tracking information\n "
summary: Partial Update Credit Memo
parameters:
- in: path
name: id
schema:
type: integer
required: true
tags:
- Accounts Receivable
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedAccountingCreditMemo'
examples:
UpdateCreditMemoAmount:
value:
amount: '750.00'
internal_message: 'Adjusted credit amount per client request - approval #CM-2024-456'
summary: Update Credit Memo Amount
description: Partial update to adjust the credit memo amount and add internal notes
UpdateLineItem:
value:
line_items:
- id: line-item-uuid-789
description: 'Updated: Credit for Enterprise license overpayment - Q1 2024'
department:
id: dept-uuid-accounting
name: Accounting Department
summary: Update Line Item
description: Partial update to modify a specific line item description and department
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedAccountingCreditMemo'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedAccountingCreditMemo'
security:
- knoxApiToken: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditMemo'
examples:
UpdateCreditMemoResponse:
value:
id: 9a4bc225-ebe6-41fa-9a2f-de7947899c6c
number: CM-2024-001
date: '2024-03-15'
amount: '750.00'
# --- truncated at 32 KB (194 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/campfire/refs/heads/main/openapi/campfire-accounts-receivable-api-openapi.yml