Please rate how useful you found this document: 
Average: 2.3 (3 votes)

Output Document Endpoints

The current methods implemented for the output document resources in the ProcessMaker API designer are listed below:

Output Document resources:

NameDescriptionTypeValue
out_doc_uidOutput document UIDStringString with the output document UID
out_doc_titleDocument titleStringString with the document title
out_doc_descriptionDocument descriptionStringString with the document description
out_doc_filenameGenerated document file nameStringString with the generated file name
out_doc_templateDocument shape or templateStringString with the document template
out_doc_report_generatorDocument generatorStringLibrary converter used to render the document, valid values are: TCPDF, HTML2PDF

Warning: The HTML2PDF is not available on installations over PHP 7.X, specifically as of ProcessMaker 3.3.0. In this case, use TCPDF.

out_doc_landscapeDocument orientationIntegerValid values: 0 = portrait, 1 = landscape
out_doc_mediaDocument sizeStringMax length 10 characters
out_doc_left_marginLeft marginIntegerInteger number
out_doc_right_marginRight marginIntegerInteger number
out_doc_top_marginUpper marginIntegerInteger number
out_doc_bottom_marginBottom marginIntegerInteger number
out_doc_generateType of generated documentStringValid values are: PDF, WORD or BOTH
out_doc_typeDocument type (HTML)StringString of 32 characters
out_doc_current_revisionCurrent document versionIntegerInteger number
out_doc_field_mappingField mappingStringString
out_doc_versioningDocument versionIntegerInteger number
out_doc_destination_pathDocument pathStringString
out_doc_tagsDocument tagStringString
out_doc_pdf_security_enabledPassword security enabling for PDF documentsIntegerValid values are:0 disabled and 1 password security enabled
out_doc_pdf_security_open_passwordPassword used to open the documentStringString
out_doc_pdf_security_owner_passwordPassword of the document ownerStringString
out_doc_pdf_security_permissionPermissions of the documentStringValid values are: "print", "modify", "copy", "forms". Values can be combined using the pipe character ("|")

Information about each method is written in the sections below:

Get Output Documents List: GET project/{prj_uid}/output-documents

Gets a list of the Output Documents of a project.

GET /api/1.0/{workspace}/project/{prj_uid}/output-documents

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of output document objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "out_doc_uid": "8488283114bffe914417cb5020528882",
        "out_doc_title": "Output doc #1",
        "out_doc_description": "Output doc #1 - Desc",
        "out_doc_filename": "od_generated_1",
        "out_doc_template": "",
        "out_doc_report_generator": "HTML2PDF",
        "out_doc_landscape": 0,
        "out_doc_media": "Letter",
        "out_doc_left_margin": 0,
        "out_doc_right_margin": 0,
        "out_doc_top_margin": 0,
        "out_doc_bottom_margin": 0,
        "out_doc_generate": "BOTH",
        "out_doc_type": "HTML",
        "out_doc_current_revision": 0,
        "out_doc_field_mapping": "",
        "out_doc_versioning": 0,
        "out_doc_destination_path": "",
        "out_doc_tags": "",
        "out_doc_pdf_security_enabled": 0,
        "out_doc_pdf_security_open_password": "",
        "out_doc_pdf_security_owner_password": "",
        "out_doc_pdf_security_permissions": ""
    }
 ]

Get Output Document: GET project/{prj_uid}/output-document/{out_doc_uid}

Gets a single Output Document from a project.

GET /api/1.0/{workspace}/project/{prj_uid}/output-document/{out_doc_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
out_doc_uidStringOutput document UID

Result:

TypeDescription
objectReturns an output document object

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "out_doc_uid": "8488283114bffe914417cb5020528882",
    "out_doc_title": "Output doc #1",
    "out_doc_description": "Output doc #1 - Desc",
    "out_doc_filename": "od_generated_1",
    "out_doc_template": "",
    "out_doc_report_generator": "HTML2PDF",
    "out_doc_landscape": 0,
    "out_doc_media": "Letter",
    "out_doc_left_margin": 0,
    "out_doc_right_margin": 0,
    "out_doc_top_margin": 0,
    "out_doc_bottom_margin": 0,
    "out_doc_generate": "BOTH",
    "out_doc_type": "HTML",
    "out_doc_current_revision": 0,
    "out_doc_field_mapping": "",
    "out_doc_versioning": 0,
    "out_doc_destination_path": "",
    "out_doc_tags": "",
    "out_doc_pdf_security_enabled": 0,
    "out_doc_pdf_security_open_password": "",
    "out_doc_pdf_security_owner_password": "",
    "out_doc_pdf_security_permissions": ""
 }


Create Output Document: POST project/{prj_uid}/output-document

Create a new output document for a project.

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Structure:

POST /api/1.0/{workspace}/project/{prj_uid}/output-document

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
out_doc_titleStringDocument title
out_doc_descriptionStringDocument description
out_doc_filenameStringGenerated document filename

Optional Fields:

NameTypeDescription
out_doc_templateStringDocument template or shape
out_doc_report_generatorStringDocument generator. It can be TCPDF or HTML2PDF

Warning: The HTML2PDF is not available on installations over PHP 7.X, specifically as of ProcessMaker 3.3.0. In this case, use TCPDF.

out_doc_landscapeIntegerDocument orientation (0=portrait and 1=landscape)
out_doc_mediaStringDocument size
out_doc_left_marginIntegerLeft margin
out_doc_right_marginIntegerRight margin
out_doc_top_marginIntegerUpper margin
out_doc_bottom_marginIntegerBottom margin
out_doc_generateStringType of generated document (PDF, WORD or BOTH)
out_doc_typeStringDocument type (HTML)
out_doc_versioningStringDocument version
out_doc_destination_pathStringDocument path
out_doc_tagsStringDocument tag
out_doc_pdf_security_enabledIntegerPassword security enabling for pdf documents (0= does not exist and 1 = exists)
out_doc_pdf_security_open_passwordStringPassword used to open the document
out_doc_pdf_security_owner_passwordStringPassword for the document owner
out_doc_pdf_security_permissionStringDocument permissions

Result:

TypeDescription
objectReturns the new output document object

Example:

Request

 Content-Type: application/json
 {
    "out_doc_title": "Output doc #1",
    "out_doc_description": "Output doc #1 - Desc",
    "out_doc_filename": "od_generated_1",
    "out_doc_template": "Example",
    "out_doc_report_generator": "HTML2PDF",
    "out_doc_landscape": 0,
    "out_doc_media": "Letter",
    "out_doc_left_margin": 0,
    "out_doc_right_margin": 0,
    "out_doc_top_margin": 0,
    "out_doc_bottom_margin": 0,
    "out_doc_generate": "BOTH",
    "out_doc_type": "HTML",
    "out_doc_versioning": 0,
    "out_doc_destination_path": "",
    "out_doc_tags": "",
    "out_doc_pdf_security_enabled": 0,
    "out_doc_pdf_security_open_password": "",
    "out_doc_pdf_security_owner_password": "",
    "out_doc_pdf_security_permissions": ""
 }

Response

 201 (Created)
 {
    "out_doc_title": "Output doc #1",
    "out_doc_description": "Output doc #1 - Desc",
    "out_doc_filename": "od_generated_1",
    "out_doc_template": "Example",
    "out_doc_report_generator": "HTML2PDF",
    "out_doc_landscape": 0,
    "out_doc_media": "Letter",
    "out_doc_left_margin": 0,
    "out_doc_right_margin": 0,
    "out_doc_top_margin": 0,
    "out_doc_bottom_margin": 0,
    "out_doc_generate": "BOTH",
    "out_doc_type": "HTML",
    "out_doc_current_revision": 0,
    "out_doc_field_mapping": "",
    "out_doc_versioning": 0,
    "out_doc_destination_path": "",
    "out_doc_tags": "",
    "out_doc_pdf_security_enabled": 0,
    "out_doc_pdf_security_open_password": "",
    "out_doc_pdf_security_owner_password": "",
    "out_doc_pdf_security_permissions": "",
    "pro_uid": "1265557095225ff5c688f46031700471",
    "out_doc_uid": "62708276253600efb11bde2066213658"
 }


Update Output Document: PUT project/{prj_uid}/output-document/{out_doc_uid}

Update an Output Document in a project.

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Structure:

PUT /api/1.0/{workspace}/project/{prj_uid}/output-document/{out_doc_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
out_doc_uidStringOutput document UID

Required Fields:

NameTypeDescription
out_doc_titleStringDocument title
out_doc_descriptionStringDocument description
out_doc_filenameStringDocument filename when it is generated

Optional Fields:

NameTypeDescription
out_doc_report_generatorStringDocument generator. It can be TCPDF or HTML2PDF

Warning: The HTML2PDF is not available on installations over PHP 7.X, specifically as of ProcessMaker 3.3.0. In this case, use TCPDF.

out_doc_landscapeIntegerDocument orientation (0=portrait and 1=landscape)
out_doc_mediaStringDocument size
out_doc_left_marginIntegerLeft margin
out_doc_right_marginIntegerRight margin
out_doc_top_marginIntegerUpper margin
out_doc_bottom_marginIntegerBottom margin
out_doc_generateStringGenerated document type (PDF, WORD or BOTH)
out_doc_typeStringDocument type (HTML)
out_doc_versioningStringDocument version
out_doc_destination_pathStringDocument path
out_doc_tagsStringDocument tag
out_doc_pdf_security_enabledStringPassword security enabling for PDF documents (0 = does not exist, 1= exists)
out_doc_pdf_security_open_passwordStringPassword used to open the document
out_doc_pdf_security_owner_passwordStringPassword for the document owner
out_doc_pdf_security_permissionStringDocument permissions

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
    "out_doc_title": "Output doc #fsdfsdfsd1",
    "out_doc_description": "Output doc #1 - Desc",
    "out_doc_filename": "od_generated_1",
    "out_doc_template": "Example",
    "out_doc_report_generator": "HTML2PDF",
    "out_doc_landscape": 0,
    "out_doc_media": "Letter",
    "out_doc_left_margin": 0,
    "out_doc_right_margin": 0,
    "out_doc_top_margin": 0,
    "out_doc_bottom_margin": 0,
    "out_doc_generate": "BOTH",
    "out_doc_type": "HTML",
    "out_doc_versioning": 0,
    "out_doc_destination_path": "",
    "out_doc_tags": "",
    "out_doc_pdf_security_enabled": 0,
    "out_doc_pdf_security_open_password": "",
    "out_doc_pdf_security_owner_password": "",
    "out_doc_pdf_security_permissions": ""
 }

Response

 200 (OK)


Delete Output Document: DELETE project/{prj_uid}/output-document/{out_doc_uid}

Delete an Output Document in a project.

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Structure:

DELETE /api/1.0/{workspace}/project/{prj_uid}/output-document/{out_doc_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
out_doc_uidStringOutput document UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)