Fetch Designs

Use this endpoint to fetch all the designs associated with your particular domain.

The only parameters required are the signature parameters to authenticate the call.

[POST] https://pitchprint.net/api/runtime/fetch-designs
BODY PARAMS
apiKey Your domain's api key
timestamp Timestamp generated at runtime
signature Signature = MD5(apikey + secretKey + timestamp)

SAMPLE CODE
<?php

define('PITCH_APIKEY', 'your-api-key');
define('PITCH_SECRETKEY', 'your-secret-key');

function generateSignature () {
    $timestamp = time();
    $signature = md5(PITCH_APIKEY . PITCH_SECRETKEY . $timestamp);
    return array ('timestamp'=>$timestamp, 'apiKey'=>PITCH_APIKEY, 'signature'=>$signature);
}

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://pitchprint.net/api/runtime/fetch-designs');
curl_setopt($ch, CURLOPT_POST, true);

$opts = generateSignature();

curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($opts));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$output = curl_exec($ch);
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
$curlerr = curl_error($ch);
curl_close($ch);

header('Content-Type: application/json');

echo $output;

?>
RESPONSE
[{
    "title": "Business Cards",
    "id": "761f4e66d4a1b8965df66061dc959175",
    "designs": [{
        "id": "a01d14b9ea64d9161e09cd932e83e96b",
        "title": "Alpha Potraits",
        "thumbnail": "https://s3.amazonaws.com/pitchprint.rsc/images/designs/a01d14b9ea64d9161e09cd932e83e96b_1.jpg"
    }, {
        "id": "1e6690fba14da73d96fb25b8eaef2a39",
        "title": "Green Leaf",
        "thumbnail": "https://s3.amazonaws.com/pitchprint.rsc/images/designs/1e6690fba14da73d96fb25b8eaef2a39_1.jpg"
    }, {
        "id": "5afb3c7960aa7ff504632367553a3fa2",
        "title": "Standard Business Card",
        "thumbnail": "https://s3.amazonaws.com/pitchprint.rsc/images/designs/5afb3c7960aa7ff504632367553a3fa2_1.jpg"
    }]
}]

Still need help? Contact Us Contact Us