Files
svg-backend/backend/docs/api-map.md
greebo 2af5e49b8c feat(backend): add pricing coverage, unpriced seats, and explain endpoints
add backend endpoints for pricing coverage analysis and unpriced seat inspection

add explain endpoint to make effective pricing decisions traceable
improve pricing diagnostics for admin and editor workflows
2026-03-19 20:10:14 +03:00

3.8 KiB

API map

app/api/routes/system.py

  • GET /
  • GET /healthz
  • GET /api/v1/ping
  • GET /api/v1/auth/me
  • GET /api/v1/db/ping
  • GET /api/v1/manifest

app/api/routes/uploads.py

  • POST /api/v1/schemes/upload
  • GET /api/v1/uploads
  • GET /api/v1/uploads/{upload_id}
  • GET /api/v1/uploads/{upload_id}/normalized

app/api/routes/schemes.py

  • GET /api/v1/schemes
  • GET /api/v1/schemes/{scheme_id}
  • GET /api/v1/schemes/{scheme_id}/current
  • GET /api/v1/schemes/{scheme_id}/versions
  • POST /api/v1/schemes/{scheme_id}/versions
  • GET /api/v1/schemes/{scheme_id}/publish/validation
  • POST /api/v1/schemes/{scheme_id}/publish
  • POST /api/v1/schemes/{scheme_id}/unpublish
  • POST /api/v1/schemes/{scheme_id}/rollback

app/api/routes/structure.py

  • GET /api/v1/schemes/{scheme_id}/current/sectors
  • GET /api/v1/schemes/{scheme_id}/current/groups
  • GET /api/v1/schemes/{scheme_id}/current/seats
  • GET /api/v1/schemes/{scheme_id}/current/seats/{seat_id}/price
  • GET /api/v1/schemes/{scheme_id}/current/svg
  • GET /api/v1/schemes/{scheme_id}/current/svg/display
  • GET /api/v1/schemes/{scheme_id}/current/svg/display/meta

app/api/routes/pricing.py

  • GET /api/v1/schemes/{scheme_id}/pricing
  • POST /api/v1/schemes/{scheme_id}/pricing/categories
  • PUT /api/v1/schemes/{scheme_id}/pricing/categories/{pricing_category_id}
  • DELETE /api/v1/schemes/{scheme_id}/pricing/categories/{pricing_category_id}
  • POST /api/v1/schemes/{scheme_id}/pricing/rules
  • PUT /api/v1/schemes/{scheme_id}/pricing/rules/{price_rule_id}
  • DELETE /api/v1/schemes/{scheme_id}/pricing/rules/{price_rule_id}

app/api/routes/pricing_diagnostics.py

  • GET /api/v1/schemes/{scheme_id}/pricing/coverage
  • GET /api/v1/schemes/{scheme_id}/pricing/unpriced-seats
  • GET /api/v1/schemes/{scheme_id}/pricing/explain/{seat_id}

app/api/routes/test_mode.py

  • GET /api/v1/schemes/{scheme_id}/test/seats/{seat_id}

app/api/routes/audit.py

  • GET /api/v1/schemes/{scheme_id}/audit

app/api/routes/publish.py

  • POST /api/v1/schemes/{scheme_id}/draft/pricing/snapshot
  • GET /api/v1/schemes/{scheme_id}/draft/publish-preview
  • POST /api/v1/schemes/{scheme_id}/draft/remap/preview
  • POST /api/v1/schemes/{scheme_id}/draft/remap/apply

app/api/routes/editor.py

  • GET /api/v1/schemes/{scheme_id}/draft/structure
  • GET /api/v1/schemes/{scheme_id}/draft/compare-preview
  • GET /api/v1/schemes/{scheme_id}/draft/validation
  • GET /api/v1/schemes/{scheme_id}/draft/seats/records/{seat_record_id}
  • GET /api/v1/schemes/{scheme_id}/draft/sectors/records/{sector_record_id}
  • GET /api/v1/schemes/{scheme_id}/draft/groups/records/{group_record_id}
  • POST /api/v1/schemes/{scheme_id}/draft/sectors
  • POST /api/v1/schemes/{scheme_id}/draft/groups
  • DELETE /api/v1/schemes/{scheme_id}/draft/sectors/records/{sector_record_id}
  • DELETE /api/v1/schemes/{scheme_id}/draft/groups/records/{group_record_id}
  • PATCH /api/v1/schemes/{scheme_id}/draft/seats/records/{seat_record_id}
  • POST /api/v1/schemes/{scheme_id}/draft/seats/bulk
  • PATCH /api/v1/schemes/{scheme_id}/draft/sectors/records/{sector_record_id}
  • PATCH /api/v1/schemes/{scheme_id}/draft/groups/records/{group_record_id}
  • POST /api/v1/schemes/{scheme_id}/draft/repair-references

app/api/routes/admin.py

  • GET /api/v1/admin/schemes/{scheme_id}/current/artifacts
  • GET /api/v1/admin/schemes/{scheme_id}/current/validation
  • POST /api/v1/admin/schemes/{scheme_id}/current/display/regenerate
  • POST /api/v1/admin/display/backfill
  • GET /api/v1/admin/artifacts/publish-preview/audit
  • POST /api/v1/admin/artifacts/publish-preview/cleanup

Notes

  • This file is an operational route index, not a generated OpenAPI export.
  • Update this map in the same change set when adding, removing, renaming, or moving routes.
  • Query guards such as expected_current_scheme_version_id / expected_scheme_version_id are part of the operational contract for optimistic concurrency on mutable flows.