feat: обновление API для поиска автомобиля по VIN - изменен маршрут на /v2/search, добавлены новые параметры и улучшены описания ответов для более информативного взаимодействия с пользователем
This commit is contained in:
parent
db80e6088b
commit
0643d8173a
134
api/swagger.yaml
134
api/swagger.yaml
@ -77,10 +77,10 @@ paths:
|
||||
type: string
|
||||
description: Error description
|
||||
|
||||
/decode:
|
||||
/v2/search:
|
||||
post:
|
||||
summary: Decode VIN
|
||||
description: Decode VIN number to get vehicle information
|
||||
summary: Search vehicle by VIN (v2)
|
||||
description: Search for vehicle information with full history records
|
||||
parameters:
|
||||
- name: access_code
|
||||
in: query
|
||||
@ -101,83 +101,79 @@ paths:
|
||||
example: "1HGCM82633A123456"
|
||||
responses:
|
||||
'200':
|
||||
description: Successful decoding
|
||||
description: Successful search
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
make:
|
||||
type: string
|
||||
description: Vehicle make
|
||||
model:
|
||||
type: string
|
||||
description: Vehicle model
|
||||
year:
|
||||
type: integer
|
||||
description: Manufacturing year
|
||||
'400':
|
||||
description: Invalid VIN or access code
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error description
|
||||
|
||||
/detail/{vin}:
|
||||
get:
|
||||
summary: Get detailed information
|
||||
description: Get detailed information about a vehicle by VIN
|
||||
parameters:
|
||||
- name: vin
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Vehicle Identification Number
|
||||
- name: access_code
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: API access code for authentication
|
||||
responses:
|
||||
'200':
|
||||
description: Successful information retrieval
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
vin:
|
||||
type: string
|
||||
description: VIN number
|
||||
make:
|
||||
type: string
|
||||
description: Vehicle make
|
||||
model:
|
||||
type: string
|
||||
description: Vehicle model
|
||||
year:
|
||||
type: integer
|
||||
description: Manufacturing year
|
||||
history:
|
||||
found:
|
||||
type: boolean
|
||||
description: Whether the vehicle was found
|
||||
details:
|
||||
type: object
|
||||
description: Vehicle details
|
||||
properties:
|
||||
make:
|
||||
type: string
|
||||
description: Vehicle manufacturer
|
||||
model:
|
||||
type: string
|
||||
description: Vehicle model
|
||||
year:
|
||||
type: integer
|
||||
description: Manufacturing year
|
||||
body:
|
||||
type: string
|
||||
description: Vehicle body type
|
||||
engine:
|
||||
type: string
|
||||
description: Engine model
|
||||
cylinders:
|
||||
type: string
|
||||
description: Number of engine cylinders
|
||||
drive:
|
||||
type: string
|
||||
description: Drive type (FWD/RWD/AWD)
|
||||
records:
|
||||
type: array
|
||||
description: Vehicle history records
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
date:
|
||||
odometer:
|
||||
type: integer
|
||||
description: Odometer reading in miles
|
||||
odometer_status:
|
||||
type: string
|
||||
description: Odometer status (ACTUAL, EXEMPT, NOT ACTUAL)
|
||||
title:
|
||||
type: string
|
||||
description: Title status (CLEAR, SALVAGE, REBUILT)
|
||||
damage1:
|
||||
type: string
|
||||
description: Primary damage type
|
||||
damage2:
|
||||
type: string
|
||||
description: Secondary damage type
|
||||
add_to_db:
|
||||
type: string
|
||||
format: date
|
||||
description: Event date
|
||||
event:
|
||||
description: Date added to database
|
||||
RD_Status:
|
||||
type: string
|
||||
description: Event description
|
||||
'404':
|
||||
description: Vehicle not found
|
||||
description: Vehicle status
|
||||
Sale_Location:
|
||||
type: string
|
||||
description: Sale location
|
||||
Repear_Cost:
|
||||
type: number
|
||||
description: Repair cost in USD
|
||||
Photo_Count:
|
||||
type: integer
|
||||
description: Number of available photos
|
||||
'400':
|
||||
description: Invalid VIN or access code
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@ -275,4 +271,4 @@ paths:
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error description
|
||||
description: Error description
|
||||
Loading…
x
Reference in New Issue
Block a user