From f3b9c34656300202fcf2e73778a4fbb58f830f0f Mon Sep 17 00:00:00 2001 From: Minojhini Valaiyapathi Date: Wed, 10 Jun 2026 14:34:27 -0400 Subject: [PATCH 1/2] 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, From 653045bcd52a87f306f1fa6f224054f76b99a8ae Mon Sep 17 00:00:00 2001 From: Minojhini Valaiyapathi Date: Thu, 11 Jun 2026 13:44:59 -0400 Subject: [PATCH 2/2] CASH-2856 - Pointed to v3 of Parts Service for parts-or-question endpoint for SL vehicles --- src/constants/endpoints.js | 4 ++-- src/store/index.js | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index d6b3e3431..76077db76 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -56,8 +56,8 @@ const endpoints = { url: "/parts/api/v1/parts/parts-or-questions", method: "POST", }, - GetPartsOrQuestionsV2: { - url: "/parts/api/v2/parts/parts-or-questions", + GetPartsOrQuestionsV3: { + url: "/parts/api/v3/parts/parts-or-questions", method: "POST", }, GetParts: { diff --git a/src/store/index.js b/src/store/index.js index 5e69005e9..503c2baef 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1971,7 +1971,7 @@ export const actions = { const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray); const partsOrQuestionsEndpoint = vehicle.vinRequired - ? endpoints.GetPartsOrQuestionsV2 + ? endpoints.GetPartsOrQuestionsV3 : endpoints.GetPartsOrQuestions; const response = await globalMethods @@ -2020,6 +2020,7 @@ export const actions = { const vehicle = context.getters.vehicle; const damage = context.getters.damage; const order = context.state.order; + const payment = context.getters.payment; const carId = vehicle.carId; const glassArray = damage.glassToReplace; @@ -2028,6 +2029,7 @@ export const actions = { const vin = vehicle.vin; const serviceType = order.serviceLocation?.appointmentType; const referralSeqNumber = order.referralSequenceNumber; + const parentAccountNumber = payment.parentAccountNumber; // create a new array to avoid mutating state const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray); @@ -2044,6 +2046,7 @@ export const actions = { vin: vin, serviceType: serviceType, referralSeqNumber: referralSeqNumber, + parentAccountNumber: parentAccountNumber, }, logApiCall: true, pageNameToLog: pageNameToLog,