Quotes search service
IntroducerThis service contains the following method:
GET/quotes IntroducerThe aim of this method is to search for quotes primarily to display the results before loading a single quote for full details. The amount of detail is much less than loading a full quote. e.g. there are no fees.
Search quotes
GET/quotes IntroducerThis method will search for quotes. The payload for this method is
{
"pageNumber": 1,
"pageSize": 10,
"tmpReference": "",
"productCode": "",
"partialCustomerName": "",
"partialPostcode": "",
"searchTypeCode": "",
"dateSearchCode": "Created",
"dateFromTimestamp": null,
"dateToTimestamp": null,
"sortColumnName": "Created",
"sortAscending": true
}
The properties of this payload are:
| Property | Description |
|---|---|
| pageNumber | The page number to return. Set to 1 for first page. |
| pageSize | The number of results to return. From 1 to 50. |
| tmpReference | The TMP reference. Can be empty. |
| productCode | The product. Can be empty. |
| partialCustomerName | Part of the customer name. Can be empty. |
| partialPostcode | Part of postcode, typically the first 3 or 4 characters. Can be empty. |
| searchTypeCode | The type of search. See below. |
| dateSearchCode | What dates to search on. Valid values are Created. |
| dateFromTimestamp | Start date. Set to null to not specify. |
| dateToTimestamp | To date. Set to null to not specify. |
| sortColumnName | The column to sort by. Valid values are TMPReference, Product, Created. |
| sortAscending | Whether results are in ascending order of the sortColumnName. |
Search type code
The search type can be set to the case status code or a specialised search code. If not specified the search will return
- All active quotes (i.e. Saved, Requested, not expired, removed or instructed)
- Any expired, removed or instructed quotes created in the last two months
searchTypeCode | Description |
|---|---|
| ALLQUOTES | Will return all quotes within the date range. If this is used then you should set the date from property otherwise all quotes will be returned. |
Validation
pageNumbermust be greater than or equal to 1. If a page number is specified for which there are no results then a validation error will not be raised. The result object will return the number of results from which you can calculate how many pages there are.pageSizemust be between 1 and 50.tmpReferencemust be a valid TMP reference. Can be empty.productCodemust be a valid Product code. Can be empty.searchTypeCodemust be as specified above.partialCustomerNamecan have a length of up to 20 characters. Can be empty.partialPostcodecan have a length of up to 8 characters. Can be empty.dateSearchCodemust be set to Created.sortColumnNamecan be set to one of TMPReference, Product, Created.
Search results
A simple search results return could be
{
"searchResults": [
{
"tmpReference": "TMP103263",
"tmpCustomerReference": "TMP103263",
"customerNames": "Joe Kennilworth",
"propertyPostcode": "OX10 3PL",
"results": [
{
"sequence": 1,
"productCode": "RICSL2SURVEY",
"quoteResultStatusCode": "EXPIRED"
}
],
"otherInformation": {},
"timestamps": {
"CREATED": "2024-06-25T13:06:09.7782796Z"
}
}
],
"numberOfResults": 1,
"pageSize": 2,
"currentPage": 1
}
There are integer values for
currentPage- the page number being returned.pageSize- the size of the page. Will always be the size of the page and not the number of results returned in thesearchResultsproperty.numberOfResults- the total number of results (for all pages).
And there is a searchResults property which is a list of results, e.g.
The properties of this return are:
| Property | Description |
|---|---|
| tmpReference | The TMP Reference. See (References)(/key-concepts#instruction-references). |
| tmpCustomerReference | The TMP Reference to show to customers. See (References)(/key-concepts#instruction-references). |
| customerNames | The names of the customer - for display. |
| propertyPostcode | The postcode of the property - for display. |
| results | A list of each result for the quote. |
| otherInformation | A dictionary of other information returned. |
| timestamps | A dictionary of key timestamps. |
Quote results
Each quote can have one or more results. See (Key concepts)(/key-concepts#introduction) for more details.
The results object for the search consists of the following properties:
| Property | Description |
|---|---|
| Sequence | Index starting for 1 of the results. |
| QuoteResultStatusCode | Status of the quote - set to REQUESTED, SAVED, REFERRED, REMOVED, EXPIRED. |
| ProductCode | The product for this result. |
Other information
No information is currently added to this property.
INFO
This property is present as it will be used for INTRODUCERCUSTOMERREFERENCE and INTRODUCERINTEGRATIONREFERENCE in a similar manner to the Instruction search.
Timestamps
The timestamps property will have the following (if applicable):
- CREATED - the timestamp the instruction was created.
