Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The most common request types will be GET/POST.

The request body’s text area allows for specification of raw data to be passed along with the request. Generally this would only be leveraged for POST and PATCH requests. Why not forbidden, it’s is generally considered bad practice for GET requests to include a request body. In most cases, you will find that GET requests will include any parameterized / variable data in the request URL itself.

The request body text area will generally (but is not required to) contain JSON formatted data, and may include notations. A basic request body might resemble:

Code Block
{
    "vendorInvoiceNumber": "{p_Invoice Number}",
    "vendorNumber":"{p_selectedVendor}",
    "dueDate":"{p_Due Date}"
}
Info

Note that the keys and values specified in any request body are dictated entirely by the host API. Refer to the API documentation for specifics on how to format requests.

Send document

Some APIs support the ability to receive a document file. This is common in ERP applications where you might create a new transaction (Bill) and then attach a PDF of the invoices to the transaction. With this option selected, the request body’s textarea is ignored. In it’s place, the file is sent to the API as multipart/form-data.

Add response (document)

With this option selected, the API request is expected to return a document. That document will be injected into the process, and would then follow any routing following that request. Use this option to retrieve a document form an external API and inject it into a capture workflow.

Formatting

Formatting options are available to manipulate response data.

Response Text Replacement

Note

NOTE: This is a REQUEST formatter. It works against request data, prior to sending it to the API.

Use this option to perform simple full text replacements on API request values. This options accepts a regular expression that when matched, will replace a value with the regex match. Consider the pattern:

(?<=.*\s\--\s).*

This pattern will match any value that includes a space, two hyphens, and another space, then matches everything to the right of that sequence.

A request body of

Code Block
{
  "vendorNumber":"Square 9 Softworks -- 77364"
}

would be translated to

Code Block
{
  "77364"
}
Info

Use this feature when working with data fields that are concatenated, like vendor lists. It’s common for vendor lists to include vendor name and vendor id. The user needs to see a vendor name for indexing purposes, and the ERP needs the vendor id for creating transactions. It would be possible to make additional API requests to perform runtime data lookups, but it’s generally best practice to minimize requests where possible.