EzeScan WebApps

API Endpoint Stage

Outputs to a user defined API endpoint.

image-20250416-215932.png

Body Content Types

Type

Description

Item Metadata Json (application/json)

Preconfigured output in JSON format.

Item Metadata XML (text/xml)

Preconfigured output in XML format.

Item Metadata CSV (text/xml)

Preconfigured output in CSV format.

Attachment Template (application/json)

Custom output in JSON format.

You must construct a valid JSON payload manually.

Example:

{
    "DocumentName": "{{attachment["name"]}}",
    "Length": "{{attachment["size"]}}",
    "PhotoData": "{{attachment["data"]}}"
}

If only one attachment exists, the output will be:

JSON
{
    "DocumentName": "1",
    "Length": "100",
    "PhotoData": "BASE64_ENCODED_DATA_HERE"
}

If multiple attachments exist, the output will be:

[
   {
      "DocumentName":"1",
      "Length":"100",
      "PhotoData":"BASE64_ENCODED_DATA_HERE"
   },
   {
      "DocumentName":"2",
      "Length":"1240",
      "PhotoData":"BASE64_ENCODED_DATA_HERE"
   },
]

Per Attachment Request (application/json)

When this type is specified, a new request is sent separately for each attachment.

Supports the following attachment placeholders:

Placeholder

Description

{{attachment["name"]}}

Original file name of the attachment.

{{attachment["nameNoExtension"]}}

Original file name of the attachment without its extension.

{{attachment["extension"]}}

Original extension of the attachment. Value includes the period. (eg .pdf)

{{attachment["extensionNoDot"]}}

Original extension of the attachment. Value doesn’t contain the period. (eg pdf)

{{attachment["id"]}}

Id of the uploaded attachment.

{{attachment["size"]}}

Size of the attachment in bytes.

{{attachment["data"]}}

Base 64 Encoded data of the attachment

{{attachment["mimeType"]}}

Mime Type of the file based on its extension.

Example:

{
    "FirstName": "{{fields["first_name"]}}",
    "LastName": "{{fields["last_name"]}}",
    "Age": {{fields["age"]}},
    "IdDocument": {
      "DocumentName": "{{attachment["name"]}}",
      "Length": "{{attachment["size"]}}",
      "Data": "{{attachment["data"]}}"
    }
}

Custom Json (application/json)

Custom output in JSON format.

You must construct a valid JSON payload manually.

Example:

{
    "FirstName": "{{fields["first_name"]}}",
    "LastName": "{{fields["last_name"]}}",
    "Age": {{fields["age"]}}
}

Custom XML (text/xml)

Custom output in XML format.

You must construct a valid XML payload manually.

Example:

HTML
<Person>
    <FirstName>{{fields["first_name"]}}</FirstName>
    <LastName>{{fields["last_name"]}}</LastName>
    <Age>{{fields["age"]}}</Age>
</Person>

Custom Text (text/plain)

Custom output in just a string output.

Use this to just send plain text to the end point.

Example:

The user {{fields["first_name"]}} {{fields["last_name"]}} has just signed up with an age of {{fields["age"]}}

Custom Form (application/x-www-form-urlencoded)

Custom output in XML format.

Example:

FirstName={{fields["first_name"]}}&LastName={{fields["last_name"]}}&Age={{fields["age"]}}

Parse response as JSON

Enabling this option means the return properties are generated from the JSON payload.

Example Return Payload:

{
    "FirstName": "Bobby",
    "LastName": "Brown",
    "Age": 22
}

This would create the following return properties

Property

Example Placeholder

Returned Value

FirstName

{{stages["api-endpoint"] | property("FirstName")}}

Bobby

LastName

{{stages["api-endpoint"] | property("LastName")}}

Brown

Age

{{stages["api-endpoint"] | property("Age")}}

22