{
  "service": "polar",
  "displayName": "Polar",
  "categories": [
    "Finance",
    "Developer Tools"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "Organization Access Token",
      "placeholder": "POLAR_OAT",
      "description": "Polar Organization Access Token sent as a Bearer token. Create OATs in your Polar organization settings: https://polar.sh/docs/api-reference/introduction#authentication."
    }
  ],
  "homepageUrl": "https://polar.sh",
  "actions": [
    {
      "id": "polar.get_customer",
      "service": "polar",
      "name": "get_customer",
      "description": "Get a Polar customer by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Polar resource ID.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving a Polar customer."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Polar resource payload."
          }
        },
        "additionalProperties": false,
        "description": "A Polar customer response."
      }
    },
    {
      "id": "polar.get_customer_by_external_id",
      "service": "polar",
      "name": "get_customer_by_external_id",
      "description": "Get a Polar customer by external ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "external_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Polar customer external ID."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving a Polar customer by external ID."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Polar resource payload."
          }
        },
        "additionalProperties": false,
        "description": "A Polar customer response."
      }
    },
    {
      "id": "polar.get_customer_state",
      "service": "polar",
      "name": "get_customer_state",
      "description": "Get a Polar customer state by customer ID, including subscriptions and benefits.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Polar resource ID.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving a Polar customer state."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Polar resource payload."
          }
        },
        "additionalProperties": false,
        "description": "A Polar customer state response."
      }
    },
    {
      "id": "polar.get_customer_state_by_external_id",
      "service": "polar",
      "name": "get_customer_state_by_external_id",
      "description": "Get a Polar customer state by external customer ID, including subscriptions and benefits.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "external_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Polar customer external ID."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving a Polar customer state by external ID."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Polar resource payload."
          }
        },
        "additionalProperties": false,
        "description": "A Polar customer state response."
      }
    },
    {
      "id": "polar.get_order",
      "service": "polar",
      "name": "get_order",
      "description": "Get a Polar order by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Polar resource ID.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving a Polar order."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Polar resource payload."
          }
        },
        "additionalProperties": false,
        "description": "A Polar order response."
      }
    },
    {
      "id": "polar.get_organization",
      "service": "polar",
      "name": "get_organization",
      "description": "Get a Polar organization by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Polar resource ID.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving a Polar organization."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Polar resource payload."
          }
        },
        "additionalProperties": false,
        "description": "A Polar organization response."
      }
    },
    {
      "id": "polar.get_product",
      "service": "polar",
      "name": "get_product",
      "description": "Get a Polar product by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Polar resource ID.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving a Polar product."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Polar resource payload."
          }
        },
        "additionalProperties": false,
        "description": "A Polar product response."
      }
    },
    {
      "id": "polar.get_subscription",
      "service": "polar",
      "name": "get_subscription",
      "description": "Get a Polar subscription by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Polar resource ID.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving a Polar subscription."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Polar resource payload."
          }
        },
        "additionalProperties": false,
        "description": "A Polar subscription response."
      }
    },
    {
      "id": "polar.list_customers",
      "service": "polar",
      "name": "list_customers",
      "description": "List Polar customers with optional organization, email, search, activity, and metadata filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar organization ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar organization IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by organization ID."
          },
          "email": {
            "type": "string",
            "description": "Filter by exact customer email.",
            "format": "email"
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "description": "Filter by customer name, email, or external ID."
          },
          "active": {
            "type": "boolean",
            "description": "Filter by active customers."
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number, starting from 1."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of items to return per page. Polar supports up to 100."
          },
          "sorting": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "created_at",
                "-created_at",
                "email",
                "-email",
                "name",
                "-name"
              ],
              "description": "A Polar customer sorting field."
            },
            "description": "Polar customer sorting fields.",
            "minItems": 1
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "A string metadata value."
                },
                {
                  "type": "integer",
                  "description": "An integer metadata value."
                },
                {
                  "type": "boolean",
                  "description": "A boolean metadata value."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "A string metadata value."
                  },
                  "description": "String metadata values.",
                  "minItems": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "description": "An integer metadata value."
                  },
                  "description": "Integer metadata values.",
                  "minItems": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "boolean",
                    "description": "A boolean metadata value."
                  },
                  "description": "Boolean metadata values.",
                  "minItems": 1
                }
              ],
              "description": "A Polar metadata filter value."
            },
            "description": "Metadata filters sent with Polar's deepObject query style."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Polar customers."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "customers"
            },
            "description": "Polar customers returned for the requested page."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Total number of items matching the request."
              },
              "max_page": {
                "type": "integer",
                "minimum": 0,
                "description": "Maximum page number available for this request."
              }
            },
            "additionalProperties": false,
            "description": "Polar pagination metadata."
          }
        },
        "additionalProperties": false,
        "description": "A page of Polar customers."
      }
    },
    {
      "id": "polar.list_orders",
      "service": "polar",
      "name": "list_orders",
      "description": "List Polar orders with optional organization, product, customer, checkout, subscription, and metadata filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar organization ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar organization IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by organization ID."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar product ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar product IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by product ID."
          },
          "product_billing_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "one_time",
                  "recurring"
                ],
                "description": "Polar product billing type."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "one_time",
                    "recurring"
                  ],
                  "description": "Polar product billing type."
                },
                "description": "Product billing types to include.",
                "minItems": 1
              }
            ],
            "description": "Filter by product billing type."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar discount ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar discount IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by discount ID."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar customer ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar customer IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by customer ID."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "A Polar customer external ID."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "A string filter value."
                },
                "description": "Polar customer external IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by customer external ID."
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar checkout ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar checkout IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by checkout ID."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar subscription ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar subscription IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by subscription ID."
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number, starting from 1."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of items to return per page. Polar supports up to 100."
          },
          "sorting": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "created_at",
                "-created_at",
                "status",
                "-status",
                "invoice_number",
                "-invoice_number",
                "amount",
                "-amount",
                "net_amount",
                "-net_amount",
                "customer",
                "-customer",
                "product",
                "-product",
                "discount",
                "-discount",
                "subscription",
                "-subscription"
              ],
              "description": "A Polar order sorting field."
            },
            "description": "Polar order sorting fields.",
            "minItems": 1
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "A string metadata value."
                },
                {
                  "type": "integer",
                  "description": "An integer metadata value."
                },
                {
                  "type": "boolean",
                  "description": "A boolean metadata value."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "A string metadata value."
                  },
                  "description": "String metadata values.",
                  "minItems": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "description": "An integer metadata value."
                  },
                  "description": "Integer metadata values.",
                  "minItems": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "boolean",
                    "description": "A boolean metadata value."
                  },
                  "description": "Boolean metadata values.",
                  "minItems": 1
                }
              ],
              "description": "A Polar metadata filter value."
            },
            "description": "Metadata filters sent with Polar's deepObject query style."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Polar orders."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "orders"
            },
            "description": "Polar orders returned for the requested page."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Total number of items matching the request."
              },
              "max_page": {
                "type": "integer",
                "minimum": 0,
                "description": "Maximum page number available for this request."
              }
            },
            "additionalProperties": false,
            "description": "Polar pagination metadata."
          }
        },
        "additionalProperties": false,
        "description": "A page of Polar orders."
      }
    },
    {
      "id": "polar.list_organizations",
      "service": "polar",
      "name": "list_organizations",
      "description": "List Polar organizations accessible to the Organization Access Token.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 1,
            "description": "Filter organizations by slug."
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number, starting from 1."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of items to return per page. Polar supports up to 100."
          },
          "sorting": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "created_at",
                "-created_at",
                "slug",
                "-slug",
                "name",
                "-name",
                "next_review_threshold",
                "-next_review_threshold",
                "days_in_status",
                "-days_in_status"
              ],
              "description": "A Polar organization sorting field."
            },
            "description": "Polar organization sorting fields.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Polar organizations."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "organizations"
            },
            "description": "Polar organizations returned for the requested page."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Total number of items matching the request."
              },
              "max_page": {
                "type": "integer",
                "minimum": 0,
                "description": "Maximum page number available for this request."
              }
            },
            "additionalProperties": false,
            "description": "Polar pagination metadata."
          }
        },
        "additionalProperties": false,
        "description": "A page of Polar organizations."
      }
    },
    {
      "id": "polar.list_products",
      "service": "polar",
      "name": "list_products",
      "description": "List Polar products with optional organization, name, visibility, and metadata filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar product ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar product IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by product ID."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar organization ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar organization IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by organization ID."
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "description": "Filter by product name."
          },
          "is_archived": {
            "type": "boolean",
            "description": "Filter by archived products."
          },
          "is_recurring": {
            "type": "boolean",
            "description": "Filter by recurring products."
          },
          "benefit_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar benefit ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar benefit IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter products granting a benefit."
          },
          "visibility": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "draft",
                "private",
                "public"
              ],
              "description": "Polar product visibility."
            },
            "description": "Product visibility values to include.",
            "minItems": 1
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number, starting from 1."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of items to return per page. Polar supports up to 100."
          },
          "sorting": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "created_at",
                "-created_at",
                "name",
                "-name",
                "price_amount_type",
                "-price_amount_type",
                "price_amount",
                "-price_amount"
              ],
              "description": "A Polar product sorting field."
            },
            "description": "Polar product sorting fields.",
            "minItems": 1
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "A string metadata value."
                },
                {
                  "type": "integer",
                  "description": "An integer metadata value."
                },
                {
                  "type": "boolean",
                  "description": "A boolean metadata value."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "A string metadata value."
                  },
                  "description": "String metadata values.",
                  "minItems": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "description": "An integer metadata value."
                  },
                  "description": "Integer metadata values.",
                  "minItems": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "boolean",
                    "description": "A boolean metadata value."
                  },
                  "description": "Boolean metadata values.",
                  "minItems": 1
                }
              ],
              "description": "A Polar metadata filter value."
            },
            "description": "Metadata filters sent with Polar's deepObject query style."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Polar products."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "products"
            },
            "description": "Polar products returned for the requested page."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Total number of items matching the request."
              },
              "max_page": {
                "type": "integer",
                "minimum": 0,
                "description": "Maximum page number available for this request."
              }
            },
            "additionalProperties": false,
            "description": "Polar pagination metadata."
          }
        },
        "additionalProperties": false,
        "description": "A page of Polar products."
      }
    },
    {
      "id": "polar.list_subscriptions",
      "service": "polar",
      "name": "list_subscriptions",
      "description": "List Polar subscriptions with optional organization, product, customer, status, cancellation, and metadata filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar organization ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar organization IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by organization ID."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar product ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar product IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by product ID."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar customer ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar customer IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by customer ID."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "A Polar customer external ID."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "A string filter value."
                },
                "description": "Polar customer external IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by customer external ID."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "A Polar discount ID.",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Polar UUID value.",
                  "format": "uuid"
                },
                "description": "Polar discount IDs.",
                "minItems": 1
              }
            ],
            "description": "Filter by discount ID."
          },
          "active": {
            "type": "boolean",
            "description": "Filter by active or inactive subscription. This Polar filter is deprecated upstream."
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "incomplete",
                  "incomplete_expired",
                  "trialing",
                  "active",
                  "past_due",
                  "canceled",
                  "unpaid"
                ],
                "description": "Polar subscription status."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "incomplete",
                    "incomplete_expired",
                    "trialing",
                    "active",
                    "past_due",
                    "canceled",
                    "unpaid"
                  ],
                  "description": "Polar subscription status."
                },
                "description": "Subscription statuses to include.",
                "minItems": 1
              }
            ],
            "description": "Filter by subscription status."
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "description": "Filter by subscriptions set to cancel at period end."
          },
          "customer_cancellation_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "customer_service",
                  "low_quality",
                  "missing_features",
                  "switched_service",
                  "too_complex",
                  "too_expensive",
                  "unused",
                  "other"
                ],
                "description": "Polar customer cancellation reason."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "customer_service",
                    "low_quality",
                    "missing_features",
                    "switched_service",
                    "too_complex",
                    "too_expensive",
                    "unused",
                    "other"
                  ],
                  "description": "Polar customer cancellation reason."
                },
                "description": "Customer cancellation reasons to include.",
                "minItems": 1
              }
            ],
            "description": "Filter by customer cancellation reason."
          },
          "canceled_at_after": {
            "type": "string",
            "description": "Filter by cancellation timestamp after or equal to this value.",
            "format": "date-time"
          },
          "canceled_at_before": {
            "type": "string",
            "description": "Filter by cancellation timestamp before or equal to this value.",
            "format": "date-time"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number, starting from 1."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of items to return per page. Polar supports up to 100."
          },
          "sorting": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "customer",
                "-customer",
                "status",
                "-status",
                "started_at",
                "-started_at",
                "current_period_end",
                "-current_period_end",
                "ended_at",
                "-ended_at",
                "ends_at",
                "-ends_at",
                "amount",
                "-amount",
                "product",
                "-product",
                "discount",
                "-discount"
              ],
              "description": "A Polar subscription sorting field."
            },
            "description": "Polar subscription sorting fields.",
            "minItems": 1
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "A string metadata value."
                },
                {
                  "type": "integer",
                  "description": "An integer metadata value."
                },
                {
                  "type": "boolean",
                  "description": "A boolean metadata value."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "A string metadata value."
                  },
                  "description": "String metadata values.",
                  "minItems": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "description": "An integer metadata value."
                  },
                  "description": "Integer metadata values.",
                  "minItems": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "boolean",
                    "description": "A boolean metadata value."
                  },
                  "description": "Boolean metadata values.",
                  "minItems": 1
                }
              ],
              "description": "A Polar metadata filter value."
            },
            "description": "Metadata filters sent with Polar's deepObject query style."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Polar subscriptions."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "subscriptions"
            },
            "description": "Polar subscriptions returned for the requested page."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Total number of items matching the request."
              },
              "max_page": {
                "type": "integer",
                "minimum": 0,
                "description": "Maximum page number available for this request."
              }
            },
            "additionalProperties": false,
            "description": "Polar pagination metadata."
          }
        },
        "additionalProperties": false,
        "description": "A page of Polar subscriptions."
      }
    }
  ]
}
