REST Transactions API
The Transactions API provides a REST service for querying and updating transactions in Journey Manager in a secure and efficient manner.
Security
To access the Transactions REST endpoint the caller needs to be authenticated using HTTP Basic Authentication. The authenticated user will need an user account on the Journey Manager server and this account will need to be active and have access to the Management Console module.
To be authorized to call the service the user account will also need the Management Console permission 'REST Transactions API
'.
You will also need to be either an administrator with global access or be associated with an organization to access its transaction
records.
URL Endpoint
The REST Transactions API URL endpoint is as follows:
``` https://Service API
This section provides a description all the REST Transactions API operations including:
- GET Transaction
- GET Transactions
- GET Portal Help Desk
- GET Portal User Submissions
- GET Portal User ToDo
- POST Create Task
- PUT Update Transaction
GET Transaction
Retrieve a single transaction by specifying the database ID.
URL Format
GET https://<tm server>/manager/secure/rest/transactions/v1/<submission ID>
URL Example
GET https://transact.maguire.com/manager/secure/rest/transactions/v1/71139
200 Response
{
"id": 71139,
"trackingCode": "YG7M4B",
"receiptNumber": "job-example-2-plus-5",
"submitKey": "de838352020015c22826e1017b45fb83",
"taskFlag": true,
"taskKey": "de838352020015c22826e1017b45fb83",
"taskType": "Review",
"taskCreatedTimestamp": "2015-09-23T16:09:35+10:00",
"taskSubject": "Additional review of Job Example 2 Plus from Anne Applicant",
"taskMessage": "The application has been initially approved and is pending your final review.",
"job": {
"id": 1190,
"jobName": "Job Controller - 2 Step Review",
"referenceNumber": "QKQP4K",
"jobKey": "2b76a98e70fa911f0c46ea73c624ce6c",
"jobStep": "Additional Review",
"jobAction": "Create Task"
},
"formCode": "job-example-2-plus",
"formName": "Job Example 2 Plus",
"formVersion": "1.0",
"clientCode": "maguire",
"clientName": "Maguire",
"portalName": "Maguire",
"fieldWorkerFlag": false,
"testMode": false,
"userLoginName": "mike",
"submissionGroupNames": "Job Managers",
"formStatus": "Completed",
"timeRequest": "2015-09-23T16:09:45+10:00",
"timeSubmission": "2015-09-23T16:09:53+10:00",
"timeLastUserActivity": "2015-09-23T16:09:53+10:00",
"timeFormCompleted": "2015-09-23T16:09:53+10:00",
"timeToSubmitSec": 7,
"ipAddress": "123.134.145.156",
"requestCookie": "JSESSIONID=l6Ijn4jARdI59Mz89mwgOJiq; __utma=264897119.2043164291...",
"referer": "https://transact.maguire.com/maguire/secure/account/todo.htm",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0",
"userAgentBrowser": "Firefox 40",
"userAgentBrowserType": "Firefox",
"userAgentBrowserVersion": "40",
"userAgentDeviceType": "Desktop",
"userAgentOs": "Windows 10",
"userAgentOsType": "Windows",
"userAgentOsVersion": "10",
"dataExtracts": {
"First Name": "Anne",
"Last Name": "Applicant",
"Email": "test@email.com",
"Loan Amount": "123456",
"routeName": "Approve"
},
"deliveryStatus": "Not Ready",
"dataDeleted": false
}
GET Transactions
Retrieve the list of transactions sorted by database ID in descending order (the ordering can be customized).
URL Format
GET https://<tm server>/manager/secure/rest/transactions/v1/
Request Parameters
The table below shows the set of request parameters can be used as additional search criteria.
If multiple parameters are specified, all of them are applied to the result set.
Note: The special parameter value "null" can be used to specify that transactions are included only if the corresponding field is not set to a value.
For example, passing in the parameter "paymentStatus=null" would exclude all transactions for which payment has been requested, because those submissions would have a specific value for the payment status.
Parameter | Description | ||
---|---|---|---|
abandonmentFormStatus | filters on the form status of an abandoned transaction at abandonment time (Values: null, Assigned, Opened, Saved, Submitted) | ||
attachmentsStatus | filters on the attachment status of the submission (Values: null, Required, Optional, Completed) | ||
clientCode | filters on the organization code | ||
clientName | filters on the organization name | ||
contactEmailAddress | filters on the contact email address extracted from transaction data | ||
contactPhone | filters on the contact phone number extracted from transaction data | deletedFlag | a boolean parameter that filters on the transaction data deleted flag (Values: true, false) |
deliveryStatus | filters on the delivery status of the submission (Values: null, Not Required, Not Ready, Ready, Sent Email, Sent WS, In Progress, Pending, Completed, Error, Undeliverable) | ||
endDate | only transactions requested before the specified end date will be included (Format: yyyy-MM-dd) | ||
externalProfileId | filters on the external profile ID of the submission (only relevant if set by an external system or Groovy script) | ||
fetchLimit | the maximum number of transactions to return (range 1 - 10000). Will default to 1000 if a valid value was not provided. | ||
fieldWorkerFlag | a boolean parameter that filters on the set of spaces associated with a submission (Values: true, false); if true, the set of spaces must contain a TransactField space | ||
formCode | filters on the form code | ||
formName | filters on the form name | ||
formStatus |
filters on the form status of the submission (Values: null, Assigned, Opened, Saved, Submitted, Completed, Expired, Abandoned) Note that you can specify multiple values like this: [Saved, Submitted] |
||
formVersion | filters on the form version number (e.g. "1.0") of the transaction | ||
id | filters on the transaction database ID | ||
jobKey |
filters on the job key (which is set only if the transaction is associated with a collaboration job) Note: If you would like to exclude transactions associated with collaboration jobs, you can set this parameter to "" |
||
loginName | filters on the login name of the user associated with the transaction (if set to "null", only transactions not associated with a user will be returned) | ||
orderByAsc | specifies a field to use for result sorting in ascending order Note: Sorting will be case sensitive for string fields. | ||
orderByDsc | specifies a field to use for result sorting in descending order (takes effect only if the parameter "orderByAsc" was not set) Note: Sorting will be case sensitive for string fields. | ||
paymentStatus | filters on the payment status of the transaction (Values: null, Required, Pending, Completed, Error) | ||
portalName | filters on the name of a space associated with the transaction | ||
receiptNumber | filters on the transaction receipt number | ||
receiptStatus | filters on the receipt status of the transaction (Values: null, Completed, Error, Error - No Data) | ||
referenceNumber | filters on the job reference number (which is set only if the transaction is associated with a collaboration job) | ||
startDate | only transactions requested on or after the specified start date will be included (Format: yyyy-MM-dd) | ||
submitKey | filters on the transaction submit key (a GUID) | ||
taskFlag | a boolean parameter that filters on whether the transaction is a task (Values: true, false) | ||
taskKey | filters on the transaction task key (a GUID) | ||
testMode | a boolean parameter that filters on the transaction test mode flag (Values: true, false) | ||
trackingCode | filters on the transaction tracking code | ||
transRefNumber | filters on the transaction reference number |
URL Example
GET https://transact.maguire.com/manager/secure/rest/transactions/v1/?startDate=2015-09-28&formCode=credit-card
200 Response
[
{
"id": 71865,
"trackingCode": "B25LWD",
"receiptNumber": "attachments-for-diff-1",
"submitKey": "7b44754c1c8e1fc4ecd9dd0d0ecd5319",
"taskFlag": false,
"formCode": "credit-card",
"formName": "Platinum Credit Card",
"formVersion": "1.0",
"clientCode": "maguire",
"clientName": "Maguire Finance",
"portalName": "Web Plugin",
"fieldWorkerFlag": false,
"testMode": false,
"formStatus": "Completed",
"timeRequest": "2015-09-28T16:13:53+10:00",
"timeSubmission": "2015-09-28T16:14:00+10:00",
"timeLastUserActivity": "2015-09-28T16:14:00+10:00",
"timeFormCompleted": "2015-09-28T16:14:00+10:00",
"timeToSubmitSec": 7,
"ipAddress": "123.134.145.156",
"requestCookie": "JSESSIONID=HD3Tet57kC-Pqda7+jGO7ubT; _ga=GA1.2.1363876154.1441243068;",
"referer": "https://transact.maguire.com/manager/admin/form/form-edit.htm?entityId=5013",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)...",
"userAgentBrowser": "Edge 12",
"userAgentBrowserType": "Edge",
"userAgentBrowserVersion": "12",
"userAgentDeviceType": "Desktop",
"userAgentOs": "Windows 10",
"userAgentOsType": "Windows",
"userAgentOsVersion": "10",
"deliveryStatus": "Ready",
"dataDeleted": false
}
GET Portal Help Desk
Retrieve the list of help desk transactions similar to what the help desk page on a Journey Manager user space displays.
URL Format
GET https://<tm server>/manager/secure/rest/transactions/v1/portal/help-desk
Request Parameters
The table below shows the set of request parameters can be used as additional search criteria.
If multiple parameters are specified, all of them are applied to the result set.
Parameter | Description |
---|---|
formStatus | filters on the form status of the submission (Values: Assigned, Opened, Saved, Submitted, Completed, Cancelled, Abandoned) |
includeAnonymousSubmissions | a boolean parameter that controls the inclusion of anonymous transactions (Values: true, false). By default, anonymous transactions will be included. |
includeAuthenticatedSubmissions | a boolean parameter that controls the inclusion of authenticated transactions (Values: true, false). By default, authenticated transactions will be included. |
keyword | only transactions fitting the keyword will be included |
portalName |
filters on the name of the space for which help desk submissions are to be retrieved Note: When invoking the service mounted on the management console (context path /manager), this parameter is required. |
startDate | the search start date (Format: yyyy-MM-dd) |
URL Example
GET https://transact.maguire.com/manager/secure/rest/transactions/v1/portal/help-desk?portalName=Maguire&formStatus=Submitted
200 Response
[
{
"id": 69033,
"trackingCode": "HX4BG7",
"receiptNumber": "smartform-test-1",
"submitKey": "0cedffee9c9af536c24315fc06a9330b",
"taskFlag": false,
"formCode": "smartform-test",
"formName": "SmartForm Test",
"formVersion": "1.0",
"clientCode": "MACQUARIE",
"clientName": "Macquarie",
"portalName": "Maguire",
"fieldWorkerFlag": false,
"testMode": false,
"formStatus": "Submitted",
"timeRequest": "2015-09-07T10:31:02+10:00",
"timeSubmission": "2015-09-07T10:31:23+10:00",
"timeLastUserActivity": "2015-09-07T10:31:24+10:00",
"timeToSubmitSec": 22,
"ipAddress": "123.134.145.156",
"referer": "https://transact.maguire.com/maguire/landing.htm?formCode=smartform-test",
"userAgent": "AcroForms",
"userAgentBrowser": "AcroForms Unknown",
"userAgentBrowserType": "AcroForms",
"userAgentBrowserVersion": "Unknown",
"userAgentDeviceType": "Unknown",
"userAgentOs": "Unknown ",
"userAgentOsType": "Unknown",
"userAgentOsVersion": "Unknown",
"paymentStatus": "Required",
"paymentType": "Credit/Debit Card",
"paymentTotal": 49.0,
"deliveryStatus": "Not Ready",
"dataDeleted": false
},
{
"id": 69031,
"trackingCode": "6QZ6JD",
"receiptNumber": "smartform-pdf-test-50",
"submitKey": "bc47ba43993152ec2503167ce117c75a",
"taskFlag": false,
"formCode": "smartform-pdf-test",
"formName": "SmartForm PDF Test",
"formVersion": "1.0",
"clientCode": "maguire",
"clientName": "Maguire",
"portalName": "Maguire",
"fieldWorkerFlag": false,
"testMode": false,
"formStatus": "Submitted",
"timeRequest": "2015-09-07T10:29:11+10:00",
"timeSubmission": "2015-09-07T10:29:29+10:00",
"timeLastUserActivity": "2015-09-07T10:29:29+10:00",
"timeToSubmitSec": 18,
"ipAddress": "123.134.145.156",
"referer": "https://transact.maguire.com/manager/admin/form/form-search.htm?_wid=d51",
"userAgent": "AcroForms",
"userAgentBrowser": "AcroForms Unknown",
"userAgentBrowserType": "AcroForms",
"userAgentBrowserVersion": "Unknown",
"userAgentDeviceType": "Unknown",
"userAgentOs": "Unknown ",
"userAgentOsType": "Unknown",
"userAgentOsVersion": "Unknown",
"attachmentsStatus": "Required",
"paymentStatus": "Required",
"paymentType": "Credit/Debit Card",
"paymentTotal": 39.95,
"dataExtracts": {
"Given Name": "Test",
"Family Name": "User",
"Email": "test@avoka.com"
},
"deliveryStatus": "Not Ready",
"dataDeleted": false
},
{
"id": 69030,
"trackingCode": "Z4QJWA",
"receiptNumber": "smartform-pdf-test-49",
"submitKey": "8fc87249c79ca45cb083879b678133b1",
"taskFlag": false,
"formCode": "smartform-pdf-test",
"formName": "SmartForm PDF Test",
"formVersion": "1.0",
"clientCode": "maguire",
"clientName": "Maguire",
"portalName": "Maguire",
"fieldWorkerFlag": false,
"testMode": false,
"formStatus": "Submitted",
"timeRequest": "2015-09-07T10:27:59+10:00",
"timeSubmission": "2015-09-07T10:28:48+10:00",
"timeLastUserActivity": "2015-09-07T10:28:48+10:00",
"timeToSubmitSec": 79,
"ipAddress": "123.134.145.156",
"referer": "https://transact.maguire.com/manager/admin/form/form-search.htm?_wid=d51",
"userAgent": "AcroForms",
"userAgentBrowser": "AcroForms Unknown",
"userAgentBrowserType": "AcroForms",
"userAgentBrowserVersion": "Unknown",
"userAgentDeviceType": "Unknown",
"userAgentOs": "Unknown ",
"userAgentOsType": "Unknown",
"userAgentOsVersion": "Unknown",
"attachmentsStatus": "Required",
"paymentStatus": "Required",
"paymentType": "Credit/Debit Card",
"paymentTotal": 39.95,
"dataExtracts": {
"Given Name": "First",
"Family Name": "Last"
},
"deliveryStatus": "Not Ready",
"dataDeleted": false
}
]
GET Portal User Submissions
Retrieve the list of submissions completed by a user similar to what the submissions page on a Journey Manager user space displays.
URL Format
GET https://<tm server>/manager/secure/rest/transactions/v1/portal/user-submissions
Request Parameters
The table below shows the set of request parameters can be used as additional search criteria.
If multiple parameters are specified, all of them are applied to the result set.
Parameter | Description |
---|---|
clientName |
the name of the organization for which transactions shall be retrieved |
endDate | the search end date (Format: yyyy-MM-dd) |
formNameLike | filters on a substring of the form name |
includeGroupItems | a boolean parameter that controls the inclusion of transactions associated with groups the user is a member of (Values: true, false). By default, anonymous transactions will be included. |
keyword | only transactions fitting the keyword will be included |
portalName |
filters on the name of the space for which submissions are to be retrieved Note: When invoking the service mounted on the management console (context path /manager), this parameter is required. |
startDate | the search start date (Format: yyyy-MM-dd) |
userLoginName |
filters on the user login name for which transactions are to be retrieved Note: This parameter is required. |
URL Example
GET https://transact.maguire.com/manager/secure/rest/transactions/v1/portal/user-submissions?portalName=Maguire&userLoginName=someAdmin&formNameLike=Payment
200 Response
[
{
"id": 69618,
"trackingCode": "AFG8TW",
"receiptNumber": "pf-lt41-15",
"submitKey": "3888c972a167ca55e967cd764ab691bf",
"taskFlag": false,
"formCode": "pf-lt41",
"formName": "Payment Form",
"formVersion": "1.0",
"clientCode": "lt41",
"clientName": "Test Client (4.1)",
"portalName": "Maguire",
"fieldWorkerFlag": false,
"testMode": false,
"userLoginName": "someadmin",
"formStatus": "Completed",
"timeRequest": "2015-09-11T09:40:42+10:00",
"timeSubmission": "2015-09-11T09:40:45+10:00",
"timeLastUserActivity": "2015-09-22T15:48:35+10:00",
"timeFormCompleted": "2015-09-22T15:48:35+10:00",
"timeToSubmitSec": 4,
"ipAddress": "123.134.145.156",
"requestCookie": "JSESSIONID=ZlSTyEAIR-LB0wGwCNIL1vk5; __utma=264897119.59525688.1351658449...",
"referer": "https://transact.maguire.com/maguire/login.htm",
"userAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0",
"userAgentBrowser": "Firefox 40",
"userAgentBrowserType": "Firefox",
"userAgentBrowserVersion": "40",
"userAgentDeviceType": "Desktop",
"userAgentOs": "Windows 7",
"userAgentOsType": "Windows",
"userAgentOsVersion": "7",
"attachmentsStatus": "Completed",
"deliveryStatus": "Sent Email",
"deliveryMessage": "Sent Email Secure delivery notification to: test@avoka.com",
"deliveryTime": "2015-09-22T15:48:50+10:00",
"dataDeleted": false
}
]
GET Portal User ToDo
Retrieve the list of to do items for a user similar to what the to do page on a Journey Manager user space displays.
URL Format
GET https://<tm server>/manager/secure/rest/transactions/v1/portal/user-todo
Request Parameters
The table below shows the set of request parameters can be used as additional search criteria.
If multiple parameters are specified, all of them are applied to the result set.
Parameter | Description |
---|---|
formStatus | filters on the form status of the submission (Values: Assigned, Opened, Saved, Submitted, Completed, Cancelled, Abandoned) |
includeGroupItems | a boolean parameter that controls the inclusion of transactions associated with groups the user is a member of (Values: true, false). By default, anonymous transactions will be included. |
keyword | only transactions fitting the keyword will be included |
portalName |
filters on the name of the space for which submissions are to be retrieved Note: When invoking the service mounted on the management console (context path /manager), this parameter is required. |
userLoginName |
filters on the user login name for which transactions are to be retrieved Note: This parameter is required. |
URL Example
GET https://transact.maguire.com/manager/secure/rest/transactions/v1/portal/user-todo?portalName=Maguire&userLoginName=someAdmin&formStatus=Saved
200 Response
[
{
"id": 63744,
"trackingCode": "LFS2HH",
"submitKey": "8113f5a32e0647321b8047c5c8034bb1",
"taskFlag": true,
"taskKey": "8113f5a32e0647321b8047c5c8034bb1",
"taskType": "Form",
"taskCreatedTimestamp": "2015-08-06T11:04:53+10:00",
"taskSubject": "Test Task 4.0",
"formCode": "pf-lt418",
"formName": "Payment Form",
"formVersion": "1.0",
"clientCode": "lt418",
"clientName": "Test Client (4.1.8)",
"fieldWorkerFlag": false,
"testMode": false,
"userLoginName": "someadmin",
"formStatus": "Assigned",
"userAgentBrowser": "",
"userAgentOs": "",
"dataDeleted": false
},
{
"id": 54315,
"trackingCode": "2QJHMB",
"receiptNumber": "pf-lt41-14",
"submitKey": "b097f6a9878a27c5ad29844e97c7d237",
"taskFlag": false,
"formCode": "pf-lt41",
"formName": "Payment Form",
"formVersion": "1.0",
"clientCode": "lt41",
"clientName": "Test Client (4.1)",
"portalName": "Maguire",
"fieldWorkerFlag": false,
"testMode": false,
"userLoginName": "someadmin",
"formStatus": "Submitted",
"timeRequest": "2015-05-19T11:30:36+10:00",
"timeSubmission": "2015-05-19T11:32:33+10:00",
"timeLastUserActivity": "2015-05-19T11:32:55+10:00",
"timeToSubmitSec": 117,
"ipAddress": "114.141.100.203",
"requestCookie": "JSESSIONID=iIsfRT+sa4I1T2inf0nk5M57; __utma=264897119.59525688.1351658449...",
"referer": "https://transact.maguire.com/maguire/landing.htm?formCode=pf-lt41",
"userAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0",
"userAgentBrowser": "Firefox 37",
"userAgentBrowserType": "Firefox",
"userAgentBrowserVersion": "37",
"userAgentDeviceType": "Desktop",
"userAgentOs": "Windows 7",
"userAgentOsType": "Windows",
"userAgentOsVersion": "7",
"paymentStatus": "Required",
"paymentType": "Hosted",
"paymentTotal": 112.0,
"paymentLog": {
"paymentStatus": "Cancelled",
"paymentLogKey": "cab053fa940afb12fabce66a36ac0496",
"paymentServiceCode": "WestpacQuickWeb",
"userIpAddress": "114.141.100.203",
"doTimestamp": "2015-05-19T11:32:41+10:00",
"doAmount": 11200,
"doMerchTxnRef": "9fb84dad611a5",
"doVersion": "76.0",
"drTxnResponseCode": "Cancelled",
"drTxnResponseMsg": "The transaction has been cancelled by the user"
},
"deliveryStatus": "Not Ready",
"dataDeleted": false
}
]
POST Create Task
Create a task that can be assigned to a user or a group.
URL Format
POST https://<tm server>/manager/secure/rest/transactions/v1/
POST Body
The POST request must contain a request parameter named "task", whose value contains a JSON structure describing the task.
To support multiple parameters this API uses the HTTP Content Type: application/x-www-form-urlencoded
The set of task JSON attributes is listed below (all attributes are optional unless indicated otherwise):
Attribute | Type | Description |
---|---|---|
allowClaimFlag | boolean | a flag describing whether the task will be claimable (relevant for tasks assigned to groups) |
address | String | a string containing the physical address related to the task |
contactEmailAddress | String | the email address to send email to (must be specified if sendEmailFlag is set to true) |
datetimeExpiry | String |
a JSON ISO DateTime string without milliseconds describing when the task should expire automatically if it has not been completed the required date format is yyyy-MM-dd'T'HH:mm:ssZZ |
datetimeScheduled | String |
a JSON ISO DateTime string without milliseconds describing when the task is scheduled the required date format is yyyy-MM-dd'T'HH:mm:ssZZ |
emailMessage | String | the email message to use in the task notification email (used only if sendEmailFlag is set to true) |
emailSubject | String | the email subject to use in the task notification email (used only if sendEmailFlag is set to true) |
formCode | String | the form code of the form that the task will be based on (required) |
formPrefillServiceName | String | the name of a service definition of type 'Form Prefill' that will be used to provide prefill XML data at task creation time (used only if taskType is "Anonymous") |
groups | List of String | A list of group names to which the task shall be assigned (required if userLoginName is not set and taskType is not "Anonymous") |
latitude | Double | The latitude of the location the task relates to |
longitude | Double | The longitude of the location the task relates to |
portalName | String | The name of the space that will be hosting the task (required if taskType is set to "Anonymous") |
receiptNumber | String | The receipt number that will be used for the task transaction |
reviewSubmissionId | String | The database ID of the submission that this task will review (required and used only if taskType is set to "Review") |
saveChallengeAnswer | String | If you would like to secure the task further, you can specify a secret answer the user will have to enter to access the form (used only if taskType is set to "Anonymous") |
sendEmailFlag | boolean | a flag controlling whether an email shall be sent to notify of the new task (if taskType is set to "Anonymous", the email will be sent to the contact email address) |
sequence | Integer | The task sequence number (mainly used in collaboration job task sequencing) |
taskMessage | String | The task message that will be displayed to assignees |
taskSubject | String | The task subject that will be displayed to assignees |
taskType | String |
The type of task you want to create (required). Possible values:
|
transRefNumber | String | A custom reference number that will be stored in the transaction object (used only if the taskType is set to "Anonymous") |
userDeletableFlag | boolean | a flag controlling whether the task can be deleted by assignees |
userLoginName | String | The login name of the assignee (used only if taskType is not "Anonymous") |
In addition to the task
request parameter, there are two optional parameters you can use to pass in XML task data:
-
formDataXml
- the XML data to be used as the seed file -
inputXmlData
- the XML data that will be mapped into the form using XML prefill mappings set up in TM
The two XML parameters can be passed in as request parameters, or alternatively can be included in a Multipart POST request.
Example: Creating an anonymous saved form
This example creates an anonymous saved form secured with a secret code. The person who will fill in the form is notified via email. The example the message body below formatted for easier reading.
Please ensure you specify Content-Type: application/x-www-form-urlencoded
POST <b>/manager/secure/rest/transactions/v1/</b> HTTP/1.1
Host: https://transact.maguire.com
Content-Type: application/x-www-form-urlencoded
<b>task</b>={
"taskType": "Anonymous",
"portalName": "Maguire",
"formCode": "pf-lt41",
"taskSubject": "Please complete this submission",
"taskMessage": "This submission has been assigned to you to complete.",
"saveChallengeAnswer": "b3d5",
"contactEmailAddress": "test@avoka.com",
"sendEmailFlag": true,
"formPrefillServiceName": "Task Prefill"
}
200 Response
{
"id": 73003,
"trackingCode": "7FAE76",
"submitKey": "01b2b3c0ac09dc706fb81c0e47731724",
"taskFlag": false,
"taskCreatedTimestamp": "2015-10-06T14:04:40+11:00",
"taskSubject": "Please complete this submission",
"taskMessage": "This submission has been assigned to you to complete.",
"formCode": "pf-lt41",
"formName": "Payment Form",
"formVersion": "1.0",
"clientCode": "lt41",
"clientName": "Test Client (4.1)",
"portalName": "Maguire",
"fieldWorkerFlag": false,
"testMode": false,
"contactEmailAddress": "test@avoka.com",
"formStatus": "Saved",
"timeSubmission": "2015-10-06T14:04:39+11:00",
"userAgentBrowser": "",
"userAgentOs": "",
"deliveryStatus": "Not Ready",
"dataDeleted": false,
"formURL": "https://transact.maguire.com/maguire/servlet/SmartForm.html?submitKey=01b2b3c0ac09dc706fb81c0e47731724"
}
Example: Creating a form task with XML form data
This example creates a standalone form task assigned to a single user with the task
parameter, and includes the XML form data provided with the
formDataXml
parameter.
Please note the form prefill data is application/x-www-form-urlencoded
encoded, and the message body below formatted for easier reading.
In practice it may be eaiser to use a Multipart POST request to upload the form XML data.
POST <b>/manager/secure/rest/transactions/v1/</b> HTTP/1.1
Host: https://transact.maguire.com
Content-Type: application/x-www-form-urlencoded
<b>task</b>={
"taskType": "Form",
"formCode": "pf-lt41",
"taskSubject": "Monthly activity summary",
"taskMessage": "Please fill in the monthly activity summary for 2015-09",
"transRefNumber": "ma-201509-jdoe",
"sendEmailFlag": true,
"emailSubject": "TASK: Monthly activity summary",
"datetimeScheduled": "2015-10-09T09:00:00%2b10:00",
"datetimeExpiry": "2015-10-16T23:59:59%2b10:00",
"userLoginName": jdoe,
"userDeletableFlag": false
}
&formDataXml=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CAvokaSmartForm%3E%0A++%3CAddressAustralia%3E%0A++++%3CAddressLine1%2F...
200 Response
{
"id": 73004,
"trackingCode": "3ZYAA3",
"submitKey": "d97d8a4be640d6a04cec039a1a657971",
"taskFlag": true,
"taskKey": "d97d8a4be640d6a04cec039a1a657971",
"taskType": "Form",
"taskCreatedTimestamp": "2015-10-06T14:09:31+11:00",
"taskScheduledTimestamp": "2015-10-09T10:00:00+11:00",
"taskExpiryTimestamp": "2015-10-17T00:59:59+11:00",
"taskSubject": "Monthly activity summary",
"taskMessage": "Please fill in the monthly activity summary for 2015-09",
"formCode": "pf-lt41",
"formName": "Payment Form",
"formVersion": "1.0",
"clientCode": "lt41",
"clientName": "Test Client (4.1)",
"fieldWorkerFlag": false,
"testMode": false,
"userLoginName": "jdoe",
"formStatus": "Assigned",
"userAgentBrowser": "",
"userAgentOs": "",
"dataDeleted": false
}
Example: Creating a review task
This example creates a review task assigned to a group of users.
POST <b>/manager/secure/rest/transactions/v1/</b> HTTP/1.1
Host: https://transact.maguire.com
Content-Type: application/x-www-form-urlencoded
<b>task</b>={
"taskType": "Review",
"formCode": "pf-lt41",
"taskSubject": "Please review application no. 69618",
"sendEmailFlag": false,
"address": "The Corso, Manly NSW 2095",
"latitude": -33.86,
"longitude": 151.2,
"userDeletableFlag": false,
"allowClaimFlag": true,
"groups": [
"Job Reviewers",
"Job Managers"
],
"reviewSubmissionId": "69618"
}
200 Response
{
"id": 73008,
"trackingCode": "KVGGBB",
"submitKey": "13537f9ab228a8bc50eae0e5d8bb3436",
"taskFlag": true,
"taskKey": "13537f9ab228a8bc50eae0e5d8bb3436",
"taskType": "Review",
"taskCreatedTimestamp": "2015-10-06T14:14:49+11:00",
"taskSubject": "Please review application no. 69618",
"taskAddress": "The Corso, Manly NSW 2095",
"taskLatitude": -33.86,
"taskLongitude": 151.2,
"formCode": "pf-lt41",
"formName": "Payment Form",
"formVersion": "1.0",
"clientCode": "lt41",
"clientName": "Test Client (4.1)",
"fieldWorkerFlag": false,
"testMode": false,
"submissionGroupNames": "Job Managers, Job Reviewers",
"formStatus": "Assigned",
"userAgentBrowser": "",
"userAgentOs": "",
"attachmentsStatus": "Optional",
"dataDeleted": false
}
PUT Update Transaction
Update the status of a transaction.
URL Format
PUT https://<tm server>/manager/secure/rest/transactions/v1/<transaction id>
PUT Body
The body of your PUT request must contain a structure that looks like this:
``` { "formStatus": <new form status value>, "processingStatus": <new processing status value> } ```
Both status values are optional.
The new form status can be "Saved" or "Abandoned".
The processing status value is added as a new processing status entry associated with the transaction (visible to the user), but does not otherwise influence transaction processing.
URL Example
PUT <b>https://transact.maguire.com/manager/secure/rest/transactions/v1/417</b>
{
"formStatus": "Saved",
"processingStatus": "Reverted to saved status at user request"
}
200 Response
{
"id": 72492,
"trackingCode": "P74L3V",
"receiptNumber": "pf-lt41-16",
"submitKey": "9f746b51721051b674b057c37b4bee95",
"taskFlag": false,
"formCode": "pf-lt41",
"formName": "Payment Form",
"formVersion": "1.0",
"clientCode": "lt41",
"clientName": "Test Client (4.1)",
"portalName": "Maguire",
"fieldWorkerFlag": false,
"testMode": false,
"userLoginName": "someadmin",
"formStatus": "Saved",
"timeRequest": "2015-10-02T14:07:39+10:00",
"timeSubmission": "2015-10-02T14:10:25+10:00",
"timeLastUserActivity": "2015-10-02T14:11:14+10:00",
"timeToSubmitSec": 166,
"ipAddress": "123.134.145.156",
"requestCookie": "JSESSIONID=pfD+pEOezdTwyev-jINZSn1y; __utma=264897119.59525688.1351658449.1393997213...",
"referer": "https://transact.maguire.com/maguire/login.htm",
"userAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0",
"userAgentBrowser": "Firefox 40",
"userAgentBrowserType": "Firefox",
"userAgentBrowserVersion": "40",
"userAgentDeviceType": "Desktop",
"userAgentOs": "Windows 7",
"userAgentOsType": "Windows",
"userAgentOsVersion": "7",
"attachmentsStatus": "Optional",
"paymentStatus": "Required",
"paymentType": "Hosted",
"paymentTotal": 123.0,
"processingStatus": "Reverted to saved status at user request",
"processingStatusTime": "2015-10-02T14:11:14+10:00",
"deliveryStatus": "Not Ready",
"dataDeleted": false,
"formURL": "https://transact.maguire.com/maguire/secure/servlet/SmartForm.html?submitKey=9f746b51721051b674b057c37b4bee95"
}