Fetch Project
curl --request POST \
--url https://api.pitchprint.io/runtime/fetch-project \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "your-api-key",
"timestamp": 1485934721,
"signature": "e2fc714c4727ee9395f324cd2e7f331f",
"projectId": "835a460c916dec74f02adef0e4a9dce9"
}
'import requests
url = "https://api.pitchprint.io/runtime/fetch-project"
payload = {
"apiKey": "your-api-key",
"timestamp": 1485934721,
"signature": "e2fc714c4727ee9395f324cd2e7f331f",
"projectId": "835a460c916dec74f02adef0e4a9dce9"
}
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',
projectId: '835a460c916dec74f02adef0e4a9dce9'
})
};
fetch('https://api.pitchprint.io/runtime/fetch-project', 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-project",
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',
'projectId' => '835a460c916dec74f02adef0e4a9dce9'
]),
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-project"
payload := strings.NewReader("{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"projectId\": \"835a460c916dec74f02adef0e4a9dce9\"\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-project")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"projectId\": \"835a460c916dec74f02adef0e4a9dce9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pitchprint.io/runtime/fetch-project")
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 \"projectId\": \"835a460c916dec74f02adef0e4a9dce9\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "835a460c916dec74f02adef0e4a9dce9",
"version": "8.0.0",
"_author": "guest",
"showPresetForm": false,
"hideBackgroundPanel": false,
"hideTextPanel": false,
"hideImagePanel": false,
"product": {
"id": "28",
"name": "HTC Touch HD"
},
"disableImageClick": false,
"designId": "74b9c1f4cfbbec8f59245304d7f7332c",
"projectId": "835a460c916dec74f02adef0e4a9dce9",
"productId": "28",
"layout": "default",
"title": "Red T-Shirt",
"scaling": 0.28826764436296975,
"unit": "cm",
"welcomeMsg": "Welcome to your creative side.",
"pages": [
{
"pageData": {
"title": "Front",
"render": true,
"fWidth": 67.249,
"fHeight": 77,
"templateSource": "//s3.amazonaws.com/pitchprint.cdn/.../front.png",
"canvasDimension": {
"top": 10,
"left": 16,
"right": 16.249,
"bottom": 12,
"width": 35,
"height": 55
},
"index": 0
},
"groups": [],
"items": [
{
"type": "i-text",
"left": 143.29,
"top": 101.31,
"fill": "#ffffff",
"text": "Click Here\nTo Edit\nYour Awesome\nText",
"fontSize": 40,
"fontWeight": "bold",
"fontFamily": "Candara",
"textAlign": "center",
"includeInForm": false
}
]
}
],
"_owner": "9a3a11ea5f5fc12e7a41f3098a082cd9",
"lastModified": "2015-08-24T16:37:19.876Z",
"enabled": true
}
}Runtime API
Fetch Project
Retrieve a saved project’s data, including its design records and customer selections, from the runtime API.
POST
/
runtime
/
fetch-project
Fetch Project
curl --request POST \
--url https://api.pitchprint.io/runtime/fetch-project \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "your-api-key",
"timestamp": 1485934721,
"signature": "e2fc714c4727ee9395f324cd2e7f331f",
"projectId": "835a460c916dec74f02adef0e4a9dce9"
}
'import requests
url = "https://api.pitchprint.io/runtime/fetch-project"
payload = {
"apiKey": "your-api-key",
"timestamp": 1485934721,
"signature": "e2fc714c4727ee9395f324cd2e7f331f",
"projectId": "835a460c916dec74f02adef0e4a9dce9"
}
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',
projectId: '835a460c916dec74f02adef0e4a9dce9'
})
};
fetch('https://api.pitchprint.io/runtime/fetch-project', 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-project",
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',
'projectId' => '835a460c916dec74f02adef0e4a9dce9'
]),
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-project"
payload := strings.NewReader("{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"projectId\": \"835a460c916dec74f02adef0e4a9dce9\"\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-project")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"your-api-key\",\n \"timestamp\": 1485934721,\n \"signature\": \"e2fc714c4727ee9395f324cd2e7f331f\",\n \"projectId\": \"835a460c916dec74f02adef0e4a9dce9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pitchprint.io/runtime/fetch-project")
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 \"projectId\": \"835a460c916dec74f02adef0e4a9dce9\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "835a460c916dec74f02adef0e4a9dce9",
"version": "8.0.0",
"_author": "guest",
"showPresetForm": false,
"hideBackgroundPanel": false,
"hideTextPanel": false,
"hideImagePanel": false,
"product": {
"id": "28",
"name": "HTC Touch HD"
},
"disableImageClick": false,
"designId": "74b9c1f4cfbbec8f59245304d7f7332c",
"projectId": "835a460c916dec74f02adef0e4a9dce9",
"productId": "28",
"layout": "default",
"title": "Red T-Shirt",
"scaling": 0.28826764436296975,
"unit": "cm",
"welcomeMsg": "Welcome to your creative side.",
"pages": [
{
"pageData": {
"title": "Front",
"render": true,
"fWidth": 67.249,
"fHeight": 77,
"templateSource": "//s3.amazonaws.com/pitchprint.cdn/.../front.png",
"canvasDimension": {
"top": 10,
"left": 16,
"right": 16.249,
"bottom": 12,
"width": 35,
"height": 55
},
"index": 0
},
"groups": [],
"items": [
{
"type": "i-text",
"left": 143.29,
"top": 101.31,
"fill": "#ffffff",
"text": "Click Here\nTo Edit\nYour Awesome\nText",
"fontSize": 40,
"fontWeight": "bold",
"fontFamily": "Candara",
"textAlign": "center",
"includeInForm": false
}
]
}
],
"_owner": "9a3a11ea5f5fc12e7a41f3098a082cd9",
"lastModified": "2015-08-24T16:37:19.876Z",
"enabled": true
}
}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 single project.
Example:
"835a460c916dec74f02adef0e4a9dce9"
Response
200 - application/json
The source data for the requested project.
The response is of type object.