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": [
    {
      "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": {
            "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": {
            "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": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "external_id": "<string>",
            "at": "2023-11-07T05:31:56Z",
            "amount": 123,
            "processor": "<string>",
            "payment_clearing_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": {
              "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": {
                  "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"
              }
            ],
            "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": {
        "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": {
    "pagination": {
      "sort_by": "<string>",
      "cursor": "<string>",
      "has_more": true,
      "total_count": 123
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt

Use this file to discover all available pages before exploring further.

List Bills supports cursor-based pagination through sort_by, sort_order, cursor, limit, and show_total_count. Responses include bill records in data and pagination details in meta.pagination; see Pagination for the shared response contract.

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 bills by whether they are marked as expenses.

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[]
meta
object