X

Generate a QR Code

Creates a QR code image. You must use a PUBLIC KEY for this request.


[GET] / [POST] https://api-eu1.stannp.com/v1/qrcode/create

Parameters

size optional The size in pixels of the QR code.
data mandatory The content you wish the QR code to contain.

Request

                <?php
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api-eu1.stannp.com/v1/qrcode/create?api_key={API_KEY}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => array(
        'size' => "300",
        'data' => "hello+world"
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
print_r($response);
?>
            

Response


Merge PDF files

Merge multiple PDF files into a single file.


[POST] https://api-eu1.stannp.com/v1/pdf/merge

Parameters

files array An array of URLs for the PDF files to merge. Example: files[]=https://file1.pdf&files[]=https://file2.pdf

Request

                <?php
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api-eu1.stannp.com/v1/pdf/merge?api_key={API_KEY}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => array(
        'files[0]' => "https://file1.pdf",
        'files[1]' => "https://file2.pdf"
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
print_r($response);
?>
            

Response

{
    "success": true,
    "data": "https:\/\/merged-file.pdf"
}

Get templates

Get the templates created on your account.


[GET] https://api-eu1.stannp.com/v1/templates/list

Request

                <?php
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api-eu1.stannp.com/v1/templates/list?api_key={API_KEY}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => array(
        
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
print_r($response);
?>
            

Response

{
    "success": true,
    "data": [
        {
            "id": "0",
            "account_id": "0",
            "template_name": "Template name 1",
            "image": "",
            "created": "2023-09-06 12:37:21",
            "updated": "2023-11-01 09:53:20",
            "size": "US-letter",
            "page_count": "1",
            "duplex": "1",
            "back_image": null,
            "template": "",
            "is_public": "1",
            "is_template": "1",
            "version": "3",
            "is_hidden": "1",
            "shared": "0",
            "user_id": "0",
            "tags": "",
            "versions": "3"
        },
        {
            "id": "0",
            "account_id": "0",
            "template_name": "Template name 2",
            "image": "",
            "created": "2023-09-06 11:44:37",
            "updated": "2023-11-01 09:52:50",
            "size": "4X6",
            "page_count": "1",
            "duplex": "1",
            "back_image": null,
            "template": "",
            "is_public": "1",
            "is_template": "1",
            "version": "3",
            "is_hidden": "1",
            "shared": "0",
            "user_id": "0",
            "tags": "",
            "versions": "2"
        }
    ]
}