Getting Started
===============
We use the industry standard OSCRE/PISCES format for structuring
requests.
This will need to be POSTed to the correct endpoint as described below.
API Credentials
~~~~~~~~~~~~~~~
Credentials are required when passing requests to our API.
You will need to speak to a member of our team to get an API username
and password.
Authentication
~~~~~~~~~~~~~~
In order to authenticate a request a API username and password need to
be passed in as part of the message body.
The following example shows how to format the Authentication element.
::
2.0
api
api
Crafting the XML request
~~~~~~~~~~~~~~~~~~~~~~~~
In order to place an order you will need to construct an XML document of
the following type:
::
....
...
Search Order
^^^^^^^^^^^^
The next element is the SearchOrder element.
::
....
The following fields should be placed within this element.
Search Requester Reference (Required)
'''''''''''''''''''''''''''''''''''''
This your reference. We will store this with your order for future use.
::
01321635
SearchFacilitatorParty
Search Facilitator Reference (Required)
'''''''''''''''''''''''''''''''''''''''
This is your customer’s reference.
::
MY-CUSTOMER-REF
SearchRequesterParty
Subject Property (Required)
'''''''''''''''''''''''''''
The property specifics should be provided in the following element:
::
....
PAF Address
'''''''''''
Full address details for the property.
::
Legal Bricks Searches Ltd
2 Dudley Court North
Waterfront East
Brierley Hill
Dudley
DY5 1XP
Easting / Northing coordinates
''''''''''''''''''''''''''''''
Provide a central point of the property
::
1
398831.63
283710.5
Plan Geometry (Required)
''''''''''''''''''''''''
A boundary extent is required and can be provided as an array of
polygons. The first is considered the outer ring and further geometries
are inner rings.
The array of points must start and end with the same point to ensure
that there is a closed polygon.
::
PROPERTY_EASTING_AND_NORTHING
EASTING and NORTHING of the property
1
1
398831.63
283710.5
2
398864.88
283725
....
....
Plan Attachment (Dependent)
'''''''''''''''''''''''''''
If you have ordered a product that requires a plan, then you will need
to provide this as part of your order.
This should be provided as a base64 encoded binary object. The original
file should be a zipped gif file.
::
{base64_encoded_plan}
Search Product (Required)
'''''''''''''''''''''''''
You need to provide a ProductType and a LocalAuthority.
Example:
::
PersonalLocalAuthoritySearch
Dudley Metropolitan Borough Council
LocalAuthority
The product type must match on the product types listed below.
Allowed product codes
- PersonalLocalAuthoritySearch
- OfficialLLC1AndCON29
- PersonalDrainageAndWaterSearch
- OfficialDrainageAndWaterSearch
- TitlePlan
- ChancelSearch
- CoalAndBrineReport
- LandmarkEnvirosearch
- GroundSureEnvirosearch
- LandmarkHomecheckProfessional
- LandmarkHomecheckFlood
Local authority names
It’s preferred that you use the ONS Code for the local authority as this
will be easier for us to lookup when creating the order.
However, you can provide us a list of the local authority names stored
in your database so that we can make sure they map to ones in ours.
The Response
~~~~~~~~~~~~
The response will be of a ForwardSearchOrderSendAcknowledge type
::
....
Fields
^^^^^^
Search Order Reference / Search Requester Party
'''''''''''''''''''''''''''''''''''''''''''''''
This is the original reference passed as part of the request - this is
stored with the order in our database
::
CUST_REF_01
SearchRequesterParty
Search Order Reference / Search Facilitator Party
'''''''''''''''''''''''''''''''''''''''''''''''''
This is the facilitor reference that you pass in. We pass this back
unaltered.
Example
::
99900555
SearchFacilitatorParty
Search Order Reference / Search Supplier Party
''''''''''''''''''''''''''''''''''''''''''''''
This is our reference that we generate when storing the order in our
database.
Example:
::
6919
SearchSupplierParty
Legal Bricks
Errors
~~~~~~
You may recieve the following resonses from the server if there was a
probelm processing the request.
The XML was badly formed
^^^^^^^^^^^^^^^^^^^^^^^^
::
There is an error in XML document (1, 1496).
Authentication failed
^^^^^^^^^^^^^^^^^^^^^
::
Invalid user credentials
Reference missing
^^^^^^^^^^^^^^^^^
::
Missing SearchOrderReference for SearchFacilitatorParty
Plan not provided
^^^^^^^^^^^^^^^^^
::
A plan is required for this order
Invalid product type
^^^^^^^^^^^^^^^^^^^^
::
Unknown product type
Endpoints
~~~~~~~~~
You will be provided a set of credentials for both our testing and
production environments.
The URIs are as follows
Testing: https://api-testing.legalbricks.co.uk/pisces/v2
Production: https://api.legalbricks.co.uk/pisces/v2
Testing
~~~~~~~
Testing should be performed against the ‘testing’ environment (using the
testing endpoint as specified)
You can test using Curl, e.g ordering a search using the order sample
xml file:
::
curl -X POST -H "Content-Type: application/xml" -d @/mnt/d/misc/xml/order.xml https://api-testing.legalbricks.co.uk/pisces/v2/
or PowerShell
::
Invoke-RestMethod -Uri https://api-testing.legalbricks.co.uk/pisces/v2 -Method POST -InFile .\order.xml