Skip to main content

Version: 24.10

POST Query Txn

Return a list of transactions, filtered on the specified criteria. Only submissions associated with the current portal are returned.

If no filters are specified in the query, the following default filters are applied:

  • formStatus in [ 'Saved', 'Opened', 'Assigned']
  • timeRequest range of 14 days

Furthermore, if no formStatus or identity (submitKey, trackingCode, jobRefNumber) filters are specified within an operator "AND", the default filter "formStatus in ['Saved', 'Opened', 'Assigned']" is added.

Likewise, if no time or identity (submitKey, trackingCode, jobRefNumber) filters are specified within an operator "AND", the default filter to limit the results to transactions from the last 14 days based on timeRequest is added.

The result is ordered by submission oid by default however a sorting order can be defined.

Request

HTTP request

POST https://<JM_SERVER>/workspaces/secure/api/v1/txn/query

Request body

The POST request must contain a JSON structure describing the txn query. To support multiple parameters, this API uses HTTP Content Type: application/json.

The available query attributes are listed below. All attributes are optional except where otherwise indicated.

AttributeDescription
attributesList
A list of attributes to return.
Specify the attributes to return in each txn in the result. Transactions consists of the attributes listed in Txn Result Attributes.
If no attributes are specified, all attributes are returned.
fetchLimitInteger (Default: 10000)
Required. Specify the query fetch limit; that is, the maximum number of results returned.
Values: In the range 1 - 10,000. Values greater than 10,000 are reduced to 10,000.
Note: This attribute is used in conjunction with fetchOffset to determine which results are returned.
fetchOffsetInteger (Default: 0)
Specify the query fetch offset.
Note: This attribute is used in conjunction with fetchLimit to determine which results are returned.
filtersList
A list of filters to query transactions by. To learn more about filters, see Filter query results.
scopeString
Define which transactions will be included in the search.
By default (or if passing in "Portal"), only transactions directly associated with the current space are included. When passing in "Form" and the user has the Help Desk View permissions, all transactions whose forms are associated with the current space are included (even if the transaction itself is associated with a different space).
sortsList
A list of sort orders to sort transactions by. To learn more about sorting, see Sort query results.

Supported filter criteria attributes

The filter criteria attributes supported are listed below. Any additional attributes will return a Bad Request Response.

AttributeDescription
authStatusString
Filter transactions based on the transaction authStatus.
Supported operators: =, IN
clientCodeString
Filter transactions based on the client code.
Supported operators: =, IN
emailAddressString
Filter transactions based on the email address associated with the submission.
Supported operators: =, IN
formCategoryString
Filter transactions based on the form template version's association to the specified category.
Supported operators: =, IN
formCodeString
Filter transactions based on the submitted form's form code.
Supported operators: =, IN
formDataMapMap
Filter transactions based on an entry in the formDataMap. Supports exact match of value but not extract name.
Examples:
  • "formDataMap[*] = 'Jane'"
  • "formDataMap['firstName'] = 'Jane'"
  • "formDataMap['firstName'] IN ('Jane', 'Doe')"
Supported operators: =
formNameString
Filter transactions based on the submitted form's form name.
Supported operators: =, IN
formStatusString
Filter transactions based on transaction form status.
Supported operators: =, IN
groupNameString
Filter transactions based on the association with the specified submission group names.
Supported operators: =, IN
jobRefNumberString
Filter transactions based on the job reference number.
Supported operators: =, IN
milestonesString
Filter transactions based on submission milestones.
Supported operators: =, IN
propertiesMap
Filter transactions based on submission properties. Supports exact match of both name and value for a single property per search.
Examples:
  • "properties[*] = 'prop1Value'"
  • "properties['property1'] = 'prop1Value'"
  • "properties['property1'] IN ('prop1Value', 'prop2Value')"
Supported operators: =, IN
spaceNameString
Filter transactions based on the association with the specified space names.
Supported operators: =, IN
submitKeyString
Filter transactions based on the submission submitKey. Matches one transaction record only.
Supported operators: =, IN
timeAbandonedString
Filter transactions based on the time abandoned timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
Examples:
  • "timeAbandoned < '2018-01-01'"
  • "timeAbandoned > '2019-01-01 09:00:00'"
  • "timeAbandoned <= '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
timeCompletedString
Filter transactions based on the time completed timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
Examples:
  • "timeCompleted > '2018-01-01'"
  • "timeCompleted = '2018-01-01 23:17:29'"
  • "timeCompleted < '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
timeCreatedString
Filter transactions based on the time created timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
Examples:
  • "timeCreated < '2018-01-01'"
  • "timeCreated <= '2018-01-01 15:17:29'"
  • "timeCreated >= '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
timeRequestString
Filter transactions based on the time request timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
Examples:
  • "timeRequest <= '2018-01-01'"
  • "timeRequest = '2018-01-01 15:17:29'"
  • "timeRequest <= '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
timeSubmittedString
Filter transactions based on the time submitted timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format) .
Examples:
  • "timeSubmitted > '2018-01-01'"
  • "timeSubmitted = '2018-01-01 15:17:29'"
  • "timeSubmitted <= '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
timeUserLastModifiedString
Filter transactions based on the time user last modified timestamp in the format "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" or "yyyy-MM-ddTHH:mm:ssZ" (the returned date format).
Examples:
  • "timeUserLastModified >= '2018-01-01'"
  • "timeUserLastModified = '2019-01-01 23:17:29'"
  • "timeUserLastModified < '2018-01-01T15:17:29+10:00'"
Supported operators: <, <=, =, >=, >
trackingCodeString
Filter transactions based on the tracking code. Matches one transaction record only.
Supported operators: =, IN
userLoginNameString
Filter transactions based on the user login name.
Supported operators: =, IN
userSavedBoolean
Filter transactions based on the user saved property.
  • True: "userSaved = 1"
  • False: "userSaved = 0" and/or "userSaved = null"
Supported operators: =

Result attributes

The transactions returned by the query consist of a number of attributes. If only certain attributes are of interest, these can be specified in the "attributes" parameter in the Txn Query. By default, all attributes are populated and returned if their value is not empty.

All Transaction attributes are listed below. All attributes are optional except where otherwise indicated.

caution

If you specify an invalid query attribute, a 400 Bad Request HTTP status code is returned.

"attributes": [
"authStatus",
"clientCode",
"comments",
"emailAddress",
"fileAttachments",
"formCategories",
"formCode",
"formDataMap",
"formName",
"formStatus",
"formUrl",
"groupName",
"job",
"job.currentAction",
"job.currentStep",
"job.jobKey",
"job.name",
"job.jobRefNumber",
"job.status",
"job.timeCompletionScheduled",
"job.timeCreated",
"job.timeLastModified",
"milestones",
"properties",
"receiptUrl",
"spaceName",
"submitKey",
"taskType",
"timeAbandoned",
"timeCompleted",
"timeCreated",
"timeRequest",
"timeSubmitted",
"timeUserLastModified",
"trackingCode",
"userLoginName",
"userSaved"
]

Response

If successful, this operation returns a response with a HTTP 200 OK status code.

Error messages

Error keyErrorHTTP status code
illegalArgumentUnsupported criteria attribute: <ATTRIBUTE>
Unsupported operator for attribute '<ATTRIBUTE>': <OPERATOR>
For input string: <STRING>
Invalid scope: <STRING>
Invalid sort string: <STRING>
Unsupported sort attribute: <ATTRIBUTE>
Please see Error Log ID {number}
400 Bad Request
internalErrorPlease see Error Log ID {number}500 Internal Server Error
unableToResolvePortalUnable to resolve portal from request400 Bad Request

Error responses

HTTP status codeDescription
400 Bad RequestBad request or request parameter. Check error message for details.
404 Not FoundEnsure the URL endpoint is entered correctly.
500 Internal Server ErrorException occurred in txn query. Contact administrator.

Examples

Complex queries can be created by joining multiple filter criteria using "AND" or "OR" operators. For examples of how to define these queries, see Filter query results.

Query Txn with result attributes

In this example, attributes are passed into the query; hence, only the specified attributes are returned. For each atribute, if the attribute value is empty it is not returned.

Ensure you specify Content-Type: application/json.

Example request - With result attributes
POST /workspaces/secure/api/v1/txn/query HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json

{
"fetchLimit": 100,
"fetchOffset": 0,
"attributes": [
"clientCode",
"formDataMap",
"formCode",
"submitKey",
"job",
"job.jobRefNumber"
],
"filters": [
{
"criteria": [
"clientCode = 'workspace'",
"formCode = 'loanapplicationwithr'",
"timeUserLastModified < '2018-08-06'",
"timeUserLastModified > '2018-07-06'"
],
"operator": "and"
}
],
"sorts": [
"submitKey asc"
],
"scope": "portal"
}
Example successful response - With result attributes
{
"fetchLimit": 100,
"fetchOffset": 0,
"durationMs": 37,
"totalCount": 3,
"result": [
{
"clientCode": "workspace",
"fileAttachments": [],
"formCategories": [],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Katheleen Pacinovsky",
"lastName": "Pacinovsky",
"loanAmount": "15000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"job": {
"jobRefNumber": "9B4W7NM"
},
"submitKey": "08215d28b908dc616a03325b7eaafee7"
},
{
"clientCode": "workspace",
"fileAttachments": [],
"formCategories": [],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Louise Pica",
"lastName": "Pica",
"loanAmount": "10000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"job": {
"jobRefNumber": "MXGR2DC"
},
"submitKey": "0a426dcf7c648c4e9cc06083bd5669b4"
},
{
"clientCode": "workspace",
"fileAttachments": [],
"formCategories": [],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Lily Grace Haynesworthington",
"lastName": "Haynesworthington",
"loanAmount": "10000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"job": {
"jobRefNumber": "G4HYYSY"
},
"submitKey": "6057bc3cef7773f5745a780258d6156a"
}
]
}

Query Txn without result attributes

In this example, no attributes are passed into the query; hence, all attributes for the transactions are returned. For each attribute, if the attribute value is empty it will not be returned.

Example request - Without result attributes
POST /workspaces/secure/api/v1/user/query HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json

{
"fetchLimit": 100,
"fetchOffset": 0,
"filters": [
{
"criteria": [
"clientCode = 'workspace'",
"formCode = 'loanapplicationwithr'",
"timeUserLastModified < '2018-08-06'",
"timeUserLastModified > '2018-07-06'"
],
"operator": "and"
}
],
"sorts": [
"submitKey asc"
]
}
Example successful response - Without result attributes
{
"fetchLimit": 100,
"fetchOffset": 0,
"durationMs": 200,
"totalCount": 3,
"result": [
{
"clientCode": "workspace",
"comments": [
{
"timeAdded": "2018-09-05T19:54:33-06:00",
"session": "441SKEuP-fmzpzbwi3a6JZNjOHmaq7jHxbxz2Sem",
"ipAddress": "114.141.100.202",
"commentId": "1",
"header": "comment header",
"userLoginName": "user2",
"message": "this is an example to a comment"
},
{
"parent": "1",
"timeAdded": "2018-09-05T19:55:05-06:00",
"session": "441SKEuP-fmzpzbwi3a6JZNjOHmaq7jHxbxz2Sem",
"ipAddress": "114.141.100.202",
"commentId": "2",
"header": "reply header",
"userLoginName": "user2",
"message": "reply comment"
}
],
"emailAddress": "[email protected]",
"fileAttachments": [],
"formCategories": [
"Loan applications"
],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Katheleen Pacinovsky",
"lastName": "Pacinovsky",
"loanAmount": "15000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"formName": "Loan Application With Review",
"formStatus": "Opened",
"formUrl": "https://earlyaccess.rnd.avoka-transact.com/workspaces/secure/servlet/SmartForm.html?submitKey=08215d28b908dc616a03325b7eaafee7",
"groupName": "Job Reviewers",
"job": {
"jobKey": "aaaa837c177b22fb49b91daa03c40c64",
"jobRefNumber": "9B4W7NM",
"name": "Auto Test - 1 Step Review",
"status": "In Progress",
"currentStep": "Application Review",
"currentAction": "Review Wait",
"timeCreated": "2019-03-26T13:00:02+11:00",
"timeCompletionScheduled": "2019-03-26T13:00:02+11:00",
"timeLastModified": "2019-03-26T13:00:02+11:00"
},
"milestones": [],
"properties": {},
"spaceName": "Work Spaces",
"submitKey": "08215d28b908dc616a03325b7eaafee7",
"taskType": "Review",
"timeCreated": "2018-07-24T15:17:29+10:00",
"timeRequested": "2018-07-24T15:17:29+10:00",
"timeUserLastModified": "2018-07-24T15:17:29+10:00",
"trackingCode": "M95M46T",
"userLoginName": "cwang",
"userSaved": false
},
{
"clientCode": "workspace",
"comments": [],
"emailAddress": "[email protected]",
"fileAttachments": [],
"formCategories": [
"Loan applications"
],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Louise Pica",
"lastName": "Pica",
"loanAmount": "10000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"formName": "Loan Application With Review",
"formStatus": "Opened",
"formUrl": "https://earlyaccess.rnd.avoka-transact.com/workspaces/secure/servlet/SmartForm.html?submitKey=0a426dcf7c648c4e9cc06083bd5669b4",
"groupName": "Job Reviewers",
"job": {
"jobKey": "aaaa837c177b22fb49b91daa03c40c64",
"jobRefNumber": "MXGR2DC",
"name": "Auto Test - 1 Step Review",
"status": "In Progress",
"currentStep": "Application Review",
"currentAction": "Review Wait",
"timeCreated": "2019-03-26T13:00:02+11:00",
"timeCompletionScheduled": "2019-03-26T13:00:02+11:00",
"timeLastModified": "2019-03-26T13:00:02+11:00"
},
"milestones": [],
"properties": {},
"spaceName": "Work Spaces",
"submitKey": "0a426dcf7c648c4e9cc06083bd5669b4",
"taskType": "Review",
"timeCreated": "2018-07-25T13:02:08+10:00",
"timeRequested": "2018-07-25T13:02:08+10:00",
"timeUserLastModified": "2018-07-25T13:02:08+10:00",
"trackingCode": "MRW8PQW",
"userLoginName": "[email protected]",
"userSaved": false
},
{
"clientCode": "workspace",
"comments": []
"emailAddress": "[email protected]",
"fileAttachments": [],
"formCategories": [
"Loan applications"
],
"formCode": "loanapplicationwithr",
"formDataMap": {
"firstName": "Lily Grace Haynesworthington",
"lastName": "Haynesworthington",
"loanAmount": "10000",
"emailAddress": "[email protected]",
"gender": "F",
"Gender": "F"
},
"formName": "Loan Application With Review",
"formStatus": "Opened",
"formUrl": "https://earlyaccess.rnd.avoka-transact.com/workspaces/secure/servlet/SmartForm.html?submitKey=6057bc3cef7773f5745a780258d6156a",
"groupName": "Job Reviewers",
"job": {
"jobKey": "aaaa837c177b22fb49b91daa03c40c64",
"jobRefNumber": "G4HYYSY",
"name": "Auto Test - 1 Step Review",
"status": "In Progress",
"currentStep": "Application Review",
"currentAction": "Review Wait",
"timeCreated": "2019-03-26T13:00:02+11:00",
"timeCompletionScheduled": "2019-03-26T13:00:02+11:00",
"timeLastModified": "2019-03-26T13:00:02+11:00"
},
"milestones": [],
"properties": {},
"spaceName": "Work Spaces",
"submitKey": "6057bc3cef7773f5745a780258d6156a",
"taskType": "Review",
"timeCreated": "2018-07-24T15:17:59+10:00",
"timeRequested": "2018-07-24T15:17:59+10:00",
"timeUserLastModified": "2018-07-24T15:17:59+10:00",
"trackingCode": "FND9SG6",
"userSaved": false
}
]
}