#456 — Facade “Update merchant” API correct HTTP methods; “Submit merchant” should return PersistedMerchant
Repo: Twill-AI/facade State: closed | Status: done Assignee: Unassigned
Created: 2025-08-01 · Updated: 2025-09-15
Description
Request
Caused by #411
Acceptance criteria
- Facade’s “Update merchant”/“Save draft” API should be PUT HTTP method because (current) PATCH means all fields optional, while API needs all data.
- Facade’s “Submit merchant” API should be POST, not PUT. Also it need to return the whole PersistedMerchant entity to notify UI about back-end changes in bank accounts.
- Relevant ticket for updates is filed for front-end.
Implementation details
Into https://github.com/Twill-AI/facade/pull/463 were added tests for correctness of merchant update and it caused a lot of changes in mapping Partner Portal UI → MerchantUpdate → MerchantPersisted → PE merchant → MerchantPersisted. It appears that back-end asked some fields in MerchantUpdate which don’t exist on UI and are not used for inner logic.
Also PR includes changes for https://github.com/Twill-AI/facade/issues/453 because errors in here are the same as in MerchantUpdate Pydantic entity.
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets