Skip to main content
GET
/
v1
/
businesses
/
{businessId}
/
bills
List bills
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/bills \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "type": "Bill",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "external_id": "<string>",
      "received_at": "2023-11-07T05:31:56Z",
      "due_at": "2023-11-07T05:31:56Z",
      "paid_at": "2023-11-07T05:31:56Z",
      "voided_at": "2023-11-07T05:31:56Z",
      "memo": "<string>",
      "line_items": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "external_id": "<string>",
          "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "account_identifier": {
            "type": "AccountId",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          },
          "ledger_account": {
            "type": "Single_Chart_Account",
            "id": {
              "type": "AccountId",
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            },
            "name": "Current Assets",
            "account_number": "4000",
            "stable_name": {
              "type": "StableName",
              "stable_name": "CURRENT_ASSETS"
            },
            "account_type": {
              "display_name": "Asset"
            },
            "account_subtype": {
              "display_name": "Current Assets"
            }
          },
          "prepayment_account": {
            "type": "Single_Chart_Account",
            "id": {
              "type": "AccountId",
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            },
            "name": "Current Assets",
            "account_number": "4000",
            "stable_name": {
              "type": "StableName",
              "stable_name": "CURRENT_ASSETS"
            },
            "account_type": {
              "display_name": "Asset"
            },
            "account_subtype": {
              "display_name": "Current Assets"
            }
          },
          "description": "<string>",
          "product_name": "<string>",
          "unit_price": 123,
          "quantity": 123,
          "subtotal": 123,
          "discount_amount": 123,
          "sales_taxes": [
            {
              "tax_account": {
                "name": "CALIFORNIA_VAT",
                "type": "Tax_Name"
              },
              "tax_ledger_account": {
                "id": "c4007474-f604-4d57-9690-b7f40f7a1cee",
                "name": "Sales tax: CALIFORNIA",
                "stable_name": "SALES_TAXES:CALIFORNIA",
                "normality": "CREDIT",
                "account_type": {
                  "value": "EXPENSE",
                  "display_name": "Expenses"
                },
                "account_subtype": {
                  "value": "SALES_TAXES",
                  "display_name": "Sales Taxes"
                }
              },
              "amount": 123
            }
          ],
          "sales_taxes_total": 123,
          "total_amount": 123,
          "transaction_tags": [
            {
              "key": "department",
              "value": "sales",
              "dimension_display_name": "Department",
              "value_display_name": "Sales Department"
            }
          ],
          "memo": "<string>",
          "metadata": {
            "custom_field": "value",
            "any valid json": "below 1kb",
            "nested": {
              "meaning of life": 42,
              "array": []
            }
          },
          "reference_number": "<string>"
        }
      ],
      "additional_sales_taxes": [
        {
          "tax_account": {
            "name": "CALIFORNIA_VAT",
            "type": "Tax_Name"
          },
          "tax_ledger_account": {
            "id": "c4007474-f604-4d57-9690-b7f40f7a1cee",
            "name": "Sales tax: CALIFORNIA",
            "stable_name": "SALES_TAXES:CALIFORNIA",
            "normality": "CREDIT",
            "account_type": {
              "value": "EXPENSE",
              "display_name": "Expenses"
            },
            "account_subtype": {
              "value": "SALES_TAXES",
              "display_name": "Sales Taxes"
            }
          },
          "amount": 123
        }
      ],
      "additional_sales_taxes_total": 123,
      "additional_discount": 123,
      "subtotal": 123,
      "total_amount": 123,
      "outstanding_balance": 123,
      "payment_allocations": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "amount": 123,
          "payment": {
            "type": "com.layerfi.routers.ApiBillPayment",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "external_id": "<string>",
            "vendor": {
              "type": "VendorData",
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "external_id": "<string>",
              "individual_name": "<string>",
              "company_name": "<string>",
              "email": "<string>",
              "mobile_phone": "<string>",
              "office_phone": "<string>",
              "address_string": "<string>",
              "memo": "<string>",
              "transaction_tags": [
                {
                  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                  "key": "ExampleTagKey",
                  "value": "ExampleTagValue",
                  "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                  "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                  "dimension_display_name": "<string>",
                  "value_display_name": "<string>",
                  "archived_at": "2023-11-07T05:31:56Z"
                }
              ]
            },
            "at": "2023-11-07T05:31:56Z",
            "amount": 123,
            "processor": "<string>",
            "payment_clearing_account": {
              "type": "Single_Chart_Account",
              "id": {
                "type": "AccountId",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
              },
              "name": "Current Assets",
              "account_number": "4000",
              "stable_name": {
                "type": "StableName",
                "stable_name": "CURRENT_ASSETS"
              },
              "account_type": {
                "display_name": "Asset"
              },
              "account_subtype": {
                "display_name": "Current Assets"
              }
            },
            "imported_at": "2023-11-07T05:31:56Z",
            "allocations": [
              {
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "amount": 123,
                "transaction_tags": [
                  {
                    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                    "key": "ExampleTagKey",
                    "value": "ExampleTagValue",
                    "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                    "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                    "dimension_display_name": "<string>",
                    "value_display_name": "<string>",
                    "archived_at": "2023-11-07T05:31:56Z"
                  }
                ],
                "memo": "<string>",
                "metadata": {
                  "custom_field": "value",
                  "any valid json": "below 1kb",
                  "nested": {
                    "meaning of life": 42,
                    "array": []
                  }
                },
                "reference_number": "<string>"
              }
            ],
            "transaction_tags": [
              {
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "key": "ExampleTagKey",
                "value": "ExampleTagValue",
                "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "dimension_display_name": "<string>",
                "value_display_name": "<string>",
                "archived_at": "2023-11-07T05:31:56Z"
              }
            ],
            "memo": "<string>",
            "metadata": {
              "custom_field": "value",
              "any valid json": "below 1kb",
              "nested": {
                "meaning of life": 42,
                "array": []
              }
            },
            "reference_number": "<string>"
          },
          "transaction_tags": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "key": "ExampleTagKey",
              "value": "ExampleTagValue",
              "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "dimension_display_name": "<string>",
              "value_display_name": "<string>",
              "archived_at": "2023-11-07T05:31:56Z"
            }
          ],
          "memo": "<string>",
          "metadata": {
            "custom_field": "value",
            "any valid json": "below 1kb",
            "nested": {
              "meaning of life": 42,
              "array": []
            }
          },
          "reference_number": "<string>"
        }
      ],
      "vendor_credits": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "vendor_credit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "amount": 123,
          "vendor_credit": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "vendor": {
              "type": "VendorData",
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "external_id": "<string>",
              "individual_name": "<string>",
              "company_name": "<string>",
              "email": "<string>",
              "mobile_phone": "<string>",
              "office_phone": "<string>",
              "address_string": "<string>",
              "memo": "<string>",
              "transaction_tags": [
                {
                  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                  "key": "ExampleTagKey",
                  "value": "ExampleTagValue",
                  "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                  "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                  "dimension_display_name": "<string>",
                  "value_display_name": "<string>",
                  "archived_at": "2023-11-07T05:31:56Z"
                }
              ]
            },
            "received_at": "2023-11-07T05:31:56Z",
            "line_items": [
              {
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "amount": 123,
                "ledger_account": {
                  "type": "Single_Chart_Account",
                  "id": {
                    "type": "AccountId",
                    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
                  },
                  "name": "Current Assets",
                  "account_number": "4000",
                  "stable_name": {
                    "type": "StableName",
                    "stable_name": "CURRENT_ASSETS"
                  },
                  "account_type": {
                    "display_name": "Asset"
                  },
                  "account_subtype": {
                    "display_name": "Current Assets"
                  }
                },
                "memo": "<string>",
                "metadata": {
                  "custom_field": "value",
                  "any valid json": "below 1kb",
                  "nested": {
                    "meaning of life": 42,
                    "array": []
                  }
                },
                "reference_number": "<string>",
                "transaction_tags": [
                  {
                    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                    "key": "ExampleTagKey",
                    "value": "ExampleTagValue",
                    "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                    "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                    "dimension_display_name": "<string>",
                    "value_display_name": "<string>",
                    "archived_at": "2023-11-07T05:31:56Z"
                  }
                ]
              }
            ],
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "transaction_tags": [
              {
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "key": "ExampleTagKey",
                "value": "ExampleTagValue",
                "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "dimension_display_name": "<string>",
                "value_display_name": "<string>",
                "archived_at": "2023-11-07T05:31:56Z"
              }
            ],
            "type": "Vendor_Credit",
            "external_id": "<string>",
            "allocations": [
              {
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "vendor_credit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "amount": 123,
                "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
              }
            ],
            "deleted_at": "2023-11-07T05:31:56Z",
            "memo": "<string>",
            "metadata": {
              "custom_field": "value",
              "any valid json": "below 1kb",
              "nested": {
                "meaning of life": 42,
                "array": []
              }
            },
            "reference_number": "<string>"
          },
          "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      ],
      "imported_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "vendor": {
        "type": "VendorData",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "external_id": "<string>",
        "individual_name": "<string>",
        "company_name": "<string>",
        "email": "<string>",
        "mobile_phone": "<string>",
        "office_phone": "<string>",
        "address_string": "<string>",
        "memo": "<string>",
        "transaction_tags": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "key": "ExampleTagKey",
            "value": "ExampleTagValue",
            "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "dimension_display_name": "<string>",
            "value_display_name": "<string>",
            "archived_at": "2023-11-07T05:31:56Z"
          }
        ]
      },
      "transaction_tags": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "key": "ExampleTagKey",
          "value": "ExampleTagValue",
          "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "dimension_display_name": "<string>",
          "value_display_name": "<string>",
          "archived_at": "2023-11-07T05:31:56Z"
        }
      ],
      "is_expense": true,
      "metadata": {
        "custom_field": "value",
        "any valid json": "below 1kb",
        "nested": {
          "meaning of life": 42,
          "array": []
        }
      },
      "reference_number": "<string>"
    }
  ],
  "meta": {
    "type": "request_metadata",
    "pagination": {
      "sort_by": "<string>",
      "cursor": "<string>",
      "has_more": true,
      "total_count": 123
    }
  }
}
An expense is a type of bill. To list expenses, use List bills with is_expense=true:
GET /v1/businesses/{business_id}/bills?is_expense=true
Always include is_expense=true when you want only expenses. Without this filter, the response can include both expenses and standard bills. You can combine is_expense=true with the same filters supported by List bills, including status, date range, vendor, amount, and pagination filters. See the Expense object for more on expenses vs. standard bills.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

businessId
string<uuid>
required

The UUID of the business to fetch bills for.

Query Parameters

reference_number
string

Filter by exact reference number match. Returns only records with this exact reference number.

reference_numbers
string

Comma-separated list of reference numbers to filter bills by. Only bills with reference numbers matching any value in this list will be returned.

status
enum<string>

Filter bills by status.

Available options:
RECEIVED,
PARTIALLY_PAID,
PAID,
VOIDED
due_at_start
string<date-time>

Filter bills by due date. Bills with a due date on or after this date will be included. Bills without a set due date will not be included. ISO 8601 date format.

due_at_end
string<date-time>

Filter bills by due date. Bills with a due date on or before this date will be included. Bills without a set due date will not be included. ISO 8601 date format.

received_at_start
string<date-time>

Filter bills by received date. Bills received on or after this date will be included. ISO 8601 date format.

received_at_end
string<date-time>

Filter bills by received date. Bills received on or before this date will be included. ISO 8601 date format.

vendor_id
string<uuid>

Filter bills by Layer vendor id.

vendor_external_id
string

Filter bills by vendor external id. Either the vendor_id or the vendor_external_id can be provided.

min_amount
integer<int64>

Filter bills by minimum total amount (in positive cents).

max_amount
integer<int64>

Filter bills by maximum total amount (in positive cents).

memo_contains
string

Filter bills by memo text. Returns bills where the memo contains this value.

is_expense
boolean

Filter to expenses (true) or standard bills (false).

sort_by
string

Field to sort by. Eligible sort keys include imported_at and updated_at.

sort_order
enum<string>

Sort direction.

Available options:
asc,
desc
cursor
string

Pagination cursor returned from the previous page.

limit
integer
default:100

Maximum number of bills to return.

show_total_count
boolean
default:false

Whether to include total count in pagination metadata.

Response

200 - application/json

Success.

data
object[]
required
meta
object

Request metadata. Present on paginated list responses.