Postcode Anywhere Address Management Web Service
HOME PRODUCTS DEVELOPERS RESELLERS ABOUT US MY ACCOUNT COMMUNITY  
Developer home
Getting started
Tutorials
Code samples
Documentation and reference
Downloads
Service information
Home - Developer Centre - Documentation and reference - Business Information

FetchById

Queries the database, returning a business matching the Id.

Notes

  • You will be charged 3 business credits for each record returned.
  • Not all the fields are populated for all records.
  • The following records are free for test purposes:
  • GBR: Microsoft Ltd. Microsoft Campus Thames Valley Reading, RG6 1WG
  • FRA: MICROSOFT FRANCE 148 RUE DE L UNIVERSITE Paris, 92200
  • USA: Microsoft Corporation 4200 150th Ave Ne Redmond, 98052-5302
  • DEU: Microsoft Deutschland GmbH Katharina-Heinroth-Ufer 1 Berlin, 10787
  • AUS: MICROSOFT PTY LTD LEVEL 7 1 EAGLE ST Brisbane, 4000
  • SGP: MICROSOFT SINGAPORE PTE LTD 1 Marina Boulevard Singapore, 018989
  • JPN: MICROSOFT CO.,LTD. ODAKYU SOUTHERN TOWER Shibuya-Ku, 151-0053

SOAP service

Postcode Anywhere SOAP services are based on the .NET framework and offer the easiest route for .NET and other SOAP developers to consume the service. The service is available across HTTP and HTTPS protocols although we only recommend HTTPS in exceptional circumstances due to the significant performance overhead this involves.

View the WSDL    Try the SOAP service

WSDL

http://services.postcodeanywhere.co.uk/international/business.asmx?wsdl

Method signature

Function FetchById (Id as String, AccountCode as String, LicenseKey as String) as BusinessResults

Description of parameters

Name Type Description
Id String The id of the business to search for.
AccountCode String The account code to use for the transaction.
LicenseKey String The license key to use for the transaction.

XML service

Postcode Anywhere XML services offer a simple and flexible way to interact with service. The service is available across HTTP and HTTPS protocols although we only recommend HTTPS in exceptional circumstances due to the significant performance overhead this involves. They offer 6 response formats which generalise to a tabular structure, and in each case the request structure is exactly the same. Each request is a standard HTTP GET request with the querystring forming the request parameters. The different response formats are:

  • XML is an attribute oriented XML response which is compact and quick to work with. The document contains a schema element which describes the fields present and data elements with the individual fields present as attributes. Where a field is blank in the response, the attribute is omitted.
  • Recordset is similar to the regular XML response but contains additional attributes and tags to make it parsable from the Microsoft OLEDB persistence provider. This is ideal for VB and ASP developers without XML skills as the response can be directly loaded into an ADO recordset.
  • Dataset follows the Microsoft ADO.NET dataset persistence format and can be easily loaded into a .NET dataset for manipulation. The element oriented format is considerably cleaner than the recordset equivalent and may be of use to regular XML users.
  • CSV returns a CSV formatted document with one record per line, the first line containing the field headings. This format is useful in legacy systems and those without XML parsers.
  • TSV returns a TSV formatted document with one record per line, the first line containing the field headings. This format is useful in legacy systems and those without XML parsers.
  • Inline returns Javascript to be executed by a browser. This format is useful for client side development in web applications.
  • JSON returns a JSON (JavaScript Object Notation) encoded response. Use the callback parameter to set the function that is invoked when the data is returned to the browser.

XML example    ADO recordset example    .NET dataset example

CSV example    TSV example    Inline example

JSON example

Helpful code samples

These automatically generated code samples are great for Java, Javascript, ASP, PHP and SQL developers. They provide a simple framework for integrating into your applications.

Javascript function    ASP function    SQL stored procedure

PHP function    Java function    Cold Fusion fragment

PLSQL (Oracle)    JSON    C#

VB6    VB.NET

Request parameters

Name Type Description Value Default
action String business
type String fetch
id String The id of the company.
account_code String The account code to use for the transaction.
license_key String The license key to use for the transaction.

Response fields

Name Type Description Example
id String A unique ID for this business.
seq Integer A zero based counter indicating the row number.
organisation_name String The name of the company.
line1 String Formatted line 1 of the address.
line2 String Formatted line 2 of the address.
city String
state String
country String The full name of the country
country_code String The 3 digit ISO country code for the country
postal_code String
continent String
ceo String The CEO's full name
title String The job title / description of the primary contact
forename String
surname String
country_access_code String The country access code for the phone numbers (e.g. 44 for the UK)
phone String The phone number for the company.
fax String The fax number for the company.
duns String The global DUNS number for the company.
sic_code String The SIC (87) code describing the business.
sic_description String The Thomson directory code for the business.
employees_here String The number of employees at this site.
employees_total String The number of employees in the company.
sales String Actual sales for the company.
sales_modelled String Modelled sales figure for the company.
location String The type of company locations.
year_started Integer The year the company started trading.
See the address and postcode finder in use
Register for a free trial
Developer download components