Introduction
PrintOps.com is a print on demand service that focuses on posters and framed prints. Using this API, you can create and manage orders and perform all associated functions.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting the settings page within your dashboard and selecting the API tab. The, just click the Create New Token button. Once a token is created you will need to immediately copy it down - it is only visible for this brief period.
Endpoints
Get Base Products
requires authentication
Base Products are the core products that PrintOps offers for print on demand.
Example request:
curl --request GET \
--get "https://printops.com/api/base-products" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/base-products"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/base-products';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/base-products'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
{
"data": {
"base_products": [
{
"id": 1,
"sku": "PP08",
"name": "8 x 10 Print",
"product_category": 1,
"type": "poster_sm",
"description": "8x10 Poster Print",
"properties": {
"ratio": "4:5",
"width": 8,
"height": 10,
"weight": 0.037,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.8
},
"price": "2.25",
"ships_alone": false
},
{
"id": 2,
"sku": "PP07",
"name": "8.5 x 11 Print",
"product_category": 1,
"type": "poster_sm",
"description": "8.5x11 Poster Print",
"properties": {
"ratio": "17:22",
"width": 11,
"height": 8.5,
"weight": 0.044,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.773
},
"price": "2.40",
"ships_alone": false
},
{
"id": 3,
"sku": "PP09",
"name": "9 x 12 Print",
"product_category": 1,
"type": "poster_sm",
"description": "9x12 Poster Print",
"properties": {
"ratio": "3:4",
"width": 9,
"height": 12,
"weight": 0.05,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "2.63",
"ships_alone": false
},
{
"id": 4,
"sku": "PP10",
"name": "11 x 14 Print",
"product_category": 1,
"type": "poster_sm",
"description": "11x14 Poster Print",
"properties": {
"ratio": "11:14",
"width": 11,
"height": 14,
"weight": 0.071,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.786
},
"price": "2.78",
"ships_alone": false
},
{
"id": 5,
"sku": "PP11",
"name": "11 x 17 Print",
"product_category": 1,
"type": "poster_sm",
"description": "11x17 Poster Print",
"properties": {
"ratio": "11:17",
"width": 11,
"height": 17,
"weight": 0.087,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.647
},
"price": "3.00",
"ships_alone": false
},
{
"id": 6,
"sku": "PP12",
"name": "12 x 16 Print",
"product_category": 1,
"type": "poster_sm",
"description": "12x16 Poster Print",
"properties": {
"ratio": "3:4",
"width": 12,
"height": 16,
"weight": 0.089,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "3.38",
"ships_alone": false
},
{
"id": 7,
"sku": "PP13",
"name": "12 x 18 Print",
"product_category": 1,
"type": "poster_sm",
"description": "12x18 Poster Print",
"properties": {
"ratio": "2:3",
"width": 12,
"height": 18,
"weight": 0.1,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.666
},
"price": "3.75",
"ships_alone": false
},
{
"id": 8,
"sku": "PP14",
"name": "14 x 20 Print",
"product_category": 1,
"type": "poster_sm",
"description": "14x20 Poster Print",
"properties": {
"ratio": "7:10",
"width": 14,
"height": 20,
"weight": 0.13,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.7
},
"price": "4.00",
"ships_alone": false
},
{
"id": 9,
"sku": "PP16",
"name": "16 x 20 Print",
"product_category": 1,
"type": "poster_sm",
"description": "16x20 Poster Print",
"properties": {
"ratio": "4:5",
"width": 16,
"height": 20,
"weight": 0.148,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.8
},
"price": "4.50",
"ships_alone": false
},
{
"id": 10,
"sku": "PP15",
"name": "16 x 24 Print",
"product_category": 1,
"type": "poster_sm",
"description": "16x24 Poster Print",
"properties": {
"ratio": "2:3",
"width": 16,
"height": 24,
"weight": 0.178,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.666
},
"price": "5.00",
"ships_alone": false
},
{
"id": 11,
"sku": "PP17",
"name": "17 x 22 Print",
"product_category": 1,
"type": "poster_sm",
"description": "17x22 Poster Print",
"properties": {
"ratio": "17:22",
"width": 17,
"height": 22,
"weight": 0.173,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.773
},
"price": "5.25",
"ships_alone": false
},
{
"id": 12,
"sku": "PP18",
"name": "18 x 24 Print",
"product_category": 1,
"type": "poster_sm",
"description": "18x24 Poster Print",
"properties": {
"ratio": "3:4",
"width": 18,
"height": 24,
"weight": 0.2,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "6.00",
"ships_alone": false
},
{
"id": 13,
"sku": "PP19",
"name": "18 x 27 Print",
"product_category": 1,
"type": "poster_sm",
"description": "18 x 27 Poster Print",
"properties": {
"ratio": "2:3",
"width": 18,
"height": 27,
"weight": 0.225,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.666
},
"price": "6.75",
"ships_alone": false
},
{
"id": 14,
"sku": "PP20",
"name": "20 x 30 Print",
"product_category": 1,
"type": "poster_lg",
"description": "20x30 Poster Print",
"properties": {
"ratio": "2:3",
"width": 20,
"height": 30,
"weight": 0.278,
"paperType": "Canon Oce 46lb Bond",
"thickness": 0.008,
"ratio_decimal": 0.666
},
"price": "11.00",
"ships_alone": false
},
{
"id": 15,
"sku": "PP24",
"name": "24 x 36 Print",
"product_category": 1,
"type": "poster_lg",
"description": "24x36 Poster Print",
"properties": {
"ratio": "2:3",
"width": 24,
"height": 36,
"weight": 0.4,
"paperType": "Canon Oce 46lb Bond",
"thickness": 0.008,
"ratio_decimal": 0.666
},
"price": "15.00",
"ships_alone": false
}
]
},
"links": {
"first": "https://printops.test/api/base-products?page=1",
"last": "https://printops.test/api/base-products?page=7",
"prev": null,
"next": "https://printops.test/api/base-products?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 7,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://printops.test/api/base-products?page=1",
"label": "1",
"active": true
},
{
"url": "https://printops.test/api/base-products?page=2",
"label": "2",
"active": false
},
{
"url": "https://printops.test/api/base-products?page=3",
"label": "3",
"active": false
},
{
"url": "https://printops.test/api/base-products?page=4",
"label": "4",
"active": false
},
{
"url": "https://printops.test/api/base-products?page=5",
"label": "5",
"active": false
},
{
"url": "https://printops.test/api/base-products?page=6",
"label": "6",
"active": false
},
{
"url": "https://printops.test/api/base-products?page=7",
"label": "7",
"active": false
},
{
"url": "https://printops.test/api/base-products?page=2",
"label": "Next »",
"active": false
}
],
"path": "https://printops.test/api/base-products",
"per_page": 15,
"to": 15,
"total": 104
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a Base Product by Id
requires authentication
Base Products are the core products that PrintOps offers for print on demand.
Example request:
curl --request GET \
--get "https://printops.com/api/base-products/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/base-products/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/base-products/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/base-products/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
{
"data": {
"base_product": {
"id": 1,
"sku": "PP08",
"name": "8 x 10 Print",
"product_category": 1,
"type": "poster_sm",
"description": "8x10 Poster Print",
"properties": {
"ratio": "4:5",
"width": 8,
"height": 10,
"weight": 0.037,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.8
},
"price": "2.25",
"ships_alone": false
}
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Authentication Test
requires authentication
A simple endpoint to confirm authentication was successful.
Example request:
curl --request GET \
--get "https://printops.com/api/authentication-test" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/authentication-test"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/authentication-test';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/authentication-test'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
{
"data": {
"message": [
"Success - you are authenticated."
]
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Shipping Methods
requires authentication
Returns a list of all available shipping methods.
Example request:
curl --request GET \
--get "https://printops.com/api/shipping-methods" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/shipping-methods"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/shipping-methods';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/shipping-methods'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
{
"data": {
"shipping_methods": [
{
"shipping_carrier": "UPS",
"name": "UPS Standard℠",
"identifier": "ups_standard"
},
{
"shipping_carrier": "UPS",
"name": "UPS® Ground",
"identifier": "ups_ground"
},
{
"shipping_carrier": "UPS",
"name": "UPS Saver®",
"identifier": "ups_saver"
},
{
"shipping_carrier": "UPS",
"name": "UPS Three-Day Select®",
"identifier": "ups_3_day_select"
},
{
"shipping_carrier": "UPS",
"name": "UPS Second Day Air®",
"identifier": "ups_second_day_air"
},
{
"shipping_carrier": "UPS",
"name": "UPS Second Day Air A.M.®",
"identifier": "ups_second_day_air_am"
},
{
"shipping_carrier": "UPS",
"name": "UPS Next Day Air®",
"identifier": "ups_next_day_air"
},
{
"shipping_carrier": "UPS",
"name": "UPS Next Day Air Saver®",
"identifier": "ups_next_day_air_saver"
},
{
"shipping_carrier": "UPS",
"name": "UPS Next Day Air Early A.M.®",
"identifier": "ups_next_day_air_early_am"
},
{
"shipping_carrier": "UPS",
"name": "UPS Mail Innovations (domestic)",
"identifier": "ups_mail_innovations_domestic"
},
{
"shipping_carrier": "UPS",
"name": "UPS Express®",
"identifier": "ups_express"
},
{
"shipping_carrier": "UPS",
"name": "UPS Express Plus®",
"identifier": "ups_express_plus"
},
{
"shipping_carrier": "UPS",
"name": "UPS Expedited®",
"identifier": "ups_expedited"
},
{
"shipping_carrier": "USPS",
"name": "USPS Priority Mail",
"identifier": "usps_priority"
},
{
"shipping_carrier": "USPS",
"name": "USPS Priority Mail Express",
"identifier": "usps_priority_express"
},
{
"shipping_carrier": "USPS",
"name": "USPS First Class",
"identifier": "usps_first"
},
{
"shipping_carrier": "USPS",
"name": "USPS Parcel Select",
"identifier": "usps_parcel_select"
},
{
"shipping_carrier": "USPS",
"name": "USPS Media Mail",
"identifier": "usps_media_mail"
},
{
"shipping_carrier": "USPS",
"name": "USPS International Priority",
"identifier": "usps_priority_mail_international"
},
{
"shipping_carrier": "USPS",
"name": "USPS International Express",
"identifier": "usps_priority_mail_express_international"
},
{
"shipping_carrier": "USPS",
"name": "USPS International First",
"identifier": "usps_first_class_package_international_service"
},
{
"shipping_carrier": "FedEx",
"name": "Ground",
"identifier": "fedex_ground"
},
{
"shipping_carrier": "FedEx",
"name": "Home Delivery",
"identifier": "fedex_home_delivery"
},
{
"shipping_carrier": "FedEx",
"name": "Smartpost",
"identifier": "fedex_smart_post"
},
{
"shipping_carrier": "FedEx",
"name": "2 Day",
"identifier": "fedex_2_day"
},
{
"shipping_carrier": "FedEx",
"name": "2 Day A.M.",
"identifier": "fedex_2_day_am"
},
{
"shipping_carrier": "FedEx",
"name": "Express Saver",
"identifier": "fedex_express_saver"
},
{
"shipping_carrier": "FedEx",
"name": "Standard Overnight",
"identifier": "fedex_standard_overnight"
},
{
"shipping_carrier": "FedEx",
"name": "Priority Overnight",
"identifier": "fedex_priority_overnight"
},
{
"shipping_carrier": "FedEx",
"name": "First Overnight",
"identifier": "fedex_first_overnight"
},
{
"shipping_carrier": "FedEx",
"name": "International Economy",
"identifier": "fedex_international_economy"
},
{
"shipping_carrier": "FedEx",
"name": "International Priority",
"identifier": "fedex_international_priority"
},
{
"shipping_carrier": "FedEx",
"name": "International First",
"identifier": "fedex_international_first"
},
{
"shipping_carrier": "FedEx",
"name": "Europe First International Priority",
"identifier": "fedex_europe_first_international_priority"
},
{
"shipping_carrier": "Flat",
"name": "Flat Rate",
"identifier": "flat_rate"
},
{
"shipping_carrier": "USPS",
"name": "USPS Ground Advantage",
"identifier": "usps_ground_advantage"
}
]
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Stores
requires authentication
The store resource is an organizational unit that holds user products, orders and shipments.
Example request:
curl --request GET \
--get "https://printops.com/api/stores?limit=2&page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/stores"
);
const params = {
"limit": "2",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'limit' => '2',
'page' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores'
params = {
'limit': '2',
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
{
"data": {
"stores": [
{
"id": 786322,
"name": "test",
"type": "generic",
"is_live": true,
"dropbox_name": null
}
]
},
"links": {
"first": "https://printops.test/api/stores?page=1",
"last": "https://printops.test/api/stores?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://printops.test/api/stores?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://printops.test/api/stores",
"per_page": 2,
"to": 1,
"total": 1
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a Store by Id
requires authentication
Example request:
curl --request GET \
--get "https://printops.com/api/stores/786322" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/stores/786322"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786322';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786322'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
{
"data": {
"store": {
"id": 786322,
"name": "test",
"type": "generic",
"is_live": true,
"dropbox_name": null
}
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a store
requires authentication
Example request:
curl --request POST \
"https://printops.com/api/stores" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"My Great Store\",
\"type\": \"generic\"
}"
const url = new URL(
"https://printops.com/api/stores"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "My Great Store",
"type": "generic"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'My Great Store',
'type' => 'generic',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores'
payload = {
"name": "My Great Store",
"type": "generic"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"store": {
"id": 786323,
"name": "My Great Store",
"type": "generic",
"is_live": true,
"dropbox_name": null
}
},
"status": "created",
"code": 201,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Images
requires authentication
Get images that have been created through the UI.
Example request:
curl --request GET \
--get "https://printops.com/api/images?limit=2&page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/images"
);
const params = {
"limit": "2",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/images';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'limit' => '2',
'page' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/images'
params = {
'limit': '2',
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
access-control-allow-origin: *
{
"data": {
"images": [
{
"id": 1,
"original_name": "8x10_yellow_poster.jpg",
"pixel_width": 1200,
"pixel_height": 1200,
"native_width": "16.67",
"native_height": "16.67",
"aspect_ratio": "1",
"resolution": "72.00",
"extension": "jpg",
"image_token": "Js2b5WxLA5bsIy1JuXI5inA8xStJ3TsF",
"created_at": "2024-11-16T01:11:00.000000Z",
"updated_at": "2024-11-16T01:11:00.000000Z"
},
{
"id": 2,
"original_name": "8x10_yellow_poster.jpg",
"pixel_width": 1200,
"pixel_height": 1200,
"native_width": "16.67",
"native_height": "16.67",
"aspect_ratio": "1",
"resolution": "72.00",
"extension": "jpg",
"image_token": "KoXvcHx6GVTzneEaSUXRHgv8WRV4JG7p",
"created_at": "2024-11-16T01:11:23.000000Z",
"updated_at": "2024-11-16T01:11:23.000000Z"
}
]
},
"links": {
"first": "https://printops.test/api/images?page=1",
"last": "https://printops.test/api/images?page=15",
"prev": null,
"next": "https://printops.test/api/images?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 15,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://printops.test/api/images?page=1",
"label": "1",
"active": true
},
{
"url": "https://printops.test/api/images?page=2",
"label": "2",
"active": false
},
{
"url": "https://printops.test/api/images?page=3",
"label": "3",
"active": false
},
{
"url": "https://printops.test/api/images?page=4",
"label": "4",
"active": false
},
{
"url": "https://printops.test/api/images?page=5",
"label": "5",
"active": false
},
{
"url": "https://printops.test/api/images?page=6",
"label": "6",
"active": false
},
{
"url": "https://printops.test/api/images?page=7",
"label": "7",
"active": false
},
{
"url": "https://printops.test/api/images?page=8",
"label": "8",
"active": false
},
{
"url": "https://printops.test/api/images?page=9",
"label": "9",
"active": false
},
{
"url": "https://printops.test/api/images?page=10",
"label": "10",
"active": false
},
{
"url": null,
"label": "...",
"active": false
},
{
"url": "https://printops.test/api/images?page=14",
"label": "14",
"active": false
},
{
"url": "https://printops.test/api/images?page=15",
"label": "15",
"active": false
},
{
"url": "https://printops.test/api/images?page=2",
"label": "Next »",
"active": false
}
],
"path": "https://printops.test/api/images",
"per_page": 2,
"to": 2,
"total": 29
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get an Image By Id
requires authentication
Get an image that has been created through the UI.
Example request:
curl --request GET \
--get "https://printops.com/api/images/20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/images/20"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/images/20';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/images/20'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 54
access-control-allow-origin: *
{
"data": {
"image": {
"id": 20,
"original_name": "ARSH-LastDaysOf-30x40-wBorder.jpg",
"pixel_width": 9000,
"pixel_height": 12000,
"native_width": "30.00",
"native_height": "40.00",
"aspect_ratio": "0.75",
"resolution": "300.00",
"extension": "jpg",
"image_token": "cvLFmTkJiUVqISbCGX94HpMcxXENUG60L",
"created_at": "2024-11-18T17:29:40.000000Z",
"updated_at": "2024-11-18T17:29:40.000000Z"
}
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create an Image
requires authentication
Example request:
curl --request POST \
"https://printops.com/api/images" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"image_url\": \"https:\\/\\/printops.com\\/images\\/picture.jpg\",
\"filename\": \"myfile.jpg\"
}"
const url = new URL(
"https://printops.com/api/images"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"image_url": "https:\/\/printops.com\/images\/picture.jpg",
"filename": "myfile.jpg"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/images';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'image_url' => 'https://printops.com/images/picture.jpg',
'filename' => 'myfile.jpg',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/images'
payload = {
"image_url": "https:\/\/printops.com\/images\/picture.jpg",
"filename": "myfile.jpg"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"image_url": "https://printops.com/images/picture.jpg",
"filename": "picture.jpg",
"image_token": "LA5qNgx7HxxjYRRduJJeVXzA",
"downloaded_at": "2024-11-18 13:03:03",
"processed_at": "2024-11-18 13:03:12",
"errors": null,
"image_id": null,
"created_at": "2024-02-29T20:19:42.000000Z",
"updated_at": "2024-02-29T20:19:42.000000Z"
},
"status": "created",
"code": 201,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get User Products
requires authentication
The user product resource is the customized product that PrintOps fulfills. It includes details such as the underlying base product and associated art file. User products belong to a single store.
Example request:
curl --request GET \
--get "https://printops.com/api/stores/786322/user-products?page=1&product_category_id=1&limit=2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/stores/786322/user-products"
);
const params = {
"page": "1",
"product_category_id": "1",
"limit": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786322/user-products';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page' => '1',
'product_category_id' => '1',
'limit' => '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786322/user-products'
params = {
'page': '1',
'product_category_id': '1',
'limit': '2',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 53
access-control-allow-origin: *
{
"data": {
"user_products": [
{
"id": 47230,
"store_id": 786322,
"base_product_id": 12,
"type": null,
"external_product_id": null,
"user_sku": "test",
"name": "test",
"scale_option": "fill",
"description": "test",
"base_product": {
"id": 12,
"sku": "PP18",
"name": "18 x 24 Print",
"product_category": 1,
"type": "poster_sm",
"description": "18x24 Poster Print",
"properties": {
"ratio": "3:4",
"width": 18,
"height": 24,
"weight": 0.2,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "6.00",
"ships_alone": false
},
"image": {
"id": 5,
"original_name": "8x10_yellow_poster.jpg",
"pixel_width": 1200,
"pixel_height": 1200,
"native_width": "16.67",
"native_height": "16.67",
"aspect_ratio": "1",
"resolution": "72.00",
"extension": "jpg",
"image_token": "ly9jQm4ipOHkeoliY6eCrnXzOntJ2sUy",
"created_at": "2024-11-16T01:13:54.000000Z",
"updated_at": "2024-11-16T01:18:59.000000Z"
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/scrjT4pmPO6wVUZFJ4DFm4sXn8NmPIZ1PFdxzWF2.jpg"
},
{
"id": 47257,
"store_id": 786322,
"base_product_id": 12,
"type": null,
"external_product_id": null,
"user_sku": "SCHE-FallTrail-18x24-NoFrame",
"name": "SCHE-FallTrail-18x24-NoFrame",
"scale_option": "fit",
"description": "SCHE-FallTrail-18x24-NoFrame",
"base_product": {
"id": 12,
"sku": "PP18",
"name": "18 x 24 Print",
"product_category": 1,
"type": "poster_sm",
"description": "18x24 Poster Print",
"properties": {
"ratio": "3:4",
"width": 18,
"height": 24,
"weight": 0.2,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "6.00",
"ships_alone": false
},
"image": {
"id": 32,
"original_name": "SCHE-FallTrail-30x40.jpg",
"pixel_width": 9000,
"pixel_height": 12000,
"native_width": "30.00",
"native_height": "40.00",
"aspect_ratio": "0.75",
"resolution": "300.00",
"extension": "jpg",
"image_token": "jiexQbcViSiMnEi9js2ttBkSJot6iIMsU",
"created_at": "2024-11-19T00:28:29.000000Z",
"updated_at": "2024-11-19T00:28:29.000000Z"
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/SCHE-FallTrail-18x24-NoFrame.jiexQbcViSiMnEi9js2ttBkSJot6iIMsU.jpg"
}
]
},
"links": {
"first": "https://printops.test/api/stores/786322/user-products?page=1",
"last": "https://printops.test/api/stores/786322/user-products?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://printops.test/api/stores/786322/user-products?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://printops.test/api/stores/786322/user-products",
"per_page": 2,
"to": 2,
"total": 2
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a User Product by Id
requires authentication
Get a specific User Product that was created in the UI.
Example request:
curl --request GET \
--get "https://printops.com/api/stores/786322/user-products/47257" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/stores/786322/user-products/47257"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786322/user-products/47257';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786322/user-products/47257'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 52
access-control-allow-origin: *
{
"data": {
"userProduct": {
"id": 47257,
"store_id": 786322,
"base_product_id": 12,
"type": null,
"external_product_id": null,
"user_sku": "SCHE-FallTrail-18x24-NoFrame",
"name": "SCHE-FallTrail-18x24-NoFrame",
"scale_option": "fit",
"description": "SCHE-FallTrail-18x24-NoFrame",
"base_product": {
"id": 12,
"sku": "PP18",
"name": "18 x 24 Print",
"product_category": 1,
"type": "poster_sm",
"description": "18x24 Poster Print",
"properties": {
"ratio": "3:4",
"width": 18,
"height": 24,
"weight": 0.2,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "6.00",
"ships_alone": false
},
"image": {
"id": 32,
"original_name": "SCHE-FallTrail-30x40.jpg",
"pixel_width": 9000,
"pixel_height": 12000,
"native_width": "30.00",
"native_height": "40.00",
"aspect_ratio": "0.75",
"resolution": "300.00",
"extension": "jpg",
"image_token": "jiexQbcViSiMnEi9js2ttBkSJot6iIMsU",
"created_at": "2024-11-19T00:28:29.000000Z",
"updated_at": "2024-11-19T00:28:29.000000Z"
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/SCHE-FallTrail-18x24-NoFrame.jiexQbcViSiMnEi9js2ttBkSJot6iIMsU.jpg"
}
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a UserProduct
requires authentication
UserProducts are the products that will be ordered from your PrintOps store. They reference the base product and image to be used.
Example request:
curl --request POST \
"https://printops.com/api/stores/786321/user-products" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"base_product_id\": 50,
\"name\": \"Landscape Gas Station 12x16 Framed Black\",
\"user_sku\": \"LS_Gas_station_12x16_FB\",
\"scale_option\": \"fit\",
\"image_id\": 3456,
\"image\": {
\"image_url\": \"https:\\/\\/www.printops.com\\/images\\/LS_Gas_station_18x24.jpg\",
\"filename\": \"nmbvf\"
},
\"description\": \"Landscape Gas Station Photo in 18x24 size.\"
}"
const url = new URL(
"https://printops.com/api/stores/786321/user-products"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"base_product_id": 50,
"name": "Landscape Gas Station 12x16 Framed Black",
"user_sku": "LS_Gas_station_12x16_FB",
"scale_option": "fit",
"image_id": 3456,
"image": {
"image_url": "https:\/\/www.printops.com\/images\/LS_Gas_station_18x24.jpg",
"filename": "nmbvf"
},
"description": "Landscape Gas Station Photo in 18x24 size."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786321/user-products';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'base_product_id' => 50,
'name' => 'Landscape Gas Station 12x16 Framed Black',
'user_sku' => 'LS_Gas_station_12x16_FB',
'scale_option' => 'fit',
'image_id' => 3456,
'image' => [
'image_url' => 'https://www.printops.com/images/LS_Gas_station_18x24.jpg',
'filename' => 'nmbvf',
],
'description' => 'Landscape Gas Station Photo in 18x24 size.',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786321/user-products'
payload = {
"base_product_id": 50,
"name": "Landscape Gas Station 12x16 Framed Black",
"user_sku": "LS_Gas_station_12x16_FB",
"scale_option": "fit",
"image_id": 3456,
"image": {
"image_url": "https:\/\/www.printops.com\/images\/LS_Gas_station_18x24.jpg",
"filename": "nmbvf"
},
"description": "Landscape Gas Station Photo in 18x24 size."
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"userProduct": {
"id": 17263,
"store_id": 186322,
"base_product_id": 50,
"type": null,
"external_product_id": null,
"user_sku": "LS_Gas_station_12x16_FB",
"name": "Landscape Gas Station 12x16 Framed Black",
"scale_option": "fit",
"description": "Landscape Gas Station Photo in 12x16 Black Frame",
"base_product": {
"id": 50,
"sku": "FB12",
"name": "12 x 16 Black Framed Print",
"product_category": 5,
"type": "poster_sm",
"description": "12x16 Black Framed Poster Print",
"properties": {
"ratio": "3:4",
"width": 12,
"height": 16,
"weight": 2.5,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "29.00",
"ships_alone": false
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/SCHE-FallTrail-12x16-BlkFrame-2.jpg"
}
},
"status": [
"OK",
"created"
],
"code": [
201
],
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create an Order
requires authentication
An order is the resource that contains information about what items will be sent to the end customer, how we will send it and where it's going.
When submitting an order, you have the option to reference an already created (by you) User Product, or instead, reference a Base Product and send a publicly accessible url of a print file.
The external_order_id field should be used for an outside order id.
The requested_shipping field requires a string that matches the code field of an entry in the Shipping Methods resource.
Each item in the Line Items array should have a sku entry that references either an already created User Product sku, or a Base Product sku. When referencing a Base Product sku, you will need to provide a publicly accessible url for a file to download, as well as the filename.
You can override the Scaling Option of the Base Product by including the scale_option field in the line_item node. The value must be one of the following: noscale, fill, fit or stretch. Read more about scaling options here
Example request:
curl --request POST \
"https://printops.com/api/stores/786321/orders" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"external_order_id\": \"12003210-ABD30\",
\"requested_shipping\": \"usps_ground_advantage\",
\"shipping_address\": {
\"company\": \"Initech\",
\"first_name\": \"Bill\",
\"last_name\": \"Lumbergh\",
\"address_1\": \"4120 Freidrich Lane\",
\"address_2\": \"Ste 100\",
\"city\": \"Austin\",
\"state\": \"TX\",
\"postal_code\": \"78744\",
\"country\": \"US\",
\"phone\": \"512-251-5221\"
},
\"line_items\": [
{
\"sku\": \"tps_report_1\",
\"quantity\": 1,
\"image_url\": \"https:\\/\\/mywebsite.com\\/images\\/tps_report_1.jpg\",
\"image_name\": \"tps_report_1.jpg\",
\"scale_option\": \"fit\"
}
]
}"
const url = new URL(
"https://printops.com/api/stores/786321/orders"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"external_order_id": "12003210-ABD30",
"requested_shipping": "usps_ground_advantage",
"shipping_address": {
"company": "Initech",
"first_name": "Bill",
"last_name": "Lumbergh",
"address_1": "4120 Freidrich Lane",
"address_2": "Ste 100",
"city": "Austin",
"state": "TX",
"postal_code": "78744",
"country": "US",
"phone": "512-251-5221"
},
"line_items": [
{
"sku": "tps_report_1",
"quantity": 1,
"image_url": "https:\/\/mywebsite.com\/images\/tps_report_1.jpg",
"image_name": "tps_report_1.jpg",
"scale_option": "fit"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786321/orders';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'external_order_id' => '12003210-ABD30',
'requested_shipping' => 'usps_ground_advantage',
'shipping_address' => [
'company' => 'Initech',
'first_name' => 'Bill',
'last_name' => 'Lumbergh',
'address_1' => '4120 Freidrich Lane',
'address_2' => 'Ste 100',
'city' => 'Austin',
'state' => 'TX',
'postal_code' => '78744',
'country' => 'US',
'phone' => '512-251-5221',
],
'line_items' => [
[
'sku' => 'tps_report_1',
'quantity' => 1,
'image_url' => 'https://mywebsite.com/images/tps_report_1.jpg',
'image_name' => 'tps_report_1.jpg',
'scale_option' => 'fit',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786321/orders'
payload = {
"external_order_id": "12003210-ABD30",
"requested_shipping": "usps_ground_advantage",
"shipping_address": {
"company": "Initech",
"first_name": "Bill",
"last_name": "Lumbergh",
"address_1": "4120 Freidrich Lane",
"address_2": "Ste 100",
"city": "Austin",
"state": "TX",
"postal_code": "78744",
"country": "US",
"phone": "512-251-5221"
},
"line_items": [
{
"sku": "tps_report_1",
"quantity": 1,
"image_url": "https:\/\/mywebsite.com\/images\/tps_report_1.jpg",
"image_name": "tps_report_1.jpg",
"scale_option": "fit"
}
]
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"orders": [
{
"id": 320117,
"store_id": 786321,
"type": "standard",
"state": "received",
"is_live": null,
"requested_shipping": "usps_ground_advantage",
"estimated_ship_date": "2024-02-01",
"external_order_id": "12003210-ABD30",
"packing_slip_url": null,
"shipping_label_url": null,
"canceled_at": null,
"closed_at": null,
"cancel_reason": null,
"remote_ip": null,
"total_item_count": null,
"gift_message": null,
"line_items": [
{
"id": 16,
"quantity": 1,
"unit_price": 450,
"total_price": 450,
"scale_option": "fit",
"user_product": {
"id": 47242,
"store_id": 786321,
"base_product_id": 9,
"type": null,
"external_product_id": null,
"user_sku": "tps_report_1",
"name": "TPS Report 1",
"scale_option": "fill",
"description": "A TPS report in it's final format.",
"base_product": {
"id": 9,
"sku": "PP16",
"name": "16 x 20 Print",
"product_category": 1,
"type": "poster_sm",
"description": "16x20 Poster Print",
"properties": {
"ratio": "4:5",
"width": 16,
"height": 20,
"weight": 0.148,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.8
}
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/iJL4OAm5btnTf66WLtCZb3eSNNQA5JeUWJwBkT1d.jpg"
}
}
],
"shipping_address": {
"order_id": null,
"company": "Initech",
"first_name": "Bill",
"last_name": "Lumbergh",
"address_1": "4120 Freidrich Lane",
"address_2": "Ste 100",
"city": "Austin",
"state": "TX",
"postal_code": "78744",
"country": "US",
"phone": "512-251-5221"
},
"fulfillments": [
{
"id": 621515,
"carton_id": 3,
"total_quantity": 1,
"line_items": [
{
"id": 16,
"quantity": 1,
"unit_price": 450,
"total_price": 450,
"user_product": {
"id": 47242,
"store_id": 786321,
"base_product_id": 9,
"type": null,
"external_product_id": null,
"user_sku": "tps_report_1",
"name": "TPS Report 1",
"scale_option": "fill",
"description": "A TPS report in it's final format.",
"base_product": {
"id": 9,
"sku": "PP16",
"name": "16 x 20 Print",
"product_category": 1,
"type": "poster_sm",
"description": "16x20 Poster Print",
"properties": {
"ratio": "4:5",
"width": 16,
"height": 20,
"weight": 0.148,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.8
}
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/iJL4OAm5btnTf66WLtCZb3eSNNQA5JeUWJwBkT1d.jpg"
}
}
]
}
],
"shipments": [],
"order_totals": {
"id": 33,
"line_items_total": 450,
"fulfillment_total": 300,
"handling": null,
"shipping_total": 0,
"subtotal": null,
"tax_total": 0,
"grand_total": 750
},
"order_notes": [],
"order_events": []
}
]
},
"status": "created",
"code": 201,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Orders
requires authentication
Get a list of orders from a store.
Example request:
curl --request GET \
--get "https://printops.com/api/stores/786322/orders?page=1&limit=2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/stores/786322/orders"
);
const params = {
"page": "1",
"limit": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786322/orders';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page' => '1',
'limit' => '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786322/orders'
params = {
'page': '1',
'limit': '2',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 51
access-control-allow-origin: *
{
"data": {
"orders": [
{
"id": 320100,
"store_id": 786322,
"type": "standard",
"state": "received",
"is_live": null,
"requested_shipping": "usps_ground_advantage",
"estimated_ship_date": "2024-11-22",
"external_order_id": "MAN24004_GBI",
"packing_slip_url": null,
"shipping_label_url": null,
"canceled_at": null,
"closed_at": null,
"cancel_reason": null,
"remote_ip": null,
"total_item_count": null,
"gift_message": null,
"line_items": [
{
"id": 1,
"quantity": 1,
"unit_price": 600,
"total_price": 600,
"scale_option": null,
"user_product": {
"id": 47257,
"store_id": 786322,
"base_product_id": 12,
"type": null,
"external_product_id": null,
"user_sku": "SCHE-FallTrail-18x24-NoFrame",
"name": "SCHE-FallTrail-18x24-NoFrame",
"scale_option": "fit",
"description": "SCHE-FallTrail-18x24-NoFrame",
"base_product": {
"id": 12,
"sku": "PP18",
"name": "18 x 24 Print",
"product_category": 1,
"type": "poster_sm",
"description": "18x24 Poster Print",
"properties": {
"ratio": "3:4",
"width": 18,
"height": 24,
"weight": 0.2,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "6.00",
"ships_alone": false
},
"image": {
"id": 32,
"original_name": "SCHE-FallTrail-30x40.jpg",
"pixel_width": 9000,
"pixel_height": 12000,
"native_width": "30.00",
"native_height": "40.00",
"aspect_ratio": "0.75",
"resolution": "300.00",
"extension": "jpg",
"image_token": "jiexQbcViSiMnEi9js2ttBkSJot6iIMsU",
"created_at": "2024-11-19T00:28:29.000000Z",
"updated_at": "2024-11-19T00:28:29.000000Z"
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/SCHE-FallTrail-18x24-NoFrame.jiexQbcViSiMnEi9js2ttBkSJot6iIMsU.jpg"
}
}
],
"shipping_address": {
"order_id": null,
"company": "PrintOps, LLC.",
"first_name": "John",
"last_name": "Von Colln",
"address_1": "111 Oak Valley Drive",
"address_2": null,
"city": "Nashville",
"state": "Tennessee",
"postal_code": "37207",
"country": "US",
"phone": "6153208900"
},
"fulfillments": [
{
"id": 621500,
"carton_id": 3,
"total_quantity": 1,
"line_items": [
{
"id": 1,
"quantity": 1,
"unit_price": 600,
"total_price": 600,
"user_product": {
"id": 47257,
"store_id": 786322,
"base_product_id": 12,
"type": null,
"external_product_id": null,
"user_sku": "SCHE-FallTrail-18x24-NoFrame",
"name": "SCHE-FallTrail-18x24-NoFrame",
"scale_option": "fit",
"description": "SCHE-FallTrail-18x24-NoFrame",
"base_product": {
"id": 12,
"sku": "PP18",
"name": "18 x 24 Print",
"product_category": 1,
"type": "poster_sm",
"description": "18x24 Poster Print",
"properties": {
"ratio": "3:4",
"width": 18,
"height": 24,
"weight": 0.2,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "6.00",
"ships_alone": false
},
"image": {
"id": 32,
"original_name": "SCHE-FallTrail-30x40.jpg",
"pixel_width": 9000,
"pixel_height": 12000,
"native_width": "30.00",
"native_height": "40.00",
"aspect_ratio": "0.75",
"resolution": "300.00",
"extension": "jpg",
"image_token": "jiexQbcViSiMnEi9js2ttBkSJot6iIMsU",
"created_at": "2024-11-19T00:28:29.000000Z",
"updated_at": "2024-11-19T00:28:29.000000Z"
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/SCHE-FallTrail-18x24-NoFrame.jiexQbcViSiMnEi9js2ttBkSJot6iIMsU.jpg"
}
}
]
}
],
"shipments": {
"shipments": []
},
"order_total": {
"id": 2,
"line_items_total": 600,
"fulfillment_total": 300,
"handling": null,
"shipping_total": 529,
"subtotal": null,
"tax_total": 132,
"grand_total": 1561
},
"order_notes": [],
"order_events": []
},
{
"id": 320101,
"store_id": 786322,
"type": "standard",
"state": "shipped",
"is_live": null,
"requested_shipping": "usps_ground_advantage",
"estimated_ship_date": "2024-11-22",
"external_order_id": "MAN96755_VFG",
"packing_slip_url": null,
"shipping_label_url": null,
"canceled_at": null,
"closed_at": null,
"cancel_reason": null,
"remote_ip": null,
"total_item_count": null,
"gift_message": null,
"line_items": [
{
"id": 2,
"quantity": 1,
"unit_price": 2900,
"total_price": 2900,
"scale_option": null,
"user_product": {
"id": 47263,
"store_id": 786322,
"base_product_id": 50,
"type": null,
"external_product_id": null,
"user_sku": "SCHE-FallTrail-12x16-BlkFrame-2",
"name": "SCHE-FallTrail-12x16-BlkFrame",
"scale_option": "fit",
"description": "SCHE-FallTrail-12x16-BlkFrame",
"base_product": {
"id": 50,
"sku": "FB12",
"name": "12 x 16 Black Framed Print",
"product_category": 5,
"type": "poster_sm",
"description": "12x16 Black Framed Poster Print",
"properties": {
"ratio": "3:4",
"width": 12,
"height": 16,
"weight": 2.5,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "29.00",
"ships_alone": false
},
"image": {
"id": 32,
"original_name": "SCHE-FallTrail-30x40.jpg",
"pixel_width": 9000,
"pixel_height": 12000,
"native_width": "30.00",
"native_height": "40.00",
"aspect_ratio": "0.75",
"resolution": "300.00",
"extension": "jpg",
"image_token": "jiexQbcViSiMnEi9js2ttBkSJot6iIMsU",
"created_at": "2024-11-19T00:28:29.000000Z",
"updated_at": "2024-11-19T00:28:29.000000Z"
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/SCHE-FallTrail-12x16-BlkFrame-2..jpg"
}
}
],
"shipping_address": {
"order_id": null,
"company": "PrintOps, LLC.",
"first_name": "John",
"last_name": "Von Colln",
"address_1": "111 Oak Valley Drive",
"address_2": null,
"city": "Nashville",
"state": "Tennessee",
"postal_code": "37207",
"country": "US",
"phone": "6153208900"
},
"fulfillments": [
{
"id": 621501,
"carton_id": 12,
"total_quantity": 1,
"line_items": [
{
"id": 2,
"quantity": 1,
"unit_price": 2900,
"total_price": 2900,
"user_product": {
"id": 47263,
"store_id": 786322,
"base_product_id": 50,
"type": null,
"external_product_id": null,
"user_sku": "SCHE-FallTrail-12x16-BlkFrame-2",
"name": "SCHE-FallTrail-12x16-BlkFrame",
"scale_option": "fit",
"description": "SCHE-FallTrail-12x16-BlkFrame",
"base_product": {
"id": 50,
"sku": "FB12",
"name": "12 x 16 Black Framed Print",
"product_category": 5,
"type": "poster_sm",
"description": "12x16 Black Framed Poster Print",
"properties": {
"ratio": "3:4",
"width": 12,
"height": 16,
"weight": 2.5,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "29.00",
"ships_alone": false
},
"image": {
"id": 32,
"original_name": "SCHE-FallTrail-30x40.jpg",
"pixel_width": 9000,
"pixel_height": 12000,
"native_width": "30.00",
"native_height": "40.00",
"aspect_ratio": "0.75",
"resolution": "300.00",
"extension": "jpg",
"image_token": "jiexQbcViSiMnEi9js2ttBkSJot6iIMsU",
"created_at": "2024-11-19T00:28:29.000000Z",
"updated_at": "2024-11-19T00:28:29.000000Z"
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/SCHE-FallTrail-12x16-BlkFrame-2..jpg"
}
}
]
}
],
"shipments": {
"shipments": [
{
"id": 1,
"order_id": 320101,
"fulfillment_id": 621501,
"shipping_carrier": "UPS",
"shipping_carrier_identifier": "ups",
"shipping_method": "UPS Standard℠",
"shipping_method_identifier": "ups_standard",
"price": 0,
"tracking_number": "1Z94a6a2035123123",
"weight": "12.00",
"voided_on": null,
"created_at": "2024-11-19T18:54:50.000000Z"
}
]
},
"order_total": {
"id": 5,
"line_items_total": 2900,
"fulfillment_total": 300,
"handling": null,
"shipping_total": 756,
"subtotal": null,
"tax_total": 366,
"grand_total": 4322
},
"order_notes": [],
"order_events": []
}
]
},
"links": {
"first": "https://printops.test/api/stores/786322/orders?page=1",
"last": "https://printops.test/api/stores/786322/orders?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://printops.test/api/stores/786322/orders?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://printops.test/api/stores/786322/orders",
"per_page": 2,
"to": 2,
"total": 2
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get an Order by Id
requires authentication
Get a single order by order id.
Example request:
curl --request GET \
--get "https://printops.com/api/stores/786322/orders/320100" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/stores/786322/orders/320100"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786322/orders/320100';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786322/orders/320100'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 50
access-control-allow-origin: *
{
"data": {
"order": {
"id": 320100,
"store_id": 786322,
"type": "standard",
"state": "received",
"is_live": null,
"requested_shipping": "usps_ground_advantage",
"estimated_ship_date": "2024-11-22",
"external_order_id": "MAN24004_GBI",
"packing_slip_url": null,
"shipping_label_url": null,
"canceled_at": null,
"closed_at": null,
"cancel_reason": null,
"remote_ip": null,
"total_item_count": null,
"gift_message": null,
"line_items": [
{
"id": 1,
"quantity": 1,
"unit_price": 600,
"total_price": 600,
"scale_option": null,
"user_product": {
"id": 47257,
"store_id": 786322,
"base_product_id": 12,
"type": null,
"external_product_id": null,
"user_sku": "SCHE-FallTrail-18x24-NoFrame",
"name": "SCHE-FallTrail-18x24-NoFrame",
"scale_option": "fit",
"description": "SCHE-FallTrail-18x24-NoFrame",
"base_product": {
"id": 12,
"sku": "PP18",
"name": "18 x 24 Print",
"product_category": 1,
"type": "poster_sm",
"description": "18x24 Poster Print",
"properties": {
"ratio": "3:4",
"width": 18,
"height": 24,
"weight": 0.2,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "6.00",
"ships_alone": false
},
"image": {
"id": 32,
"original_name": "SCHE-FallTrail-30x40.jpg",
"pixel_width": 9000,
"pixel_height": 12000,
"native_width": "30.00",
"native_height": "40.00",
"aspect_ratio": "0.75",
"resolution": "300.00",
"extension": "jpg",
"image_token": "jiexQbcViSiMnEi9js2ttBkSJot6iIMsU",
"created_at": "2024-11-19T00:28:29.000000Z",
"updated_at": "2024-11-19T00:28:29.000000Z"
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/SCHE-FallTrail-18x24-NoFrame.jiexQbcViSiMnEi9js2ttBkSJot6iIMsU.jpg"
}
}
],
"shipping_address": {
"order_id": null,
"company": "PrintOps, LLC.",
"first_name": "John",
"last_name": "Von Colln",
"address_1": "111 Oak Valley Drive",
"address_2": null,
"city": "Nashville",
"state": "Tennessee",
"postal_code": "37207",
"country": "US",
"phone": "6153208900"
},
"fulfillments": [
{
"id": 621500,
"carton_id": 3,
"total_quantity": 1,
"line_items": [
{
"id": 1,
"quantity": 1,
"unit_price": 600,
"total_price": 600,
"user_product": {
"id": 47257,
"store_id": 786322,
"base_product_id": 12,
"type": null,
"external_product_id": null,
"user_sku": "SCHE-FallTrail-18x24-NoFrame",
"name": "SCHE-FallTrail-18x24-NoFrame",
"scale_option": "fit",
"description": "SCHE-FallTrail-18x24-NoFrame",
"base_product": {
"id": 12,
"sku": "PP18",
"name": "18 x 24 Print",
"product_category": 1,
"type": "poster_sm",
"description": "18x24 Poster Print",
"properties": {
"ratio": "3:4",
"width": 18,
"height": 24,
"weight": 0.2,
"paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
"thickness": 0.009,
"ratio_decimal": 0.75
},
"price": "6.00",
"ships_alone": false
},
"image": {
"id": 32,
"original_name": "SCHE-FallTrail-30x40.jpg",
"pixel_width": 9000,
"pixel_height": 12000,
"native_width": "30.00",
"native_height": "40.00",
"aspect_ratio": "0.75",
"resolution": "300.00",
"extension": "jpg",
"image_token": "jiexQbcViSiMnEi9js2ttBkSJot6iIMsU",
"created_at": "2024-11-19T00:28:29.000000Z",
"updated_at": "2024-11-19T00:28:29.000000Z"
},
"thumbnail": "https://printops.s3.amazonaws.com/1245/thumbnails/SCHE-FallTrail-18x24-NoFrame.jiexQbcViSiMnEi9js2ttBkSJot6iIMsU.jpg"
}
}
]
}
],
"shipments": {
"shipments": []
},
"order_total": {
"id": 2,
"line_items_total": 600,
"fulfillment_total": 300,
"handling": null,
"shipping_total": 529,
"subtotal": null,
"tax_total": 132,
"grand_total": 1561
},
"order_notes": [],
"order_events": []
}
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Request to cancel an Order
requires authentication
This is a request to cancel an order. Depending on the state of the order, it may or may not be able to be canceled.
Example request:
curl --request POST \
"https://printops.com/api/stores/786321/orders/320100/cancel" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/stores/786321/orders/320100/cancel"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786321/orders/320100/cancel';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786321/orders/320100/cancel'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
Example response (201):
{
"data": {
"message": "Cancellation request received."
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Shipments
requires authentication
Get a list of shipments from a particular store.
Example request:
curl --request GET \
--get "https://printops.com/api/stores/786322/shipments?page=1&limit=2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/stores/786322/shipments"
);
const params = {
"page": "1",
"limit": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786322/shipments';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page' => '1',
'limit' => '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786322/shipments'
params = {
'page': '1',
'limit': '2',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 49
access-control-allow-origin: *
{
"data": {
"shipments": [
{
"id": 1,
"order_id": 320101,
"fulfillment_id": 621501,
"shipping_carrier": "UPS",
"shipping_carrier_identifier": "ups",
"shipping_method": "UPS Standard℠",
"shipping_method_identifier": "ups_standard",
"price": 0,
"tracking_number": "1Z94a6a2035123123",
"weight": "12.00",
"voided_on": null,
"created_at": "2024-11-19T18:54:50.000000Z"
}
]
},
"links": {
"first": "https://printops.test/api/stores/786322/shipments?page=1",
"last": "https://printops.test/api/stores/786322/shipments?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://printops.test/api/stores/786322/shipments?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://printops.test/api/stores/786322/shipments",
"per_page": 2,
"to": 1,
"total": 1
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a Shipment by Id
requires authentication
Retrieve a particular shipment by id.
Example request:
curl --request GET \
--get "https://printops.com/api/stores/786322/shipments/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/stores/786322/shipments/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/stores/786322/shipments/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/stores/786322/shipments/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 48
access-control-allow-origin: *
{
"data": {
"shipment": {
"id": 1,
"order_id": 320101,
"fulfillment_id": 621501,
"shipping_carrier": "UPS",
"shipping_carrier_identifier": "ups",
"shipping_method": "UPS Standard℠",
"shipping_method_identifier": "ups_standard",
"price": 0,
"tracking_number": "1Z94a6a2035123123",
"weight": "12.00",
"voided_on": null,
"created_at": "2024-11-19T18:54:50.000000Z"
}
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Webhooks
requires authentication
Webhooks allow you to subscribe to certain events during the order process.
Example request:
curl --request GET \
--get "https://printops.com/api/webhooks" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/webhooks"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/webhooks';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/webhooks'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 47
access-control-allow-origin: *
{
"data": {
"webhooks": [
{
"id": 1,
"is_active": 1,
"type": "order_state_update",
"created_at": "2024-11-19T18:56:49.000000Z",
"updated_at": "2024-11-19T18:56:49.000000Z"
},
{
"id": 2,
"is_active": 1,
"type": "order_shipment",
"created_at": "2024-11-19T18:56:50.000000Z",
"updated_at": "2024-11-19T18:56:50.000000Z"
}
]
},
"links": {
"first": "https://printops.test/api/webhooks?page=1",
"last": "https://printops.test/api/webhooks?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://printops.test/api/webhooks?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://printops.test/api/webhooks",
"per_page": 15,
"to": 2,
"total": 2
},
"status": "OK",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a Webhook by Id
requires authentication
Retrieve a webhook by id.
Example request:
curl --request GET \
--get "https://printops.com/api/webhooks/14?page=1&limit=2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/webhooks/14"
);
const params = {
"page": "1",
"limit": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/webhooks/14';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page' => '1',
'limit' => '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/webhooks/14'
params = {
'page': '1',
'limit': '2',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 46
access-control-allow-origin: *
{
"data": {
"message": "The webhook record was not found."
},
"status": "Not Found",
"code": 404,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a Webhook
requires authentication
Example request:
curl --request POST \
"https://printops.com/api/webhooks" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"order_shipment\",
\"is_active\": \"true\"
}"
const url = new URL(
"https://printops.com/api/webhooks"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "order_shipment",
"is_active": "true"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/webhooks';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'type' => 'order_shipment',
'is_active' => 'true',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/webhooks'
payload = {
"type": "order_shipment",
"is_active": "true"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"data": {
"id": 9,
"is_active": true,
"type": "order_shipment",
"created_at": "2024-02-29T20:19:42.000000Z",
"updated_at": "2024-02-29T20:19:42.000000Z"
},
"status": "created",
"code": 201,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a Webhook
requires authentication
Example request:
curl --request DELETE \
"https://printops.com/api/webhooks/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://printops.com/api/webhooks/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://printops.com/api/webhooks/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://printops.com/api/webhooks/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"message": "Webhook deleted"
},
"status": "Success",
"code": 200,
"messages": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.