Private Medical Insurance Web Service Integration Guide Version 1.0.0 Date 17/12/2014
Service Description Leads can be sent into LeadStream using the SOAP web service. This enables you to send Private Medical Insurance leads into LeadStream through your own custom designed form. ote: LeadStream cannot be held responsible for the data sent via the web service that does not meet the criteria and subsequently does not get sent into LeadStream. Errors that may occur during lead processing are described later in this document. We recommend thorough testing of your form before making it Live. The SOAP Web Service The LeadStream Private Medical Insurance Web Service can be located on the following URL: Live URL: http://delivery.leadstream.co.uk/leaddelivery.svc/addpmilead Test URL: http://testdelivery.leadstream.co.uk/leaddelivery.svc/addpmilead AddPmiLead Method Call Once you have gathered lead details from the client, the first point of interaction with LeadStream should start with a call to our AddPmiLead method on the LeadStream Web Service. Please note that you must validate the data submitted by the client before you post it to the LeadStream web service. <PmiLead xmlns="http://schemas.datacontract.org/2004/07/web_service"> <SupplierId></SupplierId> <SupplierKey></SupplierKey> <ChannelId></ChannelId> <LeadTypeId></LeadTypeId> <IpAddress></IpAddress> <MarketingUrl></MarketingUrl> <MarketingSource></MarketingSource> <MarketingMedium></MarketingMedium> <MarketingTerm></MarketingTerm> <MarketingPermission></MarketingPermission> <AffSubId1></AffSubId1> <AffSubId2></AffSubId2> <AffSubId3></AffSubId3> <Title></Title> <Firstame></Firstame> <Lastame></Lastame> <DobDay></DobDay>
<DobMonth></DobMonth> <Dobear></Dobear> <Address1></Address1> <Address2></Address2> <Town></Town> <Postcode></Postcode> <Email></Email> <Phone></Phone> <PhoneAlt></PhoneAlt> <WhoToCover></WhoToCover> <WhenToStart></WhenToStart> <HaveInsurance></HaveInsurance> <Gender></Gender> <Smoker></Smoker> <fm1_firstame></fm1_firstame> <fm1_lastame></fm1_lastame> <fm1_dob></fm1_dob> <fm1_gender></fm1_gender> <fm1_smoker></fm1_smoker> <fm2_firstame></fm2_firstame> <fm2_lastame></fm2_lastame> <fm2_dob></fm2_dob> <fm2_gender></fm2_gender> <fm2_smoker></fm2_smoker> <fm3_firstame></fm3_firstame> <fm3_lastame></fm3_lastame> <fm3_dob></fm3_dob> <fm3_gender></fm3_gender> <fm3_smoker></fm3_smoker> <fm4_firstame></fm4_firstame> <fm4_lastame></fm4_lastame> <fm4_dob></fm4_dob> <fm4_gender></fm4_gender> <fm4_smoker></fm4_smoker> <fm5_firstame></fm5_firstame> <fm5_lastame></fm5_lastame> <fm5_dob></fm5_dob> <fm5_gender></fm5_gender> <fm5_smoker></fm5_smoker> </PmiLead> Field ame Description Values Req. SupplierId Supplied by LeadStream Int SupplierKey Supplied by LeadStream String ChannelId Supplied by LeadStream Int LeadTypeId Use 10 for PMI Int IpAddress The IP address of the customer s computer making the original enquiry. String (15)
MarketingUrl The URL of the landing page used to generate the lead. String (3-50) MarketingSource The marketing source used to generate the lead (e.g. String (3-50) google) MarketingMedium The marketing medium used to generate the lead (e.g. ppc) String (3-50) MarketingTerm The marketing term used to generate the lead (e.g. life String (3-50) insurance quotes) MarketingPermission Whether the customer has specifically opted in to future Specify: es, o marketing AffSubId1 3 x custom fields for you to submit a custom identification String (0-300) AffSubId2 string (e.g. your customer s String (0-300) AffSubId3 ID, or CRM ID number so you can identify the customer at a later stage.) String (0-300) Title The customer s title (e.g. Mr, Specify: Mr, Mrs, Mrs, Miss, Dr) Miss, Ms, Dr Firstame String (3-50) Lastame String (3-50) DobDay Integer 1-31 DobMonth Integer 1-12 Dobear Integer: 1900-2015 Address1 String (3-50) Address2 String (3-50) Town String (3-40) Postcode String (5-9) Email String (3-50) Phone String (11-13) PhoneAlt String (11-13) WhoToCover Specify: Just Me, My Family WhenToStart Specify: Today, Within 3 Months, Within 6 Months, Over 6 Months HaveInsurance Specify: es, Paid By Myself, es, Paid By My Company, o Gender Smoker Specify: es, o fm1_firstame String (3-50) fm1_lastame String (3-50) fm1_dob String (10)
fm1_gender fm1_smoker Specify: es, o fm2_firstame String (3-50) fm2_lastame String (3-50) fm2_dob String (10) fm2_gender fm2_smoker Specify: es, o fm3_firstame String (3-50) fm3_lastame String (3-50) fm3_dob String (10) fm3_gender fm3_smoker Specify: es, o fm4_firstame String (3-50) fm4_lastame String (3-50) fm4_dob String (10) fm4_gender fm4_smoker Specify: es, o fm5_firstame String (3-50) fm5_lastame String (3-50) fm5_dob String (10) fm5_gender fm5_smoker Specify: es, o AddPmiLead Method Response Once the above details are sent to LeadStream using the AddPmiLead method, the web service will respond with a status whether the lead has been successfully submitted or not with the following XML response. <LeadResult> <Outcome>OK</Outcome> <Status>Valid</Status> <Earnings>37.5</Earnings> <ErrorCode></ErrorCode> <ErrorField></ErrorField> <ErrorMessage></ErrorMessage> </LeadResult> Element ame Description Values Whether the lead was OK Outcome successfully accepted by ERROR LeadStream
Status Earnings ErrorCode ErrorField ErrorMessage The status of the lead in the LeadStream system. our earnings (in GBP). Set if Status is Valid. Delivered Valid Invalid Duplicate Test Quality Check Decimal Int String String After receiving the response you must check the Outcome element to ascertain if the delivery was successful. If the lead has been successfully submitted, the value OK will be returned. If ERROR is returned, a reason for the error will be provided in the ErrorCode, ErrorField and ErrorMessage elements. A list of error codes can be found below. Testing The Integration If you want to submit test leads then please change the web service URL as shown below. Test URL: http://testdelivery.leadstream.co.uk/leaddelivery.svc/addpmilead ou may also submit test leads to the live service providing the word test is entered into either the Firstame or Lastame fields. Going Live When the integration is ready to go live then make sure that live web service URL is used. Additional Lead Data Validation When LeadStream accepts a lead, a check is made whether the same lead has been submitted to the service (based on a matching telephone number or email address) for the same product and validated within the last 30 days. If the lead is a duplicate then the lead will be marked as duplicate and not validated within our system.
Telephone numbers, email addresses and postal addresses are all validated in real time when leads are submitted via validation systems. Leads with invalid telephone numbers, email addresses and postal addresses will be rejected.