Skip to content

Identity Management Web Service: UK Telephone Directory Integration 

This guide explains how to access GBGroup's web service products using their Identity Management Platform (IdM), available via SOAP web services. The document provides a general description of the available functionality along with a definition of the corresponding interfaces used to access different datasets and services.

The fundamentals of integrating with the service are described here: Integration Fundamentals

The next section of this document gives product specific details regarding the use of the IdM UK Telephone Directory Web Service products via IdM.

Matchcode UK Telephone Web Service Product Information

The UK Telephone Directory web service product provides access to UK telephone directory information (an extract from BT OSIS). There are two services available selected via different profiles Directory Enquiry and Teleappend.

The UK Telephone Directory Service products are available via the Identity Management ExecuteCapture web service method.

UK Telephone Directory - Input Information


The UK Telephone Directory services take name/organisation and address information and returns telephone numbers matching the name/organisation and address supplied. However there are certain rules regarding the minimum information that must be supplied depending on whether the Directory Enquiry or Teleappend profile is specified. Similarly the two services produce different levels of response details. These are all detailed in the relevant sections below.

 

ProfileRequestCapture Information

The ProfileRequestCapture structure contains the criteria to identify the target product being called.

In the profileRequest element, the profileGuid should be specified as:

Profile GUID
UK Telephone number - Directory Enquiries C4915B34-639A-45AB-B6D5-75F61DFE73B9
UK Telephone number - Tele-Append 5C29EE0D-5710-4C21-9D79-D6341B18A855

UK Telephone Input Criteria

Both Directory Enquiry and Teleappend UK Telephone Directory criteria should be entered into the IdmDataSearchAddress data structure:

ExecuteCapture → ProfileRequestCapture → ProfileRequestCaptureData → IdmDataSearchAddress

The person details are entered in the IdmDatacapturePerson structure as follows:

Field Name Type Description
firstname String First Name
lastname String Last Name


The firstname field, if used, must contain the first name exactly as listed in the public telephone directory. This is often the first initial, or first and middle initial. E.g. WA (Smith) for Bill Anthony (Smith). For a good match, it is often best if the first name is omitted from the search criteria altogether.

Directory Enquiry

To perform a directory enquiry search the following rules apply:-

  • There must be a full surname or organisation name, or a minimum of three characters in the surname or organisation before any wildcard characters.
  • There can be a combination of one or more locality fields entered (postcode, stateRegion, town, locality, subLocality, however the resultant combination must identify a unique locality.

e.g.
A full postcode is acceptable.
A town on it's own is acceptable if there if there is only one town in the country with that name (e.g. Middlesbrough)
Towns or localities which are not unique will have to be qualified with a stateRegion or further locality/sublocality information. (e.g. St. Helens, Merseyside or St. Helens, Isle of Wight).

If the name/organisation is not sufficient the response will indicate insufficient criteria

If the locality is not sufficiently unique the response will include a list of possible localities as a picklist and the request will need to be re-submitted with greater locality detail (see section on output details)


Teleappend

To perform a teleappend the following rules apply:

  • There must be a full surname or organisation name, no wildcard characters are allowed.
  • This must be a uniquely specified address. The minimum requirements are a full postcode plus unique building number/name

If the name/organisation plus address information is not sufficiently unique the response will indicate insufficient criteria.

Telephone Output Format

The results of a UK Telephone Directory search are returned in a ProfileResponseDetails structure with a ProfileResponseDetail.responseType of 'CAPTURE'.

The ProfileResponseDetails structure contains a single CaptureResponse data structure which holds an array of IdmDataAddress records containing the returned address data.

ExecuteCaptureResponse > ProfileResponse [0] > ProfileResponseDetails [0] > CaptureResponse > CaptureResponseData > IdmDataAddress [n]

Additional Items

The returned phone information is returned in the additionalItems field

For lookups on a name this will be in the person additionalItems structure
For lookups on an organisation this will be in the address additionalItems structure

Key Value
BtOsisNumber Telephone Number


Directory Enquiry

A maximum of 200 numbers can be returned from a directory enquiry search. The first 200 found will be returned. It is not possible to 'page' through to the next 200, to reduce the number below 200 requires more detailed input criteria.

If the locality for the input address for a Directory Enquiry is ambiguous a list of suggestions may be returned. The resultStatus will be returned as PICKLIST containing a list of more detailed locality information suggestions. The alternative locality information will populate the appropriate address fields of an IdmDataAddress structure.


Teleappend

If the phone number for a teleappend query is Ex Directory then the telephone number field will be returned with the text "Ex Directory"

A teleappend can only return a single result. If the name/organidation and address supplied yields more than one result then no numbers are returned unless one of the numbers is not Ex Directory and all the others are in which case the non Ex Directory number will be returned.

Sample XML


Sample Directory Enquiry Lookup XML

The following XML sample demonstrates a request data object containing a name and Address (note this is dummy data).

<!-- Request Input Data - Name and Address -->
  <mes:requestData>
    <req:address>
       <data:organisation/>
       <data:street/>
       <data:town></data:town>
       <data:postCode>CR1 1AB</data:postCode>
       <data:locality></data:locality>
       <data:subBuilding/>
       <data:building></data:building>
       <data:subLocality/>
       <data:stateRegion/>
       <data:countryCode>GBR</data:countryCode>
       <data:poBox/>
       <data:freeFormatAddress></data:freeFormatAddress>
       <data:additionalItems tmp="?"></data:additionalItems>
       <data:persons tmp="?">
          <data:person>
             <data:lastname>Pode</data:lastname>
       </data:person>
       </data:persons>
    </req:address>
    <req:filters tmp="?"></req:filters>
    <req:options></req:options>
</mes:requestData>

Sample Directory Enquiry Lookup JSON

{
       "customerReference": "Test",
       "profileGuid": "C4915B34-639A-45AB-B6D5-75F61DFE73B9",
       "configurationId": "1",
       "requestData": {
         "address": {
           "countryCode": "GBR",
           "postCode": "CR1 1AB",
           "persons":  {"person":[{"lastname":"Pode"}]}
         },
         "options": {
           "addressEnvelopeFormat": "A4P",
           "offset": "0",
           "maxReturn": "100",
           "casing": "MIXED"
         }
       }
   }
Sample Directory Enquiry Lookup Output XML

The following output XML demonstrates the CaptureResponse for the above UK Telephone Directory lookup.

<!-- UK Telephone Directory Component Response -->
    <mes:captureResponse>
    <req:resultStatus>SINGLE</req:resultStatus>
    <req:recordsReturned>1</req:recordsReturned>
    <req:moreData>false</req:moreData>
    <req:totalRecordCount>1</req:totalRecordCount>
    <req:totalPages>1</req:totalPages>
    <req:matchScore>0</req:matchScore>
    <req:responseCount>0</req:responseCount>
    <req:response>
       <req:address>
          <data:street>PANIC STREET</data:street>
          <data:town>CROYDON</data:town>
          <data:postCode>CR1 1AB</data:postCode>
          <data:buildingNumber>42</data:buildingNumber>
          <data:stateRegion>SURREY</data:stateRegion>
          <data:countryCode>GBR</data:countryCode>
          <data:dpsZipPlus>1AB</data:dpsZipPlus>
          <data:additionalItems/>
          <data:persons>
             <data:person>
                <data:firstname>E</data:firstname>
                <data:lastname>PODE</data:lastname>
                <data:additionalItems>
                   <data:item>
                      <data:key>BtOsisNumber</data:key>
                      <data:value>02086666666</data:value>
                   </data:item>
                </data:additionalItems>
             </data:person>
          </data:persons>
       </req:address>
    </req:response>
</mes:captureResponse>

 Sample Directory Enquiry Lookup Output JSON

{
   "profileHeader":    {
      "profileGuid": "C4915B34-639A-45AB-B6D5-75F61DFE73B9",
      "profileName": "UK Telephone number - Directory Enquiries",
      "transactionGuid": "35709294-C86F-4AF9-AAF7-5A94CF88A1B9",
      "transactionTimeStamp": 1433340700402,
      "profileStatus": "SUCCESS",
      "remarks": null
   },
   "profileResponseDetails": [   {
      "transactionGuid": "AED2AF23-EED4-4D80-BF43-B5EDCE49777E",
      "componentName": "Osis - Directory Enquiry Capture Service",
      "componentStatus": "SUCCESS",
      "componentAction": "DIRECTORY_ENQUIRY",
      "responseType": "CAPTURE",
      "notes": "[]",
      "invoice":       {
         "invoiceList": [         {
            "invoiceGuid": "521790F5-B687-4AA4-BEC6-FB24EC63D59F",
            "billingInformationGuid": "3E1C4C82-ED38-4BCF-A7BB-F92D26814294",
            "dataLicenceDescription": null,
            "billingPoints": 1,
            "creditsUsed": 1,
            "dataSetInvoices": [            {
               "dataSetCode": "DIRECTORY_ENQUIRY",
               "billingPoints": 1,
               "recordsReturned": 1,
               "dataLicenceGuid": "3E1C4C82-ED38-4BCF-A7BB-F92D26814294"
            }]
         }],
         "tmp": null
      },
      "captureResponse":       {
         "resultStatus": "SINGLE",
         "resultStatusDetail": null,
         "recordsReturned": 1,
         "moreData": false,
         "totalRecordCount": 1,
         "totalPages": 1,
         "matchScore": 0,
         "matchLevel": null,
         "outputStatus": null,
         "fieldStatus": null,
         "responseCount": 1,
         "response": [         {
            "input": null,
            "address": [            {
               "organisation": null,
               "street": "PANIC STREET",
               "town": "CROYDON",
               "postCode": "CR1 1AB",
               "locality": null,
               "addPoint": null,
               "department": null,
               "subBuilding": null,
               "buildingNumber": "11",
               "buildingName": null,
               "buildingGroup": null,
               "poBox": null,
               "subStreet": null,
               "subLocality": null,
               "stateRegion": "SURREY",
               "subAdministrativeArea": null,
               "administrativeArea": null,
               "superAdministrativeArea": null,
               "countryCode": "GBR",
               "countryName": null,
               "dpsZipPlus": "1AB",
               "formattedAddress": null,
               "geographicInformation": null,
               "additionalItems":                {
                  "item": [],
                  "tmp": null
               },
               "groupedAdditionalItems": [],
               "persons":                {
                  "person": [                  {
                     "title": null,
                     "gender": null,
                     "firstname": "E",
                     "middlename": null,
                     "lastname": "PODE",
                     "dateOfBirth": null,
                     "firstYearOfResidency": null,
                     "lastYearOfResidency": null,
                     "yearsOfResidency": null,
                     "consentedLandlines": [],
                     "consentedMobiles": [],
                     "consentedEmails": [],
                     "socialMedia": [],
                     "additionalItems":                      {
                        "item": [                        {
                           "key": "BtOsisNumber",
                           "value": "02086666666"
                        }],
                        "tmp": null
                     },
                     "groupedAdditionalItems": []
                  }],
                  "tmp": null
               },
               "uprn": null,
               "lpi": null,
               "blpu": null,
               "streetDescriptor": null,
               "streetInformation": null,
               "companyInformation": null,
               "classification": null,
               "osAl2Toid": null,
               "osItnToid": null,
               "osTopoToid": null,
               "voaCtRecord": null,
               "voaNdrRecord": null,
               "apOSAPR": null,
               "rmUDPRN": null,
               "utilitiesInformation": null
            }],
            "relatedData": null,
            "groupedRelatedData": []
         }]
      },
      "validateResponse": null,
      "verifyResponse": null,
      "traceResponse": null
   }]
}
Sample Directory Enquiry Organisation Lookup XML

The following XML sample demonstrates a request data object containing an organisation and Address.

<!-- Request Input Data - Address and Telephone -->
    <mes:requestData>
    <req:address>
       <data:organisation>GB Group*</data:organisation>
       <data:street/>
       <data:town></data:town>
       <data:postCode>CH4 9GB</data:postCode>
       <data:locality/>
       <data:subBuilding/>
       <data:building/>
       <data:subLocality/>
       <data:stateRegion/>
       <data:countryCode>GBR</data:countryCode>
       <data:poBox/>
       <data:freeFormatAddress></data:freeFormatAddress>
       <data:additionalItems tmp="?"></data:additionalItems>
       <data:persons tmp="?">
          <data:person>
       </data:person>
       </data:persons>
    </req:address>
    <req:filters tmp="?"></req:filters>
    <req:options></req:options>
</mes:requestData>
Sample Directory Enquiry Organisation Lookup JSON
{
    "customerReference": "Test",
    "profileGuid": "C4915B34-639A-45AB-B6D5-75F61DFE73B9",
    "configurationId": "1",
    "requestData": {
      "address": {
        "town": "CHESTER",
        "organisation": "gb g*",
        "postCode": "CH4*",
        "building": "GB*"
      },
      "options": {
        "offset": "0",
        "maxReturn": "10",
        "addressSearchLevel": "PREMISE",
        "casing": "MIXED"
      }
    }
}

 

Sample Organisation Lookup Output XML

The following output XML demonstrates the CaptureResponse for the above Organisation UK Telephone Directory lookup.

<!-- Telephone Component Response -->
    <mes:captureResponse>
    <req:resultStatus>MULTIPLE</req:resultStatus>
    <req:recordsReturned>3</req:recordsReturned>
    <req:moreData>false</req:moreData>
    <req:totalRecordCount>3</req:totalRecordCount>
    <req:totalPages>1</req:totalPages>
    <req:matchScore>0</req:matchScore>
    <req:responseCount>0</req:responseCount>
    <req:response>
       <req:address>
          <data:organisation>GB GROUP PLC</data:organisation>
            <data:street>HERONS WAY</data:street>
            <data:town>CHESTER</data:town>
            <data:postCode>CH4 9GB</data:postCode>
            <data:locality>CHESTER BUSINESS PARK</data:locality>
            <data:buildingName>THE FOUNDATION</data:buildingName>
            <data:stateRegion>CHESHIRE</data:stateRegion>
          <data:additionalItems>
             <data:item>
                <data:key>BtOsisNumber</data:key>
                <data:value>01244657333</data:value>
             </data:item>
          </data:additionalItems>
          <data:persons/>
       </req:address>
       <req:address>
        .
        .
        .
        </req:address>
        <req:address>
        .
        .
        .
        </req:response>
</mes:captureResponse>

Sample Organisation Lookup Output JSON

{
   "profileHeader":    {
      "profileGuid": "C4915B34-639A-45AB-B6D5-75F61DFE73B9",
      "profileName": "UK Telephone number - Directory Enquiries",
      "transactionGuid": "858EBD43-037B-466E-B497-74876C408E09",
      "transactionTimeStamp": 1433341716547,
      "profileStatus": "SUCCESS",
      "remarks": null
   },
   "profileResponseDetails": [   {
      "transactionGuid": "A2AE771C-7DC2-4A6D-8C06-70F8B11A23AD",
      "componentName": "Osis - Directory Enquiry Capture Service",
      "componentStatus": "SUCCESS",
      "componentAction": "DIRECTORY_ENQUIRY",
      "responseType": "CAPTURE",
      "notes": "[]",
      "invoice":       {
         "invoiceList": [         {
            "invoiceGuid": "FF06CDE5-7FB1-4493-96D3-C1E3B12FA0DC",
            "billingInformationGuid": "3E1C4C82-ED38-4BCF-A7BB-F92D26814294",
            "dataLicenceDescription": null,
            "billingPoints": 1,
            "creditsUsed": 1,
            "dataSetInvoices": [            {
               "dataSetCode": "DIRECTORY_ENQUIRY",
               "billingPoints": 1,
               "recordsReturned": 4,
               "dataLicenceGuid": "3E1C4C82-ED38-4BCF-A7BB-F92D26814294"
            }]
         }],
         "tmp": null
      },
      "captureResponse":       {
         "resultStatus": "MULTIPLE",
         "resultStatusDetail": null,
         "recordsReturned": 1,
         "moreData": false,
         "totalRecordCount": 1,
         "totalPages": 1,
         "matchScore": 0,
         "matchLevel": null,
         "outputStatus": null,
         "fieldStatus": null,
         "responseCount": 1,
         "response": [         {
            "input": null,
            "address":             [
                              {
                  "organisation": "GB GROUP PLC",
                  "street": "HERONS WAY",
                  "town": "CHESTER",
                  "postCode": "CH4 9GB",
                  "locality": "CHESTER BUSINESS PARK",
                  "addPoint": null,
                  "department": "MAIN SWITCHBOARD",
                  "subBuilding": null,
                  "buildingNumber": null,
                  "buildingName": "GB HOUSE KINGSFIELD COURT",
                  "buildingGroup": null,
                  "poBox": null,
                  "subStreet": null,
                  "subLocality": null,
                  "stateRegion": "CHESHIRE",
                  "subAdministrativeArea": null,
                  "administrativeArea": null,
                  "superAdministrativeArea": null,
                  "countryCode": "GBR",
                  "countryName": null,
                  "dpsZipPlus": null,
                  "formattedAddress": null,
                  "geographicInformation": null,
                  "additionalItems":                   {
                     "item": [                     {
                        "key": "BtOsisNumber",
                        "value": "01244657333"
                     }],
                     "tmp": null
                  },
                  "groupedAdditionalItems": [],
                  "persons":                   {
                     "person": [],
                     "tmp": null
                  },
                  "uprn": null,
                  "lpi": null,
                  "blpu": null,
                  "streetDescriptor": null,
                  "streetInformation": null,
                  "companyInformation": null,
                  "classification": null,
                  "osAl2Toid": null,
                  "osItnToid": null,
                  "osTopoToid": null,
                  "voaCtRecord": null,
                  "voaNdrRecord": null,
                  "apOSAPR": null,
                  "rmUDPRN": null,
                  "utilitiesInformation": null
               }
            ],
            "relatedData": null,
            "groupedRelatedData": []
         }]
      },
      "validateResponse": null,
      "verifyResponse": null,
      "traceResponse": null
   }]
}
Sample Ambiguous Locality Lookup XML

The following XML sample demonstrates a request data object containing an ambiguous locality in the address.

<!-- Request Input Data - Address and Telephone -->
    <mes:requestData>
    <req:address>
       <data:organisation/>
       <data:street/>
       <data:town>St Helens</data:town>
       <data:postCode></data:postCode>
       <data:locality></data:locality>
       <data:subBuilding/>
       <data:building></data:building>
       <data:subLocality/>
       <data:stateRegion/>
       <data:countryCode>GBR</data:countryCode>
       <data:poBox/>
       <data:freeFormatAddress></data:freeFormatAddress>
       <data:additionalItems tmp="?"></data:additionalItems>
       <data:persons tmp="?">
          <data:person>
             <data:lastname>Smith</data:lastname>
       </data:person>
       </data:persons>
    </req:address>
    <req:filters tmp="?"></req:filters>
    <req:options></req:options>
</mes:requestData>
Sample Ambiguous Locality Lookup Output XML

The following output XML demonstrates the CaptureResponse for the above ambiguous locality UK Telephone Directory lookup.

<!-- UK Telephone Directory Execute Component Response -->
     <mes:ExecuteComponentResponse>
     <mes:action>OS</mes:action>
     <mes:completed>true</mes:completed>
     <mes:dataSetInvoices>
        <req:dataSetCode>DIRECTORY_ENQUIRY</req:dataSetCode>
        <req:billingPoints>0</req:billingPoints>
        <req:recordsReturned>0</req:recordsReturned>
     </mes:dataSetInvoices>
     <mes:notes>Locality not specific enough</mes:notes>
     <mes:captureResponse>
        <req:resultStatus>PICKLIST</req:resultStatus>
        <req:recordsReturned>2</req:recordsReturned>
        <req:moreData>false</req:moreData>
        <req:totalRecordCount>2</req:totalRecordCount>
        <req:totalPages>1</req:totalPages>
        <req:matchScore>0</req:matchScore>
        <req:responseCount>2</req:responseCount>
        <req:response>
           <req:address>
              <data:town>RYDE</data:town>
              <data:locality>ST HELENS</data:locality>
              <data:stateRegion>ISLE OF WIGHT</data:stateRegion>
              <data:persons/>
           </req:address>
           <req:address>
              <data:town>ST HELENS</data:town>
              <data:stateRegion>MERSEYSIDE</data:stateRegion>
              <data:persons/>
           </req:address>
        </req:response>
     </mes:captureResponse>
</mes:ExecuteComponentResponse>

Error Information

Information on possible error codes is given here: Error Code Information

Get started for free today

  • No credit card required
  • Cancel any time
  • 24/5 support
Get started