FastAPI (0.1.0)

Download OpenAPI specification:

auth

Register User

Authorizations:
HTTPBearer
Request Body schema: application/json
required
firstname
required
string (Firstname)
lastname
required
string (Lastname)
email
required
string <email> (Email)

Responses

Request samples

Content type
application/json
{
  • "firstname": "string",
  • "lastname": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
null

Google Auth

Authorizations:
HTTPBearer
Request Body schema: application/json
required
firstname
required
string (Firstname)
lastname
required
string (Lastname)
email
required
string <email> (Email)

Responses

Request samples

Content type
application/json
{
  • "firstname": "string",
  • "lastname": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
null

Facebook Auth

Authorizations:
HTTPBearer
Request Body schema: application/json
required
firstname
required
string (Firstname)
lastname
required
string (Lastname)
email
required
string <email> (Email)

Responses

Request samples

Content type
application/json
{
  • "firstname": "string",
  • "lastname": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
null

users

Get Users

Authorizations:
HTTPBearer

Responses

Response samples

Content type
application/json
null

Listings

Create a new listing

Creates a listing with optional address and category assignments. Requires a valid seller ID.

Authorizations:
HTTPBearer
query Parameters
User Latitude (number) or User Latitude (null) (User Latitude)
User Longitude (number) or User Longitude (null) (User Longitude)
Request Body schema: application/json
required
title
required
string (Title) <= 255 characters
description
required
string (Description)
required
Price (number) or Price (string) (Price)
listing_status
required
string (ListingStatus)
Enum: "active" "sold" "hidden" "removed" "rented"
offer_type
required
string (OfferType)
Enum: "rent" "buy" "both"
AddressBase (object) or null
category_ids
required
Array of integers (Category Ids)
image_paths
required
Array of strings (Image Paths)

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": 0,
  • "listing_status": "active",
  • "offer_type": "rent",
  • "address": {
    },
  • "category_ids": [
    ],
  • "image_paths": [
    ]
}

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": "string",
  • "listing_status": "active",
  • "offer_type": "rent",
  • "id": 0,
  • "liked": true,
  • "seller": {
    },
  • "address": {
    },
  • "categories": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "image_paths": [
    ],
  • "distance_from_user": 0
}

Filter and list listings

Retrieve listings by categories, price range, offer type, .... Listings with status REMOVED are excluded.

Authorizations:
HTTPBearer
query Parameters
offer_type
required
string (OfferType)
Enum: "rent" "buy" "both"
listing_status
string (ListingStatus)
Default: "active"
Enum: "active" "sold" "hidden" "removed" "rented"
Min Price (integer) or Min Price (null) (Min Price)
Max Price (integer) or Max Price (null) (Max Price)
Min Rating (number) or Min Rating (null) (Min Rating)
Time From (string) or Time From (null) (Time From)
sort_by
string (Sort By)
Default: "created_at"
sort_order
string (Sort Order)
Default: "desc"
Search (string) or Search (null) (Search)
Country (string) or Country (null) (Country)
City (string) or City (null) (City)
Street (string) or Street (null) (Street)
limit
integer (Limit)
Default: 10
offset
integer (Offset)
Default: 0
User Latitude (number) or User Latitude (null) (User Latitude)
User Longitude (number) or User Longitude (null) (User Longitude)
Max Distance (number) or Max Distance (null) (Max Distance)
Request Body schema: application/json
Any of
Array
integer

Responses

Request samples

Content type
application/json
null

Response samples

Content type
application/json
[
  • {
    }
]

Get current user's listings

Fetch all listings created by the current user.

Authorizations:
HTTPBearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a listing by ID

Fetch a specific listing by ID unless its status is REMOVED.

Authorizations:
HTTPBearer
path Parameters
listing_id
required
integer (Listing Id)
query Parameters
User Latitude (number) or User Latitude (null) (User Latitude)
User Longitude (number) or User Longitude (null) (User Longitude)

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": "string",
  • "listing_status": "active",
  • "offer_type": "rent",
  • "id": 0,
  • "liked": true,
  • "seller": {
    },
  • "address": {
    },
  • "categories": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "image_paths": [
    ],
  • "distance_from_user": 0
}

Update an existing listing

Updates listing fields and category relationships. You must provide valid address/category IDs.

Authorizations:
HTTPBearer
path Parameters
listing_id
required
integer (Listing Id)
Request Body schema: application/json
required
Title (string) or Title (null) (Title)
Description (string) or Description (null) (Description)
Price (number) or Price (string) or Price (null) (Price)
OfferType (string) or null
AddressBase (object) or null
Array of Category Ids (integers) or Category Ids (null) (Category Ids)

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": 0,
  • "offer_type": "rent",
  • "address": {
    },
  • "category_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": "string",
  • "listing_status": "active",
  • "offer_type": "rent",
  • "id": 0,
  • "liked": true,
  • "seller": {
    },
  • "address": {
    },
  • "categories": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "image_paths": [
    ],
  • "distance_from_user": 0
}

Soft-delete a listing

Marks the listing as REMOVED. It will no longer be visible to users.

Authorizations:
HTTPBearer
path Parameters
listing_id
required
integer (Listing Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Buy a listing

Marks the listing as SOLD. It will no longer be visible to users.

Authorizations:
HTTPBearer
path Parameters
listing_id
required
integer (Listing Id)

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": "string",
  • "listing_status": "active",
  • "offer_type": "rent",
  • "id": 0,
  • "liked": true,
  • "seller": {
    },
  • "address": {
    },
  • "categories": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "image_paths": [
    ],
  • "distance_from_user": 0
}

Rent a listing

Marks the listing as RENTED. It will no longer be visible to users.

Authorizations:
HTTPBearer
path Parameters
listing_id
required
integer (Listing Id)

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": "string",
  • "listing_status": "active",
  • "offer_type": "rent",
  • "id": 0,
  • "liked": true,
  • "seller": {
    },
  • "address": {
    },
  • "categories": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "image_paths": [
    ],
  • "distance_from_user": 0
}

Hide a listing

Marks the listing as HIDDEN. It will no longer be visible to users.

Authorizations:
HTTPBearer
path Parameters
listing_id
required
integer (Listing Id)

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": "string",
  • "listing_status": "active",
  • "offer_type": "rent",
  • "id": 0,
  • "liked": true,
  • "seller": {
    },
  • "address": {
    },
  • "categories": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "image_paths": [
    ],
  • "distance_from_user": 0
}

Shows a hidden listing

Marks the listing as ACTIVE. It will again be visible to users.

Authorizations:
HTTPBearer
path Parameters
listing_id
required
integer (Listing Id)

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": "string",
  • "listing_status": "active",
  • "offer_type": "rent",
  • "id": 0,
  • "liked": true,
  • "seller": {
    },
  • "address": {
    },
  • "categories": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "image_paths": [
    ],
  • "distance_from_user": 0
}

Get favorite listings of current user

Fetch all favorite listings of the current user.

Authorizations:
HTTPBearer
query Parameters
User Latitude (number) or User Latitude (null) (User Latitude)
User Longitude (number) or User Longitude (null) (User Longitude)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a specific listing to users favorites

Updates users favorite_listings relationship. You must provide valid listing ID

Authorizations:
HTTPBearer
path Parameters
listing_id
required
integer (Listing Id)
query Parameters
User Latitude (number) or User Latitude (null) (User Latitude)
User Longitude (number) or User Longitude (null) (User Longitude)

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": "string",
  • "listing_status": "active",
  • "offer_type": "rent",
  • "id": 0,
  • "liked": true,
  • "seller": {
    },
  • "address": {
    },
  • "categories": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "image_paths": [
    ],
  • "distance_from_user": 0
}

Remove a specific listing from users favorites

Updates users favorite_listings relationship. You must provide valid listing ID

Authorizations:
HTTPBearer
path Parameters
listing_id
required
integer (Listing Id)

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "price": "string",
  • "listing_status": "active",
  • "offer_type": "rent",
  • "id": 0,
  • "liked": true,
  • "seller": {
    },
  • "address": {
    },
  • "categories": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "image_paths": [
    ],
  • "distance_from_user": 0
}

Profile

Get Profile

Authorizations:
HTTPBearer

Responses

Response samples

Content type
application/json
{
  • "firstname": "string",
  • "lastname": "string",
  • "phone_number": "string",
  • "amount_sold_listing": 0,
  • "amount_rent_listing": 0,
  • "rating": 1,
  • "address": {
    }
}

Update Profile

Authorizations:
HTTPBearer
Request Body schema: application/json
required
required
object (UserUpdate)
required
object (AddressUpdate)

Responses

Request samples

Content type
application/json
{
  • "user_metadata": {
    },
  • "address_metadata": {
    }
}

Response samples

Content type
application/json
{
  • "user_metadata": {
    },
  • "address_metadata": {
    }
}

Get Profile

Authorizations:
HTTPBearer
path Parameters
id
required
integer (Id)

Responses

Response samples

Content type
application/json
{
  • "firstname": "string",
  • "lastname": "string",
  • "phone_number": "string",
  • "amount_sold_listing": 0,
  • "amount_rent_listing": 0,
  • "rating": 1,
  • "address": {
    }
}

Get reviews for a user

Fetch all reviews for the given user (reviewee), returning the rating and reviewer information.

Authorizations:
HTTPBearer
path Parameters
user_id
required
integer (User Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Alerts

Create a new alert

Creates a new alert for the current user. The alert will be triggered when a new listing matches the specified criteria.

Authorizations:
HTTPBearer
Request Body schema: application/json
required
Array of Category Ids (integers) or Category Ids (null) (Category Ids)
offer_type
required
string (OfferType)
Enum: "rent" "buy" "both"
listing_status
string (ListingStatus)
Default: "active"
Enum: "active" "sold" "hidden" "removed" "rented"
Min Price (integer) or Min Price (null) (Min Price)
Max Price (integer) or Max Price (null) (Max Price)
Min Rating (number) or Min Rating (null) (Min Rating)
Time From (string) or Time From (null) (Time From)
sort_by
string (Sort By)
Default: "created_at"
sort_order
string (Sort Order)
Default: "desc"
Search (string) or Search (null) (Search)
Country (string) or Country (null) (Country)
City (string) or City (null) (City)
Street (string) or Street (null) (Street)

Responses

Request samples

Content type
application/json
{
  • "category_ids": [
    ],
  • "offer_type": "rent",
  • "listing_status": "active",
  • "min_price": 0,
  • "max_price": 0,
  • "min_rating": 0,
  • "time_from": "2019-08-24T14:15:22Z",
  • "sort_by": "created_at",
  • "sort_order": "desc",
  • "search": "string",
  • "country": "st",
  • "city": "string",
  • "street": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "is_active": true,
  • "product_filters": { },
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_notified_at": "2019-08-24T14:15:22Z",
  • "user_id": 0
}

Get current user's alerts

Fetch all alerts created by the current user.

Authorizations:
HTTPBearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Enable an alert

Enable an alert by ID. The alert will be triggered when a new listing matches the specified criteria.

Authorizations:
HTTPBearer
path Parameters
alert_id
required
integer (Alert Id)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "is_active": true,
  • "product_filters": { },
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_notified_at": "2019-08-24T14:15:22Z",
  • "user_id": 0
}

Disable an alert

Disable an alert by ID. The alert will no longer be triggered.

Authorizations:
HTTPBearer
path Parameters
alert_id
required
integer (Alert Id)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "is_active": true,
  • "product_filters": { },
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_notified_at": "2019-08-24T14:15:22Z",
  • "user_id": 0
}

Delete an alert

Delete an alert by ID. The alert will no longer be triggered and will be removed from database.

Authorizations:
HTTPBearer
path Parameters
alert_id
required
integer (Alert Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}