Orders¶
Once you have the available documents for the area of interest it is now possible to construct a full order.
Request¶
Structure¶
The order is broken down in to the following items
Your Reference
Authentication
Property Information
Property Type {Residential, Commercial}
Property Title {Registered, Unregistered}
Property Tenure{Freehold, lease hold, common hold}
The Title plan
Address
Organisation
PO Pox Details
Sub Building Name
Building Name
Building Number
Dependant Thoroughfare Name
Dependant Thoroughfare Description
Thorough Fare Name
Thorough Fare Descriptor
Double Dependant Locality
Dependant Locality
Post Town
County
Postcode
List of Products¶
Id from the product search
Type from the product search
Code Example¶
var file = File.ReadAllBytes(“Path/to/file/titleplan.pdf”);
var auth = new OrderService.Authentication { Username = “Username”, Password = “Password” };
var order = new OrderService.OrderRequest
{
Authentication = auth,
Address = new OrderService.Address
{
PostCode = “TN27 8BS”,
BuildingName = “HOLLY HOUSE”,
SubBuildingName = “FLAT 1”,
ThoroughfareName = “OAK AVENUE”,
DependantLocality = “BIDDENDEN”,
County = “KENT”,
PostTown = “ASHFORD”
},
PropertyInfomation = new OrderService.PropertyInfomation
{
PropertyType = OrderService.PropertyType.Residential,
},
Products = new OrderService.ProductOrder[]
{
new OrderService.ProductOrder
{
Id = 1,
Type = “Product”
}
},
TitlePlan = file,
Reference = “YourReference”
};
var request = new OrderService.OrderWebServiceClient(endpointConfiguration);
var response = await request.SubmitOrderAsync(order);
Response¶
Class structure¶
public class OrderResponse
{
public bool IsSuccessful { get; set; }
public string CaseReference { get; set; }
public List OrderedProducts { get; set; }
}
public class ProductResponse
{
public string DocumentType { get; set; }
public string DocumentReference { get; set; }
public double DocumentPrice { get; set; }
}
Code Example¶
Console.WriteLine(response.Body.SubmitOrderResult.IsSuccessful);
Console.WriteLine(response.Body.SubmitOrderResult.CaseReference);
foreach (var item in response.Body.SubmitOrderResult.OrderedProducts)
{
Console.WriteLine($“£{item.DocumentPrice} id: {item.DocumentReference} type :{item.DocumentType}”);
}