Skip to content

Inventory Endpoints

dana-jpg edited this page May 3, 2024 · 1 revision

The following endpoints are available in the Inventory Service:

Get All Properties

  • URL: /properties/
  • Method: GET
  • Description: Retrieves all property listings.
  • Response Model: Returns a list of properties as List[Property].

Get Property by ID

  • URL: /properties/{property_id}
  • Method: GET
  • Description: Retrieves a specific property by its unique ID.
  • Response: Returns detailed information about the property as Property.
  • Errors: Throws HTTPException with status code 404 if the item is not found.

Query Properties

  • URL: /queryProperties
  • Method: GET
  • Description: Queries properties based on provided search criteria.
  • Response Model: Returns a paginated list of properties as PropertyListPaginated.
  • Parameters: Accepts various query parameters through PropertyQuery.

Fetch Properties by User

  • URL: /fetchPropertiesByUser
  • Method: GET
  • Description: Retrieves properties associated with a specific user.
  • Response: Returns a list of properties associated with the user as List[Property].

Create Property Listing

  • URL: /properties/
  • Method: POST
  • Description: Allows the creation of a new property listing.
  • Request Body: Requires a Property object.
  • Response: Returns the newly created property as Property.

Update Property Listing

  • URL: /properties/{property_id}
  • Method: PUT
  • Description: Updates an existing property listing.
  • Request Body: Requires a Property object.
  • Response: Returns the updated property as Property.

Declare Interest

  • URL: /declareInterest
  • Method: POST
  • Description: Allows a user to declare interest in a property.
  • Request Body: Requires an InterestSchema.
  • Response: Returns the declared interest as InterestSchema.

Remove Interest

  • URL: /removeInterest
  • Method: DELETE
  • Description: Allows a user to revoke their interest in a property.
  • Request Body: Requires an InterestSchema.
  • Response: Returns a message indicating successful revocation.

Fetch Interests by User

  • URL: /fetchInterestsByUser
  • Method: GET
  • Description: Retrieves all interests declared by a specific user.
  • Response: Returns a list of interests as List[InterestSchema].

Fetch Interests by Property

  • URL: /fetchInterestsByProperty
  • Method: GET
  • Description: Retrieves all interests declared for a specific property.
  • Response: Returns a list of interests as List[InterestSchema].

These endpoints provide comprehensive access to property data and user interactions with those properties, such as declaring interest or managing property listings.

Clone this wiki locally