POST /api/card-plan
Submit a request for one of the predefined website plans (Budget, Business, or Professional). This endpoint saves the request to MongoDB and sends an email notification with the plan details.Request Body
The full name of the person requesting the plan
The email address for contact
The phone number for contact
The type of website being requested
The selected plan type. Must be one of: “Budget”, “Business”, or “Professional”
The price of the selected plan
The client’s budget. Use 0 to indicate uncapped/no budget constraint
Response
Success message confirming the request submission
Error message if the request fails (only present on error)
Example Request
cURL
JavaScript
Example Request with Uncapped Budget
cURL
Success Response
Error Response
Email Notification
When a card plan request is submitted, an email is sent to the configured recipient containing:- Subject: “New [planType] Plan Request from [name]”
- Name: The submitted name
- Email: The submitted email address
- Phone: The submitted phone number
- Website Type: The type of website requested
- Selected Plan: The plan type (Budget, Business, or Professional)
- Plan Price: Formatted as R[amount] with thousands separator
- Client Budget: Formatted as R[amount] or “Uncapped/No Budget” if budget is 0
Data Storage
The card plan request is saved to MongoDB with the following schema:Plan Types
TheplanType field must be one of three predefined values:
- Budget: Entry-level plan for basic websites
- Business: Mid-tier plan for growing businesses
- Professional: Premium plan with advanced features
Budget Field
Thebudget field has special meaning:
- 0: Indicates uncapped budget or no budget constraint
- > 0: Indicates the client’s specific budget limit in the same currency as planPrice
Notes
- All fields are required for submission
- The
planTypeis validated against the enum values in the database schema - Prices are displayed in South African Rand (R) in email notifications
- The request is saved to MongoDB before sending the email notification
- The
budgetfield defaults to 0 if not provided