Bills

The Bill object

A Bill is an Accounts Payable transaction representing a request-for-payment from Vendors for goods/services rendered, received, or both. From the Bills endpoint, you can retrieve a list of all bills for a specified business.

FieldTypeDescription
id
sortable, filterable
string Identifier for the bill, unique to the business in the accounting service provider.
vendorRef Reference TypesReference to the vendor the bill was received from.
vendorInvoiceNumberstringThe buyer facing document number of the bill.
purchaseOrderRefsReference TypesReference to the purchase orders linked to the bill.
postedDate
sortable, filterable
string
See Date
The date on which the bill was posted to the accounting service, and had an impact on the general ledger. This may be different from the creation date.
dueDate
sortable, filterable
string
See Date
Date the vendor is due to be paid.
currency stringISO-4217 currency code of the bill.
currencyRate decimalRate to convert the total amount of the transaction into the base currency for the business at the time of the transaction.
lines arrayAn array of bills line items.
status
sortable, filterable
stringCurrent status of a bill.
subTotal
sortable, filterable
decimalAmount of the bill, inclusive of discounts but exclusive of tax.
taxAmount
sortable, filterable
decimalAmount of tax on the bill.
totalAmount
sortable, filterable
decimalTotal amount of the bill, inclusive of tax.
amountDue
sortable, filterable
decimalAmount outstanding of the bill
memo stringAny additional information or business notes about the bill.
payments arrayAn array of bill payments.
sourceModifiedDate
sortable, filterable
string
See Date
The date on which this record was last modified in the accounting service.

Lines

FieldTypeDescription
id
sortable, filterable
stringThe Id of the line item.
description string Description of the line item.
unitAmount
sortable, filterable
decimal Line item unit amount.
quantity
sortable, filterable
integerLine item quantity.
billableStatus
sortable, filterable
integerThe billable status of the expense.
discountAmount
sortable, filterable
decimalLine item discount amount.
discountPercentage
sortable, filterable
decimalLine item discount percentage.
taxAmount
sortable, filterable
decimalLine item tax amount.
amount
sortable, filterable
decimalLine item total amount, inclusive of discounts & tax.
accountRef Reference TypesReference to the account the line item is linked to.
taxRateRef Reference TypesReference to the tax rate the line item is linked to.

When pushing data to Xero, use a valid tax rate reference by querying Tax Rates and using the code parameter as a value.
inventoryRefReference TypesReference to the product or inventory the line item is linked to.
trackingCategoryRefsReference TypesReference to the tracking categories associated with this line item, e.g. classes or departments.

Pennding to acc trackingCateogryRefs
customerRefReference TypesReference to the customer to which the line item can be expensed to if the billable status is billable or has been billed.

Payments

FieldTypeDescription
amount
sortable, filterable
decimal Payment amount in the currency of the bill.
paymentId
sortable, filterable
string Identifier of the bill payments data type.
date
sortable, filterable
string
See Date.
Date of the payment.

Bill Status

  • open - Bill is no longer a draft. It has been processed and/or sent to the vendor. In this state, it will impact the ledger. It also has no payments made against it (amountDue == totalAmount).
  • partiallyPaid - The balance paid against the bill is positive, but less than the total bill amount (0 < amountDue < totalAmount).
  • paid - Bill is paid in full. This includes if the bill has been credited or overpaid. (amountDue == 0).
  • void - A Bill can become void by being deleted, refunded, written off, or cancelled. A voided bill may still be partially paid and so all outstanding amounts on voided bills are removed from the accounts payable account.
  • draft - Bill is yet to be authorized and sent by the vendor, and will not be used in any reports. It may contain incomplete line items.
  • unknown - Railz was not able to recognize the status of the bill. This can be due to missing values in the accounting service provider or unavailable in the data we received.

How to - User Guide

Step-by-step guide on utilizing this endpoint.