Leak allowance policy

Base URL: $BUSINESS_API

Get the tenant leak allowance policy

Logs

GET /leak-allowance-policy

Returns the rules the tenant uses to grant credits for water lost to leaks: whether the allowance is enabled, the credit share and minimum excess in basis points, the history and cooldown months, whether proof of repair is required, and the repair window in days. A tenant that never saved a policy gets the defaults: disabled, 50% credit, 6 months of history, 12-month cooldown, 50% minimum excess, proof required and a 90-day window. Needs the business:leak-allowances:read scope.

Returns

200 OK

Permissions business:leak-allowances:read · Roles: admin, analyst, customer_service, finance, operations, owner, viewer

curl -X GET "$BUSINESS_API/leak-allowance-policy" \
  -H "Authorization: Bearer sk_test_..."
Response 200

OK

Save the tenant leak allowance policy

Logs

PUT /leak-allowance-policy

Replaces the whole policy with the body you send; fields left out are saved as false or zero, so send every field. credit_percent_bp must be 0 to 10000, history_months 1 to 36 and cooldown_months 0 to 120, and min_excess_percent_bp and repair_window_days must not be negative (400 otherwise). The change is written to the audit trail. Needs the business:leak-allowances:policy scope.

Returns

200 OK

Permissions business:leak-allowances:policy · Roles: admin, finance, owner

curl -X PUT "$BUSINESS_API/leak-allowance-policy" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{}'
Response 200

OK