price-assistant-service (v1)

Download OpenAPI specification:Download

price-assistant-service

Authentication

OAuth2

Security Scheme Type OAuth2
authorizationCode OAuth Flow
Authorization URL: https://demo.traffic.online/oauth2/authorize
Token URL: https://demo.traffic.online/oauth2/token
Scopes:
  • tools.edit -

    Редактирование шаблонов

  • tools.get -

    Запрос цены + Получение шаблонов

pricing-calculator

Получить метрики по прайсам

post /pricing/calculator
http://localhost:8080/api/v1/pricing/calculator
Authorizations:
OAuth2 (tools.get)
Request Body schema: application/json
Array
date
string <date>
period
string <period>
from_level
any (Level)
Enum: "CITY" "REGION" "FEDERAL_DISTRICT" "COUNTRY"
from_id
string
from_radius
integer Nullable
to_level
any (Level)
Enum: "CITY" "REGION" "FEDERAL_DISTRICT" "COUNTRY"
to_id
string
to_radius
integer Nullable
tonnage
number <float>
volume
number <float>
transport_body_type
string (TransportBodyType)
Enum: "awning" "isothermal" "refrigerator"

Responses

200

Ok

400

Неверные параметры запроса

401

Невалидный токен, неверный логин или пароль

403

Нет прав на выполнение действия

Request samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

Content type
Copy
Expand all Collapse all
[
  • {
    }
]

Получить доступные варианты фильтрации

get /pricing/trends/filters
http://localhost:8080/api/v1/pricing/trends/filters
query Parameters
transport
string
body
string
scope
string
loading_city
string
unloading_city
string
loading_district
string
unloading_district
string

Responses

200

Ok

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Получить тренд по фильтрам

get /pricing/trends
http://localhost:8080/api/v1/pricing/trends
query Parameters
transport
string
body
string
scope
string
loading_city
string
unloading_city
string
loading_district
string
unloading_district
string
start
string <date>
end
string <date>

Responses

200

Ok

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

pricing-calculator-templates

Список шаблонов

get /pricing/calculator/templates
http://localhost:8080/api/v1/pricing/calculator/templates
Authorizations:
OAuth2 (tools.get)

Responses

200

Ok

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Создать шаблон

post /pricing/calculator/templates
http://localhost:8080/api/v1/pricing/calculator/templates
Authorizations:
OAuth2 (tools.edit)
Request Body schema: application/json
name
string
routes
Array of objects (RouteTemplate)

Responses

200

Ok

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "routes":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "name": "string",
  • "routes":
    [
    ]
}

Удалить шаблон

delete /pricing/calculator/templates/{id}
http://localhost:8080/api/v1/pricing/calculator/templates/{id}
Authorizations:
OAuth2 (tools.edit)
path Parameters
id
required
string <uuid>

Responses

204

Ok

legacy

Легаси. Не пользоваться. Отключаем 2024-01-01

post /market_prices
http://localhost:8080/api/v1/market_prices
Authorizations:
OAuth2 (tools.get)
Request Body schema: application/json
from
string <date>
till
string <date>
tonnage
number <float>
volume
number <float>
transport_body_type
string (TransportBodyType)
Enum: "awning" "isothermal" "refrigerator"
routes
Array of objects (LegacyRoute)

Responses

200

Ok

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "from": "2024-12-19",
  • "till": "2024-12-19",
  • "tonnage": 0,
  • "volume": 0,
  • "transport_body_type": "awning",
  • "routes":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "from": "2024-12-19",
  • "till": "2024-12-19",
  • "tonnage": 0,
  • "volume": 0,
  • "transport_body_type": "awning",
  • "routes":
    [
    ]
}

Легаси. Не пользоваться. Отключаем 2024-01-01

get /market_prices/{id}
http://localhost:8080/api/v1/market_prices/{id}
Authorizations:
OAuth2 (tools.get)
path Parameters
id
required
string <uuid>

Responses

200

Ok

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "from": "2024-12-19",
  • "till": "2024-12-19",
  • "tonnage": 0,
  • "volume": 0,
  • "transport_body_type": "awning",
  • "routes":
    [
    ]
}

Легаси. Не пользоваться. Отключаем 2024-01-01

get /market_prices/{id}/download_url
http://localhost:8080/api/v1/market_prices/{id}/download_url
Authorizations:
OAuth2 (tools.get)
path Parameters
id
required
string <uuid>

Responses

200

Ok

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "link": "string"
}

Легаси. Не пользоваться. Отключаем 2024-01-01

get /market_prices/downloads/{id}
http://localhost:8080/api/v1/market_prices/downloads/{id}
Authorizations:
OAuth2 (tools.get)
path Parameters
id
required
string <uuid>

Responses

200

Ok

Легаси. Не пользоваться. Отключаем 2024-01-01

post /market_prices/route_templates
http://localhost:8080/api/v1/market_prices/route_templates
Authorizations:
OAuth2 (tools.edit)
Request Body schema: application/json
name
string
routes
Array of objects (LegacyRoute)

Responses

200

Ok

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "routes":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "name": "string",
  • "created_at": "2024-12-19T10:13:31Z",
  • "routes":
    [
    ]
}

Легаси. Не пользоваться. Отключаем 2024-01-01

get /market_prices/route_templates
http://localhost:8080/api/v1/market_prices/route_templates
Authorizations:
OAuth2 (tools.get)

Responses

200

Ok

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Легаси. Не пользоваться. Отключаем 2024-01-01

delete /market_prices/route_templates/{id}
http://localhost:8080/api/v1/market_prices/route_templates/{id}
Authorizations:
OAuth2 (tools.edit)
path Parameters
id
required
string <uuid>

Responses

204

Ok