True Care SystemTrue Care SystemDocumentation
Return to Website

CONTRACT DESIGN

API Standards

Design consistent, secure, and backward-compatible API routes and responses.

Production stability and security notice

Development changes must preserve working functionality, Provider isolation, role-based access, HIPAA auditability, released Mobile compatibility, and integration stability. Never deploy AI-generated or unreviewed code directly to production.

Route Design

TopicStandard
Resource namingUse clear plural nouns and domain-specific paths.
HTTP methodsGET reads, POST creates or executes commands, PATCH updates, DELETE removes or deactivates.
AuthenticationRequire authentication unless the route is intentionally public.
AuthorizationEnforce role and Provider scope server-side.
DTO validationValidate types, formats, required fields, enums, and length.
PaginationUse explicit page or cursor parameters for large collections.
FilteringDocument supported filters and apply safe defaults.

Response Design

  • Return stable field names.
  • Include transaction or batch identifiers for asynchronous integrations.
  • Return clear success and error messages.
  • Do not include stack traces, credentials, or sensitive configuration.
  • Preserve fields used by released Mobile versions.

Integration Responses

External systems may return identifiers in different response paths. Parsers must be explicit, tested, and backward-compatible. Transaction IDs and request payload references should be stored for later review.