Discussions

Ask a Question
Back to All

Error using query endpoint

When I used Query API, I get an error message getting the list of WorkOrder Custom Fields,
it looks like some issue in using ActoryType in condition, I tried ObjectTypeId = “WO” , it returns
{
"ErrorMessage": "Input string was not in a correct format.",
"ErrorCode": "BUSINESS_LOGIC_ERROR",
"TimeStamp": "2022-02-23T20:39:32.1179262Z"
}

and ObjectTypeId = “13”, it returns empty response.

request POST 'https://am-ce97c.corrigo.com/api/v1/query/CustomField2'
--header 'CompanyName: Corrigo Demo'
--header 'Authorization: Bearer xxx

"QueryExpression":
{
"Criteria": {
"Conditions": [
{
"PropertyName": "ObjectTypeId",
"Operator": "Equal",
"Values": ["WO"]
}
],
"FilterOperator": "And"
},

  "Distinct": true,
  "PropertySet": { "Properties" : ["*", "Descriptor.*"]},
  "Count": 50  ,
  "FirstResultIndex": 0

}
}