# Endpoint: Create Specific Maid Request

This document details the `POST /api/customer/quotation-requests/create` endpoint and maps the customer mobile app's **Request Contract (Specific Maid)** form design elements to their corresponding API parameters.

## Endpoint Details

* **URL**: `/api/customer/quotation-requests/create`
* **Method**: `POST`
* **Headers**:
  * `Content-Type: application/json`
  * `Authorization: Bearer <customer_token>`

---

## Design-to-API Payload Mapping

Below is a breakdown of how the UI form fields from the "Request Contract" screens map to the API request payload:

| UI Section & Element | API Parameter | Parameter Type | Description / Mapping |
| :--- | :--- | :--- | :--- |
| **Context** | `vendor_id` | `integer` (Required) | The ID of the vendor the maid belongs to. |
| **Context** | `maid_id` | `integer` (Required) | The ID of the specific maid being requested (e.g. Sarah Jenkins). |
| **Context** | `request_type` | `string` (Required) | Must be `"specific_maid"`. |
| **Duration (Step 1)** | `start_date` | `string` (Optional) | The selected start date (e.g. `"2024-10-15"`). |
| **Duration (Step 1)** | `duration_months` | `integer` (Optional) | The contract duration. Maps to `3`, `6`, or `12`. |
| **Duration (Step 1)** | `work_days` | `integer` (Optional) | The frequency of work days per week (e.g., `6`). |
| **Requirements (Step 2)** | `service_model_id` | `integer` (Optional) | Derived from "Live-out" or "Live-in" tags. |
| **Requirements (Step 2)** | `specialty_ids` | `array of integers` (Optional) | Derived from the selected service requirements tags (Cleaning, Ironing, Cooking). |
| **Requirements (Step 2)** | `city_id` | `integer` (Optional) | The selected Service Location (e.g., Emirate ID for Dubai). |
| **Requirements (Step 2)** | `additional_notes` | `string` (Optional) | Any special instructions (e.g., Gate code). |
| **Review (Step 3)** | `estimated_total_value` | `decimal` (Optional) | Total Contract Value shown on UI (e.g., `15000.00`). |
| **Review (Step 3)** | `estimated_monthly_payment` | `decimal` (Optional) | Monthly Payment shown on UI (e.g., `2500.00`). |

---

## Example Request Payload

Based on the screenshot design (Sarah Jenkins, 6 Months, 6 Days/wk, Live-out, Cleaning/Ironing/Cooking, Dubai):

```json
{
  "vendor_id": 1,
  "maid_id": 4,
  "request_type": "specific_maid",
  "start_date": "2024-10-15",
  "duration_months": 6,
  "work_days": 6,
  "service_model_id": 2,
  "specialty_ids": [5, 6, 4],
  "city_id": 1,
  "additional_notes": "E.g., Gate code is 1234, please park in visitor area...",
  "estimated_total_value": 15000.00,
  "estimated_monthly_payment": 2500.00
}
```

---

## Response Format

### Success Response (`201 Created`)
```json
{
  "success": true,
  "message": "Quotation request submitted successfully",
  "data": {
    "id": 16,
    "customer_id": 1,
    "vendor_id": 1,
    "maid_id": 4,
    "request_type": "specific_maid",
    "start_date": "2024-10-15",
    "duration_months": 6,
    "work_days": 6,
    "city_id": 1,
    "estimated_total_value": 15000.00,
    "estimated_monthly_payment": 2500.00,
    "additional_notes": "E.g., Gate code is 1234...",
    "status": "pending",
    "created_at": "2026-05-24 10:00:00",
    "vendor_name": "Spotless Solutions",
    "maid_name": "Sarah Jenkins"
  }
}
```
