Model/backlog/tasks/task-4 - Add-POST-bulk-uploads-task_id-confirm-matches-route.md
2026-04-20 13:06:31 +00:00

1.2 KiB

id title status assignee created_date updated_date labels dependencies priority ordinal
TASK-4 Add POST /bulk-uploads/{task_id}/confirm-matches route Done
2026-04-20 2026-04-20 12:31
backend
bulk-upload
api
TASK-3
high 3000

Description

POST /bulk-uploads/{task_id}/confirm-matches

Body: {accepted_rows: [{uprn, address_line_1, address_line_2, postcode, internal_reference}]} — the rows the user accepted from the review table.

Behaviour: for each accepted row, upsert into the portfolio's addresses / property table (confirm exact model during impl — see backend/addresses/, backend/backend/Property.py). Update bulk_address_uploads.status to terminal (e.g. confirmed).

Idempotency: safe to re-call; dedupe by task_id + uprn.

Acceptance Criteria

  • #1 Accepted rows persisted as portfolio addresses
  • #2 Duplicate submits do not create duplicate address rows
  • #3 bulk_address_uploads.status updated to terminal
  • #4 Returns summary {inserted, skipped}
  • #5 Transactional — partial failure rolls back