Xribe Output API (2020-09-124T13:52:27Z)

Download OpenAPI specification:Download

Introduction

The Xribe runtime RESTful API can be used to create HTML and PDF output from Web Designer templates, get up-to-date information about your output generation requests and manage your webhooks.

The base URL for the Xribe runtime RESTful API is https://runtime.compose.platform.unifiedpost.com/api

There are two typical scenarios for generating output with the Xribe runtime API. Both scenarios start with a POST request to v1/message to initiate an output generation request, which will return a message ID that identifies this request.

In the preferred scenario Xribe will call the configured webhook when the output is generated:

                    +---------+              +-------+
                    | Client  |              | Xribe |
                    +---------+              +-------+
                          |                       |
                          | Add a new message     |
                          |---------------------->|
                          |                       | -------------------\
                          |                       |-| Validate request |
                          |                       | |------------------|
                          |                       |
                          |            message ID |
                          |<----------------------|
                          |                       | ---------------------\
                          |                       |-| Create deliverable |
                          |                       | | Generate output    |
                          |                       | |--------------------|
                          |      Webhook Callback |
                          |<----------------------|
      ------------------\ |                       |
      | Accept callback |-|                       |
      |-----------------| |                       |
                          |                       |
                          | respond with 2xx      |
                          |---------------------->|
------------------------\ |                       |
| Handle callback async |-|                       |
|-----------------------| |                       |
                          |                       |
                          | Retrieve output       |
                          |---------------------->|
                          |                       |

In the second scenario Xribe will not call a webhook when the output is generated, but the Client will use polling to see when the output is ready.:

                              +---------+                           +-------+
                              | Client  |                           | Xribe |
                              +---------+                           +-------+
                                    |                                    |
                                    | Add a new message                  |
                                    |----------------------------------->|
                                    |                                    | -------------------\
                                    |                                    |-| Validate request |
                                    |                                    | |------------------|
                                    |                                    |
                                    |                         Message ID |
                                    |<-----------------------------------|
                                    |                                    |
                                    | Get message info (deliverable ID)  |
                                    |----------------------------------->|
                                    |                                    |
                                    |      Message info (deliverable ID) |
                                    |<-----------------------------------|
----------------------------------\ |                                    |
| Repeat until deliverable exists |-|                                    |
|---------------------------------| |                                    | -----------------------\
                                    |                                    |-| Create delivererable |
                                    |                                    | |----------------------|
                                    | Get deliverable info (status)      |
                                    |----------------------------------->|
                                    |                                    |
                                    |          Deliverable info (status) |
                                    |<-----------------------------------|
                                    |                                    | ------------------\
                                    |                                    |-| Generate output |
                                    |                                    | |-----------------|
                                    |                                    |
                                    | Get deliverable info (status)      |
                                    |----------------------------------->|
                                    |                                    |
                                    |          Deliverable info (status) |
                                    |<-----------------------------------|
----------------------------------\ |                                    |
| Repeat until status 'generated' |-|                                    |
|---------------------------------| |                                    |
                                    |                                    |
                                    | Get deliverable info               |
                                    |----------------------------------->|
                                    |                                    |
                                    |                   Deliverable info |
                                    |<-----------------------------------|
                                    |                                    |
                                    | Retrieve output                    |
                                    |----------------------------------->|
                                    |                                    |

Authentication

All requests to the Xribe Runtime API must be authenticated. See OAuth 2.0 for information on how to obtain security tokens and Performing authenticated requests on how to use them.

The Xribe Runtime API uses https://login.inventivedesigners.com as its authentication and authorization server.

OAuth tokens are valid for 10 minutes by default. Reuse the token across requests to save on OAuth requests.

Authorization

Users that make calls to the Xribe Runtime API should have permission output-center. In addition to this they should also have access to the different resources.

Api operation Operation Resource
Get message(s) read runtime-engine://<accountName>/<projectID>/<environmentID>/message
Create message write runtime-engine://<accountName>/<projectID>/<environmentID>/message
Delete message write runtime-engine://<accountName>/<projectID>/<environmentID>/message AND runtime-engine://<accountName>/<projectID>/<environmentID>/deliverable
Get deliverable(s) read runtime-engine://<accountName>/<projectID>/<environmentID>/deliverable
Get defaults read runtime-engine://<accountName>/<projectID>/<environmentID>/message
Update defaults write runtime-engine://<accountName>/<projectID>/<environmentID>/message

Template Execution Context

When Xribe handles a message, it provisions and manages the resources needed to execute output generation and delivery. When output generation is requested, Xribe launches an execution context to perform this operation. The execution context is a temporary runtime environment that uses your provided template to generate output. It takes some time to set up an execution context and do the necessary "bootstrapping". Every time an execution context needs to be constructed, some additional latency may be noticable.

After a message request is handled, Xribe maintains the execution context for some time in anticipation of additional output generation requests. This facilitates improved performance for subsequent requests as there is no need to set up the output generation again. Since Xribe reuses previously created execution contexts, keep the following implication in mind: any modifications made by javascript code that may be embedded in the template, persist and exist for the lifecycle of the execution environment. Consider, for instance, a situation where a fresh execution environment is started and an incoming request is processed. Say some javascript code that changes an environment variable is embedded in the template and is executed. Then any future requests that will be handled by the same execution environment, will be using the updated environment variable that was changed by the first request. Caution is advised to only deploy vetted code that sanitizes any uncontrolled input data.

Execution contexts are solely shared between requests for the same project and environment. They are never shared across environment, project or tenant borders.

Document Flow Execution Context

When Xribe receives a message of type documentflow, it provisions a process server with the specified package deployed to handle the message. Multiple instances can be started depending on the load, and a single instance can process multiple messages. The started instances are temporary environments, local storage will be deleted when the instance is recycled. If persistent storage is required, use the temporary location provided by the initial step, or use the temporary data steps. Temporary data is automatically deleted after three months.

Note that instances can be terminated at any time, after wich the message will be offered to a new instance. Make sure the defined flows and processes can handle sudden termination and the subsequent reprocessing of a message. When a document flow instance succesfully completes, the message will be considered processed.

Execution contexts are solely shared between requests for the same project, environment and package. They are never shared across package, environment, project or tenant borders.

Webhook callbacks

Xribe will deliver webhook notifications as soon as possible after the requested output was generated.

Webhook applications must respond within 10 seconds with an HTTP 2xx response code to acknowledge the notification. Failure to respond within 10 seconds or returning a different status code will trigger a retry attempt.

Unsuccessful Webhook notifications are retried for up to 72 hours. After 72 hours have elapsed, the notification is discarded and will not be sent again. Xribe uses a backoff mechanism to avoid flooding webhook applications with retry attempts (exponential backoff with a one hour maximum between attempts). Notifications are retried according to the following schedule:

Retry attempt Time between attempts Time since first attempt
1 1 minute 1 minute
2 2 minutes 3 minutes
3 4 minutes 7 minutes
4 8 minutes 15 minutes
5 16 minutes 31 minutes
6 32 minutes 63 minutes
7 – 78 60 minutes 2 – 72 hours

⚠️ Warning: endpoints from ngrok, i.e. endpoints containing ".ngrok.io" will only be retried twice.

About limits

Your account has service limits assigned to it. These limits are in place to protect users of the service by preventing unintentional high usage or malicious activities to rack up very high consumption bills. Additionally, the limits also protect the integrity of the service. Hitting these limits can result in throttling (for example HTTP response 429 "Too Many Requests"). Most of these limits are soft limits. Different usage plans with higher limits can be assigned to your account on request.

Version 1 changes

Composition

The most important addition to version 1 of the API is the ability to pass in and compose multiple inputs. This means that when creating a message request you can pass in an array of inputs. You can compose these different inputs by specifying a compose script that describes how to combine the different inputs. Note that this requires each input to have an ID from now on. Allowing multiple inputs also has some consequences for the deliverable since you can now have distinct outputs. As a consequence, properties such as the page count and output properties have moved to the respective output in the deliverable. For more detailed information and help migrating from an earlier version to version 1, have a look at our Migration Guide.

For more information about compose scripts and the supported operations, see Composition Guide.

Example of a compose output request:

{
  "projectID": "96dd5fcf-e20a-43b4-a9b9-705347f5f19f",
  "environmentID": "37b2f370-81e2-47ff-9396-d3f60d7c27e7",
  "properties": {
    "description": "Letter - Insurance Claim"
  },
  "outputParameters": {
    "type": "pdf",
    "profile": "PDF/X-4"
  },
  "deliveryParameters": {
    "webhookParameters": {
      "generated": {
        "endpoint": "https://grok.io/callback",
        "authorizationHeader": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFU"
      }
    }
  },
  "input": [
    {
      "id": "letter",
      "type": "template",
      "ref": "letter.sdt",
      "theme": "themes/rialto-bank.html",
      "data": {
        "amount": 250000,
        "rate": 2.5
      }
    },
    {
      "id": "overlay",
      "type": "resolve",
      "ref": "logo.pdf"
    }
  ],
  "compose": {
    "ref": "overlay.json"
  }
}

Document Flow service

Version 1 of the API has also been extended with support for submitting messages to trigger cloud-deployed Design & Compose Document Flow instances. Such cloud-deployed Document Flows need to meet certain requirements and have some limitations compared to regular Document Flows deployed in on-premise environments. See Document Flow Service for more information on Document Flow design specific for the Xribe Runtime.

The Xribe Runtime API itself also has certain limitations when submitting messages intended to trigger a Document Flow instance. When submitting Document Flow messages, only a single input (of type documentflow) is supported and post-processing in the form of a Composition script is not allowed. Also, messages intended for Document Flow should contain only inline JSON data; remote data in the form of a URL is not supported. If remote data is to be passed on to a Document Flow instance, it should be wrapped in a JSON object that is passed inline with the message request. It is then up to the receiving Document Flow instance to interpret this URL and retrieve the data. Do take note that Document Flow messages might take some time before they are processed; care should be taken that any URLs passed to a Document Flow instance remain valid for a sufficient period of time. Finally, the entire Document Flow message request should be small in size (less than 2 KiB).

Retry

When you are making requests at a higher rate than your usage plan allows, an HTTP status code of 429 ("Too Many Requests") will be returned. In this case you can safely retry this call, but you should lower the rate at which you are sending requests.

While our service is scaling, it is possible an HTTP status code of 500 ("Internal Server Error") or 504 ("Gateway Timeout") might be returned rather than a 429. After a couple of seconds our service will have scaled up and you can restart sending requests, which will be successfully handled again.

Messages

Get information about messages. A message will result in a deliverable with one or more outputs.

Get the most recent messages Deprecated

When the lastEvaluatedKey is returned, it can be used with subsequent requests to get the next 100 messages.

If lastEvaluatedKey is returned empty, then the "last page" of results has been processed and there is no more data to be retrieved.

Authorizations:
IdAuthorizerapi_key
query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

lastEvaluatedKey
string

Used for paging. When provided it is used as an exclusive start key for the returned items (returns the next 100 items after the previous returned ones).

Responses

Response samples

Content type
application/json
{
  • "messages": [
    ],
  • "lastEvaluatedKey": { }
}

Creates a new message Deprecated

Add a new message and start generating the deliverable and output(s).

⚠️ Warning: Number of pages limit (PDF)

Generating a PDF that contains more than 500 pages may result in timeouts. When such a timeout occurs, the message will remain in the created state for over 15 minutes.

Authorizations:
IdAuthorizerapi_key
Request Body schema: application/json

Configures the templates, theme, data and output format for generating the output.

projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project that contains the resources that are referenced in the request (templates, themes).

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment that contains the resources that are referenced in the request (templates, themes).

properties
object (Custom properties)

This object can contain user defined key/value pairs to associate custom metadata with a message.

All the properties are also attached to the deliverable that is generated for this message.

required
object (OutputParameters)

These parameters will be used to generate the output.

Note that from version 1 output parameters can be specified at the top level of your message or at input level. Top level parameters will be used for inputs that don't explicitly have those parameters.

For all output types, we support the following optional parameters:

  • watermark: (boolean) Add a preview watermark to the output.

For type pdf we support the following optional parameters:

  • profile: (enum) The PDF output profile. Supported values:
    • PDF/A-1a
    • PDF/A-1b
    • PDF/A-3a
    • PDF/A-3b
    • PDF/UA-1
    • PDF/X-1a:2001
    • PDF/X-1a:2003
    • PDF/X-3a:2002
    • PDF/X-3a:2003
    • PDF/X-4
  • devicePixelRatio: (float) The value to use for the global devicePixelRatio when rendering HTML to PDF. This can be used for selecting the right image from a set of different quality images. See the Web Designer Themes and Pluggable Objects guide for more information and an example.
  • author: (string) Author of the PDF.
  • keywords: (string) Keywords for the PDF.
  • title: (string) Title for the PDF.
  • subject: (string) Subject for the PDF.
  • userPassword: (string) User password for the PDF.
  • ownerPassword: (string) Owner password for the PDF.
  • encrypted: (boolean) Encrypt PDF. Default false.
  • disallowPrint: (boolean) Disallow print of PDF. Default false.
  • disallowCopy: (boolean) Disallow copy of PDF. Default false.
  • disallowAnnotate: (boolean) Disallow annotations in PDF. Default false.
  • disallowModify: (boolean) Disallow modifications of PDF. Default false.
  • failDroppedContent: (boolean) Fail when content is dropped from the output. Default false.
  • failMissingResources: (boolean) Fail when resources are missing. Default false.
  • failMissingGlyphs: (boolean) Fail when glyphs are missing in the font. Default false.
  • verboseGenerationLog: (boolean) Enable this option to receive both the HTML and the PDF generation logs as intermediate output on the generated deliverable even when no error occurs.

For application we support the following optional parameters:

  • cdn: if specified the JavaScript is not embedded. Instead a link to the CDN will be added to fetch the JavaScript.
object (DeliveryParameters)

These parameters will be used to deliver the output.

required
object (V0 Input)

Responses

Request samples

Content type
application/json
{
  • "projectID": "96dd5fcf-e20a-43b4-a9b9-705347f5f19f",
  • "environmentID": "37b2f370-81e2-47ff-9396-d3f60d7c27e7",
  • "properties": {
    },
  • "outputParameters": {
    },
  • "input": {
    }
}

Response samples

Content type
application/json
"e7422335-9529-4669-a188-2472b209aba5"

Allow all methods from any origin in browsers. Deprecated

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

Responses

Response samples

Content type
application/json
{ }

Create a synchronous deliverable from a message Deprecated

Generates output from a simple message request and returns the deliverable.

⚠️ Warning: This endpoint has a maximum timeout of 29 seconds. If the generation of the deliverable takes longer, you should use the async endpoint instead.

Deprecated: use v1 of this API instead.

Authorizations:
IdAuthorizerapi_key
Request Body schema: application/json

Configures the templates, theme, data and output format for generating the output.

projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project that contains the resources that are referenced in the request (templates, themes).

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment that contains the resources that are referenced in the request (templates, themes).

properties
object (Custom properties)

This object can contain user defined key/value pairs to associate custom metadata with a message.

All the properties are also attached to the deliverable that is generated for this message.

required
object (OutputParameters)

These parameters will be used to generate the output.

Note that from version 1 output parameters can be specified at the top level of your message or at input level. Top level parameters will be used for inputs that don't explicitly have those parameters.

For all output types, we support the following optional parameters:

  • watermark: (boolean) Add a preview watermark to the output.

For type pdf we support the following optional parameters:

  • profile: (enum) The PDF output profile. Supported values:
    • PDF/A-1a
    • PDF/A-1b
    • PDF/A-3a
    • PDF/A-3b
    • PDF/UA-1
    • PDF/X-1a:2001
    • PDF/X-1a:2003
    • PDF/X-3a:2002
    • PDF/X-3a:2003
    • PDF/X-4
  • devicePixelRatio: (float) The value to use for the global devicePixelRatio when rendering HTML to PDF. This can be used for selecting the right image from a set of different quality images. See the Web Designer Themes and Pluggable Objects guide for more information and an example.
  • author: (string) Author of the PDF.
  • keywords: (string) Keywords for the PDF.
  • title: (string) Title for the PDF.
  • subject: (string) Subject for the PDF.
  • userPassword: (string) User password for the PDF.
  • ownerPassword: (string) Owner password for the PDF.
  • encrypted: (boolean) Encrypt PDF. Default false.
  • disallowPrint: (boolean) Disallow print of PDF. Default false.
  • disallowCopy: (boolean) Disallow copy of PDF. Default false.
  • disallowAnnotate: (boolean) Disallow annotations in PDF. Default false.
  • disallowModify: (boolean) Disallow modifications of PDF. Default false.
  • failDroppedContent: (boolean) Fail when content is dropped from the output. Default false.
  • failMissingResources: (boolean) Fail when resources are missing. Default false.
  • failMissingGlyphs: (boolean) Fail when glyphs are missing in the font. Default false.
  • verboseGenerationLog: (boolean) Enable this option to receive both the HTML and the PDF generation logs as intermediate output on the generated deliverable even when no error occurs.

For application we support the following optional parameters:

  • cdn: if specified the JavaScript is not embedded. Instead a link to the CDN will be added to fetch the JavaScript.
object (DeliveryParameters)

These parameters will be used to deliver the output.

required
object (V0 Input)

Responses

Request samples

Content type
application/json
{
  • "projectID": "96dd5fcf-e20a-43b4-a9b9-705347f5f19f",
  • "environmentID": "37b2f370-81e2-47ff-9396-d3f60d7c27e7",
  • "properties": {
    },
  • "outputParameters": {
    },
  • "input": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "account": "string",
  • "creator": "string",
  • "created": "string",
  • "modified": "string",
  • "messageID": "string",
  • "projectID": "string",
  • "environmentID": "string",
  • "properties": { },
  • "status": "generating",
  • "outputParameters": {
    },
  • "deliveryParameters": {
    },
  • "output": [
    ],
  • "pageCount": 1,
  • "history": [
    ]
}

Allow all methods from any origin in browsers

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

Responses

Response samples

Content type
application/json
{ }

Get basic information of a message. Deprecated

Get basic information of a message.

The possible values for status are: generating, generated, delivering, delivered and error.

Note: Additional status values will be added in the future.

Authorizations:
IdAuthorizerapi_key
path Parameters
messageId
required
string (GUID)

The ID of the message to retrieve or perform an operation on.

query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "account": "string",
  • "creator": "string",
  • "created": "string",
  • "deliverableID": "string",
  • "projectID": "string",
  • "environmentID": "string",
  • "properties": {
    },
  • "status": "generating",
  • "outputParameters": {
    },
  • "deliveryParameters": {
    },
  • "input": {
    }
}

Allow all methods from any origin in browsers. Deprecated

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

path Parameters
messageId
required
string (GUID)

The ID of the message to retrieve or perform an operation on.

Responses

Response samples

Content type
application/json
{ }

Delete the message and related deliverable if cascade is true. Deprecated

Delete a message.

Only works if the message is currently in state "generated", "delivered" or "error".

Authorizations:
IdAuthorizerapi_key
path Parameters
messageId
required
string (GUID)

The ID of the message to retrieve or perform an operation on.

query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

cascade
boolean

True if the generated deliverable should also be deleted.

Responses

Response samples

Content type
application/json
{ }

Get the most recent messages

Get the 100 most recent messages if lastEvaluatedKey is omitted, otherwise get the next 100 messages following the lastEvaluatedKey.

The lastEvaluatedKey is returned for every listing and, when not empty, can be used in subsequent requests.

Authorizations:
IdAuthorizerapi_key
query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

lastEvaluatedKey
string

Used for paging. When provided it is used as an exclusive start key for the returned items (returns the next 100 items after the previous returned ones).

includeIntermediate
boolean

Set to true if you wish to also list intermediate messages/deliverables (relevant for message requests with multiple inputs).

Responses

Response samples

Content type
application/json
{
  • "messages": [
    ],
  • "lastEvaluatedKey": { }
}

Add a new message

Add a new message and start generating the deliverable and output(s).

⚠️ Warning: Number of pages limit (PDF)

Generating a PDF that contains more than 500 pages may result in timeouts. When such timeouts occur, the message state will be stuck in "created" for over 15 minutes.

Authorizations:
IdAuthorizerapi_key
Request Body schema: application/json

Configures the templates, theme, data and output format for generating the output.

projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project that contains the resources that are referenced in the request (templates, themes, static inputs).

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment that contains the resources that are referenced in the request (templates, themes, static inputs).

properties
object (Custom properties)

This object can contain user defined key/value pairs to associate custom metadata with a message.

All the properties are also attached to the deliverable that is generated for this message.

(Inline or remote data (object)) or (Inline or remote data (string)) (Inline or remote data)

The data used to generate the output. If this is an inline object, the data will be used directly. If this is a http(s) URI, the data will be retrieved from that location. If the external data is XML, it will be converted according to the data model associated with the template. Note that if this is an http(s) URI and the data is XML, the server serving the data should return 'text/xml' or 'application/xml' as the Content-Type. Note that for Document Flow inputs, data must be an inline JSON object and is subject to a size limitation.

object (OutputParameters)

These parameters will be used to generate the output.

Note that from version 1 output parameters can be specified at the top level of your message or at input level. Top level parameters will be used for inputs that don't explicitly have those parameters.

For all output types, we support the following optional parameters:

  • watermark: (boolean) Add a preview watermark to the output.

For type pdf we support the following optional parameters:

  • profile: (enum) The PDF output profile. Supported values:
    • PDF/A-1a
    • PDF/A-1b
    • PDF/A-3a
    • PDF/A-3b
    • PDF/UA-1
    • PDF/X-1a:2001
    • PDF/X-1a:2003
    • PDF/X-3a:2002
    • PDF/X-3a:2003
    • PDF/X-4
  • devicePixelRatio: (float) The value to use for the global devicePixelRatio when rendering HTML to PDF. This can be used for selecting the right image from a set of different quality images. See the Web Designer Themes and Pluggable Objects guide for more information and an example.
  • author: (string) Author of the PDF.
  • keywords: (string) Keywords for the PDF.
  • title: (string) Title for the PDF.
  • subject: (string) Subject for the PDF.
  • userPassword: (string) User password for the PDF.
  • ownerPassword: (string) Owner password for the PDF.
  • encrypted: (boolean) Encrypt PDF. Default false.
  • disallowPrint: (boolean) Disallow print of PDF. Default false.
  • disallowCopy: (boolean) Disallow copy of PDF. Default false.
  • disallowAnnotate: (boolean) Disallow annotations in PDF. Default false.
  • disallowModify: (boolean) Disallow modifications of PDF. Default false.
  • failDroppedContent: (boolean) Fail when content is dropped from the output. Default false.
  • failMissingResources: (boolean) Fail when resources are missing. Default false.
  • failMissingGlyphs: (boolean) Fail when glyphs are missing in the font. Default false.
  • verboseGenerationLog: (boolean) Enable this option to receive both the HTML and the PDF generation logs as intermediate output on the generated deliverable even when no error occurs.

For application we support the following optional parameters:

  • cdn: if specified the JavaScript is not embedded. Instead a link to the CDN will be added to fetch the JavaScript.
object (DeliveryParameters)

These parameters will be used to deliver the output.

required
TemplateInput (object) or ResolveInput (object) or DocumentflowInput (object) or InteractiveTemplateInput (object) or (Array of One or more inputs (TemplateInput (object) or ResolveInput (object) or DocumentflowInput (object) or InteractiveTemplateInput (object))) (One or more inputs)

Input or array of inputs for which output is requested. Note that Document Flow requests only support a single input. This single input may be specified as an object or as an array of one object.

object (ComposeV1)

Object used to refer to a compose script. Note that compose scripts are not supported when performing a Document Flow request.

Responses

Request samples

Content type
application/json
{
  • "projectID": "96dd5fcf-e20a-43b4-a9b9-705347f5f19f",
  • "environmentID": "37b2f370-81e2-47ff-9396-d3f60d7c27e7",
  • "properties": {
    },
  • "outputParameters": {
    },
  • "data": {
    },
  • "input": [
    ]
}

Response samples

Content type
application/json
{}

Allow all methods from any origin in browsers.

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

Responses

Response samples

Content type
application/json
{ }

Create a synchronous deliverable from a message

Generates output from a simple message request and returns the deliverable.

⚠️ Warning: This endpoint has a maximum timeout of 29 seconds. If the generation of the deliverable takes longer, you should use the async endpoint instead.

⚠️ Warning: Complex messages (e.g. messages with a compose script, messages with a Document Flow request, etc.) are not supported.

Authorizations:
IdAuthorizerapi_key
Request Body schema: application/json

Configures the templates, theme, data and output format for generating the output.

projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project that contains the resources that are referenced in the request (templates, themes, static inputs).

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment that contains the resources that are referenced in the request (templates, themes, static inputs).

properties
object (Custom properties)

This object can contain user defined key/value pairs to associate custom metadata with a message.

All the properties are also attached to the deliverable that is generated for this message.

(Inline or remote data (object)) or (Inline or remote data (string)) (Inline or remote data)

The data used to generate the output. If this is an inline object, the data will be used directly. If this is a http(s) URI, the data will be retrieved from that location. If the external data is XML, it will be converted according to the data model associated with the template. Note that if this is an http(s) URI and the data is XML, the server serving the data should return 'text/xml' or 'application/xml' as the Content-Type. Note that for Document Flow inputs, data must be an inline JSON object and is subject to a size limitation.

object (OutputParameters)

These parameters will be used to generate the output.

Note that from version 1 output parameters can be specified at the top level of your message or at input level. Top level parameters will be used for inputs that don't explicitly have those parameters.

For all output types, we support the following optional parameters:

  • watermark: (boolean) Add a preview watermark to the output.

For type pdf we support the following optional parameters:

  • profile: (enum) The PDF output profile. Supported values:
    • PDF/A-1a
    • PDF/A-1b
    • PDF/A-3a
    • PDF/A-3b
    • PDF/UA-1
    • PDF/X-1a:2001
    • PDF/X-1a:2003
    • PDF/X-3a:2002
    • PDF/X-3a:2003
    • PDF/X-4
  • devicePixelRatio: (float) The value to use for the global devicePixelRatio when rendering HTML to PDF. This can be used for selecting the right image from a set of different quality images. See the Web Designer Themes and Pluggable Objects guide for more information and an example.
  • author: (string) Author of the PDF.
  • keywords: (string) Keywords for the PDF.
  • title: (string) Title for the PDF.
  • subject: (string) Subject for the PDF.
  • userPassword: (string) User password for the PDF.
  • ownerPassword: (string) Owner password for the PDF.
  • encrypted: (boolean) Encrypt PDF. Default false.
  • disallowPrint: (boolean) Disallow print of PDF. Default false.
  • disallowCopy: (boolean) Disallow copy of PDF. Default false.
  • disallowAnnotate: (boolean) Disallow annotations in PDF. Default false.
  • disallowModify: (boolean) Disallow modifications of PDF. Default false.
  • failDroppedContent: (boolean) Fail when content is dropped from the output. Default false.
  • failMissingResources: (boolean) Fail when resources are missing. Default false.
  • failMissingGlyphs: (boolean) Fail when glyphs are missing in the font. Default false.
  • verboseGenerationLog: (boolean) Enable this option to receive both the HTML and the PDF generation logs as intermediate output on the generated deliverable even when no error occurs.

For application we support the following optional parameters:

  • cdn: if specified the JavaScript is not embedded. Instead a link to the CDN will be added to fetch the JavaScript.
object (DeliveryParameters)

These parameters will be used to deliver the output.

required
TemplateInput (object) or ResolveInput (object) or DocumentflowInput (object) or InteractiveTemplateInput (object) or (Array of One or more inputs (TemplateInput (object) or ResolveInput (object) or DocumentflowInput (object) or InteractiveTemplateInput (object))) (One or more inputs)

Input or array of inputs for which output is requested. Note that Document Flow requests only support a single input. This single input may be specified as an object or as an array of one object.

object (ComposeV1)

Object used to refer to a compose script. Note that compose scripts are not supported when performing a Document Flow request.

Responses

Request samples

Content type
application/json
{
  • "projectID": "96dd5fcf-e20a-43b4-a9b9-705347f5f19f",
  • "environmentID": "37b2f370-81e2-47ff-9396-d3f60d7c27e7",
  • "properties": {
    },
  • "outputParameters": {
    },
  • "input": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "account": "string",
  • "creator": "string",
  • "created": "string",
  • "modified": "string",
  • "messageID": "string",
  • "projectID": "string",
  • "environmentID": "string",
  • "properties": { },
  • "status": "generating",
  • "outputParameters": {
    },
  • "deliveryParameters": {
    },
  • "output": [
    ],
  • "pageCount": 1,
  • "history": [
    ]
}

Allow all methods from any origin in browsers.

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

Responses

Response samples

Content type
application/json
{ }

Get basic information of a message.

Get basic information of a message.

The possible values for status are: created, accepted, generating, generated, delivering, delivered, unknown, and error.

Note: Additional status values will be added in the future.

Authorizations:
IdAuthorizerapi_key
path Parameters
messageId
required
string (GUID)

The ID of the message to retrieve or perform an operation on.

query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "projectID": "string",
  • "environmentID": "string",
  • "account": "string",
  • "creator": "string",
  • "created": "string",
  • "deliverableID": "string",
  • "properties": { },
  • "status": "accepted",
  • "outputParameters": {
    },
  • "deliveryParameters": {
    },
  • "input": [
    ],
  • "compose": {
    },
  • "data": { }
}

Allow all methods from any origin in browsers.

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

path Parameters
messageId
required
string (GUID)

The ID of the message to retrieve or perform an operation on.

Responses

Response samples

Content type
application/json
{ }

Delete the message and related deliverable if cascade is true.

Delete a message.

Only works if the message is currently in state "generated", "delivered" or "error".

Authorizations:
IdAuthorizerapi_key
path Parameters
messageId
required
string (GUID)

The ID of the message to retrieve or perform an operation on.

query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

cascade
boolean

True if the generated deliverable should also be deleted.

Responses

Deliverables

Get information about deliverables. A deliverable is the result of a message and contains one or more outputs.

Get the most recent deliverables. Deprecated

Get the 100 most recent deliverables.

Note: The output.url property should be considered as an opaque URL. In the future this will no longer be an S3 URL, but a URL to the object store. When we change this, the client will need to provide an Authorization header to authenticate the request.

Authorizations:
IdAuthorizerapi_key
query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

lastEvaluatedKey
string

Used for paging. When provided it is used as an exclusive start key for the returned items (returns the next 100 items after the previous returned ones).

Responses

Response samples

Content type
application/json
{
  • "deliverables": [
    ],
  • "lastEvaluatedKey": "opaque value"
}

Allow all methods from any origin in browsers. Deprecated

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

Responses

Response samples

Content type
application/json
{ }

Get basic information of a deliverable. Deprecated

Get basic information of a deliverable.

The possible values for status are: generating, generated, delivering, delivered, unknown, and error.

Note: Additional status values will be added in the future.

Authorizations:
IdAuthorizerapi_key
path Parameters
deliverableId
required
string (GUID)

The ID of the deliverable to retrieve or perform an operation on.

query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "account": "string",
  • "creator": "string",
  • "created": "string",
  • "modified": "string",
  • "messageID": "string",
  • "projectID": "string",
  • "environmentID": "string",
  • "properties": { },
  • "status": "generating",
  • "outputParameters": {
    },
  • "deliveryParameters": {
    },
  • "output": [
    ],
  • "pageCount": 1,
  • "history": [
    ]
}

Allow all methods from any origin in browsers. Deprecated

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

path Parameters
deliverableId
required
string (GUID)

The ID of the deliverable to retrieve or perform an operation on.

Responses

Response samples

Content type
application/json
{ }

Get the most recent deliverables.

Get the 100 most recent deliverables.

Note: The output.url property should be considered as an opaque URL. In the future this will no longer be an S3 URL, but a URL to the object store. When we change this, the client will need to provide an Authorization header to authenticate the request.

Authorizations:
IdAuthorizerapi_key
query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

lastEvaluatedKey
string

Used for paging. When provided it is used as an exclusive start key for the returned items (returns the next 100 items after the previous returned ones).

includeIntermediate
boolean

Set to true if you wish to also list intermediate messages/deliverables (relevant for message requests with multiple inputs).

Responses

Response samples

Content type
application/json
{
  • "deliverables": [
    ],
  • "lastEvaluatedKey": "opaque value"
}

Allow all methods from any origin in browsers.

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

Responses

Response samples

Content type
application/json
{ }

Get basic information of a deliverable.

Get basic information of a deliverable.

The possible values for status are: generating, generated, delivering, delivered and error.

Note: Additional status values will be added in the future.

Authorizations:
IdAuthorizerapi_key
path Parameters
deliverableId
required
string (GUID)

The ID of the deliverable to retrieve or perform an operation on.

query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "account": "string",
  • "creator": "string",
  • "projectID": "string",
  • "environmentID": "string",
  • "created": "string",
  • "modified": "string",
  • "messageID": "string",
  • "pageCount": 1,
  • "properties": { },
  • "status": "generating",
  • "deliveryParameters": {
    },
  • "outputParameters": {
    },
  • "output": [
    ],
  • "history": [
    ]
}

Allow all methods from any origin in browsers.

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

path Parameters
deliverableId
required
string (GUID)

The ID of the deliverable to retrieve or perform an operation on.

Responses

Response samples

Content type
application/json
{ }

Message Defaults

Sets the default values for new messages in a given project and environment. Deprecated

Sets the default values for new messages in a given project and environment.

Authorizations:
IdAuthorizerapi_key
Request Body schema: application/json

The default values for new messages for the given project and environment.

projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project for which you want to set the message defaults.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment for which you want to set the message defaults.

properties
object (Custom properties)

This object can contain user defined key/value pairs to associate custom metadata with a message.

All the properties are also attached to the deliverable that is generated for this message.

object (OutputParameters)

These parameters will be used to generate the output.

Note that from version 1 output parameters can be specified at the top level of your message or at input level. Top level parameters will be used for inputs that don't explicitly have those parameters.

For all output types, we support the following optional parameters:

  • watermark: (boolean) Add a preview watermark to the output.

For type pdf we support the following optional parameters:

  • profile: (enum) The PDF output profile. Supported values:
    • PDF/A-1a
    • PDF/A-1b
    • PDF/A-3a
    • PDF/A-3b
    • PDF/UA-1
    • PDF/X-1a:2001
    • PDF/X-1a:2003
    • PDF/X-3a:2002
    • PDF/X-3a:2003
    • PDF/X-4
  • devicePixelRatio: (float) The value to use for the global devicePixelRatio when rendering HTML to PDF. This can be used for selecting the right image from a set of different quality images. See the Web Designer Themes and Pluggable Objects guide for more information and an example.
  • author: (string) Author of the PDF.
  • keywords: (string) Keywords for the PDF.
  • title: (string) Title for the PDF.
  • subject: (string) Subject for the PDF.
  • userPassword: (string) User password for the PDF.
  • ownerPassword: (string) Owner password for the PDF.
  • encrypted: (boolean) Encrypt PDF. Default false.
  • disallowPrint: (boolean) Disallow print of PDF. Default false.
  • disallowCopy: (boolean) Disallow copy of PDF. Default false.
  • disallowAnnotate: (boolean) Disallow annotations in PDF. Default false.
  • disallowModify: (boolean) Disallow modifications of PDF. Default false.
  • failDroppedContent: (boolean) Fail when content is dropped from the output. Default false.
  • failMissingResources: (boolean) Fail when resources are missing. Default false.
  • failMissingGlyphs: (boolean) Fail when glyphs are missing in the font. Default false.
  • verboseGenerationLog: (boolean) Enable this option to receive both the HTML and the PDF generation logs as intermediate output on the generated deliverable even when no error occurs.

For application we support the following optional parameters:

  • cdn: if specified the JavaScript is not embedded. Instead a link to the CDN will be added to fetch the JavaScript.
deliveryParameters
Array of objects

Parameters for delivery.

Responses

Request samples

Content type
application/json
{
  • "projectID": "002a0f55-54e5-4944-86bb-d89b4291af2c",
  • "environmentID": "e71d719e-4bd2-4e48-a4b1-673b7f0f1875",
  • "properties": {
    },
  • "outputParameters": {
    },
  • "deliveryParameters": {}
}

Response samples

Content type
application/json
{ }

Gets the default values for new messages in a given project and environment. Deprecated

Gets the default values for new messages in a given project and environment.

Authorizations:
IdAuthorizerapi_key
query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

Responses

Response samples

Content type
application/json
{
  • "projectID": "dde74293-f204-4fc0-a589-9c3cab0ab08b",
  • "environmentID": "7a19fa63-e763-402a-86e4-1a2db01183b4",
  • "properties": {
    },
  • "outputParameters": {
    },
  • "deliveryParameters": {}
}

Allow all methods from any origin in browsers. Deprecated

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

Responses

Response samples

Content type
application/json
{ }

Sets the default values for new messages in a given project and environment.

Sets the default values for new messages in a given project and environment.

Authorizations:
IdAuthorizerapi_key
Request Body schema: application/json

The default values for new messages for the given project and environment.

projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project for which you want to set the message defaults.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment for which you want to set the message defaults.

properties
object (Custom properties)

This object can contain user defined key/value pairs to associate custom metadata with a message.

All the properties are also attached to the deliverable that is generated for this message.

object (OutputParameters)

These parameters will be used to generate the output.

Note that from version 1 output parameters can be specified at the top level of your message or at input level. Top level parameters will be used for inputs that don't explicitly have those parameters.

For all output types, we support the following optional parameters:

  • watermark: (boolean) Add a preview watermark to the output.

For type pdf we support the following optional parameters:

  • profile: (enum) The PDF output profile. Supported values:
    • PDF/A-1a
    • PDF/A-1b
    • PDF/A-3a
    • PDF/A-3b
    • PDF/UA-1
    • PDF/X-1a:2001
    • PDF/X-1a:2003
    • PDF/X-3a:2002
    • PDF/X-3a:2003
    • PDF/X-4
  • devicePixelRatio: (float) The value to use for the global devicePixelRatio when rendering HTML to PDF. This can be used for selecting the right image from a set of different quality images. See the Web Designer Themes and Pluggable Objects guide for more information and an example.
  • author: (string) Author of the PDF.
  • keywords: (string) Keywords for the PDF.
  • title: (string) Title for the PDF.
  • subject: (string) Subject for the PDF.
  • userPassword: (string) User password for the PDF.
  • ownerPassword: (string) Owner password for the PDF.
  • encrypted: (boolean) Encrypt PDF. Default false.
  • disallowPrint: (boolean) Disallow print of PDF. Default false.
  • disallowCopy: (boolean) Disallow copy of PDF. Default false.
  • disallowAnnotate: (boolean) Disallow annotations in PDF. Default false.
  • disallowModify: (boolean) Disallow modifications of PDF. Default false.
  • failDroppedContent: (boolean) Fail when content is dropped from the output. Default false.
  • failMissingResources: (boolean) Fail when resources are missing. Default false.
  • failMissingGlyphs: (boolean) Fail when glyphs are missing in the font. Default false.
  • verboseGenerationLog: (boolean) Enable this option to receive both the HTML and the PDF generation logs as intermediate output on the generated deliverable even when no error occurs.

For application we support the following optional parameters:

  • cdn: if specified the JavaScript is not embedded. Instead a link to the CDN will be added to fetch the JavaScript.
object (DeliveryParameters)

These parameters will be used to deliver the output.

object (ComposeV1)

Object used to refer to a compose script. Note that compose scripts are not supported when performing a Document Flow request.

Responses

Request samples

Content type
application/json
{
  • "projectID": "002a0f55-54e5-4944-86bb-d89b4291af2c",
  • "environmentID": "e71d719e-4bd2-4e48-a4b1-673b7f0f1875",
  • "properties": {
    },
  • "outputParameters": {
    },
  • "deliveryParameters": {}
}

Response samples

Content type
application/json
{ }

Gets the default values for new messages in a given project and environment.

Gets the default values for new messages in a given project and environment.

Authorizations:
IdAuthorizerapi_key
query Parameters
projectID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project to which the request relates.

environmentID
required
string (GUID) ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the environment to which the request relates.

Responses

Response samples

Content type
application/json
{
  • "projectID": "dde74293-f204-4fc0-a589-9c3cab0ab08b",
  • "environmentID": "7a19fa63-e763-402a-86e4-1a2db01183b4",
  • "properties": {
    },
  • "outputParameters": {
    },
  • "deliveryParameters": {}
}

Allow all methods from any origin in browsers.

Provided so that browsers can "preflight" the request. We allow all methods from all origins.

Responses

Response samples

Content type
application/json
{ }

PAY-NXT ePayments

v0GetPaymentItem Deprecated

Check the status of a PAY-NXT ePayments payment item.

path Parameters
paymentItem
required
string

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

CORS support Deprecated

Provided so that browsers can "preflight" the request. We allow OPTIONS and GET from all origins.

path Parameters
paymentItem
required
string

Responses

Response samples

Content type
application/json
{ }

v1GetPaymentItem

Check the status of a PAY-NXT ePayments payment item.

path Parameters
paymentItem
required
string

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

CORS support

Provided so that browsers can "preflight" the request. We allow OPTIONS and GET from all origins.

path Parameters
paymentItem
required
string

Responses

Response samples

Content type
application/json
{ }