Print-On-Demand.App API v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Print-On-Demand.App API. Mobile Phone Case Drop-Shipping API. Register and get your access key at https://print-on-demand.app.
Base URLs:
Terms of service Email: Support
Authentication
- API Key (ApiKeyAuth)
- Parameter Name: x-api-key, in: header. API key placed in header 'x-api-key' to authorize requests.
order
Create, access or cancel orders and upload customer images used for printing.
Upload an image
Code samples
# You can also use wget
curl -X POST https://api.print-on-demand.app/v1/order/imageUpload \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'x-api-key: API_KEY'
POST https://api.print-on-demand.app/v1/order/imageUpload HTTP/1.1
Host: api.print-on-demand.app
Content-Type: multipart/form-data
Accept: application/json
const inputBody = '{
"data": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/order/imageUpload',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"data": "string"
};
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/order/imageUpload',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.post 'https://api.print-on-demand.app/v1/order/imageUpload',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.post('https://api.print-on-demand.app/v1/order/imageUpload', headers = headers)
print(r.json())
URL obj = new URL("https://api.print-on-demand.app/v1/order/imageUpload");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.print-on-demand.app/v1/order/imageUpload", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'multipart/form-data',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.print-on-demand.app/v1/order/imageUpload', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /order/imageUpload
Upload images that can be used for printing. Use the reference from the response when creating an order.
Body parameter
data: string
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | false | none |
| » data | body | string(binary) | false | none |
Example responses
200 Response
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"imageRef": "asdfgh123456"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | successful operation | OrderImageUploadResponse |
Place an order
Code samples
# You can also use wget
curl -X POST https://api.print-on-demand.app/v1/order \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-api-key: API_KEY'
POST https://api.print-on-demand.app/v1/order HTTP/1.1
Host: api.print-on-demand.app
Content-Type: application/json
Accept: application/json
const inputBody = '{
"id": "asdfgh123456",
"customRef": "MyShop-OrderId-1234",
"address": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"addressBilling": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"items": [
{
"productId": "asdfgh123456",
"imageRef": "asdfgh123456",
"quantity": 1
}
],
"shipping": {
"value": "StandardTracked",
"description": "Shipping with tracking.",
"workdaysFrom": 1,
"workdaysUntil": 6
},
"shipped": "2019-08-24T14:15:22Z",
"canceled": "2019-08-24T14:15:22Z",
"status": "approved",
"complete": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/order',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"id": "asdfgh123456",
"customRef": "MyShop-OrderId-1234",
"address": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"addressBilling": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"items": [
{
"productId": "asdfgh123456",
"imageRef": "asdfgh123456",
"quantity": 1
}
],
"shipping": {
"value": "StandardTracked",
"description": "Shipping with tracking.",
"workdaysFrom": 1,
"workdaysUntil": 6
},
"shipped": "2019-08-24T14:15:22Z",
"canceled": "2019-08-24T14:15:22Z",
"status": "approved",
"complete": true
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/order',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.post 'https://api.print-on-demand.app/v1/order',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.post('https://api.print-on-demand.app/v1/order', headers = headers)
print(r.json())
URL obj = new URL("https://api.print-on-demand.app/v1/order");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.print-on-demand.app/v1/order", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.print-on-demand.app/v1/order', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /order
Place a new order for selected products.
Body parameter
{
"id": "asdfgh123456",
"customRef": "MyShop-OrderId-1234",
"address": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"addressBilling": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"items": [
{
"productId": "asdfgh123456",
"imageRef": "asdfgh123456",
"quantity": 1
}
],
"shipping": {
"value": "StandardTracked",
"description": "Shipping with tracking.",
"workdaysFrom": 1,
"workdaysUntil": 6
},
"shipped": "2019-08-24T14:15:22Z",
"canceled": "2019-08-24T14:15:22Z",
"status": "approved",
"complete": true
}
id: asdfgh123456
customRef: MyShop-OrderId-1234
address:
firstName: Mia
lastName: Muster
street: Leipziger-Straße 123
zip: "01234"
city: Berlin
countryCode: DE
tel: 030 1234567
email: max.muster@example.com
addressBilling:
firstName: Mia
lastName: Muster
street: Leipziger-Straße 123
zip: "01234"
city: Berlin
countryCode: DE
tel: 030 1234567
email: max.muster@example.com
items:
- productId: asdfgh123456
imageRef: asdfgh123456
quantity: 1
shipping:
value: StandardTracked
description: Shipping with tracking.
workdaysFrom: 1
workdaysUntil: 6
shipped: 2019-08-24T14:15:22Z
canceled: 2019-08-24T14:15:22Z
status: approved
complete: true
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | Order | false | none |
Example responses
200 Response
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"id": "asdfgh123456"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | successful operation | OrderPlaceOrderResponse |
| 405 | Method Not Allowed | Invalid input | ErrorResponse |
Find an order
Code samples
# You can also use wget
curl -X GET https://api.print-on-demand.app/v1/order/{orderId} \
-H 'Accept: application/json' \
-H 'x-api-key: API_KEY'
GET https://api.print-on-demand.app/v1/order/{orderId} HTTP/1.1
Host: api.print-on-demand.app
Accept: application/json
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/order/{orderId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/order/{orderId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.get 'https://api.print-on-demand.app/v1/order/{orderId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.get('https://api.print-on-demand.app/v1/order/{orderId}', headers = headers)
print(r.json())
URL obj = new URL("https://api.print-on-demand.app/v1/order/{orderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.print-on-demand.app/v1/order/{orderId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.print-on-demand.app/v1/order/{orderId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /order/{orderId}
Find an order by ID or custom ID. For valid response try generated order ID or your custom assigned ID.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| orderId | path | string | true | ID of order that needs to be fetched |
Example responses
200 Response
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"order": {
"id": "asdfgh123456",
"customRef": "MyShop-OrderId-1234",
"address": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"addressBilling": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"items": [
{
"productId": "asdfgh123456",
"imageRef": "asdfgh123456",
"quantity": 1
}
],
"shipping": {
"value": "StandardTracked",
"description": "Shipping with tracking.",
"workdaysFrom": 1,
"workdaysUntil": 6
},
"shipped": "2019-08-24T14:15:22Z",
"canceled": "2019-08-24T14:15:22Z",
"status": "approved",
"complete": true
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | successful operation | OrderFindOrderByIdResponse |
| 400 | Bad Request | Invalid ID supplied | ErrorResponse |
| 404 | Not Found | Order not found | ErrorResponse |
Cancel an order
Code samples
# You can also use wget
curl -X DELETE https://api.print-on-demand.app/v1/order/{orderId} \
-H 'Accept: application/json' \
-H 'x-api-key: API_KEY'
DELETE https://api.print-on-demand.app/v1/order/{orderId} HTTP/1.1
Host: api.print-on-demand.app
Accept: application/json
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/order/{orderId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/order/{orderId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.delete 'https://api.print-on-demand.app/v1/order/{orderId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.delete('https://api.print-on-demand.app/v1/order/{orderId}', headers = headers)
print(r.json())
URL obj = new URL("https://api.print-on-demand.app/v1/order/{orderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://api.print-on-demand.app/v1/order/{orderId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','https://api.print-on-demand.app/v1/order/{orderId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
DELETE /order/{orderId}
Cancel an order by ID. For valid response try generated order ID or your custom reference.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| orderId | path | string | true | ID of the order that needs to be canceld |
Example responses
200 Response
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Whole order successfully canceled. | OrderCancelOrderByIdResponse |
| 400 | Bad Request | Invalid ID supplied | ErrorResponse |
| 404 | Not Found | Order not found | ErrorResponse |
product
Available products. Printable phone cases and accessories.
List all products
Code samples
# You can also use wget
curl -X GET https://api.print-on-demand.app/v1/product/list \
-H 'Accept: application/json' \
-H 'x-api-key: API_KEY'
GET https://api.print-on-demand.app/v1/product/list HTTP/1.1
Host: api.print-on-demand.app
Accept: application/json
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/product/list',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/product/list',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.get 'https://api.print-on-demand.app/v1/product/list',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.get('https://api.print-on-demand.app/v1/product/list', headers = headers)
print(r.json())
URL obj = new URL("https://api.print-on-demand.app/v1/product/list");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.print-on-demand.app/v1/product/list", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.print-on-demand.app/v1/product/list', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /product/list
List all available mobile phone cases and accessories.
Example responses
200 Response
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"products": [
{
"id": "asdfgh123456",
"name": "Soft Case (Transparent) for the Apple iPhone SE 2022",
"type": "Printable",
"stockInfo": {
"sku": "asdfgh123456",
"quantity": 50,
"expectedAvailability": "2019-08-24"
},
"attributes": {
"color": "Transparent",
"material": "TPU",
"caseType": "SoftCase",
"caseTypeGroup": "SC1",
"leewayMarginMm": 3
},
"compatibleDevices": [
[
"Apple iPhone 7",
"Apple iPhone 8",
"Apple iPhone SE 2020",
"Apple iPhone SE 2022"
]
],
"renderLayers": {
"background": "https://api.print-on-demand.app/v1/imgages/background/asdfgh123456.jpg",
"overlay": "https://api.print-on-demand.app/v1/imgages/overlay/asdfgh123456.jpg"
},
"photoUrls": [
"string"
],
"status": "available"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | successful operation | ProductListResponse |
Find a product
Code samples
# You can also use wget
curl -X GET https://api.print-on-demand.app/v1/product/{productId} \
-H 'Accept: application/json' \
-H 'x-api-key: API_KEY'
GET https://api.print-on-demand.app/v1/product/{productId} HTTP/1.1
Host: api.print-on-demand.app
Accept: application/json
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/product/{productId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/product/{productId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.get 'https://api.print-on-demand.app/v1/product/{productId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.get('https://api.print-on-demand.app/v1/product/{productId}', headers = headers)
print(r.json())
URL obj = new URL("https://api.print-on-demand.app/v1/product/{productId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.print-on-demand.app/v1/product/{productId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.print-on-demand.app/v1/product/{productId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /product/{productId}
Find a product by ID. Returns a single product
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| productId | path | string | true | ID of product to return |
Example responses
200 Response
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"product": {
"id": "asdfgh123456",
"name": "Soft Case (Transparent) for the Apple iPhone SE 2022",
"type": "Printable",
"stockInfo": {
"sku": "asdfgh123456",
"quantity": 50,
"expectedAvailability": "2019-08-24"
},
"attributes": {
"color": "Transparent",
"material": "TPU",
"caseType": "SoftCase",
"caseTypeGroup": "SC1",
"leewayMarginMm": 3
},
"compatibleDevices": [
[
"Apple iPhone 7",
"Apple iPhone 8",
"Apple iPhone SE 2020",
"Apple iPhone SE 2022"
]
],
"renderLayers": {
"background": "https://api.print-on-demand.app/v1/imgages/background/asdfgh123456.jpg",
"overlay": "https://api.print-on-demand.app/v1/imgages/overlay/asdfgh123456.jpg"
},
"photoUrls": [
"string"
],
"status": "available"
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | successful operation | ProductFindProductByIdResponse |
| 400 | Bad Request | Invalid ID supplied | ErrorResponse |
| 404 | Not Found | Product not found | ErrorResponse |
device
List all device info.
Code samples
# You can also use wget
curl -X GET https://api.print-on-demand.app/v1/device/list \
-H 'Accept: application/json' \
-H 'x-api-key: API_KEY'
GET https://api.print-on-demand.app/v1/device/list HTTP/1.1
Host: api.print-on-demand.app
Accept: application/json
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/device/list',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://api.print-on-demand.app/v1/device/list',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.get 'https://api.print-on-demand.app/v1/device/list',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.get('https://api.print-on-demand.app/v1/device/list', headers = headers)
print(r.json())
URL obj = new URL("https://api.print-on-demand.app/v1/device/list");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.print-on-demand.app/v1/device/list", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.print-on-demand.app/v1/device/list', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /device/list
List detailed info to the referenced devices.
Example responses
200 Response
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"devices": [
{
"id": "asdfgh123456",
"name": "Apple iPhone SE 2022",
"type": "mobile",
"company": {
"value": "Apple"
},
"model": "iPhone SE 2022",
"attributes": {
"modelMarketingNames": [
"12T Pro"
],
"heightMm": "163.1",
"widthMm": "75.9",
"depthMm": "8.6"
},
"renderLayers": {
"back": "https://api.print-on-demand.app/v1/imgages/back/asdfgh123456.jpg",
"backCut": "https://api.print-on-demand.app/v1/imgages/backCut/asdfgh123456.jpg"
}
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | successful operation | DeviceListResponse |
Schemas
Id
"asdfgh123456"
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
Order
{
"id": "asdfgh123456",
"customRef": "MyShop-OrderId-1234",
"address": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"addressBilling": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"items": [
{
"productId": "asdfgh123456",
"imageRef": "asdfgh123456",
"quantity": 1
}
],
"shipping": {
"value": "StandardTracked",
"description": "Shipping with tracking.",
"workdaysFrom": 1,
"workdaysUntil": 6
},
"shipped": "2019-08-24T14:15:22Z",
"canceled": "2019-08-24T14:15:22Z",
"status": "approved",
"complete": true
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | Id | false | none | none |
| customRef | string | false | none | none |
| address | Address | true | none | Address used for shipping. |
| addressBilling | Address | false | none | Optionally second address used for invoices. |
| items | [OrderItem] | true | none | none |
| shipping | Shipping | false | none | none |
| shipped | string(date-time) | false | none | none |
| canceled | string(date-time) | false | none | none |
| status | string | false | none | Order Status |
| complete | boolean | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| status | placed |
| status | approved |
| status | delivered |
OrderItem
{
"productId": "asdfgh123456",
"imageRef": "asdfgh123456",
"quantity": 1
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| productId | Id | true | none | The product id reference. |
| imageRef | Id | false | none | The uploaded image reference. |
| quantity | integer(int32) | true | none | none |
Address
{
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| firstName | string | false | none | none |
| lastName | string | true | none | none |
| street | string | true | none | Street name with house number. |
| zip | string | true | none | none |
| city | string | true | none | none |
| countryCode | string | true | none | none |
| tel | string | false | none | none |
| string | false | none | none |
ProductType
"Printable"
What the product can be used for.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | What the product can be used for. |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | Printable |
| anonymous | Accessory |
DeviceType
"mobile"
What kind of device.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | What kind of device. |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | mobile |
| anonymous | tablet |
| anonymous | watch |
DeviceCompany
{
"value": "Apple"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| value | string | false | none | Company of the device. |
ProductAttributes
{
"color": "Transparent",
"material": "TPU",
"caseType": "SoftCase",
"caseTypeGroup": "SC1",
"leewayMarginMm": 3
}
Additional info about the product.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| color | string | false | none | none |
| material | string | false | none | none |
| caseType | string | false | none | none |
| caseTypeGroup | string | false | none | An identifier for different kind of case type. Different veriations in color can be in the same group. |
| leewayMarginMm | number | false | none | Margin in mm (subtracted from the uploaded image) that will be used as leeway, and will generally not be printed on the product. This can be used for products that are printed over the edge. |
Enumerated Values
| Property | Value |
|---|---|
| color | Transparent |
| color | Black |
| color | White |
| color | Red |
| color | BrickRed |
| color | Navy |
| color | Pink |
| color | TransparentBlack |
| material | GenuineLeather |
| material | ImitationLeather |
| material | TPU |
| caseType | SoftCase |
| caseType | FullBodyCase |
| caseType | FlipCase |
| caseType | Crossbody |
DeviceAttributes
{
"modelMarketingNames": [
"12T Pro"
],
"heightMm": "163.1",
"widthMm": "75.9",
"depthMm": "8.6"
}
Additional info about the device.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| modelMarketingNames | [string] | false | none | Additional / alternative model names. |
| heightMm | number(double) | false | none | The height of the device in mm. |
| widthMm | number(double) | false | none | The width of the device in mm. |
| depthMm | number(double) | false | none | The depth of the device in mm. |
RenderLayers
{
"background": "https://api.print-on-demand.app/v1/imgages/background/asdfgh123456.jpg",
"overlay": "https://api.print-on-demand.app/v1/imgages/overlay/asdfgh123456.jpg"
}
Images to use for generating a preview of the print.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| background | string | false | none | Phone case background used as first layer of a mockup. |
| overlay | string | false | none | Phone case overlay used as last layer of a mockup. |
DeviceRenderLayers
{
"back": "https://api.print-on-demand.app/v1/imgages/back/asdfgh123456.jpg",
"backCut": "https://api.print-on-demand.app/v1/imgages/backCut/asdfgh123456.jpg"
}
Images to use for generating a preview of the device.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| back | string | false | none | Phone back side. |
| backCut | string | false | none | Phone back side mask with transparent surroundings. |
StockInfo
{
"sku": "asdfgh123456",
"quantity": 50,
"expectedAvailability": "2019-08-24"
}
Current availability of the product.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| sku | Id | false | none | Stock keeping unit. Might be shared with other products. |
| quantity | integer | false | none | none |
| expectedAvailability | string(date) | false | none | none |
Product
{
"id": "asdfgh123456",
"name": "Soft Case (Transparent) for the Apple iPhone SE 2022",
"type": "Printable",
"stockInfo": {
"sku": "asdfgh123456",
"quantity": 50,
"expectedAvailability": "2019-08-24"
},
"attributes": {
"color": "Transparent",
"material": "TPU",
"caseType": "SoftCase",
"caseTypeGroup": "SC1",
"leewayMarginMm": 3
},
"compatibleDevices": [
[
"Apple iPhone 7",
"Apple iPhone 8",
"Apple iPhone SE 2020",
"Apple iPhone SE 2022"
]
],
"renderLayers": {
"background": "https://api.print-on-demand.app/v1/imgages/background/asdfgh123456.jpg",
"overlay": "https://api.print-on-demand.app/v1/imgages/overlay/asdfgh123456.jpg"
},
"photoUrls": [
"string"
],
"status": "available"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | Id | true | none | none |
| name | string | false | none | none |
| type | ProductType | true | none | What the product can be used for. |
| stockInfo | StockInfo | false | none | Current availability of the product. |
| attributes | ProductAttributes | false | none | Additional info about the product. |
| compatibleDevices | [string] | false | none | none |
| renderLayers | RenderLayers | false | none | Images to use for generating a preview of the print. |
| photoUrls | [string] | false | none | none |
| status | string | false | none | Product status |
Enumerated Values
| Property | Value |
|---|---|
| status | available |
| status | pending |
| status | sold |
Device
{
"id": "asdfgh123456",
"name": "Apple iPhone SE 2022",
"type": "mobile",
"company": {
"value": "Apple"
},
"model": "iPhone SE 2022",
"attributes": {
"modelMarketingNames": [
"12T Pro"
],
"heightMm": "163.1",
"widthMm": "75.9",
"depthMm": "8.6"
},
"renderLayers": {
"back": "https://api.print-on-demand.app/v1/imgages/back/asdfgh123456.jpg",
"backCut": "https://api.print-on-demand.app/v1/imgages/backCut/asdfgh123456.jpg"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | Id | true | none | none |
| name | string | true | none | Company + model |
| type | DeviceType | true | none | What kind of device. |
| company | DeviceCompany | false | none | none |
| model | string | false | none | Device model name. |
| attributes | DeviceAttributes | false | none | Additional info about the device. |
| renderLayers | DeviceRenderLayers | false | none | Images to use for generating a preview of the device. |
Shipping
{
"value": "StandardTracked",
"description": "Shipping with tracking.",
"workdaysFrom": 1,
"workdaysUntil": 6
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| value | ShippingValue | true | none | * Standard - Standard shipping without shipment tracking. For larger orders, which are not sent by large letter but by parcel, a tracking number may be included.* StandardBasicTracking - Standard shipping with basic shipment tracking. Basic consignment tracking documents the processing of the consignment at the origin and destination letter center. For letters sent abroad, shipment tracking is documented until forwarding abroad.* StandardTracked - Shipping with continuous shipment tracking for all EU countries and many non-EU countries. We generally ship to Germany as Warenpost (uninsured) or abroad as Warenpost International Premium (liability for numerous destination countries) via DHL. |
| description | string | false | none | Shipping description |
| workdaysFrom | integer | false | none | Estimated shipping time in days (from). |
| workdaysUntil | integer | false | none | Estimated shipping time in days (until). |
ShippingValue
"StandardTracked"
Standard- Standard shipping without shipment tracking. For larger orders, which are not sent by large letter but by parcel, a tracking number may be included.StandardBasicTracking- Standard shipping with basic shipment tracking. Basic consignment tracking documents the processing of the consignment at the origin and destination letter center. For letters sent abroad, shipment tracking is documented until forwarding abroad.StandardTracked- Shipping with continuous shipment tracking for all EU countries and many non-EU countries. We generally ship to Germany as Warenpost (uninsured) or abroad as Warenpost International Premium (liability for numerous destination countries) via DHL.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | * Standard - Standard shipping without shipment tracking. For larger orders, which are not sent by large letter but by parcel, a tracking number may be included.* StandardBasicTracking - Standard shipping with basic shipment tracking. Basic consignment tracking documents the processing of the consignment at the origin and destination letter center. For letters sent abroad, shipment tracking is documented until forwarding abroad.* StandardTracked - Shipping with continuous shipment tracking for all EU countries and many non-EU countries. We generally ship to Germany as Warenpost (uninsured) or abroad as Warenpost International Premium (liability for numerous destination countries) via DHL. |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | Standard |
| anonymous | StandardBasicTracking |
| anonymous | StandardTracked |
ResponseData
{
"statusCode": 200,
"errorMsg": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| statusCode | integer(int32) | true | none | The HTTP status code. E.g. 200 'OK', 404 'Not Found' |
| errorMsg | string | false | none | none |
ErrorResponse
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| rd | ResponseData | true | none | none |
OrderImageUploadResponse
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"imageRef": "asdfgh123456"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| rd | ResponseData | false | none | none |
| imageRef | Id | false | none | The image reference, to be used when placing an order. |
OrderPlaceOrderResponse
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"id": "asdfgh123456"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| rd | ResponseData | false | none | none |
| id | Id | false | none | none |
OrderFindOrderByIdResponse
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"order": {
"id": "asdfgh123456",
"customRef": "MyShop-OrderId-1234",
"address": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"addressBilling": {
"firstName": "Mia",
"lastName": "Muster",
"street": "Leipziger-Straße 123",
"zip": "01234",
"city": "Berlin",
"countryCode": "DE",
"tel": "030 1234567",
"email": "max.muster@example.com"
},
"items": [
{
"productId": "asdfgh123456",
"imageRef": "asdfgh123456",
"quantity": 1
}
],
"shipping": {
"value": "StandardTracked",
"description": "Shipping with tracking.",
"workdaysFrom": 1,
"workdaysUntil": 6
},
"shipped": "2019-08-24T14:15:22Z",
"canceled": "2019-08-24T14:15:22Z",
"status": "approved",
"complete": true
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| rd | ResponseData | false | none | none |
| order | Order | false | none | none |
OrderCancelOrderByIdResponse
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| rd | ResponseData | false | none | none |
ProductListResponse
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"products": [
{
"id": "asdfgh123456",
"name": "Soft Case (Transparent) for the Apple iPhone SE 2022",
"type": "Printable",
"stockInfo": {
"sku": "asdfgh123456",
"quantity": 50,
"expectedAvailability": "2019-08-24"
},
"attributes": {
"color": "Transparent",
"material": "TPU",
"caseType": "SoftCase",
"caseTypeGroup": "SC1",
"leewayMarginMm": 3
},
"compatibleDevices": [
[
"Apple iPhone 7",
"Apple iPhone 8",
"Apple iPhone SE 2020",
"Apple iPhone SE 2022"
]
],
"renderLayers": {
"background": "https://api.print-on-demand.app/v1/imgages/background/asdfgh123456.jpg",
"overlay": "https://api.print-on-demand.app/v1/imgages/overlay/asdfgh123456.jpg"
},
"photoUrls": [
"string"
],
"status": "available"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| rd | ResponseData | false | none | none |
| products | [Product] | false | none | none |
DeviceListResponse
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"devices": [
{
"id": "asdfgh123456",
"name": "Apple iPhone SE 2022",
"type": "mobile",
"company": {
"value": "Apple"
},
"model": "iPhone SE 2022",
"attributes": {
"modelMarketingNames": [
"12T Pro"
],
"heightMm": "163.1",
"widthMm": "75.9",
"depthMm": "8.6"
},
"renderLayers": {
"back": "https://api.print-on-demand.app/v1/imgages/back/asdfgh123456.jpg",
"backCut": "https://api.print-on-demand.app/v1/imgages/backCut/asdfgh123456.jpg"
}
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| rd | ResponseData | false | none | none |
| devices | [Device] | false | none | none |
ProductFindProductByIdResponse
{
"rd": {
"statusCode": 200,
"errorMsg": "string"
},
"product": {
"id": "asdfgh123456",
"name": "Soft Case (Transparent) for the Apple iPhone SE 2022",
"type": "Printable",
"stockInfo": {
"sku": "asdfgh123456",
"quantity": 50,
"expectedAvailability": "2019-08-24"
},
"attributes": {
"color": "Transparent",
"material": "TPU",
"caseType": "SoftCase",
"caseTypeGroup": "SC1",
"leewayMarginMm": 3
},
"compatibleDevices": [
[
"Apple iPhone 7",
"Apple iPhone 8",
"Apple iPhone SE 2020",
"Apple iPhone SE 2022"
]
],
"renderLayers": {
"background": "https://api.print-on-demand.app/v1/imgages/background/asdfgh123456.jpg",
"overlay": "https://api.print-on-demand.app/v1/imgages/overlay/asdfgh123456.jpg"
},
"photoUrls": [
"string"
],
"status": "available"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| rd | ResponseData | false | none | none |
| product | Product | false | none | none |