Fetch Designs
curl --request POST \
--url https://api.pitchprint.io/runtime/fetch-designs \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "your-api-key",
"timestamp": 1485934721,
"signature": "e2fc714c4727ee9395f324cd2e7f331f",
"categoryId": "cat-id"
}
'import requests
url = "https://api.pitchprint.io/runtime/fetch-designs"
payload = {
"apiKey": "your-api-key",
"timestamp": 1485934721,
"signature": "e2fc714c4727ee9395f324cd2e7f331f",
"categoryId": "cat-id"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
apiKey: 'your-api-key',
timestamp: 1485934721,
signature: 'e2fc714c4727ee9395f324cd2e7f331f',
categoryId: 'cat-id'
})
};
fetch('https://api.pitchprint.io/runtime/fetch-designs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pitchprint.io/runtime/fetch-designs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => 'your-api-key',
'timestamp' => 1485934721,
'signature' => 'e2fc714c4727ee9395f324cd2e7f331f',
'categoryId' => 'cat-id'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pitchprint.io/runtime/fetch-designs"
payload := strings.NewReader("{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"categoryId\": \"cat-id\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pitchprint.io/runtime/fetch-designs")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"categoryId\": \"cat-id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pitchprint.io/runtime/fetch-designs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"categoryId\": \"cat-id\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"categoryId": "cat-id",
"items": [
{
"designId": "******K83RU7R",
"version": 9,
"unit": "cm",
"lastModified": 1485934721,
"title": "design title",
"previews": [
"https://pitchprint.io/previews/design_id_1.jpg",
"https://pitchprint.io/previews/design_id_2.jpg"
]
}
]
}
}Runtime API
Fetch Designs
Retrieve saved customer designs from a PitchPrint project with the runtime fetch-designs endpoint.
POST
/
runtime
/
fetch-designs
Fetch Designs
curl --request POST \
--url https://api.pitchprint.io/runtime/fetch-designs \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "your-api-key",
"timestamp": 1485934721,
"signature": "e2fc714c4727ee9395f324cd2e7f331f",
"categoryId": "cat-id"
}
'import requests
url = "https://api.pitchprint.io/runtime/fetch-designs"
payload = {
"apiKey": "your-api-key",
"timestamp": 1485934721,
"signature": "e2fc714c4727ee9395f324cd2e7f331f",
"categoryId": "cat-id"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
apiKey: 'your-api-key',
timestamp: 1485934721,
signature: 'e2fc714c4727ee9395f324cd2e7f331f',
categoryId: 'cat-id'
})
};
fetch('https://api.pitchprint.io/runtime/fetch-designs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pitchprint.io/runtime/fetch-designs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => 'your-api-key',
'timestamp' => 1485934721,
'signature' => 'e2fc714c4727ee9395f324cd2e7f331f',
'categoryId' => 'cat-id'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pitchprint.io/runtime/fetch-designs"
payload := strings.NewReader("{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"categoryId\": \"cat-id\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pitchprint.io/runtime/fetch-designs")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"categoryId\": \"cat-id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pitchprint.io/runtime/fetch-designs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"categoryId\": \"cat-id\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"categoryId": "cat-id",
"items": [
{
"designId": "******K83RU7R",
"version": 9,
"unit": "cm",
"lastModified": 1485934721,
"title": "design title",
"previews": [
"https://pitchprint.io/previews/design_id_1.jpg",
"https://pitchprint.io/previews/design_id_2.jpg"
]
}
]
}
}Body
application/json
Your domain's API key.
Example:
"your-api-key"
UNIX timestamp (seconds since epoch) generated at request time. Valid for one hour.
Example:
1485934721
MD5(apiKey + secretKey + timestamp).
Example:
"e2fc714c4727ee9395f324cd2e7f331f"
ID of a design category.
Example:
"cat-id"
Response
200 - application/json
The designs under the requested category.
The response is of type object.