Version 2 of Clean Web Service is asynchronous and can be used to clean and validate both postal and email addresses. As such all three workflows are available.
As Version 2 is asynchronous it allows you to send a request for your records to be cleaned without having to wait for them all to be processed. Instead you send a second request to check the status of the job. This request can be sent at any interval until the job has been completed. You will then receive a result response with your cleaned and validated records.
The section below identifies the three workflows available to be sent in a request for Clean Web Service version 2.
<ns:workflow>CleanEnrich</ns:workflow>
This section must be used in every call. It informs Clean Web Service of the type of cleaning and/or validating that should take place on each Record
included in the request.
<soap:envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://www.qas.com/BulkWebService/2014-10" xmlns:ns1="http://www.qas.com/BulkWebService/2011-04" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<soap:header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:action>http://www.qas.com/BulkWebService/2014-10/IBulkWebService/SubmitRecords</wsa:action>
<wsa:to>https://api.experianmarketingservices.com/CleanWS/V2/BulkWebService.svc</wsa:to>
</soap:header>
<soap:body>
<ns:submitrecords>
<ns:records>
<ns1:record>
<ns1:fields>
<arr:string>REF001</arr:string>
<arr:string>MetaFiction Ltd,14 Old St,London</arr:string>
<arr:string>contact@metafiction.com</arr:string>
</ns1:fields>
</ns1:record>
<ns1:record>
<ns1:fields>
<arr:string>REF002</arr:string>
<arr:string>10 Downing St,London</arr:string>
<arr:string></arr:string>
</ns1:fields>
</ns1:record>
</ns:records>
<ns:workflow>CleanEnrichEmailValidate</ns:workflow>
<ns:settings>
<ns1:namedvalue>
<ns1:key>UserLabel</ns1:key>
<ns1:value>CleanTest</ns1:value>
</ns1:namedvalue>
<ns1:namedvalue>
<ns1:key>AddressDataSet</ns1:key>
<ns1:value>GBR</ns1:value>
</ns1:namedvalue>
<ns1:namedvalue>
<ns1:key>Layout</ns1:key>
<ns1:value>Standard</ns1:value>
</ns1:namedvalue>
<ns1:namedvalue>
<ns1:key>InputFieldMappings</ns1:key>
<ns1:value>Reference,Address,Email</ns1:value>
</ns1:namedvalue>
<ns1:namedvalue>
<ns1:key>OutputHeader</ns1:key>
<ns1:value>True</ns1:value>
</ns1:namedvalue>
<ns1:namedvalue>
<ns1:key>OutputMatchProfile</ns1:key>
<ns1:value>True</ns1:value>
</ns1:namedvalue>
<ns1:namedvalue>
<ns1:key>JobLocale</ns1:key>
<ns1:value>en-GB</ns1:value>
</ns1:namedvalue>
</ns:settings>
</ns:submitrecords>
</soap:body>
</soap:envelope>
HTTP Header
Requests to Clean Web Service use a standard SOAP envelope which declares a bulk web service namespace (the xmlns:ns attribute). SOAP headers should be empty; authorisation tokens are sent in the HTTP header.
The contents of the request body are sent to Clean Web Service in a ns:SubmitRecords SOAP object. The following sections must be included:
In this request, two Records are sent to Clean Web Service for processing. The Fields parameters each contain three strings, identified as string objects.
In this example, the first field of each Record is a reference field. Including a reference field makes comparisons easier, and will allow us to easily insert the processed address back into our source database. To ensure that reference fields are not processed by Clean Web Service, we map them using the InputFieldMappings setting (see below).
The next two fields of each Record are address and email fields (again, we map the order of the fields using the InputFieldMappings setting).
Any blank fields are sent as empty string objects. In this case, the second Record does not contain an email field, so this is left blank.
The workflow section specifies the CleanEnrichEmailValidate workflow, meaning that the address record should be matched against postal address records and cleaned, and the email record should be cleaned and validated in real time. The results of the cleaning process can be seen in the sample response.
The settings section contains several NamedValues, each made up of a Key / Value pair:
Each of these keys are covered in more detail in the SOAP Method Reference section.
<s:envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:header>
<a:action s:mustunderstand="1">http://www.qas.com/BulkWebService/2011-04/IBulkWebService/ProcessRecordsResponse</a:action>
<a:relatesto>uuid:a8bdb736-3663-4a72-98d4-104226bc5f13</a:relatesto>
</s:header>
<s:body>
<submitrecordsresponse xmlns="http://www.qas.com/BulkWebService/2014-10">
<submitrecordsresult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<additionalinformation xmlns:b="http://www.qas.com/BulkWebService/2011-04">
<jobid>1225f4e3-f20f-4766-8334-9ad9b923aa41</jobid>
<message>Job in progress.</message>
<records>
xmlns:b="http://www.qas.com/BulkWebService/2011-04"/>
<status>Processing</status>
</records></additionalinformation></submitrecordsresult>
</submitrecordsresponse>
</s:body>
</s:envelope>
Responses are sent from Clean Web Service in a SubmitRecordsResult SOAP object. The following sections are included:
This section reflects an ID that was passed by the caller in the header of the request that generated the response.
A unique JobId is included in every response. If you need to contact Experian regarding one of your jobs, this can be used for tracing purposes.
The Message field contains general information about the job, including any errors that may have been encountered. In this example, we can see that the job is still in progress.
The Status field contains a short summary of the job. In this example, this tells us that our request is processing.
<soap:envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"></soap:envelope><soap:header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:action>http://www.qas.com/BulkWebService/2014-10/IBulkWebService/GetResults</wsa:action>
<wsa:to>https://api.experianmarketingservices.com/CleanWS/V2/BulkWebService.svc</wsa:to>
</soap:header>
<soap:body>
<ns:getresults>
<ns:jobid>1225f4e3-f20f-4766-8334-9ad9b923aa41</ns:jobid>
</ns:getresults>
</soap:body>
HTTP Header
Requests to Clean Web Service use a standard SOAP envelope which declares a bulk web service namespace (the xmlns:ns attribute). SOAP headers should be empty; authorisation tokens are sent in the HTTP header.
The contents of the request body are sent to Clean Web Service in a ns:GetResults SOAP object. The only section to be included is:
The JobId is the only section for this request and is required in order to get the results of the job we submitted. The JobId can be found in the relevant SubmitRecordsResponse. If you need to contact Experian regarding one of your jobs, this can be used for tracing purposes.
Version 2 of Clean Web Service is asynchronous and so therefore when sending the GetResults request there are two possible responses.
If the results are not ready, you will get a response similar to the one below to explain that the job is still in progress.
<s:envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:header>
<a:action s:mustunderstand="1">http://www.qas.com/BulkWebService/2011-04/IBulkWebService/ProcessRecordsResponse</a:action>
<a:relatesto>uuid:a8bdb736-3663-4a72-98d4-104226bc5f13</a:relatesto>
</s:header>
<s:body>
<getresultsresponse xmlns="http://www.qas.com/BulkWebService/2014-10">
<getresultsresult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<additionalinformation xmlns:b="http://www.qas.com/BulkWebService/2011-04">
<b:namedvalue>
<b:key>ProcessingTime</b:key>
<b:value>32141.61ms</b:value>
<jobid>1225f4e3-f20f-4766-8334-9ad9b923aa41</jobid>
<message>Job in progress.</message>
<records>
xmlns:b="http://www.qas.com/BulkWebService/2011-04"/>
<status>Processing</status>
</records></b:namedvalue></additionalinformation></getresultsresult>
</getresultsresponse>
</s:body>
</s:envelope>
If the job has completed then you will receive a response similar to the one below.
<s:envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:header>
<a:action s:mustunderstand="1">http://www.qas.com/BulkWebService/2014-10/IBulkWebService/GetResultsResponse</a:action>
</s:header>
<s:body>
<getresultsresponse xmlns="http://www.qas.com/BulkWebService/2014-10">
<getresultsresult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<additionalinformation xmlns:b="http://www.qas.com/BulkWebService/2011-04">
<namedvalue>
<key>TotalRecords</key>
<value>2</value>
</namedvalue>
<namedvalue>
<key>RecordsProcessed</key>
<value>2</value>
</namedvalue>
<namedvalue>
<key>RecordsSubmitted</key>
<value>2</value>
</namedvalue>
<namedvalue>
<key>ProcessingTime</key>
<value>8328.3915ms</value>
</namedvalue>
<namedvalue>
<key>BatchVersion</key>
<value>7.30</value>
</namedvalue>
<namedvalue>
<key>DatasetName</key>
<value>GBR</value>
</namedvalue>
<namedvalue>
<key>DataSetVintage</key>
<value>21/02/2014</value>
</namedvalue>
<namedvalue>
<key>CLEAN-GBR_RecordsCleaned</key>
<value>2</value>
</namedvalue>
<namedvalue>
<key>CLEAN-GBR_RecordsProcessed</key>
<value>2</value>
</namedvalue>
<namedvalue>
<key>CLEAN-GBR-GBRGRD_Dataplus_RecordsCleaned</key>
<value>2</value>
</namedvalue>
<namedvalue>
<key>CLEAN-GBR-GBRGRD_Dataplus_RecordsProcessed</key>
<value>2</value>
</namedvalue>
<namedvalue>
<key>CLEAN-EMAILVALIDATE_RecordsProcessed</key>
<value>1</value>
</namedvalue>
</additionalinformation>
<jobid>1225f4e3-f20f-4766-8334-9ad9b923aa41</jobid>
<message>Records processed successfully.</message>
<records>
<record>
<fields xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>MatchProfile</b:string>
<b:string>MatchCode</b:string>
<b:string>ReferenceField</b:string>
<b:string>CleanedAddress1</b:string>
<b:string>CleanedAddress2</b:string>
<b:string>CleanedAddress3</b:string>
<b:string>CleanedAddress4</b:string>
<b:string>CleanedAddress5</b:string>
<b:string>CleanedAddress6</b:string>
<b:string>CleanedAddress7</b:string>
<b:string>CleanedEmail</b:string>
<b:string>EmailMatchCode</b:string>
</fields>
</record>
<record>
<fields xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>Good Premise Partial</b:string>
<b:string>P923004020220000100000000000:GBR</b:string>
<b:string>REF001</b:string>
<b:string>14-18 Old Street</b:string>
<b:string></b:string>
<b:string>LONDON</b:string>
<b:string></b:string>
<b:string>EC1V 9BH</b:string>
<b:string>05320</b:string>
<b:string>01822</b:string>
<b:string>contact@metafiction.com</b:string>
<b:string>Verified</b:string>
</fields>
</record>
<record>
<fields xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>Good Premise Partial</b:string>
<b:string>P923000000220000000000000000:GBR</b:string>
<b:string>REF002</b:string>
<b:string>10 Downing Street</b:string>
<b:string></b:string>
<b:string>LONDON</b:string>
<b:string></b:string>
<b:string>SW1A 2AA</b:string>
<b:string>05300</b:string>
<b:string>01799</b:string>
<b:string></b:string>
<b:string>Unreachable</b:string>
</fields>
</record>
</records>
<status>Completed</status>
</getresultsresult>
</getresultsresponse>
</s:body>
</s:envelope>
Responses are sent from Clean Web Service in a GetResultsResult SOAP object. The following sections are included:
This section reflects an ID that was passed by the caller in the header of the request that generated the response. If this was not present in the request then this section will not appear in the response.
The first section of each response is AdditionalInformation, which contains information regarding the data used to process and clean the records. This information is contained within NamedValues, which are in turn made up of Key / Value pairs:
If any records could not be cleaned successfully against the GBR dataset, Clean Web Service would not attempt to enrich the record by appending GBR-GBRGRD DataPlus information to it. In this situation, neither the RecordsProcessed or RecordsCleaned values for any datasets would be incremented.
For more information, see this definition of postal address processing and cleaning.
A unique JobId is included in every response. If you need to contact Experian regarding one of your jobs, this can be used for tracing purposes.
The Message field contains general information about the completed job, including any errors that may have been encountered. In the first example, we can see that the job is still in progress. In the second example, we can see all records were processed successfully.
Each completed job response contains cleaned Records – one for each Record you sent in a SOAP request. Each Record's Fields are represented as string objects.
If you set the OutputHeader setting to True, the first Record will contain headers for each field in all subsequent Record blocks (for example, 'Match Profile', 'ReferenceField', 'CleanedAddress1', 'CleanedEmail').
In all subsequent Record blocks in this example:
The Status field contains a short summary of the completed job. In this example, this tells us that our request was completed without errors or timeouts.