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,