Generate-Synchronous

Overview

The Generate-Synchronous operation is used to request document processing based on transaction data included in the request. This operation is a synchronous call that takes transaction data, a Content URI, an account ID (AccountID), and any additional optional request data for the calling application and returns the transaction ID, status information, as well as the generated package documents.

Table 1. Method
Method URL Description
POST /api/v1/Document/account/{accountId}/generate-synchronous The POST method submits the accountId as part of the Generate call
Table 2. Request Parameters
Parameter Type Constraints Description
accountId integer Required The account used to associate to the request.
DocumentFormat DocumentFormatType Optional A string identifying the format of the document to return. Options include: PDF, Raw XML, TRF, Tagged PDF.
DaysToPersistInLongTermStorage int Optional The value used to calculate when the request will be deleted from the database (in days). Setting a value of "-1" will immediately delete all request data and images. "7" is the default value.
TransactionData xml Required Transaction data in the form of a XML file that will be used to process the request.
ContentIdentifier string Required A string identifying the type of content to be used.
AncillaryOutputOptions AncillaryOutputOption Optional A sequence of elements indicating Watermark and Barcode information. AncillaryOutPutOptions is an array of AncillaryOutputOption
Attachments Attachment Optional The Attachment object contains the requested file as a PDF and includes description information about the attached PDF.

Attachment format.

Attachments are base64 encoded. The code reads the file and the uses a .net library call to encode the file for transmission:

Attachment = Convert.ToBase64String(data, 0, strLen)

Convert can be found in System.Convert

AttachmentPosition LocationEnum Optional An enumerator indicating the location of the attachment in relation to the documents.
Callback Callback Optional A sequence of elements indicating the Callback URL, Username and Password.
PassThroughIdentifier string Optional

The PassThroughIdentifier is an optional user-defined generated parameter. This parameter is case-sensitive.

The PassThroughIdentifier MUST be unique for each request.

If a PassThroughIdentifier has been submitted previously for an account and exists in the database, Expere Document Services will return the original transaction ID. A new transaction ID will not be created.

If the PassThroughIdentifier is passed in the request and the parameter is empty (null), Expere Document Services will process the request and return a new transaction ID.

MergeTRIDDocs boolean Optional A true or false value indicating whether to include the MergeTRIDDocs parameter.
EZConfig EZConfig Optional Container object for EZConfigID information.
EZTransform EZTransform Optional Container object for EZTransform information.

Sample Request

{
    "generate": {
        "request": {
            "daysToExpire": 0,
            "documentFormat": "PDF",
            "transactionData": "PFR4biB4bWxucz0iaHR0c",
            "contentIdentifier": "BaseLibrary.PKG.Default_Default",
            "ancillaryOutput": [
                {
                    "outputType": "Barcode",
                    "barcode": {
                        "type": "barcode2D",
                        "pattern": "%BRCD%,2200478271,DP_CLOSE-2020-05-20T03:40:27.69032-2200478271,%page%,%totalpages%",
                        "horizontalAlignment": "Right"
                    }
                },
                {
                    "outputType": "Watermark",
                    "watermark": {
                        "text": "Sample",
                        "rotate": true,
                        "location": "Center"
                    }
                }
            ],
            "attachmentPosition": "Beginning",
            "delivery": {
                "deliveryHold": true,
                "deliveryMode": "DirectToPaper",
                 "recipients": [
                    {
                        "name": "borrower one",
                        "addressLine1": "123 main street",
                        "addressLine2": "apt 4",
                        "city": "Fargo",
                        "state": "ND",
                        "zip": "58102",
                        "countryCode": "USA",
                        "mailingMethod": [
                            "USPSFirstClass","FedExStandardOvernight"
                        ]
                    },                    {
                        "name": "borrower two",
                        "addressLine1": "321 main street",
                        "addressLine2": "apt 5",
                        "city": "Cold Spring",
                        "state": "MN",
                        "zip": "56320",
                        "countryCode": "USA",
                        "mailingMethod": [
                            "USPSFirstClass"
                        ]
                    }
                  ],
                "returnAddress": {
                    "name": "WKFS",
                    "businessName": "WKES businessName",
                    "addressLine1": "6815 Saukview",
                    "addressLine2": "suite 100",
                    "city": "St Cloud",
                    "state": "MN",
                    "zip": "56301",
                    "countryCode": "BBB"
                },
                "fiPreConsent": true
            }
        }
    }
}
Note: the </transactionData> element must consist of base64 data.

Sample Response

{
  "generate": {
    "request": {
      "documentFormat": "PDF",
      "documentsToGenerate": [
        {
          "documentID": "string",
          "format": "PDF",
          "ancillaryOutput": [
            {
              "outputType": "Barcode",
              "watermark": {
                "imageURL": "string",
                "text": "string",
                "rotate": true,
                "location": "Top"
              },
              "setEncryption": {
                "strength128Bits": true,
                "passwords": {
                  "user": "string",
                  "owner": "string"
                },
                "permissions": {
                  "allowPrinting": true,
                  "allowModifyContents": true,
                  "allowCopy": true,
                  "allowModifyAnnotations": true,
                  "allowScreenReaders": true,
                  "allowFillIn": true,
                  "allowAssembly": true,
                  "allowDegradedPrinting": true
                }
              },
              "barcode": {
                "type": "Barcode128",
                "pattern": "string",
                "useCoverPage": true,
                "firstPageOnly": true,
                "horizontalAlignment": "Left"
              },
              "eSignatureAndFieldSupport": {
                "eSignatureCoordinatesOnly": true,
                "eSignatureDateSupport": true,
                "eSignatureTooltip": "string",
                "eSignatureInitialsTooltip": "string",
                "nonSignatureFieldCoordinatesOnly": true,
                "eSignatureWKES": true
              },
              "logo": {
                "image": "string",
                "heightInInches": 0,
                "widthInInches": 0,
                "placement": "AllPages",
                "justification": "Left",
                "alternateText": "string"
              }
            }
          ]
        }
      ],
      "daysToExpire": 0,
      "transactionData": "string",
      "contentIdentifier": "string",
      "callback": {
        "authorization": {
          "authType": "HTTPBasic",
          "user": "string",
          "password": "string",
          "token": "string"
        },
        "url": "string"
      },
      "passthroughIdentifier": "string",
      "ancillaryOutput": [
        {
          "outputType": "Barcode",
          "watermark": {
            "imageURL": "string",
            "text": "string",
            "rotate": true,
            "location": "Top"
          },
          "setEncryption": {
            "strength128Bits": true,
            "passwords": {
              "user": "string",
              "owner": "string"
            },
            "permissions": {
              "allowPrinting": true,
              "allowModifyContents": true,
              "allowCopy": true,
              "allowModifyAnnotations": true,
              "allowScreenReaders": true,
              "allowFillIn": true,
              "allowAssembly": true,
              "allowDegradedPrinting": true
            }
          },
          "barcode": {
            "type": "Barcode128",
            "pattern": "string",
            "useCoverPage": true,
            "firstPageOnly": true,
            "horizontalAlignment": "Left"
          },
          "eSignatureAndFieldSupport": {
            "eSignatureCoordinatesOnly": true,
            "eSignatureDateSupport": true,
            "eSignatureTooltip": "string",
            "eSignatureInitialsTooltip": "string",
            "nonSignatureFieldCoordinatesOnly": true,
            "eSignatureWKES": true
          },
          "logo": {
            "image": "string",
            "heightInInches": 0,
            "widthInInches": 0,
            "placement": "AllPages",
            "justification": "Left",
            "alternateText": "string"
          }
        }
      ],
      "attachments": [
        {
          "attachmentDoc": "string",
          "displayName": "string",
          "instanceFileName": "string",
          "attachmentPosition": "Beginning",
          "passwords": {
            "user": "string",
            "owner": "string"
          }
        }
      ],
      "attachmentPosition": "Beginning",
      },
      "mergeTRIDDocs": true,
      "ezConfig": {
        "orgId": "string",
        "orgName": "string",
        "orgAlias": "string",
        "orgLOB": "string"
      }
    }
  }
}

Generate-Asynchronous Overview

The Generate operation is used to request document processing based on transaction data included in the request. This operation is an asynchronous call that takes transaction data, a Content URI, and an account ID (AccountID) for the calling application and returns the transaction ID, status information, as well as the generated package documents.

Select-Synchronous Overview

The Select - Synchronous operation is used to select documents for immediate processing and retrieve the results of the Select request.