Getting a Spatial Address by UPRN
Ordnance Survey UPRN is a unique identifier for all addressable properties in the UK.
Use a UPRN to get a Spatial Address:
// 10 Downing Street, London, SW1A 2AA
var addresses = await client.PurchasePostalAddressesAsync(new UniquePropertyReferenceNumber(100023336956));
var address = addresses.First();
Once you have a Spatial Address you can then purchase variables from its catalog:
var catalogId = new ResourceCatalogId($"https://api.whenfresh.com/world/GB/uprns/{uprn}/catalog");
var variableIdentifiersToPurchase = new List<VariableId>
{
new VariableId("...first variable identifier..."),
new VariableId("...second variable identifier...")
};
var purchasedVariables = await client.PurchaseVariablesAsync(catalogId, variableIdentifiersToPurchase);
