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 a bill

This section will guide you through the process of creating a bill in Campfire.
1

Fetch related data

We’ll need to grab some object references for related objects to create our bill. We’ll need to pass in the id’s of the related objects where applicable in the bill 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"
bill_dateAccounting date for the bill in YYYY-MM-DD format"2025-07-01"
due_dateDue date for the bill in YYYY-MM-DD format"2025-08-25"
linesArray of line items for the billSee line item fields below
entityID from entity"5"
currencyCurrency code"USD"
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.373
vendorID from vendor"34182"
bill_numberBill number"098765"
item_dateBill date in YYYY-MM-DD format"2025-07-01"
message_on_billMessage to display on bill"Bill Message"
mailing_addressFree text address"1234 Main St. San Francisco CA"
Line Item Fields:
FieldDescriptionExample
tagsArray of custom dimension field IDs (optional)[{"id": "8114"}]
accountID from accounts (expense account)"180564"
amountLine item amount10000
descriptionLine item description"Line Desc"
bill_customerID from vendor"34182"
departmentID from department (optional)"35"
Example request body:
{
    "terms": "net_30",
    "bill_date": "2025-07-01",
    "due_date": "2025-08-25",
    "lines": [
        {
            "tags": [
                {
                    "id": "8114"
                }
            ],
            "account": "180564",
            "amount": 10000,
            "description": "Line Desc",
            "bill_customer": "34182",
            "department": "35"
        }
    ],
    "entity": "5",
    "currency": "USD",
    "exchange_rate_book": 1,
    "exchange_rate": 1.373,
    "vendor": "34182",
    "bill_number": "098765",
    "item_date": "2025-07-01",
    "message_on_bill": "Bill Message",
    "mailing_address": "1234 Main St. San Francisco CA"
}
3

Post the bill

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

Paying a Bill

This section will walk you through posting a payment to a bill.
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 a bill 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 bill!