All requests in this flow assume you have a valid access token attached in your request headers. See our authentication guide for more information.

Creating an invoice

This section will guide you through the process of creating an invoice in Campfire.
1

Fetch related data

We’ll need to grab some object references for related objects to create our invoice. We’ll need to pass in the id’s of the related objects where applicable in the invoice creation request. Linked here are the filter endpoints for the applicable objects. These include:
2

Assemble the request

We can now create our request body by filling in the related fields. Here are the required fields:
FieldDescriptionExample
termsPayment terms (default is net_30, can be: 7, 10, 15, 20, 30, 40, 45, 60, 90, 105, 120 or due_on_receipt)"net_30"
invoice_dateAccounting date for the invoice in YYYY-MM-DD format"2025-07-01"
due_dateDue date for the invoice in YYYY-MM-DD format"2025-07-31"
linesArray of line items for the invoiceSee line item fields below
entityID from entity"54"
currencyCurrency code"USD"
message_on_invoiceMessage to display on invoice"Invoice Message"
exchange_rate_bookExchange rate between transactional and entity currency (auto-computed if not provided)1
exchange_rateExchange rate between entity and consolidation currency (auto-computed if not provided)1
clientID from client"24020"
billing_addressBilling address"Billing Address"
shipping_addressShipping address"Shipping Address"
contractID from contract (optional)"24899"
purchase_order_numberPurchase order number"123456789"
invoice_numberInvoice number"1234567890"
location_of_saleLocation of sale description"Location of sale desc"
item_dateBill date in YYYY-MM-DD format"2025-07-01"
period_startPeriod start date in YYYY-MM-DD format"2025-07-01"
period_endPeriod end date in YYYY-MM-DD format"2025-07-31"
shipping_dateShipping date in YYYY-MM-DD format"2025-07-01"
Line Item Fields:
FieldDescriptionExample
service_dateService date in YYYY-MM-DD format"2025-07-01"
amountLine item amount300
productID from product"3560"
rateRate per unit15
descriptionLine item description"Line desc"
quantityQuantity20
taxTax amount12
Example request body:
{
    "terms": "net_30",
    "invoice_date": "2025-07-01",
    "due_date": "2025-07-31",
    "lines": [
        {
            "service_date": "2025-07-01",
            "amount": 300,
            "product": "3560",
            "rate": 15,
            "description": "Line desc",
            "quantity": 20,
            "tax": 12
        }
    ],
    "entity": "54",
    "currency": "USD",
    "message_on_invoice": "Invoice Message",
    "exchange_rate_book": 1,
    "exchange_rate": 1,
    "client": "24020",
    "billing_address": "Billing Address",
    "shipping_address": "Shipping Address",
    "contract": "24899",
    "purchase_order_number": "123456789",
    "invoice_number": "1234567890",
    "location_of_sale": "Location of sale desc",
    "item_date": "2025-07-01",
    "period_start": "2025-07-01",
    "period_end": "2025-07-31",
    "shipping_date": "2025-07-01"
}
3

Post the invoice

Now that we have the request we can post it via the Create Invoice endpoint.Congrats! You’ve created your first invoice!

Paying an invoice

This section will walk you through posting a payment to an invoice.
1

Get a Journal & Transaction

We need to get a transaction id to reference in the payment.You have two options for this:
2

Assembling the payment

Now that we have a transaction id, we can create our payment request body.Payments that don’t use the full amount of a transaction will bump out a new line of the journal based on the referenced transaction.
You can apply multiple transactions to an invoice at the same time. Each transaction will be a separate payment.
FieldDescriptionExample
transaction_idID from transaction"1234"
amountPayment amount10000
accountID from account (If you want to categorize the transaction at the same time)"1234"
Example request body:
{
    "transactions": [
        {
            "transaction_id": 21069178,
            "account_id": "2550",
            "amount": 8999.99
        }
    ],
}
3

Post the payment

Now that we have the request we can post it via the Create Payment endpoint.Congrats! You’ve paid your invoice!