5cf7f780d3c8

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-10235140907.9 KB
Accounting

Retrieves purchase orders

get/PurchaseOrders

Query parameters

Status'DRAFT' | 'SUBMITTED' | 'AUTHORISED' | 'BILLED' | 'DELETED'

Filter by purchase order status

DateFromstring
DateTostring
orderstring

Order by an any element

pageinteger

To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned.

pageSizeinteger

Number of records to retrieve per page

Headers

If-Modified-Sincestring date-time

Only records created or modified since this timestamp will be returned

Response

Success - return response of type PurchaseOrder array of all PurchaseOrder

Example response

{
  "PurchaseOrders": [
    {
      "Contact": {
        "UpdatedDateUTC": "/Date(1573755038314)/",
        "BrandingTheme": {
          "CreatedDateUTC": "/Date(1573755038314)/"
        },
        "BatchPayments": {
          "BankAccountNumber": "123-456-1111111",
          "BankAccountName": "ACME Bank",
          "Details": "Hello World",
          "Code": "ABC",
          "Reference": "Foobar"
        },
        "Attachments": [
          {
            "AttachmentID": "00000000-0000-0000-0000-000000000000",
            "FileName": "xero-dev.jpg",
            "Url": "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg",
            "MimeType": "image/jpg"
          }
        ]
      },
      "LineItems": [
        {
          "LineItemID": "00000000-0000-0000-0000-000000000000",
          "AccountID": "00000000-0000-0000-0000-000000000000",
          "Tracking": [
            {
              "TrackingCategoryID": "00000000-0000-0000-0000-000000000000",
              "TrackingOptionID": "00000000-0000-0000-0000-000000000000",
              "Name": "Region",
              "Option": "North"
            }
          ],
          "RepeatingInvoiceID": "00000000-0000-0000-0000-000000000000"
        }
      ],
      "UpdatedDateUTC": "/Date(1573755038314)/",
      "Attachments": [
        {
          "AttachmentID": "00000000-0000-0000-0000-000000000000",
          "FileName": "xero-dev.jpg",
          "Url": "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg",
          "MimeType": "image/jpg"
        }
      ]
    }
  ]
}