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:
Line Item Fields:
Example request body:
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.
Example request body:
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!