### OpenAPI Quote Request Example Source: https://documentation.ivendi.com/docs/OpenApi This example demonstrates a full quote request payload, including HTML options, credentials, dealership enrichment, and detailed quote requests for a vehicle. ```json { "HtmlOptions":{ "IncludeOptions":false, "AsHtml":false, "ImageUrl":"https://sampleimageforthecaronsale.png ", "ReturnUrl":null, "Make":null, "Model":null, "Derivative":null, "Channel":null, "RegDate":null, "DealerId":null, "VehicleMileage":null, "EncryptedVrm":null }, "Credentials":{ "Username":"www.ivendimotors.com", "Mode":0 }, "DealershipEnrichment":{ "IpAddress":"188.29.164.138", "Email":null, "Postcode":"BL40PJ", "SearchMeta":"{\"IsPaymentSearch\":\"True\",\"MinPrice\": \"-1\",\"MaxPrice\":\"-1\" ,\"MinPaymentMonthlyCost\":\"-1\",\"MaxPaymentMonthlyCost\":\"-1\"}", "UserAgent":null, "UserGenerated":true, "TraceRequest":false, "PersistRequestResponse":true }, "QuoteRequests":[ { "ProductRequestUID":null, "IsPlatformProductRequest":false, "QuoteeUID":"268E8202-338H-4B26-A6FE-74BCDAB0A357", "GlobalRequestSettings":null, "GlobalRequestParameters":{ "Rate":0, "RateType":"Default", "Commission":0, "CommissionType":"Default", "ComputationPath":"Default", "Term":54, "TermUnit":"Default", "PaymentRangeFrom":0, "PaymentRangeTo":0, "RegularPayment":0 }, "Requests":[ { "Figures":{ "CashPrice":7000, "CashDeposit":1000, "Asset":{ "ManualResidualValue":0, "ResidualValueYear":0, "ResidualValueMonth":0, "AnnualDistance":10000, "PartExchange":0, "OutstandingSettlement":0, "VATIncluded":"None", "VATQualifying":"None", "Extras":null } }, "Asset":{ "CurrentOdometerReading":1300, "RegistrationDate":"04/06/2017", "RegistrationMark":"CX17HHA", "Condition":"Default", "Source":"Default", "Identity":"CX17HHA", "IdentityType":"VRM", "StockIdentity":"39736298", "StockingDate":null, "StockLocation":null, "Class":"Car", "CubicCentimetres":0, "EntityType":"None" }, "RequestSettings":null, "RequestParameters":null } ] } ], "PlatformMeta":null } ``` -------------------------------- ### Payment Search Request Example Source: https://documentation.ivendi.com/docs/PaymentSearch This is an example of a POST request to the Payment Search API. Note that providing multiple vehicles in 'VehicleRequests' is deprecated. ```json { "Debug": false, "Credentials": { "Username": "www.ivendimotors.com", "Mode": 0 }, "Parameters": { "Terms": [12], "AnnualMileages": [10000], "Deposits": [500], "CreditTiers": [""] }, "VehicleRequests": [{ "Id": null, "Dealer": "268E8202-338E-4B26-A6FE-74BCDAB0A357", "Vehicle": { "CashPrice": 6999, "IsNew": false, "Identifier": "14970", "IdentifierType": "RVC", "Type": "Motorbike", "StockId": null, "RegistrationNumber": "HF67VKK", "CurrentMileage": 274, "RegistrationDate": "01-09-2017", "ProductUid": null, "VATIncluded": false, "VATQualifying": false } }] } ``` -------------------------------- ### fpaStructure for Ford Fiesta Example 2 (Complex) Source: https://documentation.ivendi.com/docs/LinkingToYourVehiclePages This example shows a more complex fpaStructure configuration that includes vehicle derivative and fuel type. It matches a URL structure with multiple dynamic attributes. ```javascript fpaStructure: "https://acmemotors.co.uk/used-cars/{{bodystyle}}/{{fuel}}/{{id}}/{{make}}/{{model}}/{{deriv}}" ``` -------------------------------- ### Payment Search API Request Example Source: https://documentation.ivendi.com/docs/OpenApi Example JSON payload for the payment search API. This includes credentials, parameters, and vehicle requests. ```json { "Debug": false, "Credentials": { "Username": "www.ivendimotors.com", "Mode": 0 }, "Parameters": { "Terms": [12, 24, 36, 42, 52, 60], "AnnualMileages": [10000, 11000, 12000], "Deposits": [500, 1000, 1500], "CreditTiers": [""] }, "VehicleRequests": [{ "Id": null, "Dealer": "268E8202-338E-4B26-A6FE-74BCDAB0A357", "Vehicle": { "CashPrice": 6999, "IsNew": false, "Identifier": "14970", "IdentifierType": "RVC", "Type": "Motorbike", "StockId": null, "RegistrationNumber": "HF67VKK", "CurrentMileage": 274, "RegistrationDate": "01-09-2017", "ProductUid": null } }] } ``` -------------------------------- ### New Vehicle Quoting Widget Example Source: https://documentation.ivendi.com/docs/NewVehicles This JavaScript function demonstrates how to build the URL for a new vehicle quote within the iVendi widget. It includes helper functions to get today's date and construct the full URL with all necessary parameters for a new vehicle quote. ```javascript function widget() { function todaysDate() { let date = new Date(Date.now()).toLocaleString("en-GB"); //Get Today's Date let dateFormat = date.split(","); // Format it let justDate = dateFormat[0]; // Return just the date portion of the string return justDate; } function buildUrl() { return ( "https://newvehicle.com/widgets/lib/finance-comparator-convert/?username=www.ivendimotors.com"eeUid=268E8202-338E-4B26-A6FE-74BCDAB0A357&class=Car&condition=new&vrm=NEW®istrationDate=" + todaysDate() + "&capCode=&capId=96096&cashPrice=30000&vatIncluded=true&vatQualifying=false¤tOdometerReading=0&vehicleImageUrl=https%3A%2F%2Fmedia-psa.groupe-psa.com%2Fmedias%2Fdomain1%2Fmedia11848%2F2009228-r00lv2pybs-preview.jpg&cashDepositType=flatRate&cashDeposit=1000&term=48&annualDistance=10000&dateOnForecourt=" + todaysDate() + "&usePersistedOptions=false&origin=https%3A%2F%2Fsales-widget-demo.ivendi.co%2F&widgetId=iv-finance-widget" ); } return ( <> > ); } ``` -------------------------------- ### fpaStructure for Ford Fiesta Example 1 Source: https://documentation.ivendi.com/docs/LinkingToYourVehiclePages Configure fpaStructure to match a URL pattern for a specific vehicle make, model, and location. This example demonstrates linking to a Ford Fiesta in Colwyn Bay. ```javascript fpaStructure: "https://acmemotors.co.uk/{{location}}/{{make}}/{{model}}/id-{{id}}" ``` -------------------------------- ### Quoteware Request Example Source: https://documentation.ivendi.com/docs/ExampleQuotewareRequest This snippet shows a sample JSON payload that can be sent to the Quoteware API to initiate a quote request. It includes details about HTML options, credentials, dealership enrichment, and specific quote requests. ```APIDOC ## POST https://quoteware3.ivendi.com/quotes/ ### Description Submits a request to the Quoteware API to generate a quote. This endpoint accepts a JSON payload containing various configuration and request details. ### Method POST ### Endpoint https://quoteware3.ivendi.com/quotes/ ### Request Body - **HtmlOptions** (object) - Options for generating HTML output, including image URLs and return URLs. - **IncludeOptions** (boolean) - Whether to include options in the HTML. - **AsHtml** (boolean) - Whether to return the output as HTML. - **ImageUrl** (string) - URL for an image to be included. - **ReturnUrl** (string) - URL to return to after the quote process. - **Make** (string) - Vehicle make. - **Model** (string) - Vehicle model. - **Derivative** (string) - Vehicle derivative. - **Channel** (string) - The channel through which the request is made. - **RegDate** (string) - Registration date of the vehicle. - **DealerId** (string) - Identifier for the dealership. - **VehicleMileage** (number) - Mileage of the vehicle. - **EncryptedVrm** (string) - Encrypted Vehicle Registration Mark. - **Credentials** (object) - Authentication credentials for the API. - **Username** (string) - The username for authentication. - **Mode** (number) - The operating mode (e.g., 0 for default). - **DealershipEnrichment** (object) - Data for enriching the dealership context. - **IpAddress** (string) - The IP address of the client. - **Email** (string) - Email address of the user. - **Postcode** (string) - Postcode of the user. - **SearchMeta** (string) - Metadata for the search, often in JSON format. - **UserAgent** (string) - The User-Agent string of the client. - **UserGenerated** (boolean) - Indicates if the request was user-generated. - **TraceRequest** (boolean) - Whether to trace the request. - **PersistRequestResponse** (boolean) - Whether to persist the request and response. - **QuoteRequests** (array) - An array of quote requests. - **ProductRequestUID** (string) - Unique identifier for the product request. - **IsPlatformProductRequest** (boolean) - Flag indicating if it's a platform product request. - **QuoteeUID** (string) - Unique identifier for the quotee. - **GlobalRequestSettings** (object) - Global settings for the request. - **GlobalRequestParameters** (object) - Global parameters for the quote calculation. - **Rate** (number) - The interest rate. - **RateType** (string) - The type of rate (e.g., 'Default'). - **Commission** (number) - Commission amount. - **CommissionType** (string) - The type of commission. - **ComputationPath** (string) - The path for computation. - **Term** (number) - The loan term in months. - **TermUnit** (string) - The unit for the term (e.g., 'Default'). - **PaymentRangeFrom** (number) - Minimum payment range. - **PaymentRangeTo** (number) - Maximum payment range. - **RegularPayment** (number) - The regular payment amount. - **Requests** (array) - An array of individual request details. - **CreditTier** (string) - The credit tier for the request. - **Figures** (object) - Financial figures for the quote. - **CashPrice** (number) - The cash price of the asset. - **CashDeposit** (number) - The cash deposit amount. - **Asset** (object) - Details about the asset. - **ManualResidualValue** (number) - Manually set residual value. - **ResidualValueYear** (number) - Residual value based on years. - **ResidualValueMonth** (number) - Residual value based on months. - **AnnualDistance** (number) - Annual distance the vehicle is expected to travel. - **PartExchange** (number) - Part exchange value. - **OutstandingSettlement** (number) - Outstanding settlement amount. - **VATIncluded** (string) - VAT inclusion status (e.g., 'None'). - **VATQualifying** (string) - VAT qualifying status (e.g., 'None'). - **Extras** (object) - Any additional extras. - **Asset** (object) - Details about the asset being financed. - **CurrentOdometerReading** (number) - The current odometer reading. - **RegistrationDate** (string) - The date the vehicle was registered. - **RegistrationMark** (string) - The registration mark (license plate) of the vehicle. - **Condition** (string) - The condition of the asset. - **Source** (string) - The source of the asset information. - **Identity** (string) - The identity of the asset (e.g., VRM). - **IdentityType** (string) - The type of identity provided. - **StockIdentity** (string) - The stock identity of the asset. - **StockingDate** (string) - The date the asset was stocked. - **StockLocation** (string) - The location where the asset is stocked. - **Class** (string) - The class of the asset (e.g., 'Car'). - **CubicCentimetres** (number) - Engine displacement in cubic centimeters. - **EntityType** (string) - The entity type of the asset. - **RequestSettings** (object) - Specific settings for this request. - **RequestParameters** (object) - Specific parameters for this request. - **PlatformMeta** (object) - Metadata related to the platform. ### Request Example ```json { "HtmlOptions": { "IncludeOptions": false, "AsHtml": false, "ImageUrl": "https://sampleimageforthecaronsale.png ", "ReturnUrl": null, "Make": null, "Model": null, "Derivative": null, "Channel": null, "RegDate": null, "DealerId": null, "VehicleMileage": null, "EncryptedVrm": null }, "Credentials": { "Username": "www.ivendimotors.com", "Mode": 0 }, "DealershipEnrichment": { "IpAddress": "188.29.164.138", "Email": null, "Postcode": "BL40PJ", "SearchMeta": "{\"IsPaymentSearch\":\"True\",\"MinPrice\": \"-1\",\"MaxPrice\":\"-1\" ,\"MinPaymentMonthlyCost\":\"-1\",\"MaxPaymentMonthlyCost\":\"-1\"}", "UserAgent": null, "UserGenerated": true, "TraceRequest": false, "PersistRequestResponse": true }, "QuoteRequests": [ { "ProductRequestUID": null, "IsPlatformProductRequest": false, "QuoteeUID": "268E8202-338E-4B26-A6FE-74BCDAB0A357", "GlobalRequestSettings": null, "GlobalRequestParameters": { "Rate": 0, "RateType": "Default", "Commission": 0, "CommissionType": "Default", "ComputationPath": "Default", "Term": 54, "TermUnit": "Default", "PaymentRangeFrom": 0, "PaymentRangeTo": 0, "RegularPayment": 0 }, "Requests": [ { "CreditTier": "", "Figures": { "CashPrice": 7000, "CashDeposit": 1000, "Asset": { "ManualResidualValue": 0, "ResidualValueYear": 0, "ResidualValueMonth": 0, "AnnualDistance": 10000, "PartExchange": 0, "OutstandingSettlement": 0, "VATIncluded": "None", "VATQualifying": "None", "Extras": null } }, "Asset": { "CurrentOdometerReading": 1300, "RegistrationDate": "04/06/2017", "RegistrationMark": "CX17HHA", "Condition": "Default", "Source": "Default", "Identity": "CX17HHA", "IdentityType": "VRM", "StockIdentity": "39736298", "StockingDate": null, "StockLocation": null, "Class": "Car", "CubicCentimetres": 0, "EntityType": "None" }, "RequestSettings": null, "RequestParameters": null } ] } ], "PlatformMeta": null } ``` ``` -------------------------------- ### Example Quoteware Response Source: https://documentation.ivendi.com/docs/ExampleQuotewareResponse This snippet shows a successful HTTP 200 response containing quote results for a motor vehicle. It includes details about the asset, product groups, and specific financial quotes with their associated terms and rates. ```APIDOC ## GET /example/quoteware/response ### Description Retrieves an example JSON response from the Quoteware API for a motor vehicle quote request. This response details available financing options, including asset information and financial figures. ### Method GET ### Endpoint /example/quoteware/response ### Parameters None ### Request Example None ### Response #### Success Response (200) - **hasQuoteResults** (boolean) - Indicates if any quote results are available. - **QuotedResultsUID** (string) - Unique identifier for the quote results. - **QuoteResults** (array) - An array of quote result objects. - **hasResults** (boolean) - Indicates if this specific quote result has data. - **ProductRequestUID** (string) - Unique identifier for the product request. - **QuotedResultUID** (string) - Unique identifier for this quoted result. - **QuoteeUID** (string) - Unique identifier for the entity being quoted. - **QuoteRequest** (object or null) - Details of the quote request, if available. - **Results** (array) - An array of detailed results for the quote. - **Asset** (object) - Information about the asset being quoted (e.g., a vehicle). - **__type** (string) - The type of the asset. - **Age** (integer) - The age of the asset in months. - **AgeIdentifier** (string) - Identifier for the age unit. - **AgeUnit** (string) - The unit of age (e.g., 'Months'). - **Class** (string) - The class of the asset (e.g., 'Car'). - **Condition** (string) - The condition of the asset (e.g., 'Used'). - **CurrentOdometerReading** (integer) - The current odometer reading. - **EntityType** (string) - The entity type. - **Identity** (string) - The asset's identity (e.g., registration number). - **IdentityType** (string) - The type of identity (e.g., 'VRM'). - **CapCodeOverridden** (any) - Indicates if the Cap Code was overridden. - **RegistrationDate** (string) - The date of registration. - **RegistrationMark** (string) - The registration mark (license plate). - **RequestedAnnualDistance** (integer) - The requested annual distance for the quote. - **RequestedDeposit** (integer) - The requested deposit amount. - **RequestedTerm** (integer) - The requested finance term. - **RequestedTermUnit** (string) - The unit for the requested term. - **Source** (string) - The source of the asset data. - **StockIdentity** (string) - The stock identity of the asset. - **StockingDays** (integer) - The number of stocking days. - **StockLocation** (any) - The stock location, if applicable. - **TermDistance** (integer) - The total distance for the term. - **VrmEnabled** (boolean) - Indicates if VRM is enabled. - **hasProductGroup** (boolean) - Indicates if product groups are available for this result. - **hasProductGroupWithinPaymentRange** (string) - Indicates if product groups fall within the payment range. - **ProductGroups** (array) - An array of product group objects. - **FacilityType** (string) - The type of facility (e.g., 'HP' for Hire Purchase). - **hasProductQuote** (boolean) - Indicates if product quotes are available within this group. - **hasProductQuoteWithinPaymentRange** (string) - Indicates if product quotes fall within the payment range. - **ProductGroupUID** (string) - Unique identifier for the product group. - **ProductQuotes** (array) - An array of specific product quotes. - **BaseCfcUrl** (string) - Base URL for the car finance checker. - **Commissions** (array) - Details of commissions applied. - **Amount** (number) - The commission amount. - **Method** (string) - The commission method. - **Type** (string) - The commission type. - **Value** (number) - The commission value. - **VolumeBonus** (number) - The volume bonus amount. - **ExpiryDate** (string) - The expiry date of the quote. - **FacilitatorCode** (string) - The facilitator code. - **FacilityType** (string) - The type of facility for this quote. - **Figures** (object) - Financial figures for the quote. - **AcceptanceFee** (number) - The acceptance fee. - **AcceptanceFeeSpread** (boolean) - Indicates if the acceptance fee is spread. - **AdditionalDeposit** (number) - Any additional deposit amount. - **Advance** (number) - The advance amount. - **AER** (number) - Annual Equivalent Rate. - **APR** (number) - Annual Percentage Rate. - **Asset** (object) - Asset details specific to this quote. - **__type** (string) - The type of the asset. - **AdjustedDistance** (boolean) - Indicates if the distance was adjusted. - **AdjustedTerm** (boolean) - Indicates if the term was adjusted. - **AnnualDistanceQuoted** (integer) - The quoted annual distance. - **ChargePerOverDistanceUnit** (number) - Charge per unit of distance over the limit. - **Equity** (number) - The equity in the asset. - **FinanceDepositAllowance** (number) - Allowance for finance deposit. - **FinanceDepositAllowances** (any) - Details of finance deposit allowances. - **NegativeEquity** (number) - The amount of negative equity. - **OutstandingSettlement** (number) - Outstanding settlement amount. - **OutstandingSource** (any) - Source of outstanding settlement information. - **PartExchange** (number) - Part exchange value. - **RVDataSet** (any) - Residual Value data set. - **RVDataSetMonth** (integer) - Month of the Residual Value data set. - **RVDataSetYear** (integer) - Year of the Residual Value data set. - **RVPercentageUsed** (number) - Percentage of Residual Value used. - **ValueAddedProducts** (any) - Details of value-added products. - **VATQualifying** (string) - VAT qualification status. - **ExcludeVatAsDeposit** (string) - Indicates if VAT should be excluded as deposit. - **Balloon** (number) - The balloon payment amount. - **BalloonAtTerm** (boolean) - Indicates if the balloon payment is at term end. - **BaseRate** (number) - The base interest rate. - **CustomerRate** (number) - The customer's interest rate. - **EarlySettlements** (any) - Details of early settlement options. - **FinalPayment** (number) - The amount of the final payment. - **FirstPayment** (number) - The amount of the first payment. - **FlatRate** (number) - The flat interest rate. - **FullFees** (any) - Details of full fees. - **InitialPause** (number) - The initial payment pause period. - **InterestCharges** (number) - Total interest charges. - **InterestRate** (number) - The interest rate. - **InterestRateRateType** (string) - The type of interest rate. - **NumberOfRegularPayments** (integer) - The total number of regular payments. - **OptionFeeSpread** (boolean) - Indicates if the option fee is spread. - **OptionToPurchaseFee** (number) - The fee for the option to purchase. - **PaymentSchedules** (array) - Schedule of payments. - **Amount** (number) - The payment amount. - **Number** (integer) - The payment number. - **Period** (integer) - The payment period. - **ProductRateType** (string) - The type of product rate. - **RegularPayment** (number) - The amount of the regular payment. - **Repossession** (number) - The repossession value. #### Response Example ```json { "hasQuoteResults": true, "QuotedResultsUID": "d3d0350d-8ad5-477b-9408-2523d1bb42bd", "QuoteResults": [ { "hasResults": true, "ProductRequestUID": "f9e788bc-dbe2-4718-b6cc-ef63cc83a193", "QuotedResultUID": "a43f8b64-db2d-4388-b6bf-247e0a89c2c1", "QuoteeUID": "268e8202-338e-4b26-a6fe-74bcdab0a357", "QuoteRequest": null, "Results": [ { "Asset": { "__type": "QuotewareV3.Core.ResultAssetMotorVehicle, QuotewareV3.Core", "Age": 48, "AgeIdentifier": "17", "AgeUnit": "Months", "Class": "Car", "Condition": "Used", "CurrentOdometerReading": 1300, "EntityType": "None", "Identity": "CX17HHA", "IdentityType": "VRM", "CapCodeOverridden": null, "RegistrationDate": "/Date(1490313600000)/", "RegistrationMark": "CX17HHA", "RequestedAnnualDistance": 10000, "RequestedDeposit": 1000, "RequestedTerm": 54, "RequestedTermUnit": "Default", "Source": "RegionCurrent", "StockIdentity": "39736298", "StockingDays": 0, "StockLocation": null, "TermDistance": 46300, "VrmEnabled": true }, "hasProductGroup": true, "hasProductGroupWithinPaymentRange": "False", "ProductGroups": [ { "FacilityType": "HP", "hasProductQuote": true, "hasProductQuoteWithinPaymentRange": "False", "ProductGroupUID": "cc1c74e1-e24d-4b76-0a11-011eb60d5c1a", "ProductQuotes": [ { "BaseCfcUrl": "https://carfinancechecker.com", "Commissions": [ { "Amount": 0, "Method": "RRPDiscounting", "Type": "None", "Value": 0, "VolumeBonus": 0 } ], "ExpiryDate": "/Date(1615939200000+0000)/", "FacilitatorCode": "BLA", "FacilityType": "HP", "Figures": { "AcceptanceFee": 0, "AcceptanceFeeSpread": false, "AdditionalDeposit": 0, "Advance": 6000, "AER": 9.85, "APR": 9.9, "Asset": { "__type": "QuotewareV3.Core.ProductQuoteAssetMotorVehicle, QuotewareV3.Core", "AdjustedDistance": false, "AdjustedTerm": false, "AnnualDistanceQuoted": 10000, "ChargePerOverDistanceUnit": 0, "Equity": 0, "FinanceDepositAllowance": 0, "FinanceDepositAllowances": null, "NegativeEquity": 0, "OutstandingSettlement": 0, "OutstandingSource": null, "PartExchange": 0, "RVDataSet": null, "RVDataSetMonth": 0, "RVDataSetYear": 0, "RVPercentageUsed": 0, "ValueAddedProducts": null, "VATQualifying": "None", "ExcludeVatAsDeposit": "None" }, "Balloon": 0, "BalloonAtTerm": false, "BaseRate": 9.9, "CustomerRate": 9.9, "EarlySettlements": null, "FinalPayment": 136.92, "FirstPayment": 136.92, "FlatRate": 5.13, "FullFees": null, "InitialPause": 0, "InterestCharges": 1383.68, "InterestRate": 9.43, "InterestRateRateType": "Yield", "NumberOfRegularPayments": 52, "OptionFeeSpread": false, "OptionToPurchaseFee": 10, "PaymentSchedules": [ { "Amount": 136.92, "Number": 54, "Period": 1 } ], "ProductRateType": "APR", "RegularPayment": 136.92, "Repossession": 2797.89 } } ] } ] } ] } ] } ``` ``` -------------------------------- ### JavaScript Payment Search Example Source: https://documentation.ivendi.com/docs/PaymentSearch This JavaScript function demonstrates how to perform a payment search using the iVendi Payment Search Service. It includes the request object, a helper function to find the cheapest payment, and an AJAX call to the service. The results are displayed in a designated HTML element. Ensure jQuery is loaded for AJAX functionality. ```javascript function Search() { function Request() { const PaymentSearchEndpoint = "https://quoteware3.ivendi.com/paymentsearch/"; const PaymentSearchObject = { Debug: false, Credentials: { Username: "www.ivendimotors.com", Mode: 0, }, Parameters: { Terms: [60, 48], AnnualMileages: [8000, 10000], Deposits: [500], CreditTiers: [""], }, VehicleRequests: [ { Id: null, Dealer: "268E8202-338E-4B26-A6FE-74BCDAB0A357", Vehicle: { CashPrice: 4989, //The Cash Price of the Vehicle IsNew: false, Identifier: "71786", //The CAP ID of the requested vehicle, CAP Code may also be used here. IdentifierType: "RVC", //Default to RVC, meaning that CAP data will be used to dictate the calculation. Type: "Car", //The class of vehicle requested - ( Car // Motorbike // LCV ) StockId: null, RegistrationNumber: "WK66JZE", //The Vehicle Registration Number. CurrentMileage: 70862, //The Mileage of the Vehicle. RegistrationDate: "13-09-2016", //The registration date of the Vehicle. ProductUid: null, }, }, ], }; function cheapest(result, type) { let payment = []; for (let i = 0; i < result.length; i++) { for (let j = 0; j < result[i].ProductResults.length; j++) { payment.push(result[i].ProductResults[j]); } } return payment .filter((x) => x.Key === type) .sort((a, b) => a.Payment - b.Payment); } $.ajax({ type: "POST", headers: { "Content-Type": "application/json", }, url: PaymentSearchEndpoint, data: JSON.stringify(PaymentSearchObject), success: (data) => { let cheapestArray = cheapest( data.VehicleResults[0].FinanceProductResults, "HP" ); $("#paymentsearch-results-cheapest").append( JSON.stringify(cheapestArray[0]) ); }, }); } return ( <>
Click the below button to get the cheapest quote
You will be required to edit this JSFiddle and manipulate the JSON object being sent to tweak it to your desire.
> ); } ``` -------------------------------- ### Log Search Results Details Source: https://documentation.ivendi.com/docs/Engage/IVC This example demonstrates how to access and log specific details from the 'ivc:search:completed' event payload, such as the number of hits and applied filters. ```javascript window.addEventListener('ivc:search:completed', (event) => { const { numberOfHits, selectedFacets, query } = event.detail; console.log(`Found ${numberOfHits} vehicles for "${query}"`, selectedFacets); }); ``` -------------------------------- ### Basic Engage Widget Configuration with fpaStructure Source: https://documentation.ivendi.com/docs/LinkingToYourVehiclePages This snippet shows the basic setup for the Engage widget, including the required fpaStructure attribute for linking to vehicle pages. Ensure this attribute is correctly configured to match your website's URL structure. ```javascript var engage = new lib.Webshop({ ...fpaStructure: "https://acmemotors.co.uk/{{location}}/{{make}}/{{model}}/id-{{id}}", }); ``` -------------------------------- ### Embed Reserve Vehicle CTA Widget (PHP) Source: https://documentation.ivendi.com/docs/Reserve Use this PHP example to dynamically generate the widget's script tag. Update the placeholder variables with your specific values. ```php ``` -------------------------------- ### Embed Reserve Vehicle CTA Widget (Templated) Source: https://documentation.ivendi.com/docs/Reserve This example uses ERB-style templating for dynamic URL parameters. Ensure the variables match your template engine's syntax and your site's data. ```html ``` -------------------------------- ### Partial Quoteware API Response Example Source: https://documentation.ivendi.com/docs/Custom This is a partial JSON response from the Quoteware API. Extract the 'QuoteUID' from the 'Product Quote Group' object to use in your custom URL. ```json }, "FunderCode": "BLA", "FunderProductCode": "HP", "ParentQuoteUID": null, "ProductCode": "HP", "ProductName": "Blackhorse HP APR - Standard Rate", "ProductUID": "b644028d-c545-4a54-ba3a-004007009d3b", "CreditTier": "None", "QuotedDateTime": "/Date(1614772549066+0000)/", "QuoteeProductCode": "HP", "QuoteeUid": "268e8202-338e-4b26-a6fe-74bcdab0a357", "QuoteUID": "03031155-49f1-41f3-b332-5235d0263664", "WithinPaymentRange": "None", "Errors": null, "hasErrors": false, "hasWarnings": false, "Warnings": null } ... ``` -------------------------------- ### JavaScript Payment Search Request Source: https://documentation.ivendi.com/docs/PaymentSearch This example demonstrates how to construct and send a POST request to the iVendi Payment Search endpoint using jQuery. It includes a detailed JSON object for search parameters and vehicle information. Ensure jQuery is loaded before executing this script. ```javascript function Search() { function Request() { const PaymentSearchEndpoint = "https://quoteware3.ivendi.com/paymentsearch/"; const PaymentSearchObject = { Debug: false, Credentials: { Username: "www.ivendimotors.com", Mode: 0, }, Parameters: { Terms: [12, 24, 36, 42, 52, 60], AnnualMileages: [10000, 11000, 12000], Deposits: [500, 1000, 1500], CreditTiers: [""], }, VehicleRequests: [ { Id: null, Dealer: "268E8202-338E-4B26-A6FE-74BCDAB0A357", Vehicle: { CashPrice: 6999, //The Cash Price of the Vehicle IsNew: false, Identifier: "14970", //The CAP ID of the requested vehicle, CAP Code may also be used here. IdentifierType: "RVC", //Default to RVC, meaning that CAP data will be used to dictate the calculation. Type: "Motorbike", //The class of vehicle requested - ( Car // Motorbike // LCV ) StockId: null, RegistrationNumber: "HF67VKK", //The Vehicle Registration Number. CurrentMileage: 274, //The Mileage of the Vehicle. RegistrationDate: "01-09-2017", //The registration date of the Vehicle. ProductUid: null, VATIncluded: false, VATQualifying: false }, }, ], }; $.ajax({ type: "POST", headers: { "Content-Type": "application/json", }, url: PaymentSearchEndpoint, data: JSON.stringify(PaymentSearchObject), success: (data) => { $("#paymentsearch-results").append(JSON.stringify(data)); }, }); } return ( <>Click the below button to see example results returned from the iVendi Payment Search Service!
You will be required to edit this JSFiddle and manipulate the JSON object being sent to tweak it to your desire.
> ); } ```