Autotask icon

Autotask

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

Actions1078

Purchase Order Item → Get Many (Advanced)

AI-generated

Summary

Retrieves multiple Purchase Order Items from Autotask using a JSON advanced filter query. The filter must contain a "filter" array with Autotask API query criteria. The operation supports returning all matching results or a limited number specified by 'maxRecords' (1-500). Note that if 'MaxRecords' is specified inside the advanced filter JSON, it must be an integer between 1 and 500; otherwise, the API may return an HTTP 500 error. Additional options control inclusion of human-readable labels for picklist and reference fields, field selection, and whether user-defined fields are flattened to top-level properties.

Inputs

  • advancedFilter (required) — A JSON string containing a 'filter' array with Autotask API query criteria.
  • returnAll — Whether to return all results or only up to a given limit.
  • maxRecords — Max number of records to return (1-500).
  • addPicklistLabels — Whether to automatically add '_label' fields for picklist fields with human-readable values.
  • addReferenceLabels — Whether to automatically add '_label' fields for reference fields with human-readable values.
  • selectColumns — Choose which fields to include in the response. If no fields are selected, all fields will be returned.
  • flattenUdfs — Whether to bring user-defined fields up to the top level of each object.

Output shape

a list of items, each representing a Purchase Order Item with all selected fields.

The ID field is always included regardless of selection. UDFs are nested in 'userDefinedFields' by default unless 'Flatten User-Defined Fields' is enabled.

Examples

Example 1: Fetch all active Purchase Order Items

Set 'returnAll' to true, 'advancedFilter' to [ { 'fieldName': 'status', 'operator': 'equals', 'value': 'Active' } ], and ensure 'addPicklistLabels' is true for readable status values.

Example 2: Retrieve a specific list of Purchase Order Items by ID

Set 'advancedFilter' to [ { 'fieldName': 'id', 'operator': 'in', 'value': [ 1, 2, 3 ] } ], 'selectColumns' to [ 'id', 'purchaseOrderID', 'itemNumber' ], and 'maxRecords' to 3.

Links

Discussion