Customer Deals API
Base URL: http://localhost:8000/api/v1
Prefix: /customers
Auth: Customer JWT bearer token
Headers: Content-Type: application/json
1. Get My Deals
Retrieves the authenticated customer’s purchase and lease deals.
/customers/deals/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Deals retrieved successfully.",
"data": {
"deals": [
{
"transaction_type": "buy",
"transaction_id": "7b5f8f4d-9f0e-4eb1-a5e4-f91a1df75a30",
"status": "requested",
"property": {
"id": "32bb890e-1ae3-46df-a892-25cf5a580e62",
"slug": "downtown-condo",
"title": "Downtown Condo",
"price": "625000.00",
"currency": "USD",
"city": "Austin",
"address": "110 Example Lane, Austin, TX 78701",
"area_size": "1200.00",
"area_unit": "sqft",
"primary_media": null
},
"created_at": "2026-10-06T09:00:00Z",
"updated_at": "2026-10-06T09:00:00Z"
},
{
"transaction_type": "lease",
"transaction_id": "8c6f9f5e-0f1e-4eb1-a5e4-f91a1df75b41",
"status": "submitted",
"property": {
"id": "43cc890e-2be4-46df-a892-25cf5a580e73",
"slug": "rental-apartment",
"title": "Rental Apartment",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"address": "112 Example Lane, Austin, TX 78701",
"area_size": "950.00",
"area_unit": "sqft",
"primary_media": null
},
"created_at": "2026-10-05T11:00:00Z",
"updated_at": "2026-10-05T11:00:00Z"
}
]
}
}Notes
-
Results include only deals owned by the authenticated customer.
-
transaction_typeis eitherbuyorlease. -
Results are sorted by
created_atin descending order. -
Purchase and lease records use their respective workflow status values.
-
An empty result is returned as
"deals": [].
2. Get Property Purchase or Lease Progress
Retrieves the purchase or lease workflow progress for a property associated with the authenticated customer.
/customers/properties/{property_id}/progress/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Property progress retrieved successfully.",
"data": {
"property_id": "32bb890e-1ae3-46df-a892-25cf5a580e62",
"property": {
"id": "32bb890e-1ae3-46df-a892-25cf5a580e62",
"slug": "downtown-condo",
"title": "Downtown Condo",
"price": "625000.00",
"currency": "USD",
"city": "Austin",
"address": "110 Example Lane, Austin, TX 78701",
"area_size": "1200.00",
"area_unit": "sqft",
"primary_media": null
},
"transaction_type": "buy",
"transaction_id": "7b5f8f4d-9f0e-4eb1-a5e4-f91a1df75a30",
"status": "requested",
"current_stage": "reserved",
"reservation_payment": {
"status": "submitted",
"amount": "12500.00",
"currency": "USD",
"method": "bank_transfer",
"transaction_id": "BFT-20261006-987654",
"verified_at": null
},
"milestones": [
{
"stage": "reserved",
"title": "Reserved",
"sort_order": 1,
"status": "in_progress",
"items": [
{
"id": "12",
"title": "Reservation payment verified",
"assigned_to": "admin",
"status": "pending"
}
]
},
{
"stage": "complete_purchase",
"title": "Complete Purchase",
"sort_order": 2,
"status": "locked",
"items": []
},
{
"stage": "ownership_transfer",
"title": "Ownership Transfer",
"sort_order": 3,
"status": "locked",
"items": []
},
{
"stage": "buy_handover",
"title": "Completed / Handover",
"sort_order": 4,
"status": "locked",
"items": []
}
]
}
}Notes
-
The endpoint automatically detects whether the customer has a purchase or lease transaction for the property.
-
transaction_typeis eitherbuyorlease. -
Milestone statuses are
completed,in_progress, orlocked. -
Locked milestones return an empty
itemsarray. -
reservation_paymentisnullwhen no reservation payment exists. -
The customer must own the related purchase or lease transaction.
-
If no matching transaction exists, the API returns
404 Not Found.
Common Success Format
{
"success": true,
"message": "Operation completed successfully.",
"data": {}
}Common Error Format
{
"success": false,
"message": "Validation failed.",
"errors": {
"field_name": [
"Error message."
]
}
}