REST API documentation
SAIF.Agency.Api is the system of record for agency, agent, and appointment
data at SAIF. It exposes read endpoints that let internal applications resolve
which agency holds a producer code, which agents work there, and which of them
are appointed to write business, plus a single write endpoint that maintains
agency contact details. The agency portal, SAIF.Claims.Intake, and
SAIF.Policy.RenewalNotice all read from it rather than querying the AGENCY
schema directly, so agency data has one owner and one set of rules.
Field
Value
Service
SAIF.Agency.Api
Framework
ASP.NET Web API 2 (System.Web.Http, .NET Framework 4.8)
Host
IIS — Global.asax + AgencyApiApplication : System.Web.HttpApplication
Route configuration
App_Start\WebApiConfig.cs → Register(HttpConfiguration)
Routing mode
Attribute routes (MapHttpAttributeRoutes()) — no convention route is registered
Base controller
AgencyApiBase : ApiController
Versioning
[RoutePrefix("v1/agencies")], [RoutePrefix("v1/agents")], [RoutePrefix("v1/appointments")]
Media types
JSON only — config.Formatters.XmlFormatter removed in WebApiConfig.Register
Composition root
src\SAIF.Agency.Api\App_Start\AutofacConfig.cs
Documentation sections
Section
Description
Overview
Purpose, consumers, business context, and capability summary
Architecture
Hosting, request pipeline, layering, and the DI composition root
Endpoints
Endpoint catalog with per-controller detail pages
Authentication and authorization
Identity, authorization enforcement, and role requirements
Dependencies
Libraries, packages, APIs, and database connections
Configuration
Environment API settings, runtime-resolved connections, Web.config surface
Operations and processes
End-to-end processing workflows behind the endpoints
Business rules
Rules enforced during request processing
Data model
Persistence model, entity mappings, and stored procedure usage
Operational runbook
Deployment, health checks, logs, status codes, error recovery
Tech debt
CRITICAL and HIGH severity findings
Controllers
Controller
Route prefix
Endpoints
Documentation
AgenciesController
v1/agencies
4
Docs
AgentsController
v1/agents
3
Docs
AppointmentsController
v1/appointments
3
Docs
Sources
src/SAIF.Agency.Api/Global.asax.cs
src/SAIF.Agency.Api/App_Start/WebApiConfig.cs
src/SAIF.Agency.Api/App_Start/AutofacConfig.cs
src/SAIF.Agency.Api/Controllers/AgencyApiBase.cs
src/SAIF.Agency.Api/Controllers/v1/AgenciesController.cs
src/SAIF.Agency.Api/Controllers/v1/AgentsController.cs
src/SAIF.Agency.Api/Controllers/v1/AppointmentsController.cs
src/SAIF.Agency.Api/SAIF.Agency.Api.csproj