---
title: "Get contracts count by filter"
method: GET
path: "/api/v2/organizations/{orgSlug}/contracts/count"
tags: ["Contracts"]
---

# Get contracts count by filter

`GET /api/v2/organizations/{orgSlug}/contracts/count`

## Request

- Base URL: `https://app.officernd.com`
- URL: `https://app.officernd.com/api/v2/organizations/{orgSlug}/contracts/count`
- Auth: OAuth 2
  - Authorization code: `https://identity.officernd.com/auth/authorize`
  - Client credentials
  - Token URL: `https://identity.officernd.com/auth/token` scopes: `flex.community.contracts.read`

Retrieve a count of contracts based on provided filters 

 Required scopes: `flex.community.contracts.read`

## Path parameters

- `orgSlug` string, required

## Query parameters

- `_id` string
- `company` string
- `location` string
- `status` 'signed' | 'draft' | 'terminated' | 'not_signed' | 'canceled': The status of the contract.
- `stage` 'terminated' | 'served_notice' | 'active' | 'up_for_renewal' | 'not_renewed' | 'expired' | 'rolling': The stage of the contract.
- `createdAt` string
- `modifiedAt` string
- `$countBy` 'status' | 'company' | 'location'

## Response `200`

- CountResultDto
  - `total` number, required
  - `groups` GroupDto[]
    - `key` string, required
    - `count` number, required

---

[API](https://skmtc.dev/officernd/apis/community-api.md) - [All operations](https://skmtc.dev/officernd/apis/community-api/llms.txt) - [OpenAPI document](https://skmtc.dev/officernd/apis/community-api/revisions/dad1b7912165?raw)
