Autotask icon

Autotask

Interact with Kaseya's Autotask PSA REST API to manage companies, tickets, contracts, and more.

Actions1078

Purchase Order → Get Many (Advanced)

AI-generated

Summary

Executes an advanced query against the Autotask PSA API to retrieve multiple Purchase Order records based on a custom JSON filter with Autotask API query criteria. Supports validation of maxRecords within the advanced filter to prevent HTTP 500 errors from values above 500.

Inputs

  • advancedFilter (required) — A JSON string containing a 'filter' array with Autotask API query criteria. Use 'Get Field Info' and 'Search Filter Build' to construct this filter.
  • maxRecords — Maximum number of records to return (1-500). Required if 'Get All' is false.
  • returnAll — Whether to return all results. If true, ignores 'maxRecords'.

Output shape

A list of items, each representing a Purchase Order with its standard fields and optionally user-defined fields, picklist labels, and reference labels.

The ID field is always included regardless of column selection. User-defined fields (UDFs) are nested by default unless 'Flatten User-Defined Fields' is enabled.

Examples

Example 1: Fetch the last 50 active purchase orders created in the last 30 days.

Set 'Get All' to false, 'maxRecords' to 50, and 'advancedFilter' to a query like [['CreationDate', '>=', '2023-01-01'], ['Status', 'is', 'Active']].

Example 2: Retrieve all purchase orders associated with a specific vendor.

Set 'Get All' to true and 'advancedFilter' to [['Vendor', 'is', 'VendorID123']].

Links

Discussion