Properties API
This API allows you to manage properties for your company.
- URL:
/api/properties/ - Method:
GET,POST,PUT,PATCH,DELETE - Auth required: Yes (Token authentication)
List Properties
- Method:
GET - URL:
/api/properties/
Success response:
- Code:
200 OK - Content: An array of property objects.
Create Property
- Method:
POST - URL:
/api/properties/
Request body:
{
"title": "Beautiful 3-bedroom house",
"description": "A beautiful house with a garden.",
"property_type": "House",
"listing_type": "Sale",
"price": "500000.00",
"address_line_1": "123 Main St",
"city": "New York",
"status": "Active",
"main_image": "https://example.com/image.jpg"
}
Success response:
- Code:
201 CREATED - Content: The created property object.
Retrieve Property
- Method:
GET - URL:
/api/properties/{id}/
Success response:
- Code:
200 OK - Content: The property object.
Update Property
- Method:
PUTorPATCH - URL:
/api/properties/{id}/
Request body: The fields to update.
Success response:
- Code:
200 OK - Content: The updated property object.
Delete Property
- Method:
DELETE - URL:
/api/properties/{id}/
Success response:
- Code:
204 NO CONTENT