Skip to content

digitalprint/printess-api-php

Repository files navigation

printess-api-php

Getting started

Initializing the Printess API client, and setting your AccessToken key.

$printess = new \Printess\Api\PrintessApiClient();
$printess->setAccessToken("TheVerySecretAccessToken");

Creating a new produce job.

$job = $printess->production->produce([
            'templateName' => 'st:thesavedjobtoken',
            'outputSettings' => ['dpi' => 150],
            'outputFiles' => [
                [ 'documentName' => 'myDocument' ],
            ],
            'origin' => 'printess',
        ]);

Get the job status with the link to the pdf file.

$status = $printess->production->getStatus([
        "jobId" => $job->jobId,
    ]);