Skip to main content

Version: 24.10

POST Count Txn

Return the total count of transactions associated with the portal, filtered on the specified criteria.

This API is similar to Query Txn in its supported filter criteria attributes; however, it ignores the fetchLimit and fetchOffset set in the query.

Only submissions associated with the current portal are included in the count.

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. Similarly, 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.

Request

HTTP request

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

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.

caution

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

AttributeDescription
filtersList
A list of filters to query transactions by. To learn more about filters, see Filter query results.
scopeString
Defines 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).

Supported filter criteria attributes

The supported filter criteria attributes are listed below.

caution

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

AttributeDescription
authStatusString
Filter transactions based on the authStatus of the transaction.
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 category specified.
Supported operators: =, IN
formCodeString
Filter transactions based on the form code of the submitted form.
Supported operators: =, IN
formDataMapMap
Filter transactions based on an entry in the formDataMap.
Supports exact match of value but not extract name. For example:
  • Supported: "formDataMap[*] = 'Jane'"
  • Supported: "formDataMap['firstName'] = 'Jane'"
  • Supported: "formDataMap['firstName'] IN ('Jane', 'Doe')"
Supported operators: =, IN
formNameString
Filter transactions based on the form name of the submitted form.
Supported operators: =, IN
formStatusString
Filter transactions based on transaction form status.
Supported operators: =, IN
groupNameString
Filter transactions based on the association with submission groups with specified 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.
Supported operators: =, IN
Supports exact match of both name and value for a single property per search. For example:
  • "properties[*] = 'prop1Value'"
  • "properties['property1'] = 'prop1Value'"
  • "properties['property1'] IN ('prop1Value', 'prop2Value')"
spaceNameString
Filter transactions based on the association with spaces with name(s) specified
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).
  • "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).
  • "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).
  • "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).
  • "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).
  • "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).
  • "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.
Matchs 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 userSaved property.
  • True: "userSaved = 1"
  • False: "userSaved = 0" and/or "userSaved = null"
Supported operators: =

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>
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 count. Contact administrator.

Example

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.

Ensure you specify Content-Type: application/json.

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

{
"filters": [
{
"criteria": [
"clientCode = 'workspace'",
"formCode = 'loanapplicationwithr'",
"timeUserLastModified &lt; '2018-08-06'",
"timeUserLastModified > '2018-07-06'"
],
"operator": "and"
}
]
}
Example successful response
{
"count": 3
}