> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/api-reference/models/model-filter-values.md).

# Model Filter Values

## List Model Filter Values

> Retrieves a paginated list of filter values associated with a model.\
> Note: Model variables, filter values, and notes can all be attached to different entity types via \`model\_type\` and \`model\_id\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Model Filter Values"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ModelFilterValuesListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelFilterValues"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"ModelFilterValues":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"filter_id":{"type":"integer"},"value":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"filter":{"$ref":"#/components/schemas/Filters"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":"integer","nullable":true},"total":{"type":"integer"}}},"PaginationLinks":{"type":"object","properties":{"first":{"type":"string","format":"uri"},"last":{"type":"string","format":"uri"},"prev":{"type":"string","format":"uri","nullable":true},"next":{"type":"string","format":"uri","nullable":true}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/model-filter-values":{"get":{"summary":"List Model Filter Values","description":"Retrieves a paginated list of filter values associated with a model.\nNote: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.","parameters":[{"name":"filter[filter_id]","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"}},"description":"Filter results by filter_id.","style":"form","explode":false},{"name":"filter[model_type]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by model_type."},{"name":"filter[model_id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by model_id."},{"name":"filter[filter.model_type]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by filter.model_type."},{"name":"filter[filter.model_id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by filter.model_id."},{"name":"filter[does_not_belong_to_deleted_step]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by does_not_belong_to_deleted_step."},{"name":"filter[model]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by model."},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["filter"]}},"description":"Comma-separated list of relationships to include. Available: filter","style":"form","explode":false},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["filter_id","-filter_id"]}},"description":"Sort field. Prefix with - for descending. Available: filter_id","style":"form","explode":false},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Number of results per page."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFilterValuesListResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Model Filter Values"],"operationId":"modelFilterValuesIndex"}}}}
```

## Create Model Filter Value

> Creates a new filter value for a model.\
> Note: Model variables, filter values, and notes can all be attached to different entity types via \`model\_type\` and \`model\_id\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Model Filter Values"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ModelFilterValuesResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModelFilterValues"}}},"ModelFilterValues":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"filter_id":{"type":"integer"},"value":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"filter":{"$ref":"#/components/schemas/Filters"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}},"ModelFilterValuesStoreRequest":{"type":"object","properties":{"model_type":{"type":"string"},"model_id":{"type":"integer"},"filter_id":{"type":"integer"},"value":{"type":"string","maxLength":1024}},"required":["filter_id","model_id","model_type","value"]}}},"paths":{"/api/v1/model-filter-values":{"post":{"summary":"Create Model Filter Value","description":"Creates a new filter value for a model.\nNote: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFilterValuesResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFilterValuesStoreRequest"}}}},"tags":["Model Filter Values"],"parameters":[],"operationId":"modelFilterValuesStore"}}}}
```

## Update Model Filter Value

> Updates an existing model filter value.\
> Note: Model variables, filter values, and notes can all be attached to different entity types via \`model\_type\` and \`model\_id\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Model Filter Values"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ModelFilterValuesResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModelFilterValues"}}},"ModelFilterValues":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"filter_id":{"type":"integer"},"value":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"filter":{"$ref":"#/components/schemas/Filters"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}},"ModelFilterValuesUpdateRequest":{"type":"object","properties":{"filter_id":{"type":"integer"},"value":{"type":"string","maxLength":1024}}}}},"paths":{"/api/v1/model-filter-values/{model_filter_value}":{"put":{"summary":"Update Model Filter Value","description":"Updates an existing model filter value.\nNote: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.","parameters":[{"name":"model_filter_value","in":"path","required":true,"schema":{"type":"string"},"description":"The model filter value identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFilterValuesResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFilterValuesUpdateRequest"}}}},"tags":["Model Filter Values"],"operationId":"modelFilterValuesUpdate"}}}}
```

## Delete Model Filter Value

> Permanently deletes a specific model filter value.\
> Note: Model variables, filter values, and notes can all be attached to different entity types via \`model\_type\` and \`model\_id\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Model Filter Values"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/model-filter-values/{model_filter_value}":{"delete":{"summary":"Delete Model Filter Value","description":"Permanently deletes a specific model filter value.\nNote: Model variables, filter values, and notes can all be attached to different entity types via `model_type` and `model_id`.","parameters":[{"name":"model_filter_value","in":"path","required":true,"schema":{"type":"string"},"description":"The model filter value identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Model Filter Values"],"operationId":"modelFilterValuesDestroy"}}}}
```
