Skip to main content

The FusionInvoice API

The FusionInvoice API allows you to programmatically manage clients, invoices, quotes, payments, and related resources within your FusionInvoice system. This API provides both read and write capabilities, enabling integration with other business systems or custom tooling.

Getting Started

For the purposes of testing, we are using Postman. You can use whatever API testing tool you prefer - The Postman collection can be found at the link below:.

Postman Collection

Below are the variables we have set up for our local environment to make testing easier. Note that the token value must be retrieved using the login endpoint. More on that next. 

image.png

Your API auth token can be retrieved by using the FusionInvoice login endpoint. Before doing this, it’s a good idea to create a new admin level user within your FusionInvoice installation, which you will use for API calls. For instance, create a called api user with an email of

[email protected]

 and make note of the password.  Next, we’ll go back to Postman and call the login endpoint with this new user’s credentials. (see example below)

image.png

Click the Send button and your personal access token will be generated. You will see it in the response area.

image.png

At this point, you can go back to your Postman environment variables and paste in the value from the token you received. (In this example you would paste in the value starting with 2|Wlf. Do not paste the quotation marks. Now that you have a token saved to your environment, you should be able to start making API calls from Postman.

How the API endpoints are organized

Our endpoints are organized by module and we currently support:

  • Client
  • Invoices
  • Quotes
  • Payments

Let’s explore the Client endpoints first. There are 5 endpoints that can be called for clients.

image.png

List endpoints end in the name of the module, for instance the list endpoint for clients would be something like: https://myfiurl.com/api/v1/clients

List endpoints support many query parameter options for filtering criteria. 
•paginated_response
•include_custom_fields
•active

In addition, you can specify any valid field name that matches (or does not match) a certain value. For instance, if we wanted to retrieve a list of clients that had a timezone in America, we would add a “timezone” key and give it a value of “america”.

If you add multiple key values to filter by, the conditions are joined with an OR operator. For instance, timezone=america OR name=acme shoe repair. However, you can change the operator to an AND condition by adding the key “where_operator” and giving it a value of “AND”. The OR or AND operator works on the entire expression and at this time you cannot mix and match OR and AND operators.

Show endpoints are meant to fetch the data for a single record. In the case of a client, we would specify the ID of the client to show in the URL. Ie. https://myfiurl.com/api/v1/clients/2

List endpoints support many query parameter options for filtering criteria. 

  • include_custom_fields

Add endpoints use an POST method and are used to add a new record and have a URL ending with “/store”. In the case of a client,  https://myfiurl.com/api/v1/clients/store

There are several required fields for each add endpoint. In the case of clients, the required fields are:
•name
•email
•type

You can however pass any valid field name and value pair. 

Update endpoints use a PUT method and are used to update an existing record and have a URL ending with ID of the record. A client example,  https://myfiurl.com/api/v1/clients/1201

List the fields name and values you would like to update. Here is a JSON body example for the client with ID 1201:

{
“name”  :  “Barnes and Associates”, 
“city”  :  “Tallahassee””,
“state”  :  “FL”,
“active”  :  1
}

Delete endpoints use a DEL method and are used to delete an existing record. They have a URL ending with ID of the record. A client example,  https://myfiurl.com/api/v1/clients/1302


There are no additional parameters for delete endpoints. 

Formatting the request parameters

The API can accept parameters as normal URL query stings (key value pairs) or as JSON in the body of the request. The JSON collection included shows both methods in the various examples. 

Base URL

All endpoints are accessed via a base URL, which generally follows this pattern:

{{protocol}}://{{host}}/api/v{{version}}/
  • protocol: Usually https
  • host: Your FusionInvoice installation domain (e.g., app.yourdomain.com)
  • version: The current API version (e.g., 1)

For example:

https://app.yourdomain.com/api/v1/

Notes on Authentication

The FusionInvoice API uses Bearer Token authentication. To authenticate:

  1. Obtain a token by calling the POST /login endpoint with valid credentials.
  2. Include the token in subsequent requests via the Authorization header:
Authorization: Bearer {{token}}

Request and Response Formats

  • Request Formats: Endpoints generally accept JSON or form-data. Check the specific endpoint details for the required content type.
  • Response Format: JSON is returned in responses unless otherwise specified.
  • Error Handling: If an error occurs (e.g., validation failures, unauthorized access), the response will typically include an HTTP status code (4xx or 5xx) and a JSON payload describing the error.

Pagination

Many listing endpoints support pagination. To enable pagination, include the query parameter paginated_response=1. The response will then include pagination metadata (like current_page, last_page, per_page).

Custom Fields

Some endpoints support include_custom_fields=1 to include custom field data. Additionally, you can filter or search using custom fields by passing parameters such as custom->column_1.


Authentication

Login

Endpoint: POST /login

Description: Obtain a bearer token by providing valid FusionInvoice user credentials.

Form Data Parameters:

  • email (string, required): Your account email.
  • password (string, required): Your account password.

Example:

curl -X POST "{{protocol}}://{{host}}/api/v{{version}}/login" \
     -F "[email protected]" \
     -F "password=12345678"

Upon success, the response will contain a token you can use for subsequent requests.


Clients

Manage client information, including creation, retrieval, updating, and deletion.

List Clients

Endpoint: GET /clients

Query Parameters:

  • paginated_response (int, optional): 1 to paginate results.
  • name (string, optional): Filter clients by name.
  • Additional filters like active, include_custom_fields, or custom->column_x may be available.

Example:

curl -X GET "{{protocol}}://{{host}}/api/v{{version}}/clients?paginated_response=1&page=1" \
     -H "Authorization: Bearer {{token}}"

Show Client

Endpoint: GET /clients/{id}

Description: Retrieve details for a single client by ID.

Example:

curl -X GET "{{protocol}}://{{host}}/api/v{{version}}/clients/2" \
     -H "Authorization: Bearer {{token}}"

Add Client

Endpoint: POST /clients/store

Body (JSON):

  • unique_name (string, required)
  • name (string, required)
  • email (string, optional)
  • type (string, e.g., customer)
  • allow_client_center_login (int, 1 or 0)
  • password and password_confirmation (required if allow_client_center_login=1)

Example:

curl -X POST "{{protocol}}://{{host}}/api/v{{version}}/clients/store" \
     -H "Authorization: Bearer {{token}}" \
     -H "Content-Type: application/json" \
     -d '{
           "unique_name": "Api Prospect11",
           "name": "Api Client11",
           "email": "[email protected]",
           "type": "customer",
           "allow_client_center_login": 1,
           "password": "12345678",
           "password_confirmation": "12345678"
         }'

Update Client

Endpoint: PUT /clients/{id}

Description: Update client information.

Example:

curl -X PUT "{{protocol}}://{{host}}/api/v{{version}}/clients/33657" \
     -H "Authorization: Bearer {{token}}" \
     -H "Content-Type: application/json" \
     -d '{
           "name": "Test API Client",
           "allow_client_center_login": "",
           "custom": { "column_1": "Test 123456789" }
         }'

Delete Client

Endpoint: DELETE /clients/{id}

Example:

curl -X DELETE "{{protocol}}://{{host}}/api/v{{version}}/clients/1302" \
     -H "Authorization: Bearer {{token}}"

Expenses

Allows you to list, view, add, update, and delete expenses.

List Expenses

Endpoint: GET /expenses

Query Parameters:

  • paginated_response=1 for pagination.
  • Optional filters like include_custom_fields, search, etc.

Show Expense

Endpoint: GET /expenses/{id}

Example:

curl -X GET "{{protocol}}://{{host}}/api/v{{version}}/expenses/2?include_custom_fields=1" \
     -H "Authorization: Bearer {{token}}"

Add Expense

Endpoint: POST /expenses/store

Body (form-data):

  • type (required, e.g., standard_expense)
  • amount (required if type=standard_expense)
  • Other fields like company_profile_id, vendor_name, category_name, description, expense_date, etc.

Update Expense

Endpoint: POST /expenses/{id}/update

Description: Update an existing expense by ID. Uses form-data parameters similar to adding.

Delete Expense

Endpoint: DELETE /expenses/{id}


Quotes

Manage quotes: list, show, create, add items, custom fields, send email, and download PDF.

List Quotes

Endpoint: GET /quotes

Query Parameters:

  • paginated_response=1, page, include_custom_fields, etc.

Show Quote

Endpoint: GET /quotes/{id}

Add Quote

Endpoint: POST /quotes/store

Form Data Parameters:

  • client_name or client_id
  • quote_date (Y-m-d)
  • company_profile_id

Delete Quote

Endpoint: DELETE /quotes/delete

Form Data Parameters:

  • id (the quote ID to delete)

Add Quote Items

Endpoint: PUT /quotes/items/add

Body (JSON):

  • quote_id (int)
  • name (string)
  • quantity (int)
  • price (numeric)

Add Custom Field to Quote

Endpoint: PATCH /quotes/custom-fields/add

Body (JSON):

  • quote_id
  • column_1 (example custom field)

Send Quote via Email

Endpoint: POST /quotes/email

Form Data Parameters:

  • id (quote ID)
  • subject
  • to[]
  • attach_pdf (0 or 1)

Download Quote PDF

Endpoint: GET /quotes/{id}/pdf


Invoices

Manage invoices: list, show, create, add items, send email, download PDF, and apply credit memos.

List Invoices

Endpoint: GET /invoices

Query Parameters:

  • paginated_response=1, page, include_custom_fields, etc.

Show Invoice

Endpoint: GET /invoices/{id}

Download Invoice PDF

Endpoint: GET /invoices/{id}/pdf

Send Invoice via Email

Endpoint: POST /invoices/email

Form Data Parameters:

  • id (invoice ID)
  • subject
  • to[]
  • attach_pdf (0 or 1)

Add Invoice

Endpoint: POST /invoices/store

Form Data Parameters:

  • client_name or client_id
  • invoice_date (Y-m-d)
  • company_profile_id

Apply Credit Memo to Invoice

Endpoint: POST /invoices/apply/credit-memo

Form Data Parameters:

  • invoice_id
  • credit_memo_id
  • amount

Add Invoice Items

Endpoint: PUT /invoices/items/add

Body (JSON):

  • invoice_id
  • name
  • quantity
  • price

Delete Invoice

Endpoint: DELETE /invoices/{id}


Payments

Manage payments: list, show, add, and delete.

List Payments

Endpoint: GET /payments

Show Payment

Endpoint: GET /payments/{id}

Add Payment

Endpoint: POST /payments/store

Form Data Parameters:

  • payment_method_id
  • paid_at (date)
  • amount
  • invoice_id
  • client_id

Add Custom Fields to Payment

Endpoint: PUT /payments/custom-fields/add

Delete Payment

Endpoint: DELETE /payments/{id}


Client Contacts

Manage client contacts associated with a particular client.

List Client Contacts

Endpoint: GET /clients?name={name}

(Filter by name or other parameters as needed.)

Show Client Contact

Endpoint:  GET /client/contact/{id}

Add Contact

Endpoint: POST /client/contact/store

Form Data Parameters:

  • title
  • name
  • primary_isd_code, primary_phone, primary_is_mobile
  • alternate_isd_code, alternate_phone, alternate_is_mobile
  • email
  • default_to, default_cc, default_bcc (1 or 0)
  • notes
  • client_id

Update Contact

Endpoint: PUT /client/contact/update/{id}

Body (JSON): Fields similar to adding a contact.

Delete Contact

Endpoint: DELETE /client/contact/{id}


Additional Notes

  • Always include the bearer token in authorized requests.
  • For complex filtering and searching, refer to the query parameters shown in examples.
  • If you encounter issues or need clarification on any endpoint, please contact FusionInvoice support.