Listings

Search listings

get

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
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
  }
]

Add a new listing

post

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
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"
}

Delete a listing

delete
Path parameters
listingIdstringRequired

The unique identifier of the listing to delete

Responses
200
Listing deleted successfully
delete
DELETE /listings/{listingId} HTTP/1.1
Host: 
Accept: */*

No content