PT EN

Política de abatimento por fuga

URL base: $BUSINESS_API

Obter a política de abatimento por fuga

Registos

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.

Devolve

200 OK

Permissões business:leak-allowances:read · Funções: admin, analyst, customer_service, finance, operations, owner, viewer

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

OK

Guardar a política de abatimento por fuga

Registos

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.

Devolve

200 OK

Permissões business:leak-allowances:policy · Funções: admin, finance, owner

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

OK