GraphQL API

Retrieve Upcoming Renewals

Query and sort SaaS license plans by upcoming contract-renewal date.

Last updated

Use licensePlans to retrieve plans whose next contract renewal falls inside a planning window.

Request

query UpcomingRenewals($from: Date!, $to: Date!, $first: Int!, $after: String) {
  licensePlans(
    first: $first
    after: $after
    where: { renewal: { nextOn: { gte: $from, lte: $to } } }
    order: { renewal: { nextOn: ASC } }
  ) {
    nodes {
      ... on IntegratedLicensePlan {
        id
        name
        directIntegrationInstallation {
          name
        }
        nextRenewalContract {
          ...RenewingContract
        }
        pricingStats {
          ...RenewalPricing
        }
        seats {
          ...RenewalSeats
        }
      }
      ... on ManualLicensePlan {
        id
        name
        nextRenewalContract {
          ...RenewingContract
        }
        pricingStats {
          ...RenewalPricing
        }
        seats {
          ...RenewalSeats
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

fragment RenewingContract on Contract {
  id
  name
  renewal {
    nextOn
    isAutomatic
  }
  notice {
    leadDays
    cancelBy
  }
}

fragment RenewalPricing on LicensePlanPricingStats {
  annualCost
  currency
  potentialSaving {
    amount
    percentage
  }
}

fragment RenewalSeats on LicensePlanSeats {
  entitled {
    effective {
      count
    }
  }
  assigned {
    effective {
      count
    }
  }
  reclaimable {
    count
  }
}

Example variables for a 90-day planning window:

{
  "from": "2026-08-01",
  "to": "2026-10-31",
  "first": 50,
  "after": null
}

Plan the renewal

nextRenewalContract is the active contract whose renewal comes next for the plan. When a contract requires notice, notice.cancelBy is the last day to cancel before it renews, so treat it as the decision deadline. Review pricing and seats before that date so procurement has time to validate seats, negotiate terms, or cancel. When renewal.isAutomatic is false, the contract ends unless you renew it.

To plan around notice deadlines instead of renewal dates, filter and sort on renewal.cancelBy.

API keys can't read contracts yet. With an API key, nextRenewalContract is null on every plan and the response has an AUTH_NOT_AUTHORIZED error for each one. Filtering and sorting on renewal works with any key, so the query still returns the plans that renew in the window.