> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.partnerpage.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.partnerpage.io/_mcp/server.

# Update a filter

PATCH https://v1.api.partnerpage.io/api/directory/private/v1alpha/filters/{filterId}/
Content-Type: application/json

Update a filter

Reference: https://docs.partnerpage.io/api-reference/directory/filters/update-a-filter

## Authentication

- `Authorization` header (required) (prefixed with ` Token   `) — Your API key, sent as `Authorization: Token <your API key>`

## Request

### Path parameters

- `filterId` (string, required) — ID of the filter to update

### Body (application/json)

This endpoint expects a PatchedFilterSerializerReaderRequest.

- `id` (string, optional)
- `type` (string, optional)
- `name` (string, optional)
- `slug` (string, optional)
- `order` (integer, optional)
- `parentFilterId` (string, optional)
- `parentFilterSlug` (string, optional)
- `assignmentDescription` (string, optional, nullable)
- `multipleSelectFromDashboard` (boolean, optional)
- `multipleLimit` (integer, optional, nullable)
- `multipleSelectFromDirectory` (boolean, optional)
- `userAssignable` (boolean, optional)
- `displayInDirectory` (boolean, optional)
- `displayInInternalDirectory` (boolean, optional)
- `displayInEntryProfile` (boolean, optional)
- `displayInInternalEntryProfile` (boolean, optional)
- `displayInEntryProfileMainArea` (boolean, optional)
- `required` (boolean, optional)
- `isLocation` (boolean, optional, default: false) — Whether this is one of the Country, Region and City filters, which visitors pick from as one Location filter.
- `overrides` (FilterOverridesRequest, optional, nullable) — Visibility rule of the filter, or null when it has none.

## Response

### 200

Details of the filter

- `name` (string, required)
- `order` (integer, optional)
- `assignmentDescription` (string, optional, nullable)
- `multipleSelectFromDashboard` (boolean, optional)
- `multipleLimit` (integer, optional, nullable)
- `multipleSelectFromDirectory` (boolean, optional)
- `userAssignable` (boolean, optional)
- `displayInDirectory` (boolean, optional)
- `displayInInternalDirectory` (boolean, optional)
- `displayInEntryProfile` (boolean, optional)
- `displayInInternalEntryProfile` (boolean, optional)
- `displayInEntryProfileMainArea` (boolean, optional)
- `required` (boolean, optional)
- `overrides` (FilterOverrides, optional, nullable) — A filter's visibility rule, in the same shape as a form field's overrides: when the conditions are met the filter takes the hidden value, otherwise the opposite one.

## Errors

### 400 Bad Request Error

- `map from string to any`

### 404 Not Found Error

- `map from string to any`

## Types

### FilterOverridesRequest

A filter's visibility rule, in the same shape as a form field's overrides: when the conditions are met the filter takes the hidden value, otherwise the opposite one.

- `attributes` (list of FilterOverrideAttributeRequest, required)
- `conditions` (list of FilterOverrideConditionRequest, required)
- `conditionCombinator` (enum, optional, default: and) — * `and` - and * `or` - or
  - Allowed values: `and`, `or`

### FilterOverrides

A filter's visibility rule, in the same shape as a form field's overrides: when the conditions are met the filter takes the hidden value, otherwise the opposite one.

- `attributes` (list of FilterOverrideAttribute, required)
- `conditions` (list of FilterOverrideCondition, required)
- `conditionCombinator` (enum, optional, default: and) — * `and` - and * `or` - or
  - Allowed values: `and`, `or`

### FilterOverrideAttributeRequest

- `attribute` (string, required)
- `value` (boolean, required)

### FilterOverrideConditionRequest

- `key` (string, required) — Id of the filter the condition reads.
- `operator` (enum, required) — * `equals` - equals * `not_equals` - not_equals
  - Allowed values: `equals`, `not_equals`
- `value` (string, required) — Id of an option of that filter.

### FilterOverrideAttribute

- `attribute` (string, required)
- `value` (boolean, required)

### FilterOverrideCondition

- `key` (string, required) — Id of the filter the condition reads.
- `operator` (enum, required) — * `equals` - equals * `not_equals` - not_equals
  - Allowed values: `equals`, `not_equals`
- `value` (string, required) — Id of an option of that filter.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "name": "Filter 1",
  "order": 0,
  "assignmentDescription": "Assignment description",
  "multipleSelectFromDashboard": false,
  "multipleLimit": null,
  "multipleSelectFromDirectory": false,
  "displayInDirectory": true,
  "displayInInternalDirectory": false,
  "required": false,
  "filterOptions": [],
  "genericDirectory": "969d9b77-c063-4101-b534-63071317ddbd",
  "href": "/api/directory/private/v1alpha/filters/006059d7-4d1e-4ace-b816-32fa9a9659ac/",
  "id": "006059d7-4d1e-4ace-b816-32fa9a9659ac",
  "slug": "filter-1",
  "type": "user",
  "userEnabled": true
}
```

**SDK Code**

```python application/json example
import requests

url = "https://v1.api.partnerpage.io/api/directory/private/v1alpha/filters/filterId/"

payload = {}
headers = {
    "Authorization": "Token  <apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript application/json example
const url = 'https://v1.api.partnerpage.io/api/directory/private/v1alpha/filters/filterId/';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Token  <apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```