Skip to content

Merchant Profile API (Get & Update) #11

Description

@codebestia

Background

The frontend dashboard will have a profile/settings page where merchants can view and update their information. This requires a GET to load the current profile and a PATCH to update editable fields.

Proposed Steps

  1. Create GET /merchants/me (protected) — returns the authenticated merchant's full profile
  2. Create PATCH /merchants/me (protected) — accepts partial update of: firstName, lastName, businessName, category, description, logo, webhook
  3. Fields that cannot be changed via this endpoint: address, email, merchantId, accountContract
  4. Add input validation for all fields (e.g. webhook must be a valid HTTPS URL if provided)
  5. Return the updated merchant profile on PATCH

Acceptance Criteria

  • GET /merchants/me returns the full profile of the authenticated merchant
  • PATCH /merchants/me with valid partial payload → 200 with updated profile
  • PATCH /merchants/me attempting to change address or email → those fields are silently ignored
  • Invalid webhook URL format → 400
  • Unauthenticated request to either endpoint → 401
  • Response shape never exposes internal fields (emailOtp, apiKey hashes, etc.)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions