Purchase Orders

Overview

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. See PurchaseOrders endpoint for more details.

Data Model

Field

Type

Description

id

string

Identifier for the purchase order, unique to the business in the accounting service provider.

vendorRef

Reference Types

Reference to the vendor the purchase order has been issued to.

accountRef

Reference Types

Reference to the account to which the purchase order is linked to.

postedDate
sortable, filterable

string
See Date

Date of the purchase order as recorded in the accounting service provider.

dueDate
sortable, filterable

string
See Date

Date the purchase order is due to be paid by.

deliveryDate
sortable, filterable

string
See Date

Date the purchase order expired as recorded in the accounting service provider.

expectedArrivalDate
sortable, filterable

string
See Date

Date the purchase order was accepted by the vendor as recorded in the accounting service provider.

currencyRef

Reference Types

Currency of the purchase order.

Pushing data will fail if the business has not enabled or does not support multiple currency. Leaving this blank would default to the business' default currency.

currencyRate

decimal

Rate between the currency of the purchase order and the base currency of the business. Not applicable when multi-currency is not supported.

lines

array

An array of purchase order lines.

subTotal
sortable, filterable

decimal

Value of the purchase order, including discounts and excluding tax.

taxAmount
sortable, filterable

decimal

Any tax applied to the purchase order amount.

discountAmount

decimal

Numerical value of any discounts applied.

discountPercentage

decimal

Percentage rate (from 0 to 100) of any discounts applied to the unit amount.

totalAmount
sortable, filterable

decimal

Amount of the purchase order, inclusive of tax.

status
sortable, filterable

string

Current status of a purchase order.

memo

string

User-friendly reference for the purchase order.

shippingAddress

Reference Types

Delivery for any goods that have been ordered.

contact

Reference Types

Details of the named contact at the delivery address.

sourceModifiedData

string
See Date

Date the record was last changed in the accounting service provider.

Lines

Field

Type

Description

description

string

Friendly name of the goods or services received.

unitAmount

decimal

Price of each unit of goods or services.

quantity

decimal

Number of units of goods or services.

discountAmount

decimal

Numerical value of any discounts applied.

discountPercentage

decimal

Percentage rate (from 0 to 100) of any discounts applied to the unit amount.

subTotal

decimal

Amount of the line, inclusive of discounts but exclusive of tax.

taxAmount

decimal

Amount of tax for the line.

totalAmount

decimal

Total amount of the line, inclusive of discounts and tax.

accountRef

Reference Types

Reference to the account to which the line item is linked to.

taxRateRef

Reference Types

Reference to the tax rate to which 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.

inventoryRef

Reference Types

Reference to the product or inventory item to which 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.

trackingCategoryRef

Reference Types

Reference to the tracking category to which the line item is linked to.

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.

Example Data

{
  "data": [
    {
      "id": "1",
      "vendorRef": {
        "id": "1",
        "name": "Home Depot"
      },
      "postedDate": "2021-03-09T10:18:29.985Z",
      "deliveryDate": "2021-03-09T10:18:29.985Z",
      "expectedArrivalDate": "2021-03-09T10:18:29.985Z",
      "dueDate": "2021-03-09T10:18:29.985Z",
      "currencyRef": {
        "id": "CAD",
        "name": "Canadian Dollar"
      },
      "currencyRate": 1.13,
      "lines": [
        {
          "description": "Services rendered.",
          "unitAmount": 100.5,
          "quantity": 3,
          "discountAmount": 0,
          "subTotal": 301.5,
          "taxAmount": 20.5,
          "totalAmount": 322,
          "discountPercentage": 10.5,
          "taxRateRef": {
            "id": "1",
            "name": "HST",
            "effectiveTaxRate": 13
          },
          "inventoryRef": {
            "id": "1",
            "name": "Digital Services"
          },
          "accountRef": {
            "id": "145",
            "name": "Depreciation Expense"
          }
        }
      ],
      "totalDiscount": 322,
      "discountPercentage": 322,
      "subTotal": 301.5,
      "taxAmount": 20.5,
      "totalAmount": 322,
      "status": "open",
      "memo": "Example purchase order memo.",
      "shippingAddress": {
        "line1": "1234 Park Street",
        "line2": "Suite 1000",
        "city": "Toronto",
        "region": "ON",
        "country": "CAN",
        "postalCode": "A0B1C2"
      },
      "contact": {
        "name": "John Smith",
        "email": "[email protected]",
        "phone": "8884449999"
      },
      "sourceModifiedDate": "2021-03-09T10:18:29.985Z"
    }
  ]
}

Did this page help you?