From 0643d8173a180d07949567a6349afaf2ca1225b8 Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 21 Apr 2025 01:26:42 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20API=20=D0=B4=D0=BB=D1=8F=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B8=D1=81=D0=BA=D0=B0=20=D0=B0=D0=B2=D1=82=D0=BE=D0=BC?= =?UTF-8?q?=D0=BE=D0=B1=D0=B8=D0=BB=D1=8F=20=D0=BF=D0=BE=20VIN=20-=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=20=D0=BC=D0=B0=D1=80?= =?UTF-8?q?=D1=88=D1=80=D1=83=D1=82=20=D0=BD=D0=B0=20/v2/search,=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D1=8B=D0=B5=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D1=80=D1=8B=20=D0=B8=20=D1=83=D0=BB=D1=83=D1=87=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82=D0=BE=D0=B2=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20=D0=B8=D0=BD=D1=84?= =?UTF-8?q?=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8=D0=B2=D0=BD=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=B2=D0=B7=D0=B0=D0=B8=D0=BC=D0=BE=D0=B4=D0=B5=D0=B9?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B8=D1=8F=20=D1=81=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D0=B5=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/swagger.yaml | 134 +++++++++++++++++++++++------------------------ 1 file changed, 65 insertions(+), 69 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 74b7c49..f138e0f 100644 --- a/api/swagger.yaml +++ b/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 \ No newline at end of file + description: Error description \ No newline at end of file