---
title: REST API documentation
summary: Entry point for .NET Framework 4 ASP.NET Web API documentation.
status: draft
owner: Agency Systems Team
last_reviewed: 2026-09-10
---

# 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](overview.md) | Purpose, consumers, business context, and capability summary |
| [Architecture](architecture.md) | Hosting, request pipeline, layering, and the DI composition root |
| [Endpoints](endpoints.md) | Endpoint catalog with per-controller detail pages |
| [Authentication and authorization](authentication-authorization.md) | 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](business-rules.md) | Rules enforced during request processing |
| Data model | Persistence model, entity mappings, and stored procedure usage |
| [Operational runbook](operational-runbook.md) | 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](endpoints/agencies.md) |
| `AgentsController` | `v1/agents` | 3 | Docs |
| `AppointmentsController` | `v1/appointments` | 3 | Docs |

## Related documentation
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Endpoints](endpoints.md)
- [Authentication and authorization](authentication-authorization.md)
- Dependencies
- Configuration
- Operations and processes
- [Business rules](business-rules.md)
- Data model
- [Operational runbook](operational-runbook.md)
- Tech debt

## 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`
