From f3b9c34656300202fcf2e73778a4fbb58f830f0f Mon Sep 17 00:00:00 2001 From: Minojhini Valaiyapathi Date: Wed, 10 Jun 2026 14:34:27 -0400 Subject: [PATCH] CASH-2856 - if VinRequired use Parts Api v2 endpoint for Parts-Or-Questions --- src/constants/endpoints.js | 4 ++++ src/store/index.js | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index efb32ffc6..d6b3e3431 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -56,6 +56,10 @@ const endpoints = { url: "/parts/api/v1/parts/parts-or-questions", method: "POST", }, + GetPartsOrQuestionsV2: { + url: "/parts/api/v2/parts/parts-or-questions", + method: "POST", + }, GetParts: { url: "/parts/api/v1/parts/parts", method: "POST", diff --git a/src/store/index.js b/src/store/index.js index 3f2cf5e0d..5e69005e9 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1970,10 +1970,14 @@ export const actions = { // create a new array to avoid mutating state const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray); + const partsOrQuestionsEndpoint = vehicle.vinRequired + ? endpoints.GetPartsOrQuestionsV2 + : endpoints.GetPartsOrQuestions; + const response = await globalMethods .callHttpClient({ - method: endpoints.GetPartsOrQuestions.method, - endpoint: endpoints.GetPartsOrQuestions.url, + method: partsOrQuestionsEndpoint.method, + endpoint: partsOrQuestionsEndpoint.url, payload: { carId: carId, glassPieces: glassArrayForPayload,