• Platform
    • Manager
    • Maestro
    • Exchange
    • Workspaces
    • Analytics
    • Springboard
    • API
Transact Services Guide (TSG)

Transact Services Guide (TSG)

  • Getting Started
  • Groovy Guide
  • Service Development
  • Groovy Services API
  • REST API

›REST API

Getting Started

  • Introduction

Groovy Guide

  • Groovy Guide
  • Groovy Declarations
  • Control Statements

Service Development

  • Service Development
  • Transaction Processing Sequence
  • Service Logging
  • Remote Service Calls
  • Fluent Security Configuration
  • Third-party Libraries

Groovy Services API

  • Groovy Services API
  • Fluent Function
  • Delivery Function
  • Form Version Selector
  • Form Security Filter
  • Form Prefill
  • Tracking Number
  • Form Dynamic Data
  • Submission Preprocessor
  • Receipt Number
  • Form Saved Processor
  • Submission Data Validator
  • Submission Completed Processor
  • Render Receipt Service
  • Delivery Process
  • Task Expiry Process
  • Email Service
  • Job Action
  • Scheduled Service
  • Groovy Service
  • SSO Revalidation
  • SSO Get Authentication Token
  • SSO Authentication OK Response
  • SSO Authentication Provider
  • Transaction History Publisher
  • Virus Scan

REST API

  • REST API
  • REST Application Package API
  • REST Delivery API
  • REST Form Groups API
  • REST Groovy Service Invoke v2
  • REST Service Definitions API
  • REST Tasks API
  • REST TestCenter API
  • REST TPac API
  • REST Transactions API
  • REST Transaction History API

Workspaces API

  • Workspaces API
  • Filters
  • Sort
  • Workspaces Category API
  • Workspaces Current User API
  • Workspaces Extract Name API
  • Workspaces Form API
  • Workspaces Group API
  • Workspaces Job API
  • Workspaces Org API
  • Workspaces Property Name API
  • Workspaces Space API
  • Workspaces Txn API
  • Workspaces User API

REST Delivery API

The Delivery Service provides a REST service for performing transaction data delivery integration with other systems. Using this service you can retrieve rich set of transaction data from remote Journey Manager servers in a secure and efficient manner.

Delivery transaction data includes:

  • form XML
  • PDF receipt document
  • form transaction metadata
  • uploaded file attachments (optional)
  • Excel XML data extract (optional)

Note: It is generally recommended that the REST delivery service be used in preference to the earlier SOAP Web Service delivery service, as it enables faster integration development, provides a richer data model and is more efficient.

Getting Started

This section discusses how to get started using the Delivery Service API.

Security

To access the Delivery 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 Delivery Service API'. A standard Journey Manager role 'REST Delivery' is provided which includes this permission, simply assign the user account this role.

Delivery Channel

To make form transactions available for delivery via the REST Delivery Service you need to create a REST Service delivery channel for the form's organization and associate your form with this delivery channel.

Organization REST Delivery Channel

An organization can have multiple REST Service delivery channels defined one for each form, or they can have a single REST Service delivery channel which is configured as the default channel for the Organization. If a delivery channel is configured as the default channel, then any forms which don't have a delivery channel configured will use the default channel.

You should think of REST Service delivery channels as separate queues from which you can get completed transaction from.

URL Endpoint

The REST delivery service URL endpoint is provided as a link in the Delivery Channel configuration screen. The general format of this URL is provided below:

https://<tm server>/manager/secure/rest/delivery/v1/<organization code>/<channel name>/

Test Call

Once you have completed these steps you can call the Delivery Service URL directly using your browser, for example:

https://forms.mycorp.com/manager/secure/rest/delivery/v1/maguire/rest-service/

Once you have answered the basic authentication challenge you should see a JSON response like the one below. You can use this test call as a 'ping' to check the REST service delivery channel is available at any time.

{
  "Ready": [],
  "In Progress": [],
  "Error": []
}

The above data returned in a 200 OK response is telling you that there are no submissions ready for delivery, in-progress or in error.

If you receive a 200 OK status with an empty JSON array as shown below, this indicates the REST service delivery channel you are calling has been disabled in the Journey Manager console.

[]

Performing Delivery


The REST Delivery service provide queue based delivery integration model which supports High Availability (HA) integration without having to do a lot of state management work with the integration clients. The basic calling pattern is:

  1. get transaction item from the delivery queue
  2. download transaction data: XML, PDF, file attachments, etc.
  3. confirm transaction delivery

By using a queue based model, you can have multiple HA integration clients running, pulling down transactions from the same delivery queue. If one of the client fails, then other clients can continue to process transactions.

Call Sequence

The REST delivery call sequence diagram is illustrated below.

REST Delivery Sequence Diagram

POST Next

The first REST operation to perform is to fetch the next transaction ready for delivery by making a POST request to the example URL below.

POST http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/next/

This operation will return a transaction from the delivery channel queue and change its Delivery Status to 'In Progress'. This call will return a JSON response containing the transaction meta data. An example of this data is shown below:

{
    "id": 30,
    "trackingCode": "TVKC6R",
    "receiptNumber": "FTX-CCA-1",
    "submitKey": "c0e695fac9941801fe9cb5572150d21f",
    "formCode": "FTX-CCA",
    "formName": "Credit Card Application",
    "formVersion": "1.0",
    "clientCode": "maguire",
    "clientName": "Maguire",
    "portal": "Maguire",
    "fieldWorkerFlag": false,
    "testMode": false,
    "contactEmailAddress": "jeff.johnson@avoka.com",
    "formStatus": "Completed",
    "timeRequest": "2015-02-06T15:41:25+11:00",
    "timeSubmission": "2015-02-06T15:41:46+11:00",
    "timeLastUserActivity": "2015-02-06T15:42:20+11:00",
    "timeFormCompleted": "2015-02-06T15:41:46+11:00",
    "ipAddress": "127.0.0.1",
    "requestCookie": "JSESSIONID=SpOSp+hJFvw8cdI30CJj-S6j; A983-2928-2398-3419=",
    "referer": "http://www.google.com",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0",
    "userAgentBrowser": "Firefox 35",
    "userAgentBrowserType": "Firefox",
    "userAgentBrowserVersion": "35",
    "userAgentDeviceType": "Desktop",
    "userAgentOs": "Windows 8.1",
    "userAgentOsType": "Windows",
    "userAgentOsVersion": "8.1",
    "dataValidationStatus": "Error",
    "dataValidationMessage": "Payment calculation error. Submitted payment amount $1.00, while calculated payment amount $1260.59.",
    "dataExtracts": {
        "First Name": "Jeff",
        "Last Name": "Johnson",
        "Email": "jeff.johnson@avoka.com"
    },
    "deliveryStatus": "In Progress",
    "deliveryMethod": "REST Service",
    "deliveryMessage": "Delivered via 'REST Service' REST Service to rest-delivery from remote address 127.0.0.1",
    "deliveryChannel": "REST Service",
    "deliveryTime": "2015-02-06T15:43:32+11:00",
    "dataDeleted": false,
    "xmlURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/form.xml",
    "receiptURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/receipt.pdf",
    "extractURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/extract.xls",
    "attachments": [
        {
            "id": 15,
            "attachmentName": "Pay Slip",
            "requiredFlag": false,
            "fileName": "Greenbook_Final.pdf",
            "fileSize": 1852554,
            "fileURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/15/Greenbook_Final.pdf",
            "contentType": "application/pdf",
            "timeUploaded": "2015-02-06T17:12:34+11:00"
        },
        {
            "id": 16,
            "attachmentName": "Employment Contract",
            "requiredFlag": false,
            "fileName": "AQR001113Solution Design.docx",
            "fileSize": 3297658,
            "fileURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/16/AQR001113Solution Design.docx",
            "contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
            "timeUploaded": "2015-02-06T17:12:38+11:00"
        }
    ]
}

Once a transaction has been taken from the queue using the POST Next operation it will no longer be available on the queue. The Next operation is the only such operation that removes a transaction from the queue.

If a transaction that has been removed from the queue is not confirmed as being processed by a POST Confirmation request within a specified time period, it will be returned to Ready status. This time period is configured in the Journey Manager Delivery Channel configuration property 'REST Retry Delivery Period'.

GET Data

Using the transaction metadata, the client application should now download the associated transaction data using the URL's contained in the transaction metadata. Examples of these transaction data URLs are illustrated below.

{
  "id": 30,
  ...
  "xmlURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/form.xml",
  "receiptURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/receipt.pdf",
  "extractURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/extract.xls",
  "attachments": [
    {
      "id": 15,
      "attachmentName": "Pay Slip",
      "requiredFlag": false,
      "fileName": "Greenbook_Final.pdf",
      "fileSize": 1852554,
      "fileURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/15/Greenbook_Final.pdf",
      "contentType": "application/pdf",
      "timeUploaded": "2015-02-06T17:12:34+11:00"
    },
    {
      "id": 16,
      "attachmentName": "Employment Contract",
      "requiredFlag": false,
      "fileName": "AQR001113Solution Design.docx",
      "fileSize": 3297658,
      "fileURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/16/AQR001113Solution-Design.docx",
      "contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
      "timeUploaded": "2015-02-06T17:12:38+11:00"
    }
  ]}

From this transaction metadata we can see that we need to make the following transaction data download requests:

GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/form.xml
GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/receipt.pdf
GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/extract.xls
GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/15/Greenbook_Final.pdf
GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/16/AQR001113Solution-Design.docx

Clients which support HTTP compression should set the HTTP header "Accept-Encoding: gzip". The Journey Manager REST service will gzip compress all responses which are suitable for compression to improve network performance. Content which will not be compressed includes PDF, image, video and audio content.

POST Confirmation

Once all the transaction data has been downloaded and safely saved, the client must POST a delivery confirmation JSON message to the server confirming the transaction data has been successfully delivered. The confirmation URL is derived from the delivery channel endpoint URL with the addition of the transaction submission id, which is contained in the top level 'id' property of the transaction metadata.

{
  "id": <span class="highlighter">30</span>,
  ...
}
POST http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/<span class="highlighter">30</span>/

The JSON confirmation message posted to the server must contain SHA-256 hex encoded hash values of the form XML data and any file attachments. The attachments IDs are specified in the transaction metadata attachments array. These attachments IDs correspond to the Journey Manager server Attachment IDs.

{
    "xmlSHA256": "bd2f85644beffdd101be4137c68269627bbb935d8cd231ab2e5c505eabff72c6",
    "attachments": [
        {
            "id": 15,
            "fileSHA256": "3b80d18bc78aad01c50efbad9355a48a6907bdb850b96fc919570209e8cfc4c4"
        },
        {
            "id": 16,
            "fileSHA256": "553a417def543b52bcc786f1e2b79dbfd958348c94f689e8d85181aacd039a61"
        }
    ],
    "deleteData": true,
    "processingStatus": "Your application is being processed"
}

To calculate the SHA-256 hex encoded values there are a variety of open source libraries available. Below is a simple Java function which will create a SHA-256 data hash and Hex encodes the value.

// Hexidecimal characters for encoding.
private static final char[] HEXADECIMAL = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };

public static String toSHA256Hash(byte[] bytes) {
    if (bytes == null) {
        throw new IllegalArgumentException("Null bytes parameter");
    }

    try {
        MessageDigest md = MessageDigest.getInstance("SHA-256");

        md.update(bytes);

        byte[] binaryData = md.digest();

        // Hex encode data SHA-256 digest
        char[] buffer = new char[64];

        for (int i = 0; i < 32; i++) {
            int low = (binaryData[i] &amp; 0x0f);
            int high = ((binaryData[i] &amp; 0xf0) >> 4);
            buffer[i * 2] = HEXADECIMAL[high];
            buffer[i * 2 + 1] = HEXADECIMAL[low];
        }

        return new String(buffer);

    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}

Client Failure Recovery

If a client fails while processing a delivery (e.g. it has taken a transaction off the queue, which is now in 'In Progress' delivery state but hasn't completed the delivery), then this transaction is not available for other clients to pickup from the queue again. To enable retrying a delivery, the REST Service Delivery Channel enables configuring a delivery retry timeout, after which any 'In Progress' transactions are automatically returned to a 'Ready' state so they are available again on the delivery queue.

Access the setting in Journey Manager via the Forms/Organizations menu item, then select the Organization, click the Delivery Channels tab, then select the Delivery Channel.

REST Delivery Channel Retry Configuration

Service API


This section provides a description of all the REST Delivery Service API operations including:

  • GET Organizations
  • GET Delivery Channels
  • GET Submissions
  • GET Submission
  • GET Submission Data
  • POST Next Submission
  • POST Delivery Completed
  • POST Delivery Error


GET Organizations

Return the list of organization codes available for the current user. Note global users would see a listing of all organizations.

URL Format

GET https://<tm server>/manager/secure/rest/delivery/v1/

URL Example

GET https://transact.maguire.com/manager/secure/rest/delivery/v1/

200 Response

[
    "maguire",
    "first-bank",
    "state-bank"
]

Error Responses

401 - Not Authorized
User not authorized to perform this operation.
<dt>404 - Not Found</dt> 
<dd>Ensure the URL contains a trailing slash.</dd>

<dt>503 - Service Unavailable</dt> 
<dd>TM System Deployment Property 'Enable REST/Web Service Delivery' has been set to false.</dd>


GET Delivery Channels

Return the list of delivery channel names for the specified organization.

URL Format

GET https://<tm server>/manager/secure/rest/delivery/v1/<organization code>

URL Example

GET https://transact.maguire.com/manager/secure/rest/delivery/v1/maguire/

200 Response

[
    "credit-card",
    "home-loans",
    "home-loans-abandoned",
    "insurance",
    "insurance-abandoned"
]

Error Responses

401 - Not Authorized
User not authorized to perform this operation.
<dt>404 - Not Found</dt> 
<dd>The organization code may not exist.</dd>

<dt>503 - Service Unavailable</dt> 
<dd>TM System Deployment Property 'Enable REST/Web Service Delivery' has been set to false.</dd>


GET Submissions

Return the list of submissions id, for the specified organization and delivery channel, with the status delivery "Ready", "In Progress" and "Error".

URL Format

GET https://<tm server>/manager/secure/rest/delivery/v1/<organization code>/<delivery channel>/

URL Example

GET https://transact.maguire.com/manager/secure/rest/delivery/v1/maguire/credit-card/

200 Response

{
    "ready": [
        "2301",
        "2302",
        "2303",
        "2304",
        "2305"
    ],
    "inProgress": [
        "2300"
    ],
    "error": []
}

Query Parameter

This operation will also support a deliveryStatus query parameter, which can be used to filter on [ Ready | In Progress | Error ] values. The query parameter name and value are case sensitive. Any mismatches in the query parameter name or value will be treated as though the query parameter was not present.

For example the following request:

GET https://transact.maguire.com/manager/secure/rest/delivery/v1/maguire/credit-card/?deliveryStatus=Ready

Will return the JSON response:

[
    "2301",
    "2302",
    "2303",
    "2304",
    "2305"
]

Error Responses

401 - Not Authorized
User not authorized to perform this operation.
<dt>404 - Not Found</dt> 
<dd>The organization code or delivery channel may not exist.</dd>

<dt>503 - Service Unavailable</dt> 
<dd>TM System Deployment Property 'Enable REST/Web Service Delivery' has been set to false.</dd>


GET Submission

Return the submission for the specified submission id, organization and delivery channel.

URL Format

GET https://<tm server>/manager/secure/rest/delivery/v1/<organization code>/<delivery channel>/<submission id>/

URL Example

GET https://transact.maguire.com/manager/secure/rest/delivery/v1/maguire/credit-card/2039/

200 Response

The comprehensive submission example JSON response is provided below.

{
  "id": 69,
  "trackingCode": "UD65H6",
  "receiptNumber": "FTX-CCA-16",
  "submitKey": "20bc0dd18c74ae4f4e714dc402728d96",
  "taskKey": "a7d7c46f590c87903e39f3eb7cc2cb06",
  "taskType": "Review",
  "taskSubject": "Review Job Example 1 by medgar@avoka.com.",
  "taskMessage": "Please review the Job Example 1 by Malcolm Edgar.",
  "taskCreatedTimestamp": "2015-01-30T15:22:20+11:00",
  "job": {
    "id": 1,
    "jobName": "1 Step Review Job",
    "referenceNumber": "ZMYS4A",
    "jobKey": "24e67afe8ad22a92b1ebc3aa3dcad90c",
    "jobStep": "Application Review",
    "jobAction": "Assign Review"
  },
  "formCode": "FTX-CCA",
  "formName": "Credit Card Application",
  "formVersion": "1.0",
  "clientCode": "maguire",
  "clientName": "Maguire",
  "portal": "Maguire",
  "fieldWorkerFlag": false,
  "testMode": false,
  "contactEmailAddress": "jeff.johnson@avoka.com",
  "formStatus": "Completed",
  "timeRequest": "2015-01-27T14:51:38+11:00",
  "timeSubmission": "2015-01-27T14:52:04+11:00",
  "timeLastUserActivity": "2015-01-27T14:52:14+11:00",
  "timeFormCompleted": "2015-01-27T14:52:04+11:00",
  "ipAddress": "127.0.0.1",
  "requestCookie": "JSESSIONID\u003dPCgDnYPkLB+H6EHsXt2t6RHe; A983-2928-2398-3419\u003d",
  "referer": "http://localhost:9080/maguire/servlet/SmartForm.html?formCode\u003dFTX-CCA",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0",
  "userAgentBrowser": "Firefox 35",
  "userAgentBrowserType": "Firefox",
  "userAgentBrowserVersion": "35",
  "userAgentDeviceType": "Desktop",
  "userAgentOs": "Windows 8.1",
  "userAgentOsType": "Windows",
  "userAgentOsVersion": "8.1",
  "paymentStatus": "Completed",
  "paymentType": "Credit/Debit Card",
  "paymentTotal": 23.5,
  "paymentLog": {
    "paymentStatus": "Completed",
    "paymentLogKey": "9cb2345c50968900ac7d05e3751e465f",
    "paymentServiceCode": "DEMO",
    "userIpAddress": "127.0.0.1",
    "doTimestamp": "2015-01-27T15:10:49+11:00",
    "doAmount": 2350,
    "doMerchTxnRef": "1",
    "doVersion": "1",
    "drTimestamp": "2015-01-27T15:10:49+11:00",
    "drAmount": 2350,
    "drMerchTxnRef": "1",
    "drReceiptNo": "27",
    "drTxnResponseCode": "0",
    "drTxnResponseMsg": "Transaction approved"
  },
  "attachmentsStatus": "Completed",
  "dataExtracts": {
    "First Name": "Jeff",
    "Last Name": "Johnson",
    "Email": "jeff.johnson@avoka.com"
  },
 "milestones": [
    {
      "milestone": "Complete Application UID: ed726afdc8f94513fdcd0b1d150a1c0c",
      "timeCreated": "2015-01-27T14:52:04+11:00"
    }
  ],
  "deliveryStatus": "Ready",
  "dataDeleted": false,
  "xmlURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/69/form.xml",
  "receiptURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/69/receipt.pdf",
  "extractURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/69/extract.xls",
  "attachments": [
    {
      "id": 41,
      "attachmentName": "Pay Slip",
      "requiredFlag": false,
      "fileName": "712.GIF",
      "fileSize": 31133,
      "fileURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/69/41/712.GIF",
      "contentType": "image/gif",
      "timeUploaded": "2015-01-27T14:51:57+11:00"
    },
    {
      "id": 42,
      "attachmentName": "Employment Contract",
      "requiredFlag": false,
      "fileName": "ABC-123.pdf",
      "fileSize": 29595,
      "fileURL": "http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/69/42/ABC-123.pdf",
      "contentType": "application/pdf",
      "timeUploaded": "2015-01-27T14:52:00+11:00"
    }
  ]
}

Error Responses

401 - Not Authorized
User not authorized to perform this operation.
<dt>404 - Not Found</dt> 
<dd>The organization code, delivery channel or submission id may not exist.</dd>

<dt>503 - Service Unavailable</dt> 
<dd>TM System Deployment Property 'Enable REST/Web Service Delivery' has been set to false.</dd>


GET Submission Data

Return the submission data for the data URL specified in the GET Submission JSON response. The response code should be 200, and the returned data will have the Content-Type header set for the particular file type. Data will also be compressed if the "Accept-Encoding: gzip" header is set.

URL Examples

GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/form.xml
GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/receipt.pdf
GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/extract.xls
GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/15/Greenbook_Final.pdf
GET http://localhost:9080/manager/secure/rest/delivery/v1/maguire/rest-service/30/16/AQR001113Solution-Design.docx

Error Responses

401 - Not Authorized
User not authorized to perform this operation.
<dt>404 - Not Found</dt> 
<dd>The organization code, delivery channel, submission id, attachment id or filename may not exist. The request URL should be exactly as contained in the GET Submission JSON response.</dd>

<dt>503 - Service Unavailable</dt> 
<dd>TM System Deployment Property 'Enable REST/Web Service Delivery' has been set to false.</dd>


POST Next Submission

Return the next submission 'Ready' for delivery of the specified organization and delivery channel. This operation will change the submission delivery status to "In Progress" and will not be returned again by this operation.

URL Format

POST https://<tm server>/manager/secure/rest/delivery/v1/<organization code>/<delivery channel>/next/

URL Example

POST https://transact.maguire.com/manager/secure/rest/delivery/v1/maguire/credit-card/next/

200 Response

The response is the same as the GET Submission above except, the delivery status values will also be set.

{ 
  "id": 69,
  ...
  "deliveryStatus": "In Progress",
  "deliveryMethod": "REST Service",
  "deliveryMessage": "Delivered via \u0027REST Service\u0027 REST Service to administrator",
  "deliveryChannel": "REST Service",
  "deliveryTime": "2015-01-27T14:53:00+11:00"
  ...
}

Error Responses

401 - Not Authorized
User not authorized to perform this operation.
<dt>404 - Not Found</dt> 
<dd>The organization code or delivery channel may not exist. Ensure the HTTP method is POST, and not GET.</dd>

<dt>503 - Service Unavailable</dt> 
<dd>TM System Deployment Property 'Enable REST/Web Service Delivery' has been set to false.</dd>


POST Delivery Completed

Set the submission delivery to be completed, and optionally specify whether the transaction data should be deleted once delivery has been completed.

URL Format

POST https://<tm server>/manager/secure/rest/delivery/v1/<organization code>/<delivery channel>/<submission id>/

URL Example

POST https://transact.maguire.com/manager/secure/rest/delivery/v1/maguire/credit-card/69/

Request Body

The JSON request message must specify the transaction data SHA-256 hash values (Hex encoded) for the form XML data and the file upload attachment data.

{
    "xmlSHA256": "bd2f85644beffdd101be4137c68269627bbb935d8cd231ab2e5c505eabff72c6",
    "attachments": [
        {
            "id": 41,
            "fileSHA256": "3b80d18bc78aad01c50efbad9355a48a6907bdb850b96fc919570209e8cfc4c4"
        },
        {
            "id": 42,
            "fileSHA256": "553a417def543b52bcc786f1e2b79dbfd958348c94f689e8d85181aacd039a61"
        }
    ],
    "deleteData": true,
    "processingStatus": "Your application is being processed"
}

Delete Data Option

If the "deleteData": "true" attribute is set then JSON confirmation message then the transaction user data will be deleted immediately from the server. The delete data will include the form XML data, PDF receipt and any file attachments, but will not include the transaction meta data.

Note: you should only do this if you have pressing security requirements that requiring immedate transaction data purging after delivery. Deleted data is not recoverable from the server. Please ensure any delivered transaction data is written to HA storage systems.

Processing Status Option

If the processingStatus attribute is set then a processing status message will be added to the transaction. This message can be use to display transaction processing status updates to the end user. This text value should be 100 characters or less, longer values will be truncated.

200 Response

{ 
  "id": 69,
  ...
  "processingStatus": "Your application is being processed",
  "processingStatusTime": "2015-01-27T14:53:00+11:00",
  ...
  "deliveryStatus": "Completed",
  "deliveryMethod": "REST Service",
  "deliveryMessage": "Delivered via \u0027REST Service\u0027 REST Service to administrator",
  "deliveryChannel": "REST Service",
  "deliveryTime": "2015-01-27T14:53:00+11:00"
  ...
}

Error Responses

400 - Bad Request
Bad request or request parameter. Check error message for details.
<dt>401 - Not Authorized</dt> 
<dd>User not authorized to perform this operation.</dd>

<dt>404 - Not Found</dt> 
<dd>The organization code, delivery channel or submission id may not exist. Ensure the HTTP method is POST and not GET.</dd>

<dt>503 - Service Unavailable</dt> 
<dd>TM System Deployment Property 'Enable REST/Web Service Delivery' has been set to false.</dd>


POST Delivery Error

This operation is supported in Journey Manager 4.3 and later.

Update the transaction delivery status to 'Error' indicating that an internal delivery error has occurred. An internal error could be when attempting to store transaction data to a disk volume which is not available.

By using this operation you can inform TM operational staff that a delivery error has occurred and this matter needs to be attended to. Staff who are in the alert group 'Receive System Alerts - Delivery' will receive an email notification when a delivery error is recored on the TM server.

If the Delivery Channel is configure to enable delivery retry, the transaction will be returned to the delivery queue once the retry delay period has been reached. If there is no delivery retry configured then submission will not be automatically returned to the delivery queue, and it will be up to an administrator to resolve the issue.

Note:If the submission has already been completed by a POST Delivery Completed request, this POST Delivery Error request will be silently ignored and the response will be returned exactly as it would have been for the original POST Delivery Completed request.

URL Format

POST https://<tm server>/manager/secure/rest/delivery/v1/<organization code>/<delivery channel>/<submission id>/

URL Example

POST https://transact.maguire.com/manager/secure/rest/delivery/v1/maguire/credit-card/2039/

Request Body

The JSON request message must specify an errorMessage value describing the error.

{
    "errorMessage": "SAN delivery storage volume not available."
}

200 Response

{ 
  "id": 2039,
  ...
  "deliveryStatus": "Error",
  "deliveryMethod": "REST Service",
  "deliveryTime": "2015-01-27T14:53:00+11:00"
  ...
}

Error Responses

400 - Bad Request
Bad request or request parameter. Check error message for details.
<dt>401 - Not Authorized</dt> 
<dd>User not authorized to perform this operation.</dd>

<dt>404 - Not Found</dt> 
<dd>Organization code, delivery channel or submission id may not exist. Ensure the HTTP method is POST and not GET.</dd>

<dt>503 - Service Unavailable</dt> 
<dd>TM System Deployment Property 'Enable REST/Web Service Delivery' has been set to false.</dd>
← REST Application Package APIREST Form Groups API →
  • Getting Started
  • Performing Delivery
  • Service API

Terms & Conditions

Privacy Policy

Cookie Policy

Copyright © 2003-2022 Temenos Headquarters SA