Listings
Retrieves rental listings based on search criteria
Query parameters
userIdstringOptional
Filter listings by user ID
listingIdstringOptional
Get specific listing by ID
searchTermstringOptional
Search term to filter listings
Responses
200
Listings retrieved successfully
application/json
400
Bad request - Missing or invalid parameters
application/json
401
Unauthorized - Authentication failed
application/json
403
Forbidden - Access denied
application/json
404
Resource not found
application/json
500
Server error
application/json
get
GET /listings HTTP/1.1
Host:
Accept: */*
[
{
"listingId": "text",
"userId": "text",
"streetAddress": "text",
"city": "text",
"state": "text",
"postalCode": "text",
"monthlyRent": 1,
"bedRoomCount": 1,
"bathroomCount": 1
}
]
Adds a new rental listing to the database.
Body
listingIdstringRequired
Unique identifier for the listing (linked to blockchain ID)
userIdstringRequired
User identifier associated with the listing
streetAddressstringRequired
Street address of the rental listing
citystringRequired
City where the rental is located
statestringRequired
State where the rental is located
postalCodestringRequired
Postal code for the rental listing
monthlyRentnumberOptional
Monthly rental price
bedRoomCountintegerOptional
Number of bedrooms
bathroomCountintegerOptional
Number of bathrooms
Responses
201
Resource created successfully
application/json
400
Bad request - Missing or invalid parameters
application/json
401
Unauthorized - Authentication failed
application/json
403
Forbidden - Access denied
application/json
500
Server error
application/json
post
POST /listings HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 159
{
"listingId": "text",
"userId": "text",
"streetAddress": "text",
"city": "text",
"state": "text",
"postalCode": "text",
"monthlyRent": 1,
"bedRoomCount": 1,
"bathroomCount": 1
}
{
"message": "text"
}
Path parameters
listingIdstringRequired
The unique identifier of the listing to delete
Responses
200
Listing deleted successfully
400
Bad request - Missing or invalid parameters
application/json
401
Unauthorized - Authentication failed
application/json
403
Forbidden - Access denied
application/json
404
Resource not found
application/json
500
Server error
application/json
delete
DELETE /listings/{listingId} HTTP/1.1
Host:
Accept: */*
No content