Generate a document
POST/v1/documents/generate
Generate any document. This API is designed to be used to generate GS1 labels, invoices and any document that requires external data.
Request
- application/json
Body
The template name. Required if template is not provided.
The template content. Required if template_id is not provided.
The format of the document
The file name
data
object
The template data
Default value: [object Object]
The template data
options
object
The template rendering options
The template rendering options
Responses
- 201
- 400
- 404
- 500
- application/json
- Schema
- Example (from schema)
Schema
The template name
The format of the document
The file name
A base64 file content
{
"template_id": "string",
"doc_format": "string",
"doc_name": "string",
"doc_file": "string"
}
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
The list of API errors
The error or warning message
The message code
details
object
any additional details
any additional details
{
"errors": [
{
"message": "string",
"code": "string",
"details": {}
}
]
}
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
The list of API errors
The error or warning message
The message code
details
object
any additional details
any additional details
{
"errors": [
{
"message": "string",
"code": "string",
"details": {}
}
]
}
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
The list of API errors
The error or warning message
The message code
details
object
any additional details
any additional details
{
"errors": [
{
"message": "string",
"code": "string",
"details": {}
}
]
}