CAPTCO_Webservice
Click here for a complete list of operations.
GetTCO
Returns the Total Cost of Ownership (TCO) for a given id, registration date (in the format yyyy/mm/dd), purchase cost, finance amount and interest rate (APR), current and annual mileage, length of ownership, insurance cost, user age, user postcode. Enter mileages in thousands e.g 30 = 30,000.
Test
To test the operation using the HTTP POST protocol, click the 'Invoke' button.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /tco/captco_webservice.asmx HTTP/1.1 Host: soap.cap.co.uk Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "https://soap.cap.co.uk/tco/GetTCO" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetTCO xmlns="https://soap.cap.co.uk/tco"> <SubscriberId>int</SubscriberId> <Password>string</Password> <Database>string</Database> <CapId>int</CapId> <RegistrationDate>string</RegistrationDate> <PurchaseCost>double</PurchaseCost> <FinanceAPR>double</FinanceAPR> <Deposit>double</Deposit> <CurrentMileage>int</CurrentMileage> <AnnualMileage>int</AnnualMileage> <LengthOfOwnership>int</LengthOfOwnership> <UserAge>int</UserAge> <UserPostCode>string</UserPostCode> <AnnualInsurance>double</AnnualInsurance> </GetTCO> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetTCOResponse xmlns="https://soap.cap.co.uk/tco"> <GetTCOResult> <Success>boolean</Success> <FailMessage>string</FailMessage> <TotalCostOfOwnership>decimal</TotalCostOfOwnership> <TotalMonthlyRunningCosts>decimal</TotalMonthlyRunningCosts> <RunningCostsPerMile>decimal</RunningCostsPerMile> <FuelCosts>decimal</FuelCosts> <Depreciation>decimal</Depreciation> <ServiceAndMaintenance>decimal</ServiceAndMaintenance> <InsuranceGroup>string</InsuranceGroup> <Insurance>decimal</Insurance> <CostNew>decimal</CostNew> <DeliveryCost>decimal</DeliveryCost> <RoadTax>decimal</RoadTax> <PurchasePrice>decimal</PurchasePrice> </GetTCOResult> </GetTCOResponse> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /tco/captco_webservice.asmx HTTP/1.1 Host: soap.cap.co.uk Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetTCO xmlns="https://soap.cap.co.uk/tco"> <SubscriberId>int</SubscriberId> <Password>string</Password> <Database>string</Database> <CapId>int</CapId> <RegistrationDate>string</RegistrationDate> <PurchaseCost>double</PurchaseCost> <FinanceAPR>double</FinanceAPR> <Deposit>double</Deposit> <CurrentMileage>int</CurrentMileage> <AnnualMileage>int</AnnualMileage> <LengthOfOwnership>int</LengthOfOwnership> <UserAge>int</UserAge> <UserPostCode>string</UserPostCode> <AnnualInsurance>double</AnnualInsurance> </GetTCO> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetTCOResponse xmlns="https://soap.cap.co.uk/tco"> <GetTCOResult> <Success>boolean</Success> <FailMessage>string</FailMessage> <TotalCostOfOwnership>decimal</TotalCostOfOwnership> <TotalMonthlyRunningCosts>decimal</TotalMonthlyRunningCosts> <RunningCostsPerMile>decimal</RunningCostsPerMile> <FuelCosts>decimal</FuelCosts> <Depreciation>decimal</Depreciation> <ServiceAndMaintenance>decimal</ServiceAndMaintenance> <InsuranceGroup>string</InsuranceGroup> <Insurance>decimal</Insurance> <CostNew>decimal</CostNew> <DeliveryCost>decimal</DeliveryCost> <RoadTax>decimal</RoadTax> <PurchasePrice>decimal</PurchasePrice> </GetTCOResult> </GetTCOResponse> </soap12:Body> </soap12:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /tco/captco_webservice.asmx/GetTCO?SubscriberId=string&Password=string&Database=string&CapId=string&RegistrationDate=string&PurchaseCost=string&FinanceAPR=string&Deposit=string&CurrentMileage=string&AnnualMileage=string&LengthOfOwnership=string&UserAge=string&UserPostCode=string&AnnualInsurance=string HTTP/1.1 Host: soap.cap.co.uk
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <TCOResult xmlns="https://soap.cap.co.uk/tco"> <Success>boolean</Success> <FailMessage>string</FailMessage> <TotalCostOfOwnership>decimal</TotalCostOfOwnership> <TotalMonthlyRunningCosts>decimal</TotalMonthlyRunningCosts> <RunningCostsPerMile>decimal</RunningCostsPerMile> <FuelCosts>decimal</FuelCosts> <Depreciation>decimal</Depreciation> <ServiceAndMaintenance>decimal</ServiceAndMaintenance> <InsuranceGroup>string</InsuranceGroup> <Insurance>decimal</Insurance> <CostNew>decimal</CostNew> <DeliveryCost>decimal</DeliveryCost> <RoadTax>decimal</RoadTax> <PurchasePrice>decimal</PurchasePrice> </TCOResult>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /tco/captco_webservice.asmx/GetTCO HTTP/1.1 Host: soap.cap.co.uk Content-Type: application/x-www-form-urlencoded Content-Length: length SubscriberId=string&Password=string&Database=string&CapId=string&RegistrationDate=string&PurchaseCost=string&FinanceAPR=string&Deposit=string&CurrentMileage=string&AnnualMileage=string&LengthOfOwnership=string&UserAge=string&UserPostCode=string&AnnualInsurance=string
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <TCOResult xmlns="https://soap.cap.co.uk/tco"> <Success>boolean</Success> <FailMessage>string</FailMessage> <TotalCostOfOwnership>decimal</TotalCostOfOwnership> <TotalMonthlyRunningCosts>decimal</TotalMonthlyRunningCosts> <RunningCostsPerMile>decimal</RunningCostsPerMile> <FuelCosts>decimal</FuelCosts> <Depreciation>decimal</Depreciation> <ServiceAndMaintenance>decimal</ServiceAndMaintenance> <InsuranceGroup>string</InsuranceGroup> <Insurance>decimal</Insurance> <CostNew>decimal</CostNew> <DeliveryCost>decimal</DeliveryCost> <RoadTax>decimal</RoadTax> <PurchasePrice>decimal</PurchasePrice> </TCOResult>