Purchase Orders

The Purchase Order object

A purchase order is a commercial document and the first official offer issued by a buyer to a seller indicating types, quantities, and agreed prices for products or services. From the Purchase Ordes endpoint, you can retrieve a list of all purchase orders for a specified business.

FieldTypeDescription
id
sortable, filterable
string Identifier for the purchase order, unique for the business in the accounting service.
vendorRefReference TypesReference to the vendor the purchase order was received from.
postedDate
sortable, filterable
string
See Date
Date on which the purchase order was posted to the accounting service, and had an impact on the general ledger. This may be different from the creation date.
deliveryDate
sortable, filterable
string
See Date
Actual delivery date for any goods that have been ordered.
expectedArrivalDate
sortable, filterable
string
See Date
Expected delivery date for any goods that have been ordered.
dueDate
sortable, filterable
string
See Date
Date the vendor is due to be paid.
currency stringISO-4217 currency code of the purchase order.
currencyRate decimalRate to convert the total amount of the transaction into the base currency for the business at the time of the transaction.
apAccountRefReference TypesReference to the Account Payable to which the bill is credited. Query the Chart of Accounts endpoint to determine the appropriate Account object for this reference, where group is 'Accounts Payables'.
lines arrayAn array of purchase order line items.
totalDiscount
sortable, filterable
decimalTotal amount of discounts applied to the purchase order.
discountPercentage
sortable, filterable
decimalDiscount percentage applied to the purchase order.
subTotal
sortable, filterable
decimalAmount of the purchase order, inclusive of discounts but exclusive of tax.
taxAmount
sortable, filterable
decimalAmount of tax on the purchase order.
totalAmount
sortable, filterable
decimalTotal amount of the purchase order, inclusive of tax.
status
sortable, filterable
stringCurrent status of a purchase order.
memo stringAny additional information or business notes about the purchase order.
shippingAddressReference TypesDelivery details for any goods that have been ordered.
contactReference TypesContact details at the delivery address.
sourceModifiedDate
sortable, filterable
string
See Date
The date on which this record was last modified in the accounting service.

Lines

FieldTypeDescription
description string Description of the line item.
unitAmount
sortable, filterable
decimal Line item unit amount.
quantity
sortable, filterable
integerLine item quantity.
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, a valid tax rate reference must be used by querying Tax Rates and using the id parameter as a value. For Xero, use code parameter as a value.
inventoryRefReference TypesReference to the product or inventory the line item is linked to.

When pushing data, a valid inventory item reference must be used by querying Inventory and using the id parameter as a value. For Xero, use code parameter as a value.
trackingCategoryRefsReference TypesReference to the tracking categories associated with this line item, e.g. classes or departments.

Purchase Order Status

  • open - Purchase Order is no longer a draft. It has been processed and/or sent to the customer. In this state, it will impact the ledger.
  • closed - Purchase Order has been closed.
  • void - A Purchase Order can become void by being deleted, refunded, written off, or cancelled.
  • draft - Purchase Order is yet to be authorized and sent to the customer, 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 purchase order. This can be due to missing values in the accounting service provider or unavailable in the data we received.