Compliance

Evaluate an information-return rule

Evaluate a payment against a validated rule. Unknown future thresholds fail closed for review.

Method

POST

Path

/v1/compliance-rules/evaluate

Required scope

compliance:read

Request

curl -X POST "https://api.endurancehq.app/v1/compliance-rules/evaluate" \
  -H "Authorization: Bearer $EHQ_API_KEY"

JSON body schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "taxYear": {
      "type": "integer",
      "minimum": 1900,
      "maximum": 2200
    },
    "paymentCategory": {
      "type": "string",
      "const": "nonemployee_compensation"
    },
    "amountCents": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "jurisdictionCountry": {
      "default": "US",
      "type": "string",
      "const": "US"
    }
  },
  "required": [
    "taxYear",
    "paymentCategory",
    "amountCents",
    "jurisdictionCountry"
  ],
  "additionalProperties": false
}

Response

Success status: 200

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "determination": {
          "type": "string",
          "enum": [
            "reportable",
            "below_threshold",
            "review_required"
          ]
        },
        "reason": {
          "type": "string"
        },
        "collectW9": {
          "type": "boolean"
        },
        "reportable": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "rule": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "ruleKey": {
                  "type": "string"
                },
                "authority": {
                  "type": "string"
                },
                "jurisdictionCountry": {
                  "type": "string"
                },
                "taxYear": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "ruleTaxYear": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "paymentCategory": {
                  "type": "string",
                  "const": "nonemployee_compensation"
                },
                "formNumber": {
                  "type": "string"
                },
                "thresholdCents": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "w9CollectionPolicy": {
                  "type": "string"
                },
                "sourceUrl": {
                  "type": "string",
                  "format": "uri"
                },
                "sourceRevision": {
                  "type": "string"
                },
                "reviewedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "ruleKey",
                "authority",
                "jurisdictionCountry",
                "taxYear",
                "ruleTaxYear",
                "paymentCategory",
                "formNumber",
                "thresholdCents",
                "w9CollectionPolicy",
                "sourceUrl",
                "sourceRevision",
                "reviewedAt"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "determination",
        "reason",
        "collectW9",
        "reportable",
        "rule"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

CLI: ehq compliance information-returns evaluate --year <year> --amount-cents <amount>

MCP tool: ehq_compliance_information_returns_evaluate