Skip to content

[FEATURE] Add Tenant #37

@ysnarafat

Description

@ysnarafat

Description

Implement the ability to add a new tenant to the system.

Requirements

  • Create API endpoint: POST /api/v1/tenants
  • Validate tenant data (name, email, phone, etc.)
  • Store tenant in database
  • Return created tenant with ID
  • Handle errors appropriately

Request Body Example

{
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "phone": "string",
  "nationalId": "string",
  "dateOfBirth": "YYYY-MM-DD",
  "emergencyContactName": "string",
  "emergencyContactPhone": "string",
  "status": "active"
}

Expected Response

Success (201): Returns created tenant object
Error (400): Validation errors
Error (409): Duplicate email or national ID
Error (500): Server errors

Additional Notes

Validate email format and uniqueness
Validate phone number format
Ensure national ID is unique
Consider document upload for ID verification

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions