API Documentation
This document provides detailed information about the API endpoints available in the application.
Authentication
All endpoints require authentication via a Bearer token. The token should be passed in the Authorization
header.
Authorization: Bearer <your_token>
GET /test
This endpoint is used to test the API connection. It does not require any parameters and simply returns a success message.
Response
{
"status": "success",
"message": "All fine!"
}
POST /api/avito/count
This endpoint returns the count of items in the Avito table based on the provided filters. The filters are passed in the request body.
Request Body Parameters
- views (int): Maximum number of views. Default is
999999
.
- active (int): Maximum number of active listings. Default is
999999
.
- ended (int): Maximum number of ended listings. Default is
999999
.
- marks (int): Maximum number of marks. Default is
999999
.
- deliveries_sell (int): Maximum number of deliveries for selling. Default is
999999
.
- deliveries_sold (int): Maximum number of deliveries for sold items. Default is
999999
.
- date (int): Minimum timestamp for the listing date. Default is
current timestamp - 86400
(24 hours ago).
- price_min (int): Minimum price of the listing. Default is
1
.
- price_max (int): Maximum price of the listing. Default is
99999999
.
- category (list): List of categories to filter by. Default is
["mix"]
.
- count_lines (int): Number of lines to return. Default is
10
.
Response
{
"status": "success",
"data": {
"count": 123
}
}
POST /api/avito/get
This endpoint retrieves lines from the Avito table based on the provided filters. The filters are passed in the request body. If the need_base
parameter is set to true
, the retrieved lines will be removed from the database.
Request Body Parameters
- views (int): Maximum number of views. Default is
999999
.
- active (int): Maximum number of active listings. Default is
999999
.
- ended (int): Maximum number of ended listings. Default is
999999
.
- marks (int): Maximum number of marks. Default is
999999
.
- deliveries_sell (int): Maximum number of deliveries for selling. Default is
999999
.
- deliveries_sold (int): Maximum number of deliveries for sold items. Default is
999999
.
- date (int): Minimum timestamp for the listing date. Default is
current timestamp - 86400
(24 hours ago).
- price_min (int): Minimum price of the listing. Default is
1
.
- price_max (int): Maximum price of the listing. Default is
99999999
.
- category (list): List of categories to filter by. Default is
["mix"]
.
- count_lines (int): Number of lines to return. Default is
10
.
- need_base (bool): If
true
, the retrieved lines will be removed from the database. Default is false
.
Response
{
"status": "success",
"data": {
"payload": [
{
"p_id": "123",
"userhash": "abc123"
}
]
}
}
POST /api/youla/count
This endpoint returns the count of items in the Youla table based on the provided filters. The filters are passed in the request body.
Request Body Parameters
- views (int): Maximum number of views. Default is
999999
.
- active (int): Maximum number of active listings. Default is
999999
.
- ended (int): Maximum number of ended listings. Default is
999999
.
- marks (int): Maximum number of marks. Default is
999999
.
- deliveries_sell (int): Maximum number of deliveries for selling. Default is
999999
.
- deliveries_sold (int): Maximum number of deliveries for sold items. Default is
999999
.
- date (int): Minimum timestamp for the listing date. Default is
current timestamp - 86400
(24 hours ago).
- price_min (int): Minimum price of the listing. Default is
1
.
- price_max (int): Maximum price of the listing. Default is
99999999
.
- category (list): List of categories to filter by. Default is
["mix"]
.
- count_lines (int): Number of lines to return. Default is
10
.
Response
{
"status": "success",
"data": {
"count": 123
}
}
POST /api/youla/get
This endpoint retrieves lines from the Youla table based on the provided filters. The filters are passed in the request body. If the need_base
parameter is set to true
, the retrieved lines will be removed from the database.
Request Body Parameters
- views (int): Maximum number of views. Default is
999999
.
- active (int): Maximum number of active listings. Default is
999999
.
- ended (int): Maximum number of ended listings. Default is
999999
.
- marks (int): Maximum number of marks. Default is
999999
.
- deliveries_sell (int): Maximum number of deliveries for selling. Default is
999999
.
- deliveries_sold (int): Maximum number of deliveries for sold items. Default is
999999
.
- date (int): Minimum timestamp for the listing date. Default is
current timestamp - 86400
(24 hours ago).
- price_min (int): Minimum price of the listing. Default is
1
.
- price_max (int): Maximum price of the listing. Default is
99999999
.
- category (list): List of categories to filter by. Default is
["mix"]
.
- count_lines (int): Number of lines to return. Default is
10
.
- need_base (bool): If
true
, the retrieved lines will be removed from the database. Default is false
.
Response
{
"status": "success",
"data": {
"payload": [
{
"p_id": "123",
"userhash": "abc123"
}
]
}
}