Skip to content

Dref3: rename appeal_id to appeal_code #2817

Description

@thenav56

Summary

The dref3 API currently exposes appeal_id, but the value it holds is an appeal code (e.g. MDRTJ032), not an appeal DB pk.

On the current API, ?appeal_id=6 takes a dref.pk, not an appeal.pk, so the value is neither an appeal ID nor an appeal code. We rename to appeal_code and, make the filter multi-value and only use the appeal code

Breaking changes

Before After
Response field appeal_id: "MDRTJ032" appeal_code: "MDRTJ032"
Filter param ?appeal_id=6 (dref.pk) ?appeal_codes=MDRAM010,MDRTJ032 (comma-separated appeal codes)

Notes:

  • Filter is plural (appeal_codes) because it accepts multiple values; response field stays singular (appeal_code).
  • pk-based filtering is dropped. (Confirm: does any consumer still need it?)
  • Detail lookup by appeal code is unaffected: /api/v2/dref3/MDRNG043/ keeps working.

Current behaviour verified on test envs

alpha-3 = new dref3 changes, alpha-4 = existing dref3; both share the same DB dump from staging.

Tasks

  • Add a new response field appeal_code. It holds the Appeal Code.
  • Change the current response field appeal_id. It will hold the Appeal DB PK.
  • Add a new filter field appeal_codes. It takes a list of appeal codes, split by commas.
  • Replace the filter appeal_id with appeal_ids. It takes a list of Appeal DB PK, split by commas.
  • Update API schema / generated types

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions