Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Filters

List Filters

get

Retrieves a paginated list of filters.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Query parameters
filter[field]stringOptional

Filter results by field.

filter[model_type]stringOptional

Filter results by model_type.

filter[model_id]stringOptional

Filter results by model_id.

filter[is_default]booleanOptional

Filter results by is_default.

filter[keep_matching]booleanOptional

Filter results by keep_matching.

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

filter[active]stringOptional

Filter results by active.

Responses
200

Successful response

application/json
get/api/v1/filters
GET /api/v1/filters HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": 1,
      "type": "example_type",
      "comparison": "example_comparison",
      "value": "example_value",
      "value_type": "example_value_type",
      "keep_matching": "example_keep_matching",
      "operator_logic": "example_operator_logic",
      "match_order": "example_match_order",
      "is_default": "example_is_default",
      "location": "example_location",
      "model_type": "example_model_type",
      "model_id": 1,
      "date_format": "example_date_format",
      "created_at": "2025-01-15T10:30:00.000000Z",
      "updated_at": "2025-01-15T10:30:00.000000Z",
      "field": "example_field"
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://api.example.com/api/v1/filters",
    "per_page": 25,
    "to": 1,
    "total": 1
  },
  "links": {
    "first": "https://api.example.com/api/v1/filters?page=1",
    "last": "https://api.example.com/api/v1/filters?page=1",
    "prev": null,
    "next": null
  }
}

Create Filter

post

Creates a new filter.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
typestringRequired
comparisonstringRequired
valuestring · max: 1024 · nullableOptional
value_typestring · nullableOptional
keep_matchingstringRequired
operator_logicstring · nullableOptional
match_orderstringOptional
is_defaultstringOptional
locationstring · nullableOptional
model_typestringRequired
model_idintegerRequired
date_formatstring · nullableOptional
fieldstring · min: 1Required
Responses
200

Successful response

application/json
post/api/v1/filters
POST /api/v1/filters HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 404

{
  "type": "example_type",
  "comparison": "example_comparison",
  "value": "example_value",
  "value_type": "example_value_type",
  "keep_matching": "example_keep_matching",
  "operator_logic": "example_operator_logic",
  "match_order": "example_match_order",
  "is_default": "example_is_default",
  "location": "example_location",
  "model_type": "example_model_type",
  "model_id": 1,
  "date_format": "example_date_format",
  "field": "example_field"
}
{
  "data": {
    "id": 1,
    "type": "example_type",
    "comparison": "example_comparison",
    "value": "example_value",
    "value_type": "example_value_type",
    "keep_matching": "example_keep_matching",
    "operator_logic": "example_operator_logic",
    "match_order": "example_match_order",
    "is_default": "example_is_default",
    "location": "example_location",
    "model_type": "example_model_type",
    "model_id": 1,
    "date_format": "example_date_format",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "field": "example_field"
  }
}

Get Filter

get

Retrieves the details of a specific filter.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
filterstringRequired

The filter identifier.

Responses
200

Successful response

application/json
get/api/v1/filters/{filter}
GET /api/v1/filters/{filter} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "id": 1,
    "type": "example_type",
    "comparison": "example_comparison",
    "value": "example_value",
    "value_type": "example_value_type",
    "keep_matching": "example_keep_matching",
    "operator_logic": "example_operator_logic",
    "match_order": "example_match_order",
    "is_default": "example_is_default",
    "location": "example_location",
    "model_type": "example_model_type",
    "model_id": 1,
    "date_format": "example_date_format",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "field": "example_field"
  }
}

Update Filter

put

Updates an existing filter.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
filterstringRequired

The filter identifier.

Body
typestringOptional
comparisonstringOptional
valuestring · max: 1024Optional
value_typestring · nullableOptional
keep_matchingstringOptional
operator_logicstring · nullableOptional
match_orderstringOptional
is_defaultstringOptional
locationstring · nullableOptional
date_formatstring · nullableOptional
fieldstring · min: 1Optional
Responses
200

Successful response

application/json
put/api/v1/filters/{filter}
PUT /api/v1/filters/{filter} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 357

{
  "type": "example_type",
  "comparison": "example_comparison",
  "value": "example_value",
  "value_type": "example_value_type",
  "keep_matching": "example_keep_matching",
  "operator_logic": "example_operator_logic",
  "match_order": "example_match_order",
  "is_default": "example_is_default",
  "location": "example_location",
  "date_format": "example_date_format",
  "field": "example_field"
}
{
  "data": {
    "id": 1,
    "type": "example_type",
    "comparison": "example_comparison",
    "value": "example_value",
    "value_type": "example_value_type",
    "keep_matching": "example_keep_matching",
    "operator_logic": "example_operator_logic",
    "match_order": "example_match_order",
    "is_default": "example_is_default",
    "location": "example_location",
    "model_type": "example_model_type",
    "model_id": 1,
    "date_format": "example_date_format",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "field": "example_field"
  }
}

Delete Filter

delete

Permanently deletes a specific filter.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
filterstringRequired

The filter identifier.

Responses
200

Successful response

application/json
messagestringOptional
delete/api/v1/filters/{filter}
DELETE /api/v1/filters/{filter} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "message": "Action completed successfully."
}

Last updated

Was this helpful?