Skip to content

Matchcode UK Powersearch Integration Guide


UK Powersearch, also known as single-line auto-complete, is a "Google-like" search method by which the user types into a single text field and is shown a list of potential matches which is rebuilt as they continue to type. This Service has been implemented as a REST Web Service in order to make a light Service achieving fast response times, allowing for an interactive user experience

UK Powersearch Searching

UK Powersearch will return a list of addresses matching to the information provided in the Request. This service need one input: The ADDRESS (or part of the address) to be found. The more accurate the information provided, the smaller the returned list. The way ADDRESS must be provided to the service will be detailed below.

Output Formatting Options

UK Powersearch provides the possibility to format the returning address. The formatting will only apply when the Response has just one address rather than a list of addresses. In case of list of addresses, the formatting will be skipped. The formatting options can be found here:

Matchcode Formatting Options

The way these formatting options must be supplied to the service will be detailed below.

Using the Powersearch REST Service

The UK Powersearch REST WebService offers its operation through the HTTP GET method so that all the data supplied to the Service must be in the URL as HTTP parameters.

The REST WebService offers the possibility to get the Response in two different formats: XML or JSON. In order to specify the preferred format in the Response the Accept Header Request Parameter must be supplied:

To get the Response in XML format: Accept: application/xml
To get the Response in JSon format: Accept: application/json

If the Accept Header Request Parameter is omitted, the XML format in the Response will be applied as the default format.

 

Authentication

As a REST Web Service, UK Powersearch uses Http Basic Authentication.

Briefly, the client must send its credentials (UserID and Password). This credentials must be the result of Base64 encoding of the next string: userID:password. This Base64 encoded string must be supplied as a Header Request Parameter.

Example:
The client wants to send the credentials Username: userexample and Password: passwordexample, so the string to send should be:
Authorization: Basic dXNlcmV4YW1wbGU6cGFzc3dvcmRleGFtcGxl

Authorization is the Header Request Parameter name, and Basic dXNlcmV4YW1wbGU6cGFzc3dvcmRleGFtcGxl the Header Request Parameter value where dXNlcmV4YW1wbGU6cGFzc3dvcmRleGFtcGxl is userexample:passwordexample encoded in Base64.

The above information must be sent within every request to the REST Web Service, so the client must be authenticated in every single request.

UK Address Data

These are several examples of UK Address Data Requests and Responses:

Scenario Notes
Address Search (not very accurate request) REQUEST Enter the address to be found in the Request Parameter address
https://idmp.gb.co.uk/idm-powersearch-rest/powersearch/names?address=8 london road
Address Search (not very accurate request) RESPONSE As the Address introduced in the Request was not very accurate, the service return a list of matches.

(XML Response)                          
 
 
     
        1
        2015-09-04T11:23:47.775+01:00
        E017CACB-EF0B-41BB-91C6-3C28C02796AD
     
    8 London Road, ANDOVER, Hants, SP10 2PU, , ,
    8 London Road, ARUNDEL, W Sussex, BN18 9AT, , ,
    8 London Road, BALDOCK, Herts, SG7 6JN, , ,
    8 London Road, BECCLES, Suffolk, NR34 9NH, , ,
    8 London Road, BELFAST, Co Antrim, BT6 8EY, , ,
    8 London Road, BIGGLESWADE, Beds, SG18 8EB, , ,
    8 London Road, BILLERICAY, Essex, CM12 9ET, , ,
    8 London Road, BIRMINGHAM, W Midlands, B20 3HU, , ,
    8 London Road, BLACKPOOL, Lancs, FY3 8DL, , ,
    8 London Road, BUCKINGHAM, Bucks, MK18 1AS, , ,
    8 London Road, BUNTINGFORD, Herts, SG9 9JN, , ,
    8 London Road, BUXTON, Derbyshire, SK17 9NX, , ,
    8 London Road, CANTERBURY, Kent, CT2 8LR, , ,
    8 London Road, CARLISLE, Cumbria, CA1 2EL, , ,
    8 London Road, CATERHAM, Surrey, CR3 5PQ, , ,
    8 London Road, CHATTERIS, Cambs, PE16 6AS, , ,
    8 London Road, CHELTENHAM, Glos, GL52 6DF, , ,
    8 London Road, CHIPPENHAM, Wilts, SN15 3AT, , ,
    8 London Road, CHIPPING NORTON, Oxon, OX7 5AX, , ,
    8 London Road, CIRENCESTER, Glos, GL7 1AE, , ,
    8 London Road, COALVILLE, Leics, LE67 3JA, , ,
    8 London Road, COLCHESTER, Essex, CO3 4DE, , ,
    8 London Road, CORWEN, Clwyd, LL21 0DR, , ,
    8 London Road, DALKEITH, Midlothian, EH22 1DR, , ,
    8 London Road, DOVER, Kent, CT17 0ST, , ,
    8 London Road, FAVERSHAM, Kent, ME13 8RX, , ,
    8 London Road, GREENHITHE, Kent, DA9 9EQ, , ,
    8 London Road, HAILSHAM, E Sussex, BN27 1EB, , ,
    8 London Road, HALESWORTH, Suffolk, IP19 8LW, , ,
    8 London Road, HARLESTON, Norfolk, IP20 9BW, , ,
    8 London Road, Abridge, ROMFORD, Essex, RM4 1UX, ,
    8 London Road, Amesbury, SALISBURY, Wilts, SP4 7DY, ,
    8 London Road, Aston Clinton, AYLESBURY, Bucks, HP22 5HQ, ,
    8 London Road, Balcombe, HAYWARDS HEATH, W Sussex, RH17 6PZ, ,
    8 London Road, Blewbury, DIDCOT, Oxon, OX11 9NU, ,
    8 London Road, Capel St Mary, IPSWICH, Suffolk, IP9 2JR, ,
    8 London Road, Cowplain, WATERLOOVILLE, Hants, PO8 8DL, ,
    8 London Road, Crays Hill, BILLERICAY, Essex, CM11 2UR, ,
    8 London Road, Datchet, SLOUGH, Berks, SL3 9JN, ,
    8 London Road, Dunton Green, SEVENOAKS, Kent, TN13 2UE, ,
    8 London Road, Ewell, EPSOM, Surrey, KT17 2BB, ,
    8 London Road, Farningham, DARTFORD, Kent, DA4 0JP, ,
    8 London Road, Feering, COLCHESTER, Essex, CO5 9ED, ,
    8 London Road, Frampton, BOSTON, Lincs, PE20 1BP, ,
    8 London Road, Godmanchester, HUNTINGDON, Cambs, PE29 2JA, ,
    8 London Road, Great Chesterford, SAFFRON WALDEN, Essex, CB10 1NY, ,
    8 London Road, Great Glen, LEICESTER, Leics, LE8 9DJ, ,
    8 London Road, Great Shelford, CAMBRIDGE, Cambs, CB22 5DD, ,
    8 London Road, Halstead, SEVENOAKS, Kent, TN14 7DS, ,
    8 London Road, Harston, CAMBRIDGE, Cambs, CB22 7QH, ,
(JSON Response)                         
 
{
   "sessionData":    {
      "sessionKey": "E017CACB-EF0B-41BB-91C6-3C28C02796AD",
      "sessionCommencement": 2015-09-04T11:23:47.775+01:00,
      "numberOfSessionTransactions": 1,                               
   },
   "matches":    [
      "8 London Road, ANDOVER, Hants, SP10 2PU, , , ",
      "8 London Road, ARUNDEL, W Sussex, BN18 9AT, , , ",
      "8 London Road, BALDOCK, Herts, SG7  6JN, , , ",
      "8 London Road, BECCLES, Suffolk, NR34 9NH, , , ",
      "8 London Road, BELFAST, Co Antrim, BT6  8EY, , , ",
      "8 London Road, BIGGLESWADE, Beds, SG18 8EB, , , ",
      "8 London Road, BILLERICAY, Essex, CM12 9ET, , , ",
      "8 London Road, BIRMINGHAM, W Midlands, B20  3HU, , , ",
      "8 London Road, BLACKPOOL, Lancs, FY3  8DL, , , ",
      "8 London Road, BUCKINGHAM, Bucks, MK18 1AS, , , ",
      "8 London Road, BUNTINGFORD, Herts, SG9  9JN, , , ",
      "8 London Road, BUXTON, Derbyshire, SK17 9NX, , , ",
      "8 London Road, CANTERBURY, Kent, CT2  8LR, , , ",
      "8 London Road, CARLISLE, Cumbria, CA1  2EL, , , ",
      "8 London Road, CATERHAM, Surrey, CR3  5PQ, , , ",
      "8 London Road, CHATTERIS, Cambs, PE16 6AS, , , ",
      "8 London Road, CHELTENHAM, Glos, GL52 6DF, , , ",
      "8 London Road, CHIPPENHAM, Wilts, SN15 3AT, , , ",
      "8 London Road, CHIPPING NORTON, Oxon, OX7  5AX, , , ",
      "8 London Road, CIRENCESTER, Glos, GL7  1AE, , , ",
      "8 London Road, COALVILLE, Leics, LE67 3JA, , , ",
      "8 London Road, COLCHESTER, Essex, CO3  4DE, , , ",
      "8 London Road, CORWEN, Clwyd, LL21 0DR, , , ",
      "8 London Road, DALKEITH, Midlothian, EH22 1DR, , , ",
      "8 London Road, DOVER, Kent, CT17 0ST, , , ",
      "8 London Road, FAVERSHAM, Kent, ME13 8RX, , , ",
      "8 London Road, GREENHITHE, Kent, DA9  9EQ, , , ",
      "8 London Road, HAILSHAM, E Sussex, BN27 1EB, , , ",
      "8 London Road, HALESWORTH, Suffolk, IP19 8LW, , , ",
      "8 London Road, HARLESTON, Norfolk, IP20 9BW, , , ",
      "8 London Road, Abridge, ROMFORD, Essex, RM4  1UX, , ",
      "8 London Road, Amesbury, SALISBURY, Wilts, SP4  7DY, , ",
      "8 London Road, Aston Clinton, AYLESBURY, Bucks, HP22 5HQ, , ",
      "8 London Road, Balcombe, HAYWARDS HEATH, W Sussex, RH17 6PZ, , ",
      "8 London Road, Blewbury, DIDCOT, Oxon, OX11 9NU, , ",
      "8 London Road, Capel St Mary, IPSWICH, Suffolk, IP9  2JR, , ",
      "8 London Road, Cowplain, WATERLOOVILLE, Hants, PO8  8DL, , ",
      "8 London Road, Crays Hill, BILLERICAY, Essex, CM11 2UR, , ",
      "8 London Road, Datchet, SLOUGH, Berks, SL3  9JN, , ",
      "8 London Road, Dunton Green, SEVENOAKS, Kent, TN13 2UE, , ",
      "8 London Road, Ewell, EPSOM, Surrey, KT17 2BB, , ",
      "8 London Road, Farningham, DARTFORD, Kent, DA4  0JP, , ",
      "8 London Road, Feering, COLCHESTER, Essex, CO5  9ED, , ",
      "8 London Road, Frampton, BOSTON, Lincs, PE20 1BP, , ",
      "8 London Road, Godmanchester, HUNTINGDON, Cambs, PE29 2JA, , ",
      "8 London Road, Great Chesterford, SAFFRON WALDEN, Essex, CB10 1NY, , ",
      "8 London Road, Great Glen, LEICESTER, Leics, LE8  9DJ, , ",
      "8 London Road, Great Shelford, CAMBRIDGE, Cambs, CB22 5DD, , ",
      "8 London Road, Halstead, SEVENOAKS, Kent, TN14 7DS, , ",
      "8 London Road, Harston, CAMBRIDGE, Cambs, CB22 7QH, , "
   ],
   "information": null
}

Scenario Notes
Address Search (accurate address) REQUEST Enter the address to be found in the Request Parameter address
https://idmp.gb.co.uk/idm-powersearch-rest/powersearch/names?address=8 London Road, BALDOCK, Herts, SG7 6JN
Address Search (accurate address) RESPONSE As the Address introduced is very accurate, only one match is returned.

(XML Response)                          
 
 
     
        1
        2015-06-04T13:04:15.651+01:00
        7764B769-FF97-4FBD-BB0C-6F28F5798C6E
     
    8 London Road, BALDOCK, Herts, SG7 6JN1L, , ,
(JSON Response)                         
 
{
   "sessionData":    {
      "sessionKey": "7764B769-FF97-4FBD-BB0C-6F28F5798C6E",
      "sessionCommencement": 2015-06-04T13:04:15.651+01:00,
      "numberOfSessionTransactions": 1,                               
   },
   "matches": ["8 London Road, BALDOCK, Herts, SG7 6JN1L, , , "],
   "information": null
}

Scenario Notes
Address Search (accurate address) & Formatting REQUEST Enter the formatting option by using the Request Parameter format Parameter address
https://idmp.gb.co.uk/idm-powersearch-rest/powersearch/names?address=8 London Road, BALDOCK, Herts, SG7 6JN&format=LC=3
Address Search (accurate address) & Formatting RESPONSE According the formatting option introduced, the number of address lines must be 3

(XML Response)                          
 
 
     
        1
        2015-06-04T13:04:15.651+01:00
        7764B769-FF97-4FBD-BB0C-6F28F5798C6E
     
    8 London Road, BALDOCK, Herts SG7 6JN1L
(JSON Response)                         
 
{
   "sessionData":    {
      "sessionKey": "7764B769-FF97-4FBD-BB0C-6F28F5798C6E",
      "sessionCommencement": 2015-06-04T13:04:15.651+01:00,
      "numberOfSessionTransactions": 1,                               
   },
   "matches": ["8 London Road, BALDOCK, Herts SG7 6JN1L"],
   "information": null
}

Session Management - IMPORTANT

UK Powersearch Address Searching provides a mechanism to ensure that the desired final address can be found within a fair time and number of transactions. Thus, all the requests needed to find an Address will be included in a Session. Sessions have a limit of either 50 transactions or 2 minutes.

If the client supplies a valid SessionKey, the request will be included in that Session. If the client supplies an invalid SessionKey or no SessionKey is provided (first request), the Powersearch Service will create a new Session where the current transaction will be included.

Note that an invalid SessionKey might be a wrong key or a key that represents a Session with more than 50 calls or more than 2 minutes of life.

Each new session key will result in a billing point and will therefore remove a credit for customers with Pre-pay transaction accounts. Please therefore ensure that Session keys are recycled throughout each instance of a customer searching for their address.

As it can be seen in the above examples, a SessionData element is returned in every UK Searching Response from the Service. This SessionData contains a SessionKey (to be used in next request), sessionCommencement (session commencement timestamp), and numberOfSessionsTransactions (number of Transactions already used in this Session)

This is an example of how to add a SessionKey to the request:

Scenario Notes
Including SessionKey in the UK Address Search REQUEST Enter the parameter sessionkey with the SessionKey (got from the last Response to the Service).
https://idmp.gb.co.uk/idm-powersearch-rest/powersearch/names?address=york road f&sessionkey=2432D120-1F36-4894-861D-E319C7636A22
UK Address Search RESPONSE Address Search Response

(XML Response)                          
 
 
     
        5
        2015-06-04T15:16:12.548+01:00
        2432D120-1F36-4894-861D-E319C7636A22
     
    York Road Farm, York Road, Healaugh, TADCASTER, N Yorkshire, LS24 8DD,
    York Road Fish Shop, 28 York Road, Birtley, CHESTER LE ST, Co Durham, DH3 2BD,
    York Road Fish Shop, 40 York Road, TADCASTER, N Yorkshire, LS24 8AF, ,
    York Road Fisheries And Pizza Bar, 350 York Road, LEEDS, W Yorkshire, LS9 9DN, ,
    York Road Furniture Centre, 37 York Road, HARTLEPOOL, Cleveland, TS26 8AR, ,
(JSON Response)                         
 
{
   "sessionData":    {
      "sessionKey": "2432D120-1F36-4894-861D-E319C7636A22",
      "sessionCommencement": 2015-06-04T15:16:14.348+01:00,
      "numberOfSessionTransactions": 7,                              
   },
   "matches":    [
      "York Road Farm, York Road, Healaugh, TADCASTER, N Yorkshire, LS24 8DD, ",
      "York Road Fish Shop, 28 York Road, Birtley, CHESTER LE ST, Co Durham, DH3  2BD, ",
      "York Road Fish Shop, 40 York Road, TADCASTER, N Yorkshire, LS24 8AF, , ",
      "York Road Fisheries And Pizza Bar, 350 York Road, LEEDS, W Yorkshire, LS9  9DN, , ",
      "York Road Furniture Centre, 37 York Road, HARTLEPOOL, Cleveland, TS26 8AR, , "
   ],
   "information": null
}

Get started for free today

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