Skip to content

Agreements System — API Features #317

@bmertens-datum

Description

@bmertens-datum

High-Level Summary

Implement the backend API for managing agreements and tracking user acceptances. Provide endpoints to create and version agreements, record acceptances, and query agreement history for users and organizations. This will serve as the foundation for both staff and user-facing interfaces.

Motivation

We need a clear, consistent way to manage agreements in code. An API allows other parts of the system to check if a user has accepted the latest version, require acceptance before continuing, and show agreement history. Having a versioned API also allows external systems to integrate with this functionality in the future.

Goals

  • Define REST endpoints to:
    • Create agreement types (e.g. Terms of Service, Privacy Policy)
    • Create new revisions of an agreement type
    • Record user or org acceptance of a specific agreement revision
    • Retrieve the latest revision for a given agreement type
  • Retrieve a user’s or org’s acceptance history
  • Include metadata in acceptance records (timestamp, IP, user/org ID, agreement revision ID)
  • Enforce that only the latest revision can be newly accepted
  • Provide versioned API paths and clear error responses
  • Include OpenAPI documentation for all endpoints

Non-Goals

  • No editing or deleting agreement revisions once created
  • No PDF generation or file uploads
  • No notification or reminder system
  • No translation or localization support in this ticket

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions