---
title: "Get Service Contracts By Filter"
method: POST
path: "/service_contract/filter"
---

# Get Service Contracts By Filter

`POST /service_contract/filter`

## Request

- Base URL: `https://dc-region.zuperpro.com/api`
- URL: `https://dc-region.zuperpro.com/api/service_contract/filter`
- Auth: API key in header `x-api-key`

Rule-engine-based list endpoint — an alternative to the simple `filter.*` query params on the plain list endpoint, for building complex AND/OR filter conditions. Supports cursor pagination (`cursor_pagination`/`cursor`/`prev_cursor`/`last_page`) and `fields_to_select`. `filter.module_uid` restricts to specific contract_uids.

## Request body

- object
  - `page` integer
  - `limit` integer
  - `sort` 'ASC' | 'DESC'
  - `filter_rules` object[]: Rule-engine filter conditions, ANDed/ORed per filter_rule_operator. Get the exact field key enum from this module's Meta Filter endpoint.
    - `key` 'contract_number' | 'ref_no' | 'contract_name' | 'start_date' | 'end_date' | 'is_expired' | 'customer_uid' | 'organization_uid' | 'package_uid' | 'team_uid' | 'keyword'
    - `operator` 'EQUAL_TO' | 'NOT_EQUAL_TO' | 'CONTAINS' | 'NOT_CONTAINS' | 'GREATER_THAN' | 'LESS_THAN' | 'BETWEEN' | 'IS_EMPTY' | 'IS_NOT_EMPTY'
    - `value` unknown
    - `type` 'default_field' | 'nested_field' | 'custom_field'
  - `filter_rule_operator` 'AND' | 'OR'
  - `sort_by` 'contract_number' | 'end_date' | 'start_date' | 'created_at' | 'updated_at'
  - `cursor` string
  - `prev_cursor` string
  - `cursor_pagination` boolean
  - `last_page` boolean
  - `filter.module_uid` string
  - `fields_to_select` string
  - `preferred_timezone` string

## Response `200`

200

- object
  - `type` 'success'
  - `data` object[]: Service contract documents — same shape as GET /service_contract.
  - `total_records` integer
  - `current_page` integer: 0 in cursor-paginated mode.
  - `total_pages` integer: 0 in cursor-paginated mode.
  - `paging` object, nullable: Populated only in cursor-paginated mode.
    - `next` string, nullable
    - `previous` string, nullable
    - `has_more` boolean

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `3c21bc232e16`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zuper/apis/zuper-pro-api/changes/service_contract/filter/post.md)

---

[API](https://skmtc.dev/zuper/apis/zuper-pro-api.md) - [All operations](https://skmtc.dev/zuper/apis/zuper-pro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zuper/apis/zuper-pro-api/revisions/3c21bc232e16?raw)
