---
updatedAt: 2026-07-29T17:57:09.000Z
---

Fetch the complete documentation index at: https://developers.pismo.io/pismo-docs/llms.txt. Use this file to discover all available pages before exploring further.

# Create filter template

Create a reusable filter template that can be referenced in balance configurations. Filter templates allow you to define common filter criteria once and reuse them across multiple configurations.

For more information, refer to the [Balance configurations filter templates](doc:filter-templates) guide.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Core platform - Balance configurations",
    "version": "1.0.0",
    "description": "API responsible for indicating how the Authorizer will impact the Ledger according to predefined rules set up by the client",
    "contact": {
      "name": "API Support",
      "url": "https://developers.pismo.io/support/"
    },
    "license": {
      "name": "Copyright Pismo"
    }
  },
  "servers": [
    {
      "url": "https://api-sandbox.pismolabs.io/balances-config",
      "description": "Sandbox API server for testing."
    }
  ],
  "tags": [
    {
      "name": "Filter templates",
      "description": "Endpoints to manage filter templates."
    }
  ],
  "components": {
    "parameters": {
      "OrgIdHeader": {
        "in": "header",
        "name": "x-tenant",
        "description": "Organization ID",
        "required": true,
        "schema": {
          "type": "string",
          "example": "20167751b-efd4-494c-9e4f-4b939560ff05"
        }
      },
      "XCidHeader": {
        "in": "header",
        "name": "x-cid",
        "description": "The Correlation Identifier UUID field links related API requests and events. The `x-cid` can help the Pismo engineering team track everything related to a call. If not passed, this field is automatically generated.",
        "schema": {
          "type": "string",
          "example": "12345"
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Account access token. Tokens can expire quickly, which can result in an \"Unauthorized\" error.",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "AccountType": {
        "type": "string",
        "description": "Account type that impacts limit or different account.\nAccount types:\n\"00\" = Non-specified account\n\"10\" = Savings account\n\"20\" = Checking account\n\"30\" = Credit card account\n",
        "enum": [
          "00",
          "10",
          "20",
          "30"
        ],
        "example": "00"
      },
      "CurrencyCode": {
        "type": "string",
        "description": "Alphanumeric ISO 4217 standard currency code that impacts different limits or accounts.",
        "example": "USD"
      },
      "Error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Message that describes the error.",
            "example": "An Internal Server Error found, please contact the administrator"
          },
          "code": {
            "type": "string",
            "description": "Code that identifies the error type.",
            "example": "EBLC9999"
          }
        }
      },
      "ErrorDetails": {
        "type": "object",
        "properties": {
          "location": {
            "description": "Location describes the attribute when the error is present.",
            "type": "string",
            "example": "payload.attribute"
          },
          "message": {
            "type": "string",
            "description": "Message that describes the error detail.",
            "example": "attribute is null"
          }
        }
      },
      "ErrorWithDetails": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Message that describes the error.",
            "example": "An Internal Server Error found, please contact the administrator"
          },
          "code": {
            "type": "string",
            "description": "Code that identifies the error type.",
            "example": "EBLC9999"
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorDetails"
            }
          }
        }
      },
      "CreateFilterTemplate": {
        "type": "object",
        "description": "Filter template creation request",
        "required": [
          "id",
          "filters"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Optional custom ID for the filter template. If not provided, an ID will be auto-generated.",
            "maxLength": 36,
            "example": "filter-template-123"
          },
          "description": {
            "type": "string",
            "description": "Filter template description",
            "maxLength": 50,
            "example": "Standard retail transactions filter"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterTemplateFilters"
          }
        }
      },
      "FilterTemplateFilters": {
        "type": "object",
        "description": "Filter criteria for the template",
        "required": [
          "processing_codes"
        ],
        "properties": {
          "processing_codes": {
            "type": "array",
            "description": "Array of processing codes",
            "minItems": 1,
            "items": {
              "type": "string"
            },
            "example": [
              "0000",
              "0001",
              "0100"
            ]
          },
          "min_installments": {
            "type": "integer",
            "description": "Minimum number of installments",
            "minimum": 0,
            "example": 1
          },
          "max_installments": {
            "type": "integer",
            "description": "Maximum number of installments",
            "minimum": 0,
            "maximum": 99,
            "example": 12
          },
          "mcc": {
            "type": "array",
            "description": "Merchant Category Codes",
            "items": {
              "type": "string"
            },
            "example": [
              "5411",
              "5912"
            ]
          },
          "account_type": {
            "$ref": "#/components/schemas/AccountType"
          },
          "currency_code": {
            "$ref": "#/components/schemas/CurrencyCode"
          }
        }
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1/balances-configs/filter-templates": {
      "post": {
        "operationId": "post-v1-filter-templates",
        "summary": "Create filter template",
        "description": "Create a reusable filter template that can be referenced in balance configurations. Filter templates allow you to define common filter criteria once and reuse them across multiple configurations.\n\nFor more information, refer to the [Balance configurations filter templates](https://developers.pismo.io/pismo-docs/docs/filter-templates) guide.\n",
        "tags": [
          "Filter templates"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Filter template creation request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFilterTemplate"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrgIdHeader"
          },
          {
            "$ref": "#/components/parameters/XCidHeader"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "filter_template_id": {
                      "type": "string",
                      "description": "Filter template ID",
                      "example": "filter-template-123"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorWithDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict - Filter template ID already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  }
}
```