Autotask icon

Autotask

Consume Autotask REST API

Actions389

Overview

The 'Contract Block - Get Many (Advanced)' operation allows users to retrieve multiple contract block records from the Autotask system using advanced filtering criteria. This operation is beneficial when users need to query contract blocks with complex conditions beyond simple retrieval, such as filtering by multiple fields or nested criteria. For example, a user can fetch all contract blocks that meet specific status and date range conditions or other custom filters defined in the Autotask API query language.

Properties

Name Meaning
Get All Determines whether to return all matching contract block records or limit the number of results.
Max Records Specifies the maximum number of contract block records to return when 'Get All' is false. The value must be between 1 and 500.
Advanced Filter A required JSON string containing a 'filter' array that defines the Autotask API query criteria for filtering contract blocks. Users should construct this JSON using the Autotask API documentation and tools like 'Get Field Info' and 'Search Filter Build'.
Add Picklist Labels Indicates whether to automatically add human-readable '_label' fields for picklist fields in the output. Empty values will not have labels added.
Add Reference Labels Indicates whether to automatically add human-readable '_label' fields for reference fields in the output. Empty values will not have labels added.
Select Columns Names or IDs. Allows selection of specific fields to include in the response. If no fields are selected, all fields are returned. The ID field is always included regardless of selection.
Flatten User-Defined Fields Determines whether user-defined fields (UDFs) are brought up to the top level of each returned object instead of being nested inside a 'userDefinedFields' array.

Output

JSON

  • id - Unique identifier of the contract block record.
  • fieldName - Various contract block fields as specified by the selected columns or all fields if none selected.
  • fieldName_label - Human-readable labels for picklist or reference fields if 'Add Picklist Labels' or 'Add Reference Labels' is enabled.
  • userDefinedFields - Array of user-defined fields unless 'Flatten User-Defined Fields' is enabled, in which case UDFs appear as top-level properties.

Dependencies

  • Requires an Autotask API key credential for authentication.
  • Relies on the Autotask REST API to perform advanced filtered queries on contract blocks.

Troubleshooting

  • Invalid JSON in 'Advanced Filter' property can cause query failures. Ensure the JSON string is correctly formatted and follows Autotask API filter syntax.
  • Requesting too many records without 'Get All' enabled may result in incomplete data. Use 'Get All' to retrieve all matching records or adjust 'Max Records' accordingly.
  • If picklist or reference labels are not appearing, verify that 'Add Picklist Labels' and 'Add Reference Labels' are enabled and that the fields contain non-empty values.
  • Selecting invalid or unsupported columns in 'Select Columns' may cause errors or missing data. Use 'Get Field Info' to confirm valid field names.
  • API rate limits or authentication errors may occur if the Autotask API key is invalid or overused. Check credentials and API usage limits.

Links

Discussion