MENU navbar-image

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.test/api/base-products" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/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.test/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.test/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": []
}
 

Request   

GET api/base-products

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

page   integer  optional  

The page number for pagination. Example: 1

product_category_id   integer  optional  

Filter products by product category. Example: 1

limit   integer  optional  

The number of records to return per page. Exmaple: 2 Example: 9

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.test/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.test/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.test/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.test/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": []
}
 

Request   

GET api/base-products/{baseProduct}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

baseProduct   string   

The id of the base product. Example: 1

Authentication Test

requires authentication

A simple endpoint to confirm authentication was successful.

Example request:
curl --request GET \
    --get "https://printops.test/api/authentication-test" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/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.test/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.test/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": []
}
 

Request   

GET api/authentication-test

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Shipping Methods

requires authentication

Returns a list of all available shipping methods.

Example request:
curl --request GET \
    --get "https://printops.test/api/shipping-methods" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/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.test/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.test/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": []
}
 

Request   

GET api/shipping-methods

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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.test/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.test/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.test/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.test/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": 786323,
                "name": "The Cat Store",
                "type": "generic",
                "is_live": true,
                "dropbox_name": null
            },
            {
                "id": 786326,
                "name": "My Great Store",
                "type": "generic",
                "is_live": true,
                "dropbox_name": null
            }
        ]
    },
    "links": {
        "first": "https://printops.test/api/stores?page=1",
        "last": "https://printops.test/api/stores?page=2",
        "prev": null,
        "next": "https://printops.test/api/stores?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://printops.test/api/stores?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores?page=2",
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https://printops.test/api/stores",
        "per_page": 2,
        "to": 2,
        "total": 3
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/stores

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

limit   integer  optional  

The number of records to return per page. Example: 2

page   integer  optional  

The page number for pagination. Example: 1

Get a Store by Id

requires authentication

Example request:
curl --request GET \
    --get "https://printops.test/api/stores/786323" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/api/stores/786323"
);

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.test/api/stores/786323';
$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.test/api/stores/786323'
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": 786323,
            "name": "The Cat Store",
            "type": "generic",
            "is_live": true,
            "dropbox_name": null
        }
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/stores/{store}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

store   integer  optional  

The id of the store. Example: 786323

Create a store

requires authentication

Example request:
curl --request POST \
    "https://printops.test/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.test/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.test/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.test/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": []
}
 

Request   

POST api/stores

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Name of the store. Example: My Great Store

type   string   

Type of store. Example: generic

shipping_address   object  optional  
state   string   

Shipping address state. Example: TX

Get Images

requires authentication

Get images that have been created through the UI.

Example request:
curl --request GET \
    --get "https://printops.test/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.test/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.test/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.test/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": 19,
                "thumbnail_path": "1707423668-65c537b417578-thumbnail.jpg",
                "original_name": "100.jpg",
                "pixel_width": 675,
                "pixel_height": 926,
                "native_width": "9.38",
                "native_height": "12.86",
                "aspect_ratio": "0.7293934681182",
                "resolution": "72.00",
                "is_active": 0,
                "extension": "jpg",
                "image_token": "r73vmX9YFbBpTsyZpJENKrrDThdDdEEd",
                "created_at": "2024-02-08T20:21:08.000000Z",
                "updated_at": "2024-02-08T20:21:08.000000Z"
            },
            {
                "id": 20,
                "thumbnail_path": "1707425211-65c53dbb76d9e-thumbnail.jpg",
                "original_name": "cat.jpg",
                "pixel_width": 1024,
                "pixel_height": 1024,
                "native_width": "14.22",
                "native_height": "14.22",
                "aspect_ratio": "1",
                "resolution": "72.00",
                "is_active": 1,
                "extension": "jpg",
                "image_token": "4jhdcUY64NOqC11fSsiYzq63dMkC22uU",
                "created_at": "2024-02-08T20:46:51.000000Z",
                "updated_at": "2024-02-08T21:11:46.000000Z"
            }
        ]
    },
    "links": {
        "first": "https://printops.test/api/images?page=1",
        "last": "https://printops.test/api/images?page=13",
        "prev": null,
        "next": "https://printops.test/api/images?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 13,
        "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": "https://printops.test/api/images?page=11",
                "label": "11",
                "active": false
            },
            {
                "url": "https://printops.test/api/images?page=12",
                "label": "12",
                "active": false
            },
            {
                "url": "https://printops.test/api/images?page=13",
                "label": "13",
                "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": 25
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/images

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

limit   integer  optional  

The number of records to return per page. Example: 2

page   integer  optional  

The page number for pagination. Example: 1

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.test/api/images/20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/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.test/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.test/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,
            "thumbnail_path": "1707425211-65c53dbb76d9e-thumbnail.jpg",
            "original_name": "cat.jpg",
            "pixel_width": 1024,
            "pixel_height": 1024,
            "native_width": "14.22",
            "native_height": "14.22",
            "aspect_ratio": "1",
            "resolution": "72.00",
            "is_active": 1,
            "extension": "jpg",
            "image_token": "4jhdcUY64NOqC11fSsiYzq63dMkC22uU",
            "created_at": "2024-02-08T20:46:51.000000Z",
            "updated_at": "2024-02-08T21:11:46.000000Z"
        }
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/images/{image}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

image   integer  optional  

The id of the image. Example: 20

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.test/api/stores/786323/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.test/api/stores/786323/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.test/api/stores/786323/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.test/api/stores/786323/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": 47352,
                "store_id": 786323,
                "base_product_id": 10,
                "type": null,
                "external_product_id": null,
                "user_sku": "vision-quest",
                "name": "vision-quest",
                "scale_option": "fit",
                "description": "vision-quest",
                "base_product": {
                    "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
                },
                "thumbnail": "https://printops.s3.amazonaws.com/1246/thumbnails/78XwLCBvHAzQT5mqt0HVYwky5uWnCKvz1Jyx0hhy.jpg"
            }
        ]
    },
    "links": {
        "first": "https://printops.test/api/stores/786323/user-products?page=1",
        "last": "https://printops.test/api/stores/786323/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/786323/user-products?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https://printops.test/api/stores/786323/user-products",
        "per_page": 2,
        "to": 1,
        "total": 1
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/stores/{store}/user-products

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

store   string   

The id of the store. Example: 786323

Query Parameters

page   integer  optional  

The page number for pagination. Example: 1

product_category_id   integer  optional  

Filter products by product category. Example: 1

limit   integer  optional  

The number of records to return per page. Example: 2

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.test/api/stores/786323/user-products/47244" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/api/stores/786323/user-products/47244"
);

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.test/api/stores/786323/user-products/47244';
$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.test/api/stores/786323/user-products/47244'
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": {
        "user_product": {
            "id": 47244,
            "store_id": 786323,
            "base_product_id": 21,
            "type": null,
            "external_product_id": null,
            "user_sku": "cat_poster_18x18",
            "name": "Cat Poster 18x18",
            "scale_option": "fit",
            "description": "Cute cat poster sized to 18 x 18",
            "base_product": {
                "id": 21,
                "sku": "SP18",
                "name": "18 x 18 Square Print",
                "product_category": 2,
                "type": "poster_sm",
                "description": "18x18 Square Poster Print",
                "properties": {
                    "ratio": "1:1",
                    "width": 18,
                    "height": 18,
                    "weight": 0.15,
                    "paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
                    "thickness": 0.009,
                    "ratio_decimal": 1
                },
                "price": "4.50",
                "ships_alone": false
            },
            "thumbnail": "https://printops.s3.amazonaws.com/1246/thumbnails/1ZCBPAoVSAc9oLdyuNiwz4rzls3pFEALKGOxVGlD.jpg"
        }
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/stores/{store}/user-products/{userProduct}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

store   integer  optional  

The id of the store. Example: 786323

userProduct   integer  optional  

The id of the user product. Example: 47244

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.test/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.test/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.test/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.test/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": []
}
 

Request   

POST api/stores/{store_id}/orders

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

store_id   integer   

The id of the PrintOps store. Example: 786321

Body Parameters

external_order_id   string   

External order id - must be unique. Example: 12003210-ABD30

requested_shipping   string   

Requested shipping method. Example: usps_ground_advantage

shipping_address   object   
company   string  optional  

Shipping address company name. Example: Initech

first_name   string   

Shipping address first name. Example: Bill

last_name   string   

Shipping address last name. Example: Lumbergh

address_1   string   

Shipping address street 1. Example: 4120 Freidrich Lane

address_2   string  optional  

Shipping address street 2. Example: Ste 100

city   string   

Shipping address city. Example: Austin

state   string   

Shipping address state. Example: TX

postal_code   string   

Shipping address postal_code. Example: 78744

country   string   

Shipping address country. Example: US

phone   string   

Shipping address phone. Example: 512-251-5221

line_items   object   
sku   string   

Sku number. Example: tps_report_1

quantity   integer   

Quantity of item. Example: 1

image_url   string  optional  

Publicly accessible url of image file. Example: https://mywebsite.com/images/tps_report_1.jpg

image_name   string  optional  

The filename of the file. Example: tps_report_1.jpg

scale_option   string  optional  

The scaling option for the file. Example: fit

Get Orders

requires authentication

Get a list of orders from a store.

Example request:
curl --request GET \
    --get "https://printops.test/api/stores/786323/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.test/api/stores/786323/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.test/api/stores/786323/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.test/api/stores/786323/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": 320139,
                "store_id": 786323,
                "type": "standard",
                "state": "shipped",
                "is_live": null,
                "requested_shipping": "usps_ground_advantage",
                "estimated_ship_date": "2024-02-13",
                "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": 38,
                        "quantity": 1,
                        "unit_price": 450,
                        "total_price": 450,
                        "scale_option": null,
                        "user_product": {
                            "id": 47244,
                            "store_id": 786323,
                            "base_product_id": 21,
                            "type": null,
                            "external_product_id": null,
                            "user_sku": "cat_poster_18x18",
                            "name": "Cat Poster 18x18",
                            "scale_option": "fit",
                            "description": "Cute cat poster sized to 18 x 18",
                            "base_product": {
                                "id": 21,
                                "sku": "SP18",
                                "name": "18 x 18 Square Print",
                                "product_category": 2,
                                "type": "poster_sm",
                                "description": "18x18 Square Poster Print",
                                "properties": {
                                    "ratio": "1:1",
                                    "width": 18,
                                    "height": 18,
                                    "weight": 0.15,
                                    "paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
                                    "thickness": 0.009,
                                    "ratio_decimal": 1
                                },
                                "price": "4.50",
                                "ships_alone": false
                            },
                            "thumbnail": "https://printops.s3.amazonaws.com/1246/thumbnails/1ZCBPAoVSAc9oLdyuNiwz4rzls3pFEALKGOxVGlD.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": 621537,
                        "carton_id": 3,
                        "total_quantity": 1,
                        "line_items": [
                            {
                                "id": 38,
                                "quantity": 1,
                                "unit_price": 450,
                                "total_price": 450,
                                "user_product": {
                                    "id": 47244,
                                    "store_id": 786323,
                                    "base_product_id": 21,
                                    "type": null,
                                    "external_product_id": null,
                                    "user_sku": "cat_poster_18x18",
                                    "name": "Cat Poster 18x18",
                                    "scale_option": "fit",
                                    "description": "Cute cat poster sized to 18 x 18",
                                    "base_product": {
                                        "id": 21,
                                        "sku": "SP18",
                                        "name": "18 x 18 Square Print",
                                        "product_category": 2,
                                        "type": "poster_sm",
                                        "description": "18x18 Square Poster Print",
                                        "properties": {
                                            "ratio": "1:1",
                                            "width": 18,
                                            "height": 18,
                                            "weight": 0.15,
                                            "paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
                                            "thickness": 0.009,
                                            "ratio_decimal": 1
                                        },
                                        "price": "4.50",
                                        "ships_alone": false
                                    },
                                    "thumbnail": "https://printops.s3.amazonaws.com/1246/thumbnails/1ZCBPAoVSAc9oLdyuNiwz4rzls3pFEALKGOxVGlD.jpg"
                                }
                            }
                        ]
                    }
                ],
                "shipments": {
                    "shipments": [
                        {
                            "id": 4,
                            "order_id": 320139,
                            "fulfillment_id": 621537,
                            "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-02-08T23:11:38.000000Z"
                        },
                        {
                            "id": 10,
                            "order_id": 320139,
                            "fulfillment_id": 621537,
                            "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-03-01T17:47:58.000000Z"
                        }
                    ]
                },
                "order_total": {
                    "id": 113,
                    "line_items_total": 450,
                    "fulfillment_total": 300,
                    "handling": null,
                    "shipping_total": 567,
                    "subtotal": null,
                    "tax_total": 0,
                    "grand_total": 1317
                },
                "order_notes": [],
                "order_events": []
            },
            {
                "id": 320140,
                "store_id": 786323,
                "type": "standard",
                "state": "received",
                "is_live": null,
                "requested_shipping": "usps_ground_advantage",
                "estimated_ship_date": "2024-02-14",
                "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": 39,
                        "quantity": 1,
                        "unit_price": 450,
                        "total_price": 450,
                        "scale_option": null,
                        "user_product": {
                            "id": 47244,
                            "store_id": 786323,
                            "base_product_id": 21,
                            "type": null,
                            "external_product_id": null,
                            "user_sku": "cat_poster_18x18",
                            "name": "Cat Poster 18x18",
                            "scale_option": "fit",
                            "description": "Cute cat poster sized to 18 x 18",
                            "base_product": {
                                "id": 21,
                                "sku": "SP18",
                                "name": "18 x 18 Square Print",
                                "product_category": 2,
                                "type": "poster_sm",
                                "description": "18x18 Square Poster Print",
                                "properties": {
                                    "ratio": "1:1",
                                    "width": 18,
                                    "height": 18,
                                    "weight": 0.15,
                                    "paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
                                    "thickness": 0.009,
                                    "ratio_decimal": 1
                                },
                                "price": "4.50",
                                "ships_alone": false
                            },
                            "thumbnail": "https://printops.s3.amazonaws.com/1246/thumbnails/1ZCBPAoVSAc9oLdyuNiwz4rzls3pFEALKGOxVGlD.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": 621538,
                        "carton_id": 3,
                        "total_quantity": 1,
                        "line_items": [
                            {
                                "id": 39,
                                "quantity": 1,
                                "unit_price": 450,
                                "total_price": 450,
                                "user_product": {
                                    "id": 47244,
                                    "store_id": 786323,
                                    "base_product_id": 21,
                                    "type": null,
                                    "external_product_id": null,
                                    "user_sku": "cat_poster_18x18",
                                    "name": "Cat Poster 18x18",
                                    "scale_option": "fit",
                                    "description": "Cute cat poster sized to 18 x 18",
                                    "base_product": {
                                        "id": 21,
                                        "sku": "SP18",
                                        "name": "18 x 18 Square Print",
                                        "product_category": 2,
                                        "type": "poster_sm",
                                        "description": "18x18 Square Poster Print",
                                        "properties": {
                                            "ratio": "1:1",
                                            "width": 18,
                                            "height": 18,
                                            "weight": 0.15,
                                            "paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
                                            "thickness": 0.009,
                                            "ratio_decimal": 1
                                        },
                                        "price": "4.50",
                                        "ships_alone": false
                                    },
                                    "thumbnail": "https://printops.s3.amazonaws.com/1246/thumbnails/1ZCBPAoVSAc9oLdyuNiwz4rzls3pFEALKGOxVGlD.jpg"
                                }
                            }
                        ]
                    }
                ],
                "shipments": {
                    "shipments": []
                },
                "order_total": {
                    "id": 81,
                    "line_items_total": 450,
                    "fulfillment_total": 300,
                    "handling": null,
                    "shipping_total": 567,
                    "subtotal": null,
                    "tax_total": 0,
                    "grand_total": 1317
                },
                "order_notes": [],
                "order_events": []
            }
        ]
    },
    "links": {
        "first": "https://printops.test/api/stores/786323/orders?page=1",
        "last": "https://printops.test/api/stores/786323/orders?page=9",
        "prev": null,
        "next": "https://printops.test/api/stores/786323/orders?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 9,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=5",
                "label": "5",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=6",
                "label": "6",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=7",
                "label": "7",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=8",
                "label": "8",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=9",
                "label": "9",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/orders?page=2",
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https://printops.test/api/stores/786323/orders",
        "per_page": 2,
        "to": 2,
        "total": 18
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/stores/{store}/orders

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

store   integer  optional  

The id of the store. Example: 786323

Query Parameters

page   integer  optional  

The page number for pagination. Example: 1

limit   integer  optional  

The number of records to return per page. Example: 2

Get an Order by Id

requires authentication

Get a single order by order id.

Example request:
curl --request GET \
    --get "https://printops.test/api/stores/786323/orders/320139" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/api/stores/786323/orders/320139"
);

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.test/api/stores/786323/orders/320139';
$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.test/api/stores/786323/orders/320139'
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": 320139,
            "store_id": 786323,
            "type": "standard",
            "state": "shipped",
            "is_live": null,
            "requested_shipping": "usps_ground_advantage",
            "estimated_ship_date": "2024-02-13",
            "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": 38,
                    "quantity": 1,
                    "unit_price": 450,
                    "total_price": 450,
                    "scale_option": null,
                    "user_product": {
                        "id": 47244,
                        "store_id": 786323,
                        "base_product_id": 21,
                        "type": null,
                        "external_product_id": null,
                        "user_sku": "cat_poster_18x18",
                        "name": "Cat Poster 18x18",
                        "scale_option": "fit",
                        "description": "Cute cat poster sized to 18 x 18",
                        "base_product": {
                            "id": 21,
                            "sku": "SP18",
                            "name": "18 x 18 Square Print",
                            "product_category": 2,
                            "type": "poster_sm",
                            "description": "18x18 Square Poster Print",
                            "properties": {
                                "ratio": "1:1",
                                "width": 18,
                                "height": 18,
                                "weight": 0.15,
                                "paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
                                "thickness": 0.009,
                                "ratio_decimal": 1
                            },
                            "price": "4.50",
                            "ships_alone": false
                        },
                        "thumbnail": "https://printops.s3.amazonaws.com/1246/thumbnails/1ZCBPAoVSAc9oLdyuNiwz4rzls3pFEALKGOxVGlD.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": 621537,
                    "carton_id": 3,
                    "total_quantity": 1,
                    "line_items": [
                        {
                            "id": 38,
                            "quantity": 1,
                            "unit_price": 450,
                            "total_price": 450,
                            "user_product": {
                                "id": 47244,
                                "store_id": 786323,
                                "base_product_id": 21,
                                "type": null,
                                "external_product_id": null,
                                "user_sku": "cat_poster_18x18",
                                "name": "Cat Poster 18x18",
                                "scale_option": "fit",
                                "description": "Cute cat poster sized to 18 x 18",
                                "base_product": {
                                    "id": 21,
                                    "sku": "SP18",
                                    "name": "18 x 18 Square Print",
                                    "product_category": 2,
                                    "type": "poster_sm",
                                    "description": "18x18 Square Poster Print",
                                    "properties": {
                                        "ratio": "1:1",
                                        "width": 18,
                                        "height": 18,
                                        "weight": 0.15,
                                        "paperType": "Sappi McCoy 80lb/216gsm Coated Cover",
                                        "thickness": 0.009,
                                        "ratio_decimal": 1
                                    },
                                    "price": "4.50",
                                    "ships_alone": false
                                },
                                "thumbnail": "https://printops.s3.amazonaws.com/1246/thumbnails/1ZCBPAoVSAc9oLdyuNiwz4rzls3pFEALKGOxVGlD.jpg"
                            }
                        }
                    ]
                }
            ],
            "shipments": {
                "shipments": [
                    {
                        "id": 4,
                        "order_id": 320139,
                        "fulfillment_id": 621537,
                        "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-02-08T23:11:38.000000Z"
                    },
                    {
                        "id": 10,
                        "order_id": 320139,
                        "fulfillment_id": 621537,
                        "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-03-01T17:47:58.000000Z"
                    }
                ]
            },
            "order_total": {
                "id": 113,
                "line_items_total": 450,
                "fulfillment_total": 300,
                "handling": null,
                "shipping_total": 567,
                "subtotal": null,
                "tax_total": 0,
                "grand_total": 1317
            },
            "order_notes": [],
            "order_events": []
        }
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/stores/{store}/orders/{order}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

store   integer  optional  

The id of the store. Example: 786323

order   integer  optional  

The id of the order. Example: 320139

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.test/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.test/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.test/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.test/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": []
}
 

Request   

POST api/stores/{store}/orders/{order}/cancel

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

store   integer   

The store. Example: 786321

order   integer   

The order. Example: 320100

Get Shipments

requires authentication

Get a list of shipments from a particular store.

Example request:
curl --request GET \
    --get "https://printops.test/api/stores/786323/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.test/api/stores/786323/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.test/api/stores/786323/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.test/api/stores/786323/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": 4,
                "order_id": 320139,
                "fulfillment_id": 621537,
                "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-02-08T23:11:38.000000Z"
            },
            {
                "id": 5,
                "order_id": 320155,
                "fulfillment_id": 621550,
                "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-02-28T21:48:52.000000Z"
            }
        ]
    },
    "links": {
        "first": "https://printops.test/api/stores/786323/shipments?page=1",
        "last": "https://printops.test/api/stores/786323/shipments?page=4",
        "prev": null,
        "next": "https://printops.test/api/stores/786323/shipments?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 4,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/shipments?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://printops.test/api/stores/786323/shipments?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/shipments?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/shipments?page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "https://printops.test/api/stores/786323/shipments?page=2",
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https://printops.test/api/stores/786323/shipments",
        "per_page": 2,
        "to": 2,
        "total": 7
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/stores/{store}/shipments

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

store   integer  optional  

The id of the store. Example: 786323

Query Parameters

page   integer  optional  

The page number for pagination. Example: 1

limit   integer  optional  

The number of records to return per page. Example: 2

Get a Shipment by Id

requires authentication

Retrieve a particular shipment by id.

Example request:
curl --request GET \
    --get "https://printops.test/api/stores/786323/shipments/4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/api/stores/786323/shipments/4"
);

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.test/api/stores/786323/shipments/4';
$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.test/api/stores/786323/shipments/4'
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": 4,
            "order_id": 320139,
            "fulfillment_id": 621537,
            "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-02-08T23:11:38.000000Z"
        }
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/stores/{store}/shipments/{shipment}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

store   integer  optional  

The id of the store. Example: 786323

shipment   integer  optional  

The id of the shipment. Example: 4

Get Webhooks

requires authentication

Webhooks allow you to subscribe to certain events during the order process.

Example request:
curl --request GET \
    --get "https://printops.test/api/webhooks" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/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.test/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.test/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": 3,
                "is_active": 1,
                "type": "order_state_update",
                "created_at": "2024-02-28T16:53:16.000000Z",
                "updated_at": "2024-02-28T22:06:57.000000Z"
            },
            {
                "id": 14,
                "is_active": 1,
                "type": "order_shipment",
                "created_at": "2024-03-06T16:21:25.000000Z",
                "updated_at": "2024-03-06T16:21:25.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": []
}
 

Request   

GET api/webhooks

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get a Webhook by Id

requires authentication

Retrieve a webhook by id.

Example request:
curl --request GET \
    --get "https://printops.test/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.test/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.test/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.test/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 (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 46
access-control-allow-origin: *
 

{
    "data": {
        "webhook": {
            "id": 14,
            "is_active": 1,
            "type": "order_shipment",
            "created_at": "2024-03-06T16:21:25.000000Z",
            "updated_at": "2024-03-06T16:21:25.000000Z"
        }
    },
    "status": "OK",
    "code": 200,
    "messages": []
}
 

Request   

GET api/webhooks/{webhook}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

webhook   string   

The id of the webhook. Example: 14

Query Parameters

page   integer  optional  

The page number for pagination. Example: 1

limit   integer  optional  

The number of records to return per page. Example: 2

Create a Webhook

requires authentication

Example request:
curl --request POST \
    "https://printops.test/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.test/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.test/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.test/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": []
}
 

Request   

POST api/webhooks

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   string  optional  

The type of webhook. Example: order_shipment

is_active   string  optional  

If the webhook is active or not. Example: true

Delete a Webhook

requires authentication

Example request:
curl --request DELETE \
    "https://printops.test/api/webhooks/3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://printops.test/api/webhooks/3"
);

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.test/api/webhooks/3';
$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.test/api/webhooks/3'
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": []
}
 

Request   

DELETE api/webhooks/{webhook}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

webhook   integer   

The webhook. Example: 3