### Image Specification Example Source: https://docs.onliner.by/vm/openapi This snippet shows an example of image specifications, specifically the '80x80' size, including its type and an example URL. It demonstrates how image dimensions and their corresponding URLs are represented. ```json { "80x80": { "type": "string", "example": "https:\/\/imgproxy.onliner.by\/TzsA7QK__kgJeLYry_o6HSgB-RhR7wbpEQQSfZZ1Gpw\/rs:fill:80:80\/dpr:2\/cb:v2\/aHR0cHM6Ly9jb250\/ZW50Lm9ubGluZXIu\/YnkvYXV0b21hcmtl\/dC8xNDQzODAyL29y\/aWdpbmFsL2YyMWU1\/ZWMyMDJmODUyZTA1\/ZTU2ODc0MTY1NjM1\/ZDkzLmpwZWc" } } ``` -------------------------------- ### GET /adverts/{id} Source: https://docs.onliner.by/vm/openapi Retrieves the details of a specific advert by its ID. ```APIDOC ## GET /adverts/{id} ### Description Retrieves the details of a specific advert by its ID. ### Method GET ### Endpoint /adverts/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the advert to retrieve. #### Query Parameters - **content_type** (string) - Optional - Specifies the content type for the request. ### Response #### Success Response (200) - **advert** (object) - The advertisement object. - **id** (integer) - The unique identifier for the advertisement. - **title** (string) - The title of the advertisement. - **description** (string) - The detailed description of the advertisement. - **price** (number) - The price of the advertised item. - **images** (array) - A list of URLs for images associated with the advertisement. - **items** (string) - format: url - **author** (object) - Information about the author of the advertisement. - **id** (integer) - The author's ID. - **name** (string) - The author's name. - **online_status** (object) - The online status of the author. #### Response Example ```json { "id": 123, "title": "Amazing Product", "description": "This is a great product with many features.", "price": 100.50, "images": [ "https://example.com/image1.jpg", "https://example.com/image2.png" ], "author": { "id": 2, "name": "Вася", "online_status": { "is_online": true, "last_online": "2023-10-27T10:00:00Z" } } } ``` ``` -------------------------------- ### GET /models/{id} Source: https://docs.onliner.by/vm/openapi Retrieves detailed information about a specific car model, including its generations. Requires a model ID as a path parameter. ```APIDOC ## GET /models/{id} ### Description Retrieves detailed information about a specific car model, including its generations. Requires a model ID as a path parameter. ### Method GET ### Endpoint /models/{id} #### Path Parameters - **id** (integer) - Required - ID модели ### Response #### Success Response (200) - **generations** (array) - Array of generation objects for the model. #### Response Example { "example": "[{\"id\": 123, \"name\": \"Example Generation\", \"model_id\": 456, ... }]" } ``` -------------------------------- ### GET /users/{id}/adverts Source: https://docs.onliner.by/vm/openapi Retrieves a list of advertisements for a specific user. Supports filtering by status, sorting, and pagination. ```APIDOC ## GET /users/{id}/adverts ### Description Retrieves a list of advertisements for a specific user. Supports filtering by status, sorting, and pagination. ### Method GET ### Endpoint /users/{id}/adverts ### Parameters #### Path Parameters - **id** (integer) - Required - ID пользователя #### Query Parameters - **status** (string) - Optional - Filter by advertisement status (enum: "active", "closed") - **order** (string) - Optional - Sorting order (e.g., "last_up_at:desc", "created_at:asc") - **limit** (integer) - Optional - Pagination limit (min: 1, max: 30) - **page** (integer) - Optional - Pagination page number (min: 1) ### Request Body None ### Response #### Success Response (200) - **adverts** (array) - List of user advertisements #### Response Example ```json { "example": "array of advert objects" } ``` ``` -------------------------------- ### GET /regions/{id} Source: https://docs.onliner.by/vm/openapi Retrieves detailed information about a specific region, including a list of its associated cities. Use this endpoint to get in-depth data for a particular region. ```APIDOC ## GET /regions/{id} ### Description Retrieves detailed information about a specific region, including a list of its associated cities. Use this endpoint to get in-depth data for a particular region. ### Method GET ### Endpoint /regions/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the region. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **region** (object) - An object containing region details and a list of cities. #### Response Example ```json { "id": 1, "name": "Minsk Region", "url": "/region/minsk", "cities": [ { "id": 101, "name": "Minsk", "url": "/city/minsk" } ] } ``` ``` -------------------------------- ### GET /manufacturers/{id} Source: https://docs.onliner.by/vm/openapi Retrieves detailed information about a specific car manufacturer, including a list of its car models. Use this to display manufacturer-specific details and their product lineup. ```APIDOC ## GET /manufacturers/{id} ### Description Retrieves detailed information about a specific car manufacturer, including a list of its car models. Use this to display manufacturer-specific details and their product lineup. ### Method GET ### Endpoint /manufacturers/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the manufacturer. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **manufacturer** (object) - An object containing manufacturer details and a list of models. #### Response Example ```json { "id": 1, "name": "BMW", "url": "/manufacturer/bmw", "models": [ { "id": 1001, "name": "X5", "url": "/model/bmw/x5" } ] } ``` ``` -------------------------------- ### GET /countries Source: https://docs.onliner.by/vm/openapi Retrieves a list of all available countries. This endpoint is part of the 'Countries, regions, cities' tag. ```APIDOC ## GET /countries ### Description This endpoint provides a list of available countries. ### Method GET ### Endpoint /countries ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Array of countries**: A JSON array where each element is a country object. #### Response Example ```json [ { "id": 1, "name": "Belarus" } ] ``` ``` -------------------------------- ### GET /websites/onliner_by/ads Source: https://docs.onliner.by/vm/openapi Retrieves a list of advertisements with pagination details. This endpoint allows fetching ad listings based on various criteria and includes information about the total number of ads, current page, and pagination limits. ```APIDOC ## GET /websites/onliner_by/ads ### Description Retrieves a list of advertisements with pagination details. This endpoint allows fetching ad listings based on various criteria and includes information about the total number of ads, current page, and pagination limits. ### Method GET ### Endpoint /websites/onliner_by/ads ### Parameters #### Query Parameters - **page** (integer) - Optional - The current page number for pagination. - **limit** (integer) - Optional - The maximum number of items to return per page. ### Request Example ```json { "example": "GET /websites/onliner_by/ads?page=1&limit=10" } ``` ### Response #### Success Response (200) - **user** (object) - Information about the author of the ads. - **adverts** (array) - A list of advertisement objects. - **total** (integer) - The total number of advertisements found. - **page** (object) - Pagination details including limit, items, current page, and last page. #### Response Example ```json { "user": { "id": 123, "name": "Example User", "avatar": "http://example.com/avatar.jpg" }, "adverts": [ { "id": 1, "title": "Apartment for rent", "price": "1000 USD", "location": "Minsk" } ], "total": 50, "page": { "limit": 10, "items": 10, "current": 1, "last": 5 } } ``` #### Error Response (404) - **description**: Response if the user is not found. ``` -------------------------------- ### GET /manufacturers/{manufacturers}/models/{id} Source: https://docs.onliner.by/vm/openapi Retrieves information about a specific car model within a given manufacturer. This endpoint is useful for displaying detailed specifications of a particular car model. ```APIDOC ## GET /manufacturers/{manufacturers}/models/{id} ### Description Retrieves information about a specific car model within a given manufacturer. This endpoint is useful for displaying detailed specifications of a particular car model. ### Method GET ### Endpoint /manufacturers/{manufacturers}/models/{id} ### Parameters #### Path Parameters - **manufacturers** (integer) - Required - The unique identifier of the manufacturer. - **id** (integer) - Required - The unique identifier of the model. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **model** (object) - An object containing model details. #### Response Example ```json { "id": 1001, "name": "X5", "url": "/model/bmw/x5" } ``` ``` -------------------------------- ### GET /manufacturers Source: https://docs.onliner.by/vm/openapi Fetches a list of all available car manufacturers. This endpoint is ideal for populating dropdowns or lists of brands. ```APIDOC ## GET /manufacturers ### Description Fetches a list of all available car manufacturers. This endpoint is ideal for populating dropdowns or lists of brands. ### Method GET ### Endpoint /manufacturers ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **manufacturers** (array) - A list of manufacturer objects. #### Response Example ```json [ { "id": 1, "name": "BMW", "url": "/manufacturer/bmw" } ] ``` ``` -------------------------------- ### GET /regions Source: https://docs.onliner.by/vm/openapi Retrieves a list of all regions available on the platform. This endpoint is useful for displaying a comprehensive list of geographical areas. ```APIDOC ## GET /regions ### Description Retrieves a list of all regions. This endpoint is useful for displaying a comprehensive list of geographical areas. ### Method GET ### Endpoint /regions ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **regions** (array) - A list of region objects. #### Response Example ```json [ { "id": 1, "name": "Minsk Region", "url": "/region/minsk" } ] ``` ``` -------------------------------- ### GET /countries/{id} Source: https://docs.onliner.by/vm/openapi Retrieves detailed information about a specific country, including its regions. This endpoint is part of the 'Countries, regions, cities' tag. ```APIDOC ## GET /countries/{id} ### Description This endpoint provides information about a specific country, including its regions. ### Method GET ### Endpoint /countries/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the country. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Array containing country and region data**: A JSON array where the first element contains country information and nested regions. #### Response Example ```json [ { "id": 1, "name": "Belarus", "regions": [ { "id": 1, "name": "Minsk Region" } ] } ] ``` ``` -------------------------------- ### GET /countries/{country}/regions/{id} Source: https://docs.onliner.by/vm/openapi Retrieves information about a specific region within a specific country. This endpoint is part of the 'Countries, regions, cities' tag. ```APIDOC ## GET /countries/{country}/regions/{id} ### Description This endpoint provides information about a specific region within a specific country. ### Method GET ### Endpoint /countries/{country}/regions/{id} ### Parameters #### Path Parameters - **country** (integer) - Required - The ID of the country. - **id** (integer) - Required - The ID of the region. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Region data**: A JSON object containing information about the specified region. #### Response Example ```json { "id": 1, "name": "Minsk Region" } ``` ``` -------------------------------- ### Vehicle Specifications Schema Source: https://docs.onliner.by/vm/openapi This JSON snippet defines the structure for vehicle specifications. It includes properties like modification, body type, year, state, VIN, odometer, and color, along with their types, constraints, and examples. It's crucial for validating and describing vehicle attributes. ```json { "specs": { "description": "Характеристики автомобиля", "type": "object", "properties": { "modification": { "description": "Модификация", "type": "string", "minLength": 0, "maxLength": 30, "example": "S-Line" }, "body_type": { "description": "Тип кузова", "type": "string", "example": "sedan", "x-dictionary": "body_type", "enum": [ "sedan", "suv", "universal", "hatchback", "liftback", "minivan", "minibus", "coupe", "van", "pickup", "cabriolet", "limousine" ] }, "year": { "description": "Год выпуска", "type": "integer", "format": "int32", "minimum": 1890, "maximum": 2020, "example": 2009 }, "state": { "description": "Состояние", "type": "string", "example": "owned", "x-dictionary": "state", "enum": [ "new", "owned", "emergency" ] }, "vin": { "description": "Обязательный параметр для автомобиля, состояние у которого \"новый\"", "type": "string", "minLength": 17, "maxLength": 17, "example": "WVWRL61J84W139451" }, "odometer": { "description": "Пробег автомобиля.", "type": "object", "required": [ "value", "unit" ], "properties": { "value": { "description": "Величина пробега. Для автомобиля, состояние у которого \"новый\", следует передавать 0", "type": "integer", "format": "int32", "minimum": 1, "maximum": 1000000, "example": 150000 }, "unit": { "description": "Единицы измерения", "type": "string", "enum": [ "km", "miles" ], "example": "km" } } }, "color": { "description": "Цвет", "type": "string", "example": "black", "x-dictionary": "color", "enum": [ "black", "white", "silver", "grey", "red", "orange", "yellow", "green", "skyblue", "blue", "violet", "brown", "beige", "maroon", "golden", "other" ] }, "engine": { "description": "Параметры двигателя", "type": "object", "properties": { ``` -------------------------------- ### POST /adverts Source: https://docs.onliner.by/vm/openapi Creates a new advert on the onliner.by platform. The response includes a 'Location' header with the URL of the newly created advert. ```APIDOC ## POST /adverts ### Description Creates a new advert on the onliner.by platform. The response includes a 'Location' header with the URL of the newly created advert. ### Method POST ### Endpoint /adverts ### Parameters #### Query Parameters - **content_type** (string) - Optional - Specifies the content type for the request. #### Request Body - **advert** (object) - Required - The advertisement object to be created. - **title** (string) - Required - The title of the advertisement. - **description** (string) - Required - The detailed description of the advertisement. - **price** (number) - Required - The price of the advertised item. - **images** (array) - Optional - A list of URLs for images associated with the advertisement. - **items** (string) - format: url ### Request Example ```json { "advert": { "title": "Amazing Product", "description": "This is a great product with many features.", "price": 100.50, "images": [ "https://example.com/image1.jpg", "https://example.com/image2.png" ] } } ``` ### Response #### Success Response (200) - **advert** (object) - The created advertisement object. - **id** (integer) - The unique identifier for the advertisement. - **title** (string) - The title of the advertisement. - **description** (string) - The detailed description of the advertisement. - **price** (number) - The price of the advertised item. - **images** (array) - A list of URLs for images associated with the advertisement. - **items** (string) - format: url - **author** (object) - Information about the author of the advertisement. - **id** (integer) - The author's ID. - **name** (string) - The author's name. - **online_status** (object) - The online status of the author. #### Response Example ```json { "advert": { "id": 123, "title": "Amazing Product", "description": "This is a great product with many features.", "price": 100.50, "images": [ "https://example.com/image1.jpg", "https://example.com/image2.png" ] }, "author": { "id": 2, "name": "Вася", "online_status": { "is_online": true, "last_online": "2023-10-27T10:00:00Z" } } } ``` #### Headers - **Location** (string) - The URL of the newly created advert (e.g., "https://ab.api.onliner.by/adverts/1"). #### Error Responses - **401** - Authentication error. - **422** - Validation error. ``` -------------------------------- ### PUT /adverts/{id}/open Source: https://docs.onliner.by/vm/openapi Opens an advertisement. Only the author or a moderator can open an advertisement. Advertisements closed by a moderator cannot be reopened. ```APIDOC ## PUT /adverts/{id}/open ### Description Opens an advertisement. Only the author or a moderator can open an advertisement. Advertisements closed by a moderator cannot be reopened. ### Method PUT ### Endpoint /adverts/{id}/open ### Parameters #### Path Parameters - **id** (integer) - Required - ID объявления ### Request Body None ### Response #### Success Response (200) - **advert** (object) - Response upon successful opening of the advertisement #### Response Example ```json { "example": "advert object" } ``` #### Error Responses - **401**: Authentication error - **403**: Authorization error (e.g., trying to open another user's ad, an already open ad, or an ad closed by a moderator) - **message** (string) - Error message ```json { "message": "Access denied" } ``` - **404**: Not found ``` -------------------------------- ### POST /adverts Source: https://docs.onliner.by/vm/openapi Creates a new advertisement. Only registered and SMS-validated users can create ads. Requires various details including manufacturer, model, city, specs, equipment, price, seller info, and images. ```APIDOC ## POST /adverts ### Description Creates a new advertisement. Only registered and SMS-validated users can create ads. Requires various details including manufacturer, model, city, specs, equipment, price, seller info, and images. ### Method POST ### Endpoint /adverts #### Query Parameters - **content_type** (string) - Required - Specifies the content type of the request, typically 'application/json'. #### Request Body - **manufacturer_id** (integer) - Required - ID марки - **model_id** (integer) - Required - ID модели - **generation_id** (integer) - Required - ID поколения - **city_id** (integer) - Required - ID города - **specs** (object) - Required - Specifications of the advertisement. - **equipment** (object) - Required - Equipment details of the advertisement. - **price** (number) - Required - Price of the item. - **seller** (object) - Required - Seller information. - **images** (array) - Required - Array of image objects for the advertisement. ### Request Example { "example": "{\"manufacturer_id\": 1, \"model_id\": 2, \"generation_id\": 3, \"city_id\": 4, \"specs\": {}, \"equipment\": {}, \"price\": 10000, \"seller\": {}, \"images\": []}" } ### Response #### Success Response (200) - The response for a successful creation is not detailed in the provided schema, but typically would include the created advert's ID or a confirmation message. #### Response Example { "example": "{\"id\": \"new_advert_id\", \"message\": \"Advert created successfully\"}" } ``` -------------------------------- ### Advert Schema and Authentication Source: https://docs.onliner.by/vm/openapi Details the schema for advert properties and outlines the response for authentication errors. ```APIDOC ## Advert Schema and Authentication Error ### Description This section describes the schema for advert-related data, including images, statistics, and timestamps. It also details the response format for authentication errors, which occur when an access token is missing or invalid. ### Parameters #### Header Parameters - **Content-Type** (string) - Required - Specifies the content type of the request, typically 'application/json'. ### Responses #### Error Response (Authentication) - **message** (string) - Description of the authentication error. #### Response Example (Authentication Error) ```json { "message": "Error message describing the authentication issue" } ``` ### Schema Details (Advert Properties) - **items** - Array of images, with a minimum of 1 and a maximum of 50. - **$ref**: "#/components/schemas/image" - **stats** (object) - ReadOnly - Statistics related to the advert. - **views** (object) - Statistics on views. - **today** (integer) - Views today. - **total** (integer) - Total views. - **bookmarks** (object) - Statistics on bookmarks. - **total** (integer) - Total bookmarks. - **in_bookmarks** (boolean) - ReadOnly - Indicates if the advert is in bookmarks. - **up_counter** (integer) - ReadOnly - Number of UP votes. Example: 1. - **up_available_in** (integer) - ReadOnly - Time until the next UP vote is available in seconds. Example: 72000. - **created_at** (string) - ReadOnly - Timestamp of creation. Example: 1362484967. - **update_at** (string) - ReadOnly - Timestamp of last update. Example: 1362484967. - **last_up_at** (string) - ReadOnly - Timestamp of the last UP vote. Example: 1362484967. - **closed_at** (string) - Nullable, ReadOnly - Timestamp when the advert was closed. - **url** (string) - ReadOnly - Direct URL to the advert. Example: "https:\/\/ab.api.onliner.by\/adverts\/1". - **html_url** (string) - ReadOnly - HTML URL to the advert. Example: "https:\/\/ab.onliner.by\/car\/1". ``` -------------------------------- ### Bad Credentials Response Source: https://docs.onliner.by/vm/openapi Details the response structure for authentication failures due to invalid credentials. ```APIDOC ## Bad Credentials Response ### Description This response is returned when the provided authentication credentials (e.g., JWT token) are invalid or incorrect. ### Method N/A (This describes a response structure, not a specific request method) ### Endpoint N/A (This describes a response structure, not a specific endpoint) ### Parameters N/A ### Request Example N/A ### Response #### Success Response (e.g., 401 Unauthorized) - **message** (string) - A message indicating that the credentials provided are invalid. #### Response Example ```json { "message": "Bad Credentials" } ``` ``` -------------------------------- ### Define Deal Terms Object Schema Source: https://docs.onliner.by/vm/openapi Defines the structure for deal terms, including boolean flags for customs clearance, exchange possibility, and VAT inclusion. Default values are provided. ```json { "deal_terms": { "description": "Условия продажи", "type": "object", "properties": { "customs_clearance": { "description": "Растаможен или нет", "type": "boolean", "default": false }, "exchange": { "description": "Возможен ли обмен", "type": "boolean", "default": false }, "include_vat": { "description": "Цена с НДС", "type": "boolean", "default": false } } } } ``` -------------------------------- ### Open Advert Source: https://docs.onliner.by/vm/openapi Reopens a closed advert, making it active again. This action is available to the advert's author or a moderator. ```APIDOC ## PUT /adverts/{id}/open ### Description Reopens a closed advert, making it active again. This action can be performed by the advert's author or a moderator. ### Method PUT ### Endpoint /adverts/{id}/open ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the advert to open. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **advert** (object) - The advert object that has been reopened. #### Response Example ```json { "advert": { "id": 123, "title": "Reopened Advert", "status": "open" } } ``` #### Error Responses - **401**: Authentication failed. - **403**: Authorization failed (e.g., user trying to reopen an advert they don't own, or an already open advert). - **404**: Advert not found. ``` -------------------------------- ### Car Listing Features Source: https://docs.onliner.by/vm/openapi This endpoint provides details on available multimedia and comfort features for car listings. ```APIDOC ## GET /websites/onliner_by/cars/features ### Description Retrieves a list of multimedia and comfort features available for car listings on Onliner.by. This includes various audio-visual systems, connectivity options, and interior comfort settings. ### Method GET ### Endpoint /websites/onliner_by/cars/features ### Parameters None ### Request Example None ### Response #### Success Response (200) - **navigation_system** (boolean) - Indicates if the car has a navigation system. - **carplay** (boolean) - Indicates if the car supports CarPlay. - **yandex_auto** (boolean) - Indicates if the car supports Yandex.Auto. - **android_auto** (boolean) - Indicates if the car supports Android Auto. - **bluetooth** (boolean) - Indicates if the car has Bluetooth connectivity. - **aux** (boolean) - Indicates if the car has an AUX input. - **usb** (boolean) - Indicates if the car has USB ports. - **outlet_12v** (boolean) - Indicates if the car has a 12V power outlet. - **outlet_220v** (boolean) - Indicates if the car has a 220V power outlet. - **multimedia_for_rear_passengers** (boolean) - Indicates if there is a multimedia system for rear passengers. - **power_windows** (string) - Specifies the type of power windows: `front` or `all`. - **wheel_configuration** (string) - Specifies the steering wheel adjustment type: `out` (reach adjustment) or `electro` (electric adjustment). - **suspension** (array of strings) - Lists the types of suspension systems: `springloaded`, `pneumatic`, `hydraulic`, `adaptive`, `active`. - **conditioner** (string) - Indicates the type of air conditioning system. #### Response Example ```json { "navigation_system": true, "carplay": true, "yandex_auto": false, "android_auto": true, "bluetooth": true, "aux": false, "usb": true, "outlet_12v": true, "outlet_220v": false, "multimedia_for_rear_passengers": false, "power_windows": "all", "wheel_configuration": "electro", "suspension": ["adaptive", "springloaded"], "conditioner": "automatic" } ``` ``` -------------------------------- ### Advert Model Schema Source: https://docs.onliner.by/vm/openapi Defines the structure and properties of an advertisement within the onliner.by platform. This includes details like ID, title, city, manufacturer, model, and description. ```APIDOC ## Advert Model Schema ### Description This schema defines the structure of an `advert` object, representing a classified advertisement on the onliner.by platform. It includes information about the advertisement itself, its associated location, manufacturer, model, and generation, along with seller-specific details. ### Properties - **id** (integer) - ReadOnly - The unique identifier for the advertisement. - **title** (string) - ReadOnly - The title of the advertisement, often including the make and model of the item being sold. - **generation_id** (integer) - WriteOnly - The identifier for the specific generation of the product being advertised. - **city_id** (integer) - WriteOnly - The identifier for the city where the advertisement is located. - **manufacturer** (object) - ReadOnly - Details about the manufacturer of the product. - **id** (integer) - The manufacturer's unique identifier. - **name** (string) - The name of the manufacturer. - **slug** (string) - A URL-friendly identifier for the manufacturer. - **model** (object) - ReadOnly - Details about the model of the product. - **id** (integer) - The model's unique identifier. - **name** (string) - The name of the model. - **slug** (string) - A URL-friendly identifier for the model. - **generation** (object) - ReadOnly, Nullable - Details about the specific generation of the product. - **id** (integer) - The generation's unique identifier. - **name** (string) - The name of the generation. - **slug** (string) - A URL-friendly identifier for the generation. - **description** (string) - The detailed description of the advertisement, with a maximum length of 4000 characters. ``` -------------------------------- ### Vehicle Features API Source: https://docs.onliner.by/vm/openapi This section details the available boolean, string, and array fields for describing vehicle features. It includes options for door closers, cruise control (basic and adaptive), auxiliary systems, and child seat mounting. ```APIDOC ## GET /api/vehicles/features ### Description Retrieves a list of available vehicle features and their properties. ### Method GET ### Endpoint /api/vehicles/features ### Parameters None ### Request Example None ### Response #### Success Response (200) - **door_closer** (boolean) - Indicates if the vehicle has door closers. - **cruise_control** (string) - Type of cruise control. Enum: `basic`, `adaptive`. - **auxiliary_system** (array) - List of auxiliary systems. Enum: `abs`, `stabilization_system`, `driver_assistance`, `night_vision_system`, `autopilot`. - **child_seat_mounting_system** (boolean) - Indicates if the vehicle has a child seat mounting system. #### Response Example { "door_closer": true, "cruise_control": "adaptive", "auxiliary_system": [ "abs", "stabilization_system" ], "child_seat_mounting_system": false } ``` -------------------------------- ### Vehicle Features API Source: https://docs.onliner.by/vm/openapi This section details the available features for vehicles, including climate control, parking sensors, cameras, and more. ```APIDOC ## GET /api/v1/vehicle/features ### Description Retrieves a list of available features for vehicles on onliner.by. ### Method GET ### Endpoint /api/v1/vehicle/features ### Parameters #### Query Parameters - **category** (string) - Optional - Filter features by category (e.g., 'comfort', 'sight'). ### Response #### Success Response (200) - **climate_control** (object) - Details about climate control options. - **title** (string) - Title of the feature. - **enum** (array) - List of possible values (e.g., "basic", "climate_control"). - **description** (string) - Description of each enum value. - **parktronic** (object) - Details about parking sensors. - **title** (string) - Title of the feature. - **enum** (array) - List of possible values (e.g., "rear", "front"). - **description** (string) - Description of each enum value. - **camera** (object) - Details about camera options. - **title** (string) - Title of the feature. - **enum** (array) - List of possible values (e.g., "backview", "wholeview"). - **description** (string) - Description of each enum value. - **onboard_computer** (object) - Boolean indicating if onboard computer is available. - **title** (string) - Title of the feature. - **auxiliary_heater** (object) - Boolean indicating if auxiliary heater is available. - **title** (string) - Title of the feature. - **keyless_entry** (object) - Boolean indicating if keyless entry is available. - **title** (string) - Title of the feature. - **digital_dashboard** (object) - Boolean indicating if digital dashboard is available. - **title** (string) - Title of the feature. - **remote_engine_start** (object) - Boolean indicating if remote engine start is available. - **title** (string) - Title of the feature. - **multiwheel** (object) - Boolean indicating if multiwheel is available. - **title** (string) - Title of the feature. - **decklid_electricdrive** (object) - Boolean indicating if electric drive trunk lid is available. - **title** (string) - Title of the feature. - **park_assist** (object) - Boolean indicating if park assist system is available. - **title** (string) - Title of the feature. - **headlamps** (object) - Details about headlamp types. - **title** (string) - Title of the feature. - **enum** (array) - List of possible values (e.g., "halogen", "xenon"). - **description** (string) - Description of each enum value. - **electrical_heating** (object) - Details about electrical heating options. - **title** (string) - Title of the feature. #### Response Example ```json { "climate_control": { "title": "Климат-контроль", "enum": [ "basic", "climate_control", "one_zone_climate_control", "two_zone_climate_control", "multi_zone_climate_control" ], "description": "- `basic` : Кондиционер\n- `climate_control` : Климат-контроль\n- `one_zone_climate_control` : Климат-контроль 1-зонный\n- `two_zone_climate_control` : Климат-контроль 2-зонный\n- `multi_zone_climate_control` : Многозонный климат-контроль" }, "parktronic": { "title": "Парктроник", "enum": [ "rear", "front" ], "description": "- `rear` : Парктроник задний\n- `front` : Парктроник передний" }, "camera": { "title": "Камера", "enum": [ "backview", "wholeview" ], "description": "- `backview` : Камера заднего вида\n- `wholeview` : Камера 360°" }, "onboard_computer": { "title": "Бортовой компьютер", "type": "boolean" }, "auxiliary_heater": { "title": "Автономный отопитель", "type": "boolean" }, "keyless_entry": { "title": "Бесключевой доступ", "type": "boolean" }, "digital_dashboard": { "title": "Цифровая приборная панель", "type": "boolean" }, "remote_engine_start": { "title": "Дистанционный запуск двигателя", "type": "boolean" }, "multiwheel": { "title": "Мультируль", "type": "boolean" }, "decklid_electricdrive": { "title": "Электропривод крышки багажника", "type": "boolean" }, "park_assist": { "title": "Система активной помощи при парковке", "type": "boolean" }, "headlamps": { "title": "Фары", "enum": [ "halogen", "xenon", "led", "matrix", "laser" ], "description": "- `halogen` : Галогенные фары\n- `xenon` : Ксеноновые \/ Биксеноновые фары\n- `led` : Светодиодные фары\n- `matrix` : Матричные фары\n- `laser` : Лазерные фары" }, "electrical_heating": { "title": "Электрообогрев" } } ``` ``` -------------------------------- ### Seller Information API Source: https://docs.onliner.by/vm/openapi Defines the structure for seller information, including type, name, contact phones, preferred call times, and chat preference. Supports individual, autohaus, and dealer types. ```APIDOC ## POST /api/sellers ### Description Submits or updates seller information. This endpoint allows for the registration or modification of seller details. ### Method POST ### Endpoint /api/sellers ### Parameters #### Request Body - **type** (string) - Required - Type of seller. Enum: `individual`, `autohaus`, `dealer`. - **name** (string) - Required - Name of the seller or business. Max length: 50. - **phones** (array) - Optional - List of contact phone numbers. Max items: 5. - **items** (string) - Phone number in a valid format. - **call** (object) - Optional - Preferred time for calls. - **from** (string) - Required - Start of the call interval in "H:iP" format (e.g., "09:00+03:00"). - **to** (string) - Required - End of the call interval in "H:iP" format (e.g., "21:00+03:00"). - **chat_preferred** (boolean) - Optional - Indicates preference for communication via chat. Defaults to false. ### Request Example ```json { "type": "autohaus", "name": "Мегаполис", "phones": [ "+375296576467" ], "call": { "from": "09:00+03:00", "to": "21:00+03:00" }, "chat_preferred": true } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of successful submission. #### Response Example { "message": "Seller information updated successfully." } ``` -------------------------------- ### Define Seller Object Schema (OneOf) Source: https://docs.onliner.by/vm/openapi Defines the seller object, allowing for multiple types of sellers (individual, autohaus, dealer) using a oneOf construct and a discriminator based on the 'type' property. ```json { "seller": { "description": "Продавец", "oneOf": [ { "$ref": "#\/components\/schemas\/individual" }, { "$ref": "#\/components\/schemas\/autohaus" }, { "$ref": "#\/components\/schemas\/dealer" } ], "discriminator": { "propertyName": "type" } } } ```