| GET | /2.0/address/{Postcode} | ||
|---|---|---|---|
| GET | /2.0/address/{Postcode}/{HouseNo} |
"use strict";
export class Address {
/** @param {{County?:string,Id?:number,Locality?:string,Organisation?:string,Postcode?:string,Property?:string,RAPPPremiseId?:number,Street?:string,Town?:string,FullAddress?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
County;
/** @type {number} */
Id;
/** @type {string} */
Locality;
/** @type {string} */
Organisation;
/** @type {string} */
Postcode;
/** @type {string} */
Property;
/** @type {number} */
RAPPPremiseId;
/** @type {string} */
Street;
/** @type {string} */
Town;
/** @type {string} */
FullAddress;
}
export class LookupResult {
/** @param {{Addresses?:Address[],errormsg?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Address[]} */
Addresses;
/** @type {string} */
errormsg;
}
export class AddressRequest {
/** @param {{Version?:number,Postcode?:string,HouseNo?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Version;
/**
* @type {string}
* @description Using a Postcode to return addresses. */
Postcode;
/**
* @type {string}
* @description Optional input value to limit the return data to a specific address. */
HouseNo;
}
JavaScript AddressRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /2.0/address/{Postcode} HTTP/1.1
Host: webservices.mbukdatabase.co.uk
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Addresses":[{"County":"String","Id":0,"Locality":"String","Organisation":"String","Postcode":"String","Property":"String","RAPPPremiseId":0,"Street":"String","Town":"String","FullAddress":"String, String, String, String, String, String"}],"errormsg":"String"}