Productive icon

Productive

Interact with the Productive API

Actions508

Contracts → Get contracts

AI-generated

Summary

Retrieve a list of contracts from Productive, optionally applying pagination and filter criteria.

Inputs

  • Return All — Choose whether to return all contract records or limit to a specific number and page.
  • Limit — Specify the maximum number of contract records to return when not returning all.
  • Page Number — Specify the page number to fetch when limiting results.
  • Page Size — Set how many contracts to include per page (between 1 and 200).
  • Filter Query String — Provide a raw filter query string to override individual filters and filter the contract results.
  • Filters — Add one or more field filters (such as by contract interval ID, ends on date, ID, next occurrence on, or starts on date) with operations like equals, contains, greater than, etc. Ignored if a raw filter query string is provided.

Output shape

a list of contract records as JSON objects

If Return All is true, all matching contracts are returned. Otherwise, results are paginated according to Limit, Page Number, and Page Size. Filtering is applied based on either the Filter Query String or the specified Filters. Errors for individual items can be returned in the output if Continue On Fail is enabled.

Examples

Example 1: Get first page with up to 50 contracts containing a specific contract interval ID

Return All disabled, Limit 50, Page Number 1, Filter on Contract Interval ID equals a given value

Example 2: Retrieve all contracts starting after a certain date

Return All enabled, Filter Query String or Filters set to 'starts_on' greater than the date value

Discussion