Overview

This guide covers migrating from Partner API V1 to V2 for VIN-based plan search. V2 provides enhanced response data, better error handling, and additional filtering options.


1. Endpoint Change

Version Endpoint
V1 POST /Partners/PlansSearch/Vin
V2 POST /api/v2/Partners/PlansSearch/Vin

No authentication changes required - your existing JWT token works with V2.


2. Request Format Changes

V1 Request (Flat Structure)

{
  "vin": "WDCTG4EB3LU024973",
  "stateShortName": "SC",
  "mileage": 25000,
  "partnerId": 3
}

V2 Request (Nested Structure)

{
  "searchCriteria": {
    "vin": "WDCTG4EB3LU024973",
    "stateShortName": "SC",
    "mileage": 25000
  },
  "partner": "[yourPartnerString]"
}

Key Changes

V1 Field V2 Location Notes
vin searchCriteria.vin Moved to nested object
stateShortName searchCriteria.stateShortName Moved to nested object
mileage searchCriteria.mileage Moved to nested object
zip searchCriteria.zip Moved to nested object
partnerId partner Required field. Renamed. Set to "[youPartnerString]" instead of [yourPartnerId]

3. New V2 Filters (Optional)

V2 adds these optional filters:

{
  "filters": {
    "providers": ["NAAC", "Omega"],
    "excludeProviders": ["CarGuard"],
    "numberOfProviders": 3,
    "coverageType": "best",
    "coverageTypes": ["basicplus", "best"],
    "planChaizRating": { "from": 7.0, "to": 10.0 }, 
    "categoryTypes": ["Engine", "Transmission"],
    "returnResults": 10,
    "duration": { "from": 24, "to": 72 },
    "miles": { "from": 50, "to": 200 },
    "monthlyPrice": { "from": 50, "to": 200 }
  }
}

4. Response Changes