Query

Query

Returns information on one or more measure sheets, including measurements, by searching via a SQL query. Results can be paged. 

Request

Method
URL
POST

Headers

Name
Required
Type
Description
APIKey
Guid
A valid API key with a scope of MeasureSheets | Read

Body

Name
Required
Type
Description
CustomerUniqueID
GUID
The unique ID of the customer that the measure sheet belongs to.
CustomerExternalID
Text
The external ID of the customer that the measure sheet belongs to.
Where
Text
A where clause used to filter the results. If no query is supplied, then nothing will be returned.
Page
Number
The page number of the results to return, as dictated by the number of records per page (PageSize). The default page number is 1.
PageSize
Number
The maximum number of records to return per page. The default value is 50.
{
"CustomerUniqueID": "cd929a27-2492-4bdd-bda5-e1fa8ff0b9b3",
"CustomerExternalID": "",
"Where": "Location = 'Primary House'",
"Page": 2,
"PageSize": 25
}

Remarks

To identify a customer, only the CustomerUniqueID OR the CustomerExternalID are used. If both are supplied, the CustomerUniqueID will be used.
The “where” property of the object must be an SQL expression and should not actually contain the keyword “WHERE”. The expressions forbid the following:
  • Anything that is not a syntactically correct SQL expression which results in a Boolean.
  • Nested SELECTs.
  • References to tables.
  • References to columns not explicitly allowed by the API method.
  • References to named parameters.
  • Aggregate functions.
  • Scalar functions not explicitly allowed by the API.

Response

Headers

Code
Description
200 OK
One or more measure sheets were returned.
400 Bad Request
Measure sheets could not be queried. The reason why will be returned.
401 Unauthorized
The API key is missing, invalid, disabled, or does not have the correct scope.
404 Not Found
The customer was not found.

Body

Property
Type
Description
Location
Text
The location of the measure sheet.
UserName
Text
The username of the user who last updated the measure sheet.
AddedOn
Date
The date and time when the measure sheet was added.
UpdatedOn
Date
The date and time when the measure sheet was last updated.
UniqueID
GUID
The unique ID of the measure sheet.
Measurements
Object Array
The measurements associated with the measure sheet. See Measurements in the Create endpoint for an explanation of this format.
[
{
"Location": "Primary House",
"UserName": "Jack Black",
"AddedOn": "2012-04-23T18:25:43.511Z",
"UpdatedOn": "2012-04-23T18:25:43.511Z",
"UniqueID": "2bd27f7c-586a-49df-9bb1-e1328aa9cbdd",

"Measurements": [
{
"Room": "Kitchen",
"Item": "Window 1",
"Mount": "Inside",
"Width": "25 1/2",
"Height": "55",
"Remarks": "This window is not square."
},
{
"Room": "Kitchen",
"Item": "Window 2",
"Mount": "Inside",
"Width": "25",
"Height": "55.25",
"Remarks": "",
"OtherMeasurements":
{
"W1": "55",
"W2": "55.5",
"W3": "55.75"
}
}
]
},
{
"Location": "Office",
"UserName": "",
"AddedOn": "2012-04-23T18:25:43.511Z",
"UpdatedOn": "2012-04-23T18:25:43.511Z",
"UniqueID": "2bd27f7c-586a-49df-9bb1-e1328aa9cbdd",

"Measurements": [
{
"Room": "Main Office",
"Item": "Window 1",
"Mount": "Outside",
"Width": "44",
"Height": "55",
"Remarks": ""
}
]
}
]