Docs
Endpoints · Signed links

GET/v1/preview

The design's picture (image/jpeg) for a cart line.

What it does

The picture of a design for your cart line, to whoever holds design + sig: the same pair the designer gave your page. No key. Cached privately for 60 seconds (Cache-Control: private, max-age=60), because the picture changes with the design. One plain-text 404 for every refusal, so ids cannot be probed.

No key: the design + sig is the credential.

curl "https://printwisp.com/v1/preview?design=dsn_5c2a9e01b7d4f638&sig=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" \
  -o design.jpg
<?php
file_put_contents('design.jpg', file_get_contents('https://printwisp.com/v1/preview?design=dsn_5c2a9e01b7d4f638&sig=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'));
// Node
const r = await fetch('https://printwisp.com/v1/preview?design=dsn_5c2a9e01b7d4f638&sig=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855');
require('fs').writeFileSync('design.jpg', Buffer.from(await r.arrayBuffer()));
import requests

r = requests.get(
    "https://printwisp.com/v1/preview?design=dsn_5c2a9e01b7d4f638&sig=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
)
open("design.jpg", "wb").write(r.content)

Parameters

ParameterTypeDescription
design requiredstringThe design (dsn_ + 16 hex).
sig requiredstringThe design's signature, as the designer handed it to your page.

Response

200 image/jpeg. The picture.

HTTP/1.1 200
Content-Type: image/jpeg

Errors

HTTPerrormessage
404plain textNo picture for that design.
No picture for that design.

← Every routeQuickstart →