Businesses
- Business
- Financial Accounts
- Documents
- Scoped Authentication
- Configuration
- Tasks & Notifications
Financial Activity
- Accounts Receivable
- Accounts Payable
- Vendors
- Bills
- Bill Payments
- Bank Transactions
- General Ledger
Accounting Reports
- Profit and Loss
- Balance Sheet
- Cash Flow Statement
Platform Configuration
- Plaid
- SMS
Activity Metrics
- Platform wide activity
- Business Activity
Update bill
Updates an existing bill
curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/bills/{billId}/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"external_id": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"due_at": "2023-11-07T05:31:56Z",
"bill_terms": "DUE_ON_RECEIPT",
"bill_number": "<string>",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_external_id": "<string>",
"line_items": [
{
"external_id": "<string>",
"account_identifier": {
"type": "AccountId",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"description": "<string>",
"product_name": "<string>",
"unit_price": 123,
"quantity": 1,
"discount_amount": 123,
"sales_taxes": [
{
"amount": 123,
"tax_rate": 123,
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>"
}
]
}
],
"payments": [
{
"external_id": "<string>",
"method": "CASH",
"amount": 123,
"processor": "<string>"
}
],
"additional_sales_taxes": [
{
"amount": 123,
"tax_rate": 123,
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>"
}
],
"status": "RECEIVED"
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"status": "RECEIVED",
"terms": "DUE_ON_RECEIPT",
"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",
"bill_number": "<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"
},
"description": "<string>",
"product_name": "<string>",
"unit_price": 123,
"quantity": 123,
"subtotal": 123,
"discount_amount": 123,
"sales_taxes": [
{
"amount": 123,
"tax_rate": 123,
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>"
}
],
"sales_taxes_total": 123,
"total_amount": 123
}
],
"additional_sales_taxes": [
{
"amount": 123,
"tax_rate": 123,
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>"
}
],
"additional_sales_taxes_total": 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",
"method": "CASH",
"amount": 123,
"processor": "<string>",
"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",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
}
],
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
},
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
}
],
"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>",
"notes": "<string>",
"status": "ACTIVE"
},
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The UUID of the business the bill belongs to
The UUID of the bill to update
Body
External ID for the bill within your platform.
When the bill was received.
When the bill is due. Cannot be specified along with bill_terms.
Payment terms for the bill. Cannot be specified along with due_at.
DUE_ON_RECEIPT
, NET_10
, NET_15
, NET_30
, NET_60
Number for the bill for display to end-users.
ID of the vendor associated with the bill.
External ID of the vendor associated with the bill.
Updated line items for the bill.
Name of the product/service the line item is for
Price of a single unit of the product (in cents)
The external ID of the bill line item in your system.
Description for the bill line item
Number of units of the product purchased
Amount of discount applied to this line item in cents
Sales tax line items for this line item
Updated payments for the bill.
Method used for payment
CASH
, CHECK
, CREDIT_CARD
, ACH
, CREDIT_BALANCE
, OTHER
Payment amount in cents
External ID for the payment
Payment processor used
Updated additional sales tax line items.
Updated status of the bill.
RECEIVED
, PARTIALLY_PAID
, PAID
, VOIDED
Response
Unique identifier for the bill.
ID of the Business that received the bill.
Unique ID of the bill in your system.
Status of the bill.
RECEIVED
, PARTIALLY_PAID
, PAID
, VOIDED
Payment terms of the bill.
DUE_ON_RECEIPT
, NET_10
, NET_15
, NET_30
, NET_60
When the bill was received.
When the bill is due.
When the bill was paid.
When the bill was voided.
Number for the bill for display.
Line items making up the bill
ID of the bill line item.
The external ID of the bill line item in your system.
ID of the parent bill
Description for the bill line item
Name of the product/service
Price per unit in cents
Number of units
Subtotal for the line item in cents
Amount of discount in cents
Sales tax line items
Total sales tax in cents
Total amount including taxes and discounts
Additional sales tax line items
Sum of all additional taxes in cents
Subtotal of all line items in cents
Total amount including taxes in cents
Remaining balance after payments in cents
Payment allocations for this bill
Unique identifier for the allocation
ID of the bill
ID of the payment
Amount allocated in cents
The full payment details
Unique identifier for the payment
External ID for the payment
When the payment was made
Method used for payment
CASH
, CHECK
, CREDIT_CARD
, ACH
, CREDIT_BALANCE
, OTHER
Payment amount in cents
Payment processor used
When the payment was imported
How the payment is allocated across bills
Unique identifier for the allocation
ID of the bill
ID of the payment
Amount allocated in cents
Tags associated with the allocation
ID for the tag
Key for the tag
"ExampleTagKey"
Value for the tag
"ExampleTagValue"
When the tag was created
When the tag was last updated
When the tag was deleted
Tags associated with the payment
ID for the tag
Key for the tag
"ExampleTagKey"
Value for the tag
"ExampleTagValue"
When the tag was created
When the tag was last updated
When the tag was deleted
Tags associated with the allocation
ID for the tag
Key for the tag
"ExampleTagKey"
Value for the tag
"ExampleTagValue"
When the tag was created
When the tag was last updated
When the tag was deleted
When the bill was imported
When the bill was last updated
The vendor associated with this bill
Unique identifier for the vendor.
Unique ID of the vendor in your system for linking purposes. Idempotency key.
Full name of the individual vendor or contact at a corporate vendor.
Name of the company vendor.
Email address of the vendor.
Mobile phone number of the vendor.
Office phone number of the vendor.
Address of the vendor.
Notes about the vendor.
Status of the vendor.
ACTIVE
, ARCHIVED
Tags on the transactions
ID for the tag
Key for the tag
"ExampleTagKey"
Value for the tag
"ExampleTagValue"
When the tag was created
When the tag was last updated
When the tag was deleted
curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/bills/{billId}/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"external_id": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"due_at": "2023-11-07T05:31:56Z",
"bill_terms": "DUE_ON_RECEIPT",
"bill_number": "<string>",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_external_id": "<string>",
"line_items": [
{
"external_id": "<string>",
"account_identifier": {
"type": "AccountId",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"description": "<string>",
"product_name": "<string>",
"unit_price": 123,
"quantity": 1,
"discount_amount": 123,
"sales_taxes": [
{
"amount": 123,
"tax_rate": 123,
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>"
}
]
}
],
"payments": [
{
"external_id": "<string>",
"method": "CASH",
"amount": 123,
"processor": "<string>"
}
],
"additional_sales_taxes": [
{
"amount": 123,
"tax_rate": 123,
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>"
}
],
"status": "RECEIVED"
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"status": "RECEIVED",
"terms": "DUE_ON_RECEIPT",
"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",
"bill_number": "<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"
},
"description": "<string>",
"product_name": "<string>",
"unit_price": 123,
"quantity": 123,
"subtotal": 123,
"discount_amount": 123,
"sales_taxes": [
{
"amount": 123,
"tax_rate": 123,
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>"
}
],
"sales_taxes_total": 123,
"total_amount": 123
}
],
"additional_sales_taxes": [
{
"amount": 123,
"tax_rate": 123,
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>"
}
],
"additional_sales_taxes_total": 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",
"method": "CASH",
"amount": 123,
"processor": "<string>",
"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",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
}
],
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
},
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
}
],
"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>",
"notes": "<string>",
"status": "ACTIVE"
},
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
}