---
updatedAt: 2025-06-16T23:24:23.000Z
agentTools:
  projectIndex: https://developers.directscale.com/llms.txt
---

# /api/extension/hooks/Commissions.GetMatchRuleForVisualTree

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Extension Hooks",
    "version": "extensionHooks"
  },
  "servers": [
    {
      "url": "https://{clientId}.corpadmin.directscalestage.com",
      "variables": {
        "clientId": {
          "default": "clientId"
        }
      }
    }
  ],
  "paths": {
    "/api/extension/hooks/Commissions.GetMatchRuleForVisualTree": {
      "post": {
        "tags": [
          "CommissionHooksCallback"
        ],
        "operationId": "CommissionHooksCallback_GetMatchRuleForVisualTree",
        "parameters": [
          {
            "name": "X-DirectScale-CallbackToken",
            "in": "header",
            "description": "One-time use token. This value is sent to the endpoint configured for the hook.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-DirectScale-User",
            "in": "header",
            "description": "Sets the User Context of the request when a username is provided",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DirectScale.Disco.Extension.Hooks.Commissions.MatchRuleForVisualTreeHookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectScale.Disco.Extension.Hooks.Commissions.MatchRuleForVisualTreeHookResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Extension_Token": []
          }
        ],
        "x-codegen-request-body-name": "request"
      }
    }
  },
  "components": {
    "schemas": {
      "DirectScale.Disco.Extension.Kpi": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string"
          },
          "PeriodId": {
            "type": "integer",
            "format": "int32"
          },
          "Description": {
            "type": "string"
          },
          "Value": {
            "type": "number",
            "format": "double"
          },
          "IsBool": {
            "type": "boolean"
          },
          "DisplayValue": {
            "type": "string"
          }
        }
      },
      "DirectScale.Disco.Extension.Period": {
        "type": "object",
        "properties": {
          "PeriodId": {
            "type": "integer",
            "format": "int32"
          },
          "TemplateName": {
            "type": "string"
          },
          "TemplateRevision": {
            "type": "string"
          },
          "Begin": {
            "type": "string",
            "format": "date-time"
          },
          "End": {
            "type": "string",
            "format": "date-time"
          },
          "PeriodType": {
            "type": "string",
            "enum": [
              "All",
              "Monthly",
              "Weekly",
              "Daily",
              "Party",
              "Quarterly",
              "SemiMonthly",
              "BiMonthly",
              "FourWeek",
              "TrailingDays",
              "MovingDays",
              "Other"
            ]
          },
          "Details": {
            "$ref": "#/components/schemas/DirectScale.Disco.Extension.CommittedDetails"
          },
          "IsLocked": {
            "type": "boolean"
          },
          "IsCommitted": {
            "type": "boolean"
          },
          "Name": {
            "type": "string"
          },
          "TotalGv": {
            "type": "number",
            "format": "double"
          },
          "TotalPaid": {
            "type": "number",
            "format": "double"
          },
          "PercentPaid": {
            "type": "number",
            "format": "double"
          },
          "TotalAssociates": {
            "type": "integer",
            "format": "int32"
          },
          "TotalActive": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DirectScale.Disco.Extension.CommittedDetails": {
        "type": "object",
        "properties": {
          "TotalGv": {
            "type": "number",
            "format": "double"
          },
          "TotalPaid": {
            "type": "number",
            "format": "double"
          },
          "PercentPaid": {
            "type": "number",
            "format": "double"
          },
          "TotalAssociates": {
            "type": "integer",
            "format": "int32"
          },
          "TotalActive": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DirectScale.Disco.Extension.CommissionStats": {
        "type": "object",
        "properties": {
          "AssociateID": {
            "type": "integer",
            "format": "int32"
          },
          "AssociateName": {
            "type": "string"
          },
          "Period": {
            "$ref": "#/components/schemas/DirectScale.Disco.Extension.Period"
          },
          "Kpis": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.Kpi"
            }
          },
          "Ranks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.RankSummary"
            }
          },
          "PeriodKitLevels": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "KitLevels": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "KpiDetail": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.Kpi"
            }
          }
        }
      },
      "DirectScale.Disco.Extension.RankSummary": {
        "type": "object",
        "properties": {
          "RankId": {
            "type": "integer",
            "format": "int32"
          },
          "Groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.RankDetailGroup"
            }
          }
        }
      },
      "DirectScale.Disco.Extension.RankDetailGroup": {
        "type": "object",
        "properties": {
          "Details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.RankDetail"
            }
          }
        }
      },
      "DirectScale.Disco.Extension.RankDetail": {
        "type": "object",
        "properties": {
          "RankId": {
            "type": "integer",
            "format": "int32"
          },
          "Description": {
            "type": "string"
          },
          "MeetsCondition": {
            "type": "boolean"
          },
          "Min": {
            "type": "number",
            "format": "double"
          },
          "Max": {
            "type": "number",
            "format": "double"
          },
          "Value": {
            "type": "number",
            "format": "double"
          },
          "RankRuleId": {
            "type": "string"
          },
          "Tree": {
            "type": "string",
            "enum": [
              "Enrollment",
              "Unilevel",
              "Binary",
              "Matrix"
            ]
          },
          "IsGvCondition": {
            "type": "boolean"
          },
          "MaxPerLeg": {
            "type": "number",
            "format": "float"
          },
          "ConditionId": {
            "type": "string"
          },
          "PercentComplete": {
            "type": "number",
            "format": "double"
          },
          "IsBool": {
            "type": "boolean"
          }
        }
      },
      "DirectScale.Disco.Extension.Hooks.Commissions.MatchRuleForVisualTreeHookRequest": {
        "type": "object",
        "properties": {
          "Stats": {
            "$ref": "#/components/schemas/DirectScale.Disco.Extension.CommissionStats"
          }
        }
      },
      "DirectScale.Disco.Extension.Hooks.Commissions.MatchRuleForVisualTreeHookResponse": {
        "type": "object",
        "properties": {
          "IsMatch": {
            "type": "boolean"
          }
        }
      }
    },
    "securitySchemes": {
      "Extension_Token": {
        "type": "apiKey",
        "description": "Bearer Token For Extension",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```