Overview
The Scalable Press API is a comprehensive REST service for viewing the product catalog, making quotes, and completing orders for our printing and fulfillment services.
Requests are made using standard GET, POST, and DELETE requests. All responses are JSON.
Once you sign up for an account, you will be provided with an API key and a test API key. When using the test API key, no charges will be made against your account.
Authentication
curl "{{base}}{{print.categories.base}}" \
-u "{{username}}:{{apiKey}}"
This API uses HTTP basic auth for authentication. Your private API key should be used as the password. The username is optional and can be left empty.
All requests must be made over HTTPS.
POST requests
Request data is accepted as either standard multipart form data or JSON. The appropriate Content-Type
header must be set: multipart/form-data
or application/json
.
When a file upload is required, multipart encoding must be used because JSON does not support embedding files.
CORS / JSONP access
JSONP is not enabled for any API.
Cross-origin resource sharing (CORS) headers are enabled for all Product API routes. Other Scalable Press API endpoints require private API keys for use, and thus are not suitable for client side requests.
Product API
The Products API provides specifications and pictures of all products available for printing.
- List product categories
- List products (in a category)
- List product information
- List product availability
- List detailed item information
The Product API powers our product catalog
List product categories
DEFINITION
GET {{base}}{{print.categories.base}}
EXAMPLE REQUEST
curl "{{base}}{{print.categories.base}}"
EXAMPLE RESPONSE
[
{
"type": "Garment",
"name": "Sweatshirts",
"family": "Unisex",
"url": "{{base}}{{print.categories.base}}/sweatshirts",
"categoryId": "sweatshirts"
},
{
"type": "Garment",
"name": "Ladies Tank Tops",
"family": "Ladies",
"url": "{{base}}{{print.categories.base}}/ladies-tank-tops",
"categoryId": "ladies-tank-tops"
}
]
Get a list of available product categories. No arguments are needed for this request.
Arguments
None
Returns
Returns an array with all available category objects.
Category Object
Attribute | Type | Description |
---|---|---|
categoryId |
string | Unique identifier for the category |
type |
string | Printing categorization. Garment , Case , Mug , or Poster |
name |
string | Name of the category |
family |
string | Additional categorization, for example Unisex |
url |
string | API endpoint for category details |
List products
DEFINITION
GET {{base}}{{print.categories.base}}/{categoryId}
EXAMPLE REQUEST
curl "{{base}}{{print.categories.base}}/sweatshirts"
EXAMPLE RESPONSE
{
"type": "Garment",
"name": "Sweatshirts",
"products": [
{
"name": "Gildan Sweatshirt - Crew",
"style": "18000",
"image": {
"url": "http://www.ooshirts.com/products/5/catalog.jpg",
"label": "Catalog"
},
"id": "gildan-sweatshirt-crew",
"url": "{{base}}{{print.products.base}}/gildan-sweatshirt-crew"
},
{
"name": "Gildan Heavy Sweatshirt",
"style": "12000",
"image": {
"url": "http://www.ooshirts.com/products/6/catalog.jpg",
"label": "Catalog"
},
"id": "gildan-heavy-sweatshirt",
"url": "{{base}}{{print.products.base}}/gildan-heavy-sweatshirt"
}
],
"family": "Unisex",
"url": "{{base}}{{print.categories.base}}/sweatshirts",
"categoryId": "sweatshirts"
}
Specify a category id to receive category information and a list of products in that category.
Arguments
None
Returns
Returns a category object which now contains an array of product overview objects.
Product Overview Object
Attribute | Type | Description |
---|---|---|
id |
string | Unique identifier for the product |
name |
string | Product name |
style |
number | Reference code associated with the product |
image |
object | Image object |
url |
string | API endpoint for product details |
Image Object
Attribute | Type | Description |
---|---|---|
label |
string | Type of image |
url |
string | URL to the image |
List product information
DEFINITION
GET {{base}}{{print.products.base}}/{productId}
EXAMPLE REQUEST
curl "{{base}}{{print.products.base}}/gildan-sweatshirt-crew"
EXAMPLE RESPONSE
{
"comments": "Generous fit. Soft, sturdy, easy to move around in, all the while looking good.",
"description": "Air Jet Spun Yarn. Double-needle stitching. Set-in sleeves. 1x1 Athletic Rib with Lycra(R). Quarter-turned to eliminate center crease.",
"name": "Gildan Sweatshirt - Crew",
"type": "Garment",
"properties": {
"brand": "Gildan",
"material": "7.75 oz 50% cotton, 50% polyester.",
"style": "18000"
},
"colors": [
{
"name": "Kiwi",
"hex": "88b95d",
"images": [
{
"url": "http://i1.ooshirts.com/images/lab_shirts/Kiwi-5-R.jpg",
"label": "Right"
},
{
"url": "http://i1.ooshirts.com/images/lab_shirts/Kiwi-5-L.jpg",
"label": "Left"
},
{
"url": "http://i1.ooshirts.com/images/lab_shirts/Kiwi-5-F.jpg",
"label": "Front"
},
{
"url": "http://i1.ooshirts.com/images/lab_shirts/Kiwi-5-B.jpg",
"label": "Back"
}
],
"sizes": [
"sml",
"med",
"lrg",
"xlg",
"xxl",
"xxxl",
"xxxxl",
"xxxxxl"
]
},
{
"name": "Irish Green",
"hex": "3da858",
"images": [
{
"url": "http://i1.ooshirts.com/images/lab_shirts/Irish-Green-5-F.jpg",
"label": "Front"
},
{
"url": "http://i1.ooshirts.com/images/lab_shirts/Irish-Green-5-L.jpg",
"label": "Left"
},
{
"url": "http://i1.ooshirts.com/images/lab_shirts/Irish-Green-5-R.jpg",
"label": "Right"
},
{
"url": "http://i1.ooshirts.com/images/lab_shirts/Irish-Green-5-B.jpg",
"label": "Back"
}
],
"sizes": [
"sml",
"med",
"lrg",
"xlg",
"xxl",
"xxxl",
"xxxxl",
"xxxxxl"
]
}
],
"additionalImages": [
{
"label": "Front",
"url": "http://i1.ooshirts.com/products/5/front.jpg"
},
{
"label": "Back",
"url": "http://i1.ooshirts.com/products/5/back.jpg"
},
{
"label": "Collar",
"url": "http://i1.ooshirts.com/products/5/collar.jpg"
}
],
"image": {
"label": "Catalog",
"url": "http://www.ooshirts.com/products/5/catalog.jpg"
},
"available": true,
"url": "{{base}}{{print.products.base}}/gildan-sweatshirt-crew",
"availabilityUrl": "{{base}}{{print.products.base}}/gildan-sweatshirt-crew/availability",
"productId": "gildan-sweatshirt-crew"
}
Specify a product id to receive product information. This information could include the following:
- Description
- Materials
- Brand
- Style Code
- Color list
- Size Range
- Product Photos
The productId
, color name, (colors.#.name
), and size (colors.#.sizes.#
) are used when placing an order.
Arguments
None
Returns
Returns a product object.
Product Object
Attribute | Type | Description |
---|---|---|
productId |
string | Unique identifier for the product |
comments |
string | Comments on the product (its fit and/or feel) |
description |
string | Description of the product |
name |
string | Actual name of the product |
type |
string | Printing categorization. Garment , Case , Mug , or Poster |
properties |
object | Product properties object |
colors |
array | Array of available color objects |
additionalImages |
array | Array of image objects |
image |
object | Primary image object |
available |
boolean | Whether the product is available to order |
url |
string | API endpoint for product information (the current url) |
Fields only exist when applicable
Product Properties Object
Attribute | Type | Description |
---|---|---|
brand |
string | Brand of the product |
material |
string | Material the product is made from |
style |
string | Style code associated with the product |
Color Object
Attribute | Type | Description |
---|---|---|
name |
string | Name of the color |
hex |
string | Hex color code of the color |
image |
array | Array of image objects |
sizes |
array | Array of available sizes |
List product availability
DEFINITION
GET {{base}}{{print.products.base}}/{productId}/availability
EXAMPLE REQUEST
curl "{{base}}{{print.products.base}}/gildan-sweatshirt-crew/availability"
EXAMPLE RESPONSE
{
"red":{
"sml": 1700,
"med": 1912,
"lrg": 2597,
"xlg": 966,
"xxl": 1077,
"xxxl": 332,
"xxxxl": 160,
"xxxxxl": 55
},
"white":{
"sml": 27055,
"med": 28585,
"lrg": 29145,
"xlg": 20101,
"xxl": 6864,
"xxxl": 1599,
"xxxxl": 595,
"xxxxxl": 293
},
"blue":{
"sml": 27055,
"med": 28385,
"lrg": 29545,
"xlg": 22301,
"xxl": 6864
}
}
Specify a product id to receive product availability information. If a color/size combination is not specified then it is unavailable.
Arguments
None
Returns
Returns a product availability object.
Product availability object
Attribute | Type | Description |
---|---|---|
color |
object | a color availability object |
There will be an attribute for each available color
Color availability object
Attribute | Type | Description |
---|---|---|
size |
integer | The quantity available |
There will be an attribute for each available size
List detailed item information
DEFINITION
GET {{base}}{{print.products.base}}/{productId}/items
curl "{{base}}{{print.products.base}}/gildan-sweatshirt-crew/items"
EXAMPLE RESPONSE
{
"antique sapphire": {
"sml": {
"quantity": 795,
"price": 534,
"weight": 0.8,
"size": "sml",
"color": "antique sapphire",
"GTIN": "00821780008222"
},
"med": {
"quantity": 770,
"price": 534,
"weight": 0.9,
"size": "med",
"color": "antique sapphire",
"GTIN": "00821780008228"
},
"lrg": {
"quantity": 727,
"price": 534,
"weight": 0.98,
"size": "lrg",
"color": "antique sapphire",
"GTIN": "00821780008227"
}
...
}
Specify a product id to receive product information. For each color of the product, this information includes the following:
- Quantity
- Price
- Weight
- Size
- Color
- Global Trade Item Number
Arguments
None
Returns
Returns an item object
Item Object
Attribute | Type | Description |
---|---|---|
color |
array | Array of available colors |
size |
array | Array of available size objects |
Size Object
Attribute | Type | Description |
---|---|---|
quantity |
number | The quantity available |
price |
number | The price of the product |
weight |
number | The weight in pounds of the product |
size |
string | The color of the product |
GTIN |
string | The Global Trade Item Number |
Quote API
The Quote API lets you get an exact quote before placing an order. When using this API, it is important to understand the three possible outcomes:
- Order-ready — quote is successful and the information sent to the API is enough to place an actual order
- Quote-only — quote is successful but the information sent is not sufficient to place an order
- Error — quote is unsuccessful due to the information being sent to the API is either invalid or incomplete
Standard quotes allow a single design printed on one or more products, shipped to a single address. Bulk quotes allow greater flexibility for multiple printing orders and split shipping.
Besides making a quote, the Quote API can also be used to retrieve a quote which was previously completed. The quote API can also breakdown a bulk quote’s pricing into a per item basis.
In order to receive a quote and place an order for any of these advanced features, the bulk quote API should be used:
- Split shipping — send a single printing design to multiple shipping addresses and take advantage of large quantity printing pricing
- Multiple designs — print multiple designs on multiple garments and take advantage of possible combined shipping
- Multiple printing — print on different products and take advantage of possible combined shipping
A bulk quote with a single but unspecified design can be generated to estimate post-discount pricing.
The Quote API also allows for custom order features for your order:
- Select shipping option — select a preferred shipping option for an item in the order. Third party shipping account is required
- Custom packing slip — provide a packing slip to be shipped with the package
- Custom white label - provide a custom from address on the shipping white label
Order-ready scenario
DEFINITION
POST {{base}}{{print.quote.base}}
POST {{base}}{{print.quote.bulk}}
EXAMPLE REQUEST
curl "{{base}}{{print.quote.base}}" \
-u "{{username}}:{{apiKey}}" \
-d "type=dtg" \
-d "products[0][id]=gildan-sweatshirt-crew" \
-d "products[0][color]=ash" \
-d "products[0][quantity]=12" \
-d "products[0][size]=lrg" \
-d "address[name]=My Customer" \
-d "address[address1]=123 Scalable Drive" \
-d "address[city]=West Pressfield" \
-d "address[state]=CA" \
-d "address[zip]=12345" \
-d "designId=53ed3a23b3730f0e27a66513"
EXAMPLE RESPONSE
{
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"mode": "test"
}
This scenario occurs when the information sent to the API is enough to place an actual order.
Arguments
Quote object or bulk quote object
Returns
Returns a quote response object.
Quote-only scenario
DEFINITION
POST {{base}}{{print.quote.base}}
POST {{base}}{{print.quote.bulk}}
EXAMPLE REQUEST
curl "{{base}}{{print.quote.base}}" \
-u "{{username}}:{{apiKey}}" \
-d "type=dtg" \
-d "sides[front]=1" \
-d "products[0][id]=gildan-sweatshirt-crew" \
-d "products[0][color]=ash" \
-d "products[0][quantity]=12" \
-d "products[0][size]=lrg"
EXAMPLE RESPONSE
{
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": null,
"orderIssues": [
{
"code": "missing_field",
"path": "designId",
"message": "No 'designId' provided"
},
{
"code": "missing_field",
"path": "address",
"message": "No shipping address given"
}
],
"mode": "test"
}
This scenario occurs when the information sent to the API is enough to create a quote but not enough to create an order-ready quote (hence the orderToken field is null).
Arguments
Quote object or bulk quote object
Returns
Returns a quote response object.
Error scenario
DEFINITION
POST {{base}}{{print.quote.base}}
POST {{base}}{{print.quote.bulk}}
EXAMPLE REQUEST
curl "{{base}}{{print.quote.base}}" \
-u "{{username}}:{{apiKey}}" \
-d "type=dtg" \
-d "sides[front]=1" \
-d "products[0][id]=gildan-sweatshirt-crew" \
-d "products[0][color]=ash" \
-d "products[0][quantity]=12" \
-d "products[0][size]=xsml"
EXAMPLE RESPONSE
{
"statusCode": 400,
"issues": [
{
"code": "bad_value",
"path": "products[0]",
"message": "Color and size combination unavailable: 'ash', 'xsml' for 'gildan-sweatshirt-crew'"
}
],
"orderIssues": [
{
"code": "missing_field",
"path": "designId",
"message": "No 'designId' provided"
},
{
"code": "missing_field",
"path": "address",
"message": "No shipping address given"
}
],
"mode": "test"
}
This scenario occurs when the information sent to the API is either invalid or is missing required information.
Arguments
Quote object or bulk quote object
Returns
Returns a quote response object.
Standard quote
DEFINITION
POST {{base}}{{print.quote.base}}
EXAMPLE REQUEST
curl "{{base}}{{print.quote.base}}" \
-u "{{username}}:{{apiKey}}" \
-d "type=dtg" \
-d "products[0][id]=gildan-sweatshirt-crew" \
-d "products[0][color]=ash" \
-d "products[0][quantity]=12" \
-d "products[0][size]=lrg" \
-d "address[name]=My Customer" \
-d "address[address1]=123 Scalable Drive" \
-d "address[city]=West Pressfield" \
-d "address[state]=CA" \
-d "address[zip]=12345" \
-d "designId=53ed3a23b3730f0e27a66513"
EXAMPLE RESPONSE
{
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"warnings": [ ],
"mode": "test"
}
The standard quote API allows a quote for a single design printed on one or more products, shipped to a single address.
Arguments
Quote Object
Attribute | Type | Description | Required |
---|---|---|---|
type |
string | Type of product this design is for: screenprint , dtg , case , mug , or poster |
Always |
designId |
string | Unique identifier for a design object to print, provided by the Design API | Order‑ready |
sides |
object | Providing this optional sides object instead of a designId allows making quotes without creating a Design first |
Quote‑only |
products |
array | Array of order product objects to print on | Always |
address |
object | Shipping address object | Order‑ready |
features |
object | Custom features object | |
name |
string | Optional reference name |
Sides Object
Attribute | Type | Description |
---|---|---|
front |
number | DTG: set to any positive number to indicate printing on this side, Screenprint: the number of colors used on this side |
back |
number | Same as front |
right |
number | Same as front |
left |
number | Same as front |
At least one side is required when providing a sides object for a quote.
Order Product Object
Attribute | Type | Description |
---|---|---|
id |
string | productId of the product you wish to order, retrieved from the Product API, this product must be compatible with the design provided |
color |
string | Color of the product, see the Product API for available colors |
size |
string | Size of the product, see the Product API for available sizes |
quantity |
number | Quantity of this product/color/size to order |
Address Object
Attribute | Type | Description |
---|---|---|
name |
string | Name of customer receiving the product |
company |
string | Optional company associated with the customer |
address1 |
string | Address line 1 of customer |
address2 |
string | Optional address line 2 of customer |
city |
string | City of customer |
state |
string | State or province where customer resides |
zip |
number | Zip code or postal code of customer |
country |
string | ISO3166 country code, defaults to US |
email |
string | Optional e-mail of customer |
Returns
Returns a quote response object.
Quote Response Object
Attribute | Type | Description |
---|---|---|
total |
number | Quoted price for the order |
shipping |
number | Shipping component of quote total |
subtotal |
number | Subtotal component of quote total |
tax |
number | Tax component of quote total |
fees |
number | Other fee components of quote total |
warnings |
array | List of warnings as human readable strings |
issues |
array | Array of error objects which are preventing a successful quote |
orderIssues |
array | Array of error objects which are preventing your quote from being order-ready |
orderToken |
string | Unique identifier which can be used to place an order, can also be used to retrieve a quote |
mode |
string | “test” or “live” |
Error Object
Attribute | Type | Description |
---|---|---|
code |
string | Identifier for type of error message |
path |
string | Path in quote object causing error |
message |
string | User-friendly error message |
Bulk quote
DEFINITION
POST {{base}}{{print.quote.bulk}}
EXAMPLE REQUEST
curl "{{base}}{{print.quote.bulk}}" \
-u "{{username}}:{{apiKey}}" \
-d "items[0][type]=dtg" \
-d "items[0][designId]=53ed3a23b3730f0e27a66513" \
-d "items[0][products][0][id]=gildan-sweatshirt-crew" \
-d "items[0][products][0][color]=ash" \
-d "items[0][products][0][quantity]=12" \
-d "items[0][products][0][size]=med" \
-d "items[1][type]=dtg" \
-d "items[1][designId]=53ed3a23b3730f0e27a66513" \
-d "items[1][products][0][id]=gildan-sweatshirt-crew" \
-d "items[1][products][0][color]=ash" \
-d "items[1][products][0][quantity]=12" \
-d "items[1][products][0][size]=lrg"
EXAMPLE RESPONSE
{
"total": 346.76,
"subtotal": 298.44,
"tax": 31.52,
"fees": 0,
"shipping": 16.80,
"orderToken": null,
"orderIssues": [
{
"code": "missing_field",
"path": "items[0][address]",
"message": "No shipping address given"
},
{
"code": "missing_field",
"path": "items[1][address]",
"message": "No shipping address given"
}
],
"warnings": [ ],
"mode": "test"
}
The bulk quote API allows receiving quotes for printing multiple designs, items, and shipping to multiple addresses. Discounts will automatically be applied whenever possible.
The name
property of each quote item accepts any string and can be used for your reference on the order item level.
The name
property of the bulk quote object accepts any string and can be used for your reference on the order level.
Arguments
Returns
Returns a quote response object.
Bulk Quote Object
Attribute | Type | Description |
---|---|---|
name |
string | Optional reference name |
items |
array | Array of quote objects |
Additional bulk quote features
curl "{{base}}{{print.quote.bulk}}" \
-u "{{username}}:{{apiKey}}" \
-d "items[0][type]=screenprint" \
-d "items[0][sides][front]=1" \
-d "items[0][products][0][id]=gildan-sweatshirt-crew" \
-d "items[0][products][0][color]=ash" \
-d "items[0][products][0][quantity]=12" \
-d "items[0][products][0][size]=med" \
-d "items[1][type]=screenprint" \
-d "items[1][sides][front]=1" \
-d "items[1][products][0][id]=gildan-sweatshirt-crew" \
-d "items[1][products][0][color]=ash" \
-d "items[1][products][0][quantity]=12" \
-d "items[1][products][0][size]=lrg" \
-d "data[breakdown]=true" \
-d "data[singleDesign]=true" \
EXAMPLE RESPONSE
{
"total": 211.18,
"subtotal": 191.98,
"tax": 19.20,
"fees": 0,
"shipping": 0,
"breakdown": [
{
"fees": 0,
"shipping": 0,
"printing": 51.78,
"blanks": 44.21
},
{
"fees": 0,
"shipping": 0,
"printing": 51.78,
"blanks": 44.21
},
],
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"warnings": [ ],
"mode": "test"
}
Single Design
When generating a bulk quote, a quote will be generated even if numerous objects have no designIds specified. The singleDesign boolean can be used to specify that all objects with no designIds are all of the same design. For screenprint bulk quotes, numerous objects with the same design will result in a discount.
Breakdown
When generating a bulk quote, you can us the breakdown boolean to create a breakdown object, which splits the costs into a per item basis.
Breakdown object
Attribute | Type | Description |
---|---|---|
shipping |
number | Shipping component of quote total of an item |
printing |
number | Printing component of quote total of an item |
blanks |
number | Blank garment component of quote total of an item |
fees |
number | Other fee components of quote total of an item |
Retrieve quote
DEFINITION
GET {{base}}{{print.quote.base}}/{orderToken}
EXAMPLE REQUEST
curl "{{base}}{{print.quote.base}}/{orderToken}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
{
"status": "quote",
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "ba665645bcd4766fa1c986bb7fe27206",
"mode": "test",
"createdAt": "2014-08-14T22:38:12.755Z",
"warnings": [ ],
"events": [
{
"name": "quote",
"description": "Quote completed",
"createdAt": "2014-08--14T22:38:12.755Z"
}
],
"items": [
{
"type": "dtg",
"designId": "53ed3a23b3730f0e27a66514",
"address": {
"name": "My Customer",
"city": "West Pressfield",
"address1": "123 Scalable Drive",
"state": "CA",
"zip": "12345",
"country": "US"
},
"products": [
{
"id": "gildan-sweatshirt-crew",
"color": "ash",
"quantity": 12,
"size": "lrg"
}
],
"designUrl": "{{base}}{{print.design.base}}/53ed3a23b3730f0e27a66514"
}
],
"orderId": "555b9eb45742fadd7660d3d7"
}
After you have made a successful order-ready quote, you will be provided with an orderToken. This order token can be used to retrieve the quote it is associated with.
Arguments
None
Returns
Returns an order object.
Order Object
Attribute | Type | Description |
---|---|---|
status |
string | Name of the last event that occurred |
total |
number | Price for the order |
shipping |
number | Shipping component of quote total |
subtotal |
number | Subtotal component of quote total |
tax |
number | Tax component of quote total |
fees |
number | Other fee components of quote total |
orderToken |
string | Unique identifier which can be used to place an order, can also be used to retrieve a quote |
createdAt |
timestamp | Time at which order object was created |
items |
array | Array of item objects |
events |
array | Array of event objects |
orderId |
string | Unique id for the order, can be used to get order information using the Order API (only exists when an order has been placed) |
mode |
string | test or live |
warnings |
array | Array of warningIDs |
Order Item Object
Attribute | Type | Description |
---|---|---|
type |
string | Type of printing (dtg , screenprint , case , mug , or poster ) |
designId |
string | Unique identifier for a design object provided by the Design API |
address |
object | Address object |
products |
array | Array of order product objects |
designUrl |
string | API endpoint to Design API where information on the design can be retrieved |
status |
string | Name of the last event that occurred to this particular order item |
tracking |
string | Once the status is shipped , this will contain the tracking number of the item. Multiple order items may have the same tracking number if they are shipped together |
features |
object | Custom features object |
name |
string | Reference name provided by the user |
Event Object
Attribute | Type | Description |
---|---|---|
name |
string | Name of the event (quote, order, etc.) |
description |
string | Description of the event |
meta |
object | Optional additional data. Event examples |
createdAt |
timestamp | Time at which the event occurred |
There are a variety of order event types, indicating status of the quote or order.
Order API
The Order API lets you place an order, modify its details, and check the status of a previously placed order. The Order API can also place and modify orders.
- Place order
- Reprint order
- Order status
- Order status webhook — push notification when status changes
- Retrieve orders — get information on all orders which have been placed
- Retrieve single order — get information on an existing order
- Change order address
- Cancel entire order
Place order
DEFINITION
POST {{base}}{{print.order.base}}
EXAMPLE REQUEST
curl "{{base}}{{print.order.base}}" \
-u "{{username}}:{{apiKey}}" \
-d "orderToken=c6ae6ca449719e5237d103139255ecdd"
EXAMPLE RESPONSE
{
"status": "order",
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"mode": "test",
"createdAt": "2014-08-15T01:46:02.035Z",
"warnings": [ ],
"events": [
{
"name": "quote",
"description": "Quote completed",
"createdAt": "2014-08-15T01:46:02.036Z"
},
{
"name": "order",
"description": "Order placed. Processing",
"createdAt": "2014-08-15T05:50:07.300Z"
}
],
"items": [
{
"type": "dtg",
"designId": "53ed3a23b3730f0e27a66514",
"address": {
"name": "My Customer",
"address1": "123 Scalable Drive",
"city": "West Pressfield",
"state": "CA",
"zip": "12345",
"country": "US"
},
"products": [
{
"id": "gildan-sweatshirt-crew",
"color": "ash",
"quantity": 12,
"size": "lrg"
}
],
"designUrl": "{{base}}{{print.design.base}}/53ed3a23b3730f0e27a66514"
}
],
"orderId": "53ed665ab3730f0e27a66516"
}
In order to place an order, you first must make a quote request. After a successful quote request, you will be provided with a orderToken. This order token can then be used to place an order.
Arguments
Attribute | Type | Description |
---|---|---|
orderToken |
string | Unique identifier which can be used to place an order, can also be used to retrieve a quote |
Returns
Returns an order object.
Reprint order
DEFINITION
POST {{base}}{{print.order.base}}/{orderId}/reprint
EXAMPLE REQUEST
curl "{{base}}{{print.order.base}}/{orderId}/reprint" \
-u "{{username}}:{{apiKey}}" \
-d "items[0][itemIndex]=0" \
-d "items[0][address][name]=My Customer" \
-d "items[0][address][address1]=123 Scalable Drive" \
-d "items[0][address][city]=West Pressfield" \
-d "items[0][address][state]=CA" \
-d "items[0][address][zip]=12345"
EXAMPLE RESPONSE
{
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"warnings": [ ],
"mode": "test"
}
After placing an order, you can reprint any item in that order using the orderId. Specify which item by passing in an item index. If you pass in a new address, a new product, and/or new features, the new object will replace the corresponding old object.
Arguments
Item index and optional address objects, order product objects, and features objects
Returns
Returns a quote response object
Retrieve orders
DEFINITION
GET {{base}}{{print.order.base}}
EXAMPLE REQUEST
curl "{{base}}{{print.order.base}}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
[
{
"status": "validated",
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"mode": "test",
"createdAt": "2014-08-15T01:46:02.035Z",
"warnings": [ ],
"events": [
{
"name": "quote",
"description": "Quote completed",
"createdAt": "2014-08-15T01:46:02.036Z"
},
{
"name": "order",
"description": "Order placed. Processing",
"createdAt": "2014-08-15T05:50:07.300Z"
}
{
"name": "validated",
"description": "All order items have passed validation",
"createdAt": "2014-08-15T06:23:34.205Z"
}
],
"items": [
{
"type": "dtg",
"designId": "53ed3a23b3730f0e27a66514",
"status": "validated",
"address": {
"name": "My Customer",
"address1": "123 Scalable Drive",
"city": "West Pressfield",
"state": "CA",
"zip": "12345",
"country": "US"
},
"products": [
{
"id": "gildan-sweatshirt-crew",
"color": "ash",
"quantity": 12,
"size": "lrg"
}
],
"designUrl": "{{base}}{{print.design.base}}/53ed3a23b3730f0e27a66514"
}
],
"orderId": "53ed665ab3730f0e27a66516"
}
{
"status": "order",
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "c6ae6ca449719e5237d1031asd5ecdd",
"mode": "test",
"createdAt": "2014-07-15T01:46:02.035Z",
"warnings": [ ],
"events": [
{
"name": "quote",
"description": "Quote completed",
"createdAt": "2014-07-15T01:46:02.036Z"
},
{
"name": "order",
"description": "Order placed. Processing",
"createdAt": "2014-07-15T05:50:07.300Z"
}
],
"items": [
{
"type": "dtg",
"designId": "53ed3a23b3730f0e27a34514",
"address": {
"name": "My Customer",
"address1": "123 Scalable Drive",
"city": "West Pressfield",
"state": "CA",
"zip": "12345",
"country": "US"
},
"products": [
{
"id": "gildan-sweatshirt-crew",
"color": "black",
"quantity": 10,
"size": "med"
}
],
"designUrl": "{{base}}{{print.design.base}}/53ed3a23b3730f0e12a66514"
}
],
"orderId": "53ed6213ab3730f0e27a66516"
}
]
After placing several orders you can get the status and other information on each of your orders.
Arguments
None
Returns
Returns an array of order objects.
Retrieve single order
DEFINITION
GET {{base}}{{print.order.base}}/{orderId}
EXAMPLE REQUEST
curl "{{base}}{{print.order.base}}/{orderId}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
{
"status": "validated",
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"mode": "test",
"createdAt": "2014-08-15T01:46:02.035Z",
"warnings": [ ],
"events": [
{
"name": "quote",
"description": "Quote completed",
"createdAt": "2014-08-15T01:46:02.036Z"
},
{
"name": "order",
"description": "Order placed. Processing",
"createdAt": "2014-08-15T05:50:07.300Z"
}
{
"name": "validated",
"description": "All ordered items have passed validation"
}
],
"items": [
{
"type": "dtg",
"designId": "53ed3a23b3730f0e27a66514",
"status": "validated",
"address": {
"name": "My Customer",
"address1": "123 Scalable Drive",
"city": "West Pressfield",
"state": "CA",
"zip": "12345",
"country": "US"
},
"products": [
{
"productId": "gildan-sweatshirt-crew",
"color": "ash",
"quantity": 12,
"size": "lrg"
}
],
"designUrl": "{{base}}{{print.design.base}}/53ed3a23b3730f0e27a66514"
}
],
"orderId": "53ed665ab3730f0e27a66516"
}
Once an order has been placed, you can check on the status and other information of an order by using the orderId
field provided in the order object.
Arguments
None
Returns
Returns an order object.
Order status
PRINTING EVENT
{
"name": "printing",
"description": "Order is paid and now in production",
"createdAt": "2014-09-04T21:08:25.401Z"
}
SHIPPED EVENT
{
"name": "shipped",
"description": "Shipped item",
"createdAt": "2014-09-04T21:08:25.401Z",
"meta": {
"item": 0,
"itemName": "your-reference-name",
"tracking": "XXX",
"service": "US-FC"
}
}
Order status is exposed via the status
and events
attributes of order objects and the status
attribute of each order item object.
Each individual item has its own status because items may be processed separately. The individual item status is the name of the last item event that occurred for that item, or name of last order event if more recent.
Order event types
Name | Description |
---|---|
quote |
This is an order-ready quote, and can be used to place an order |
order |
Order has been placed, and is being processed |
validated |
Design has been validated. |
paid |
Order has been paid for and billed. Currently being processed for printing |
unpaid |
Insufficient billing balance or credit to place the order, order is on hold until billing replenished |
printing |
Billing successful and all items are printing |
shipped |
All items have shipped |
cancelled |
Order has been cancelled |
address-changed |
Address has been changed |
expired |
Returned order has been inactive for two or more weeks |
Item event types
Name | Description |
---|---|
printing |
Item is currently printing |
shipped |
Item has shipped |
cancelled |
Item has been cancelled |
hold |
Item is on hold |
Order status webhook
WEBHOOK EVENT REQUEST
{
"orderId": "54051cb9e4653e7e5b3fbb87",
"event": {
"name": "order",
"description": "Order placed. Processing",
"createdAt": "2014-09-04T21:08:25.401Z"
}
}
{
"orderId": "54051cb9e4653e7e5b3fbb87",
"event": {
"name": "shipped",
"description": "Shipped item",
"createdAt": "2014-09-04T21:08:25.401Z",
"meta": {
"item": 0,
"tracking": "XXX",
"service": "US-FC"
}
}
}
{
"orderId": "54051cb9e4653e7e5b3fbb87",
"event": {
"name": "cancelled",
"description": "Entire order has been cancelled",
"createdAt": "2014-09-04T21:08:25.401Z",
"meta": {
"reason": "Cancelled via API"
}
}
}
The order status webhook is a POST
request that is sent to the URL in your account settings when an update occurs to the order events.
If there are multiple order items (in a bulk order) then multiple events may occur. Currently, the three different events order status webhook keeps track of are order
, validated
, shipped
, delivered
and cancelled
.
The webhook request is sent as multipart/form-data
.
Request
Returns
The response from the webhook request is ignored
Event request object
Attribute | Type | Description |
---|---|---|
orderId |
string | Unique id for the affected order |
event |
object | Event object |
Change order address
DEFINITION
POST {{base}}{{print.order.base}}/{orderId}/changeAddress
EXAMPLE REQUEST
curl "{{base}}{{print.order.base}}/{orderId}/changeAddress" \
-u "{{username}}:{{apiKey}}" \
-d "itemIndex=0" \
-d "address[name]=My Customer" \
-d "address[address1]=123 Scalable Drive" \
-d "address[city]=West Pressfield" \
-d "address[state]=CA" \
-d "address[zip]=12345"
EXAMPLE RESPONSE
{
"status": "validated",
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"mode": "test",
"createdAt": "2014-08-15T01:46:02.035Z",
"warnings": [ ],
"events": [
{
"name": "quote",
"description": "Quote completed",
"createdAt": "2014-08-15T01:46:02.036Z"
},
{
"name": "order",
"description": "Order placed. Processing",
"createdAt": "2014-08-15T05:50:07.300Z"
}
{
"name": "validated",
"description": "All ordered items have passed validation"
}
{
"name": "address-changed",
"description": "Item shipping address has been changed",
"meta": {
"from": {
"name": "My Customer",
"address1": "123 Scalable Drive",
"city": "West Pressfield",
"state": "CA",
"zip": "12345",
"country": "US"
}
"to": {
"name": "My Customer",
"address1": "456 Scalable Road",
"city": "West Pressfield",
"state": "CA",
"zip": "12345",
"country": "US"
},
"createdAt": "2014-08-15T09:25:54.652Z"
}
}
...
So long as an order’s status has been validated and is not cancelled
or shipping
, an order’s shipping address can be changed using the orderId. An order’s status and orderId can both be found in order object, which can be accessed when you retrieve a single order.
Arguments
Item index and an address object
Returns
Returns an order object with an additional event with a meta that documents the original and new to address
Cancel entire order
DEFINITION
DELETE {{base}}{{print.order.base}}/{orderId}
EXAMPLE REQUEST
curl -X delete "{{base}}{{print.order.base}}/{orderId}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
{
"deletedAt": "2014-08-15T08:03:02.035Z",
"status": "cancelled",
"total": 224.17,
"subtotal": 191.99,
"tax": 20.38,
"fees": 1,
"shipping": 10.80,
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"mode": "test",
"createdAt": "2014-08-15T01:46:02.035Z",
"warnings": [ ],
"events": [
{
"name": "quote",
"description": "Quote completed",
"createdAt": "2014-08-15T01:46:02.036Z"
},
{
"name": "order",
"description": "Order placed. Processing",
"createdAt": "2014-08-15T05:50:07.300Z"
}
{
"name": "validated",
"description": "All ordered items have passed validation",
"createdAt": "2014-08-15T06:15:03.603Z"
}
{
"name": "cancelled",
"description": "Entire order has been cancelled",
"neta": {
"reason": "Cancelled via API"
},
"createdAt": "2014-08-15T088:03:02.035Z"
}
],
"items": [
{
"type": "dtg",
"designId": "53ed3a23b3730f0e27a66514",
"status": "cancelled",
"address": {
"name": "My Customer",
"address1": "123 Scalable Drive",
"city": "West Pressfield",
"state": "CA",
"zip": "12345",
"country": "US"
},
"products": [
{
"productId": "gildan-sweatshirt-crew",
"color": "ash",
"quantity": 12,
"size": "lrg"
}
],
"designUrl": "{{base}}{{print.design.base}}/53ed3a23b3730f0e27a66514"
}
],
"orderId": "53ed665ab3730f0e27a66516"
}
So long as an order’s status has not reached printing
, you can cancel an order by using the orderId. An order’s status and orderId can both be found in order object, which can be accessed when you retrieve a single order.
Arguments
None
Returns
Returns an order object with an deletedAt
timestamp that records the time the order object was cancelled.
Event API
The Event API helps you keep track of event of your orders
Query events
DEFINITION
GET {{base}}{{print.event.base}}
EXAMPLE REQUEST
curl "{{base}}{{print.event.base}}?start=2015-12-02&end=2015-12-04" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
[
{
"name": "quote",
"description": "Quote completed",
"orderId": "565f3c9a723af50277cdac12",
"createdAt": "2015-12-02T18:46:51.431Z",
"eventId": "565f3c9b723af50277cdac13"
},
{
"name": "order",
"description": "Order placed. Processing",
"orderId": "565f3c9a723af50277cdac12",
"createdAt": "2015-12-02T18:51:44.782Z",
"eventId": "565f3dc1723af50277cdac1e"
},
{
"name": "validated",
"description": "Order has been validated",
"orderId": "565f3c9a723af50277cdac12",
"createdAt": "2015-12-02T18:52:50.516Z",
"eventId": "565f3e11de3b48bb18831e9b"
},
{
"name": "quote",
"description": "Quote completed",
"orderId": "565f3c9a723af50277cdac17",
"createdAt": "2015-12-03T18:28:31.811Z",
"eventId": "565f3e11de3b48bb18831eaa"
}
]
Events contain useful information about the state of your order.
Arguments
Attribute | Type | Description |
---|---|---|
orderId |
string | ID of an order. When given, only events of that order will be returned |
name |
string | Event name. When given, only events with the provided name will be returned |
start |
date | Lower bound cutoff time. When given, only events after the provided date will be returned. Date must be formatted ISO 8601 |
end |
date | Upper bound cutoff time. When given, only events after the provided date will be returned. Date must be formatted ISO 8601 |
itemIndex |
number | Index of an order item. When given, only events of this item index will be returned. |
itemName |
number | Name of an order item. When given, only events of items with this name will be returned |
sort |
string | Sort direction of the return result. Accepted values are ‘createdAt’ and ‘-createdAt’, for ascending and descending event dates, respectively. |
Returns
Returns an array of event objects.
Retrieve single event
DEFINITION
GET {{base}}{{print.event.base}}/{eventId}
EXAMPLE REQUEST
curl "{{base}}{{print.event.base}}/{eventId}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
{
"name": "quote",
"description": "Quote completed",
"orderId": "565f3c9a723af50277cdac17",
"createdAt": "2015-12-12T18:28:31.811Z",
"eventId": "565f3e11de3b48bb18831eaa"
}
Provide the eventId
in order to receive the details of an event.
Arguments
None
Returns
Returns a event object.
Event Object
Attribute | Type | Description |
---|---|---|
name |
string | Name of the event (quote, order, etc.) |
createdAt |
timestamp | Time when the event happened |
description |
string | Description of the event |
orderId |
string | Unique identifier of the order that the event is about |
itemIndex |
number | Index of the order item that the event is about |
itemName |
number | Name of the order item that the event is about |
meta |
object | Optional additional data. |
Design API
The Design API takes in information about your print design (dimensions, files, position, etc.) and provides you with a designId which can be used to place an order.
Designs cannot be modified once created.
Create design object
DEFINITION
POST {{base}}{{print.design.base}}
EXAMPLE REQUEST
curl "{{base}}{{print.design.base}}" \
-u "{{username}}:{{apiKey}}" \
-F "type=screenprint" \
-F "sides[front][artwork]=@image.eps" \
-F "sides[front][colors][0]=white" \
-F "sides[front][dimensions][width]=5" \
-F "sides[front][position][horizontal]=C" \
-F "sides[front][position][offset][top]=2.5" \
-F "customization[0][id]=customization-id"
EXAMPLE RESPONSE
{
"mode": "test",
"type": "screenprint",
"createdAt": "2014-03-15T16:59:19.596Z",
"validation": {
"result": null,
"status": "finished"
},
"sides": {
"front": {
"artwork": "http://scalablepress.com/exampleimage.eps",
"resize": true,
"aspect": 1.008371385083714,
"dimensions": {
"width": 5
},
"position": {
"horizontal": "C",
"offset": {
"top": 2.5
}
},
"colors": [
"white"
]
}
},
"designId": "53ee3c6781cc09072c6af341"
}
Provide the details on your design in order to receive a designId, which is required to place an order.
Arguments
Design Object
Attribute | Type | Description |
---|---|---|
name |
string | Optional reference name for design |
type |
string | Type of product this design is for. screenprint , dtg , case , mug , or poster |
sides |
object | Design sides object |
validation |
object | Design validation object |
Design Validation Object
Attribute | Type | Description |
---|---|---|
result |
object | Result of validation - will return null for now |
status |
string | Status of the validation object |
Design Sides Object
Attribute | Type | Description |
---|---|---|
front | object | Design side object |
back | object | Design side object |
left | object | Design side object |
right | object | Design side object |
For case, mug and poster printing, only the front side is used.
At least one side is required for the design
Design Customization Object
Attribute | Type | Description |
---|---|---|
customization |
array | Optional list of each desired customization applied to the design |
Design Side Object
Attribute | Type | Description |
---|---|---|
artwork |
file or URL | Artwork file or absolute URL for this side of the design. Artwork requirements |
proof |
file or URL | Optional proof image file or absolute URL showing position of artwork on the product, used by our artists to make sure the print dimensions and position are as intended |
aspect |
number | Aspect ratio |
resize |
boolean | Boolean checking if design should be resized |
colors | array | Screenprint only, list of each named color or PMS color used in design. Artwork requirements |
dimensions | object | Screenprint/DTG/poster only, dimension object |
position | object | Screenprint/DTG only, position object |
Dimension Object
Attribute | Type | Description |
---|---|---|
width |
number | Screenprint/DTG/poster only, width in inches of the print on the garment, or the width of the poster, specify this OR the height of the print |
height |
number | Screenprint/DTG/poster only, height in inches of the print on the garment, or the height of the poster, specify this OR the width of the print |
Position Object
Attribute | Type | Description |
---|---|---|
horizontal |
string | Screenprint/DTG only, horizontal position. Artwork requirements |
offset |
object | Screenprint/DTG only, position offset object |
Position Offset Object
Attribute | Type | Description |
---|---|---|
top |
number | top offset in inches, specify this OR the bottom offset of the print |
bottom |
number | bottom offset in inches, specify this OR the top offset of the print |
Customization Object
Attribute | Type | Description |
---|---|---|
id |
string | Name of the desired customization |
Resize
EXAMPLE REQUEST
curl "{{base}}{{print.design.base}}" \
-u "{{username}}:{{apiKey}}" \
-F "type=screenprint" \
-F "sides[front][artwork]=@image.eps" \
-F "sides[front][colors][0]=white" \
-F "sides[front][dimensions][width]=5" \
-F "sides[front][position][horizontal]=C" \
-F "sides[front][position][offset][top]=2.5" \
-F "sides[front][resize]=true"
DTG prints
DTG prints will resize automatically for no additional cost.
Screenprints
The design will print one size regardless of garment size and type. However, if specific conditions are met, for an additional cost, setting resize to true will result in a second sized print. These conditions include:
- if there are five or more garment size options between the largest and smallest garment size selected
- if back side is selected and any standard/pocket garment is selected with any small/youth garment
- if front side is selected, any standard garment is selected with a non-standard garment, and the smallest standard garment size is bigger than the largest standard garment size
Garment design classifications
Garment design sizes are classified into four different categories.
Category | Size | Description |
---|---|---|
standard |
14' x 16' | Adult sized garments |
pocket |
10' x 10' (including height offset) | Adult sized garments with pockets, i.e. hoodies |
small |
10' x 12' | Ladies' and youth sized garments |
youth-pocket |
10' x 6' (including height offset) | Youth sized garments with pockets, i.e. hoodies |
Retrieve Design Object
DEFINITION
GET {{base}}{{print.design.base}}/{designId}
EXAMPLE REQUEST
curl "{{base}}{{print.design.base}}/{designId}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
{
"mode": "test",
"type": "screenprint",
"createdAt": "2014-03-15T16:59:19.596Z",
"validation": {
"result": null,
"status": "finished"
},
"customization": [
{
"id":"customization-id"
},
],
"sides": {
"front": {
"artwork": "http://scalablepress.com/exampleimage.eps",
"resize": true,
"aspect": 1.008371385083714,
"dimensions": {
"width": 5
},
"colors": [
"white"
]
}
},
"designId": "53ee3c6781cc09072c6af341"
}
Provide the designId
in order to receive the details of a previously submitted design.
Arguments
None
Returns
Returns a design response object.
Design Response Object
Attribute | Type | Description |
---|---|---|
type |
string | the type of product this design is for. screenprint , dtg , case , mug , or poster |
createdAt |
timestamp | Time when design was created |
validation |
object | Design validation object |
customization | array | Array of customization objects |
sides |
object | Design sides object |
mode |
string | test or live |
Delete Design
DEFINITION
DELETE {{base}}{{print.design.base}}/{designId}
EXAMPLE REQUEST
curl -X delete "{{base}}{{print.design.base}}/{designId}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
{
"deletedAt": "2014-03-15T17:15:35.596Z",
"mode": "test",
"type": "screenprint",
"createdAt": "2014-03-15T16:59:19.596Z",
"validation": {
"result": null,
"status": "finished"
},
"customization": [
{
"id": "customization-Id"
},
],
"sides": {
"front": {
"artwork": "http://scalablepress.com/exampleimage.eps",
"resize": true,
"aspect": 1.008371385083714,
"dimensions": {
"width": 5
},
"colors": [
"white"
]
}
},
"designId": "53ee3c6781cc09072c6af341"
}
Provide the designId
in order to delete a previously submitted design.
Arguments
None
Returns
Returns adesign response object with an extra deletedAt
number that records the time at which the design was deleted.
Customization API
The Customization API returns customizations, such as stickers and tags, available to you. Customizations can be added to your designs upon creation.
Customizations can only be added to designs at the time of creation.
Retrieve Customizations
DEFINITION
GET {{base}}{{print.customization.base}}
EXAMPLE REQUEST
curl "{{base}}{{print.customization.base}}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
[
{
"name": "Example Brand Sticker",
"createdAt": "2014-08-15T01:46:02.036Z",
"customizationId": "example-brand-sticker"
},
{
"name": "Example Hang Tag",
"createdAt": "2014-03-15T16:59:19.596Z",
"customizationId": "example-hang-tag"
}
]
Arguments
None
Returns
Returns an array of customization response objects.
Customization Response Object
Attribute | Type | Description |
---|---|---|
name |
string | Display name for the customization |
createdAt |
timestamp | Time when customization was created |
customizationId |
string | Unique name used to identify the customization to the Design API |
Billing API
The Scalable Press API allows orders to be placed without paying first. However customers with insufficient credit in their account will have orders held until enough credit is available.
Every order has a corresponding Invoice object that is created after the order has passed the validated
status. The invoice object lists the total
amount charged, and the remaining balance
due.
Payment can be made against the invoice if a balance is still outstanding.
Currently the billing API only allows paying an invoice by providing a PayPal transaction ID. Credit card, PayPal checkout, and ACH payment is possible via the Scalable Press website only.
List invoice objects
DEFINITION
GET {{base}}{{print.billing.invoice.base}}/invoice
EXAMPLE REQUEST
curl "{{base}}{{print.billing.invoice.base}}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
[
{
"invoiceId": "551337e45fcb0a64bbb12e37",
"createdAt": "2015-03-25T22:34:12.973Z",
"orderId": "5429cf1400c4a8722b9f383c",
"total": 150,
"balance": 2
},
{
"invoiceId": "551337e45fcb0a64bbb12e36",
"createdAt": "2015-03-22T22:34:12.871Z",
"orderId": "54259d14ad280599693cf91d",
"total": 55.56,
"balance": 0
}
]
Shows all invoices for an account, sorted descending.
Arguments
Attribute | Type | Description |
---|---|---|
Page |
number | Required. Specifies the number of documents to skip. |
Limit |
number | Required. Specifies the maximum number of documents the query will return. |
Invoice object
Attribute | Type | Description |
---|---|---|
invoiceId |
string | Unique id for the order, can be used to get invoice information or pay the invoice |
createdAt |
timestamp | The time at which the invoice object was created |
orderId |
string | The order that this invoice is for |
total |
number | The dollar total charges on the invoice, matches the order total |
balance |
number | The dollar total that remains unpaid on the invoice. A negative balance indicates overpayment |
Returns
Returns an array of Invoice objects.
Retrieve invoice object
DEFINITION
GET {{base}}{{print.billing.invoice.base}}/invoice/{invoiceId}
EXAMPLE REQUEST
curl "{{base}}{{print.billing.invoice.base}}/invoice/{invoiceId}" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
{
"invoiceId": "551337e45fcb0a64bbb12e37",
"createdAt": "2015-03-25T22:34:12.973Z",
"orderId": "5429cf1400c4a8722b9f383c",
"total": 150,
"balance": 2
}
Provide the invoiceId
in order to receive the details of an invoice
Arguments
None
Returns
Returns a Invoice object.
Pay invoice with PayPal transaction
DEFINITION
POST {{base}}{{print.billing.invoice.base}}/invoice/{invoiceId}/pay/paypal
EXAMPLE REQUEST
curl -X POST "{{base}}{{print.billing.invoice.base}}/invoice/{invoiceId}/pay/paypal" \
-u "{{username}}:{{apiKey}}" \
-d "transactionId=XXXXXXXXXXXX123" \
-d "amount=2.00" \
-d "email=paypalaccount@scalablepress.com"
EXAMPLE RESPONSE
{
"invoiceId": "551337e45fcb0a64bbb12e37",
"createdAt": "2015-03-25T22:34:12.973Z",
"orderId": "5429cf1400c4a8722b9f383c",
"total": 150,
"balance": 0
}
Send the transaction ID of a confirmed PayPal transaction in order to associate that payment with your billing account. The provided email
argument must match the payer email of the PayPal transaction. The amount
must match the amount of the transaction.
Each unique transaction can only be associated with any Scalable Press account once.
Multiple PayPal transactions can be used to pay off the same invoice, however until the total credits on the invoice equals or exceeds the invoice total, the associated order may remain on hold in the unpaid
status.
Arguments
Attribute | Type | Description |
---|---|---|
transactionId |
string | The PayPal transaction ID of a completed transaction |
amount |
number | Total amount of PayPal transaction |
email |
number | Email address of payer of PayPal transaction |
Returns
Returns a Invoice object with updated balance.
Mockup API
The Mockup API allows you to generate renderings printed products with your own artwork.
These images can be used in your online store.
Create mockup
DEFINITION
POST {{base}}{{print.mockup.base}}
curl "{{base}}{{print.mockup.base}}" \
-u "{{username}}:{{apiKey}}" \
-F "template[name]=front" \
-F "product[id]=gildan-cotton-t-shirt" \
-F "product[color]=Navy" \
-F "design[type]=dtg" \
-F "design[sides][front][artwork]=@image.png" \
-F "design[sides][front][dimensions][width]=5" \
-F "design[sides][front][position][horizontal]=C" \
-F "design[sides][front][position][offset][top]=2.5" \
-F "output[width]=1000" \
-F "output[height]=1000" \
-F "padding[height]=10" \
-F "output[format]=png"
EXAMPLE RESPONSE
{
"url": "@mockup.png"
}
Provide the details of your design and product in order to receive an URL of rendered mockup image.
Arguments
Mockup object
Attribute | Type | Description |
---|---|---|
template |
object | Template object |
product |
object | Mockup product object |
design |
object | Design object |
output |
object | Mockup output object |
Template object
Attribute | Type | Description |
---|---|---|
name |
string | Name of the mockup template. See available products for possible templates |
background |
string | Name of the background. See available backgrounds |
Mockup product object
Attribute | Type | Description |
---|---|---|
id |
string | productId of the mockup product. See available products |
color |
string | Color of the product, see the Product API for available colors, some colors may be unavailable in this API |
Mockup output object
Attribute | Type | Description |
---|---|---|
width |
number | Width of the output image in pixels |
height |
number | Height of the output image in pixels |
padding |
number | Minimum padding between the mockup and the image border in pixels |
format |
string | Format of the output image, supported formats are: png , jpg |
Available products
We currently support mockups for the limited selection of products and templates below:
More products and templates will be available in the future.
Product identifier | Template name | Description |
---|---|---|
gildan-cotton-t-shirt |
front |
Frontal view of a plain Gildan Cotton T-Shirt |
canvas-unisex-t-shirt |
front |
Frontal view of a plain Canvas Unisex T-Shirt |
Available backgrounds
Background name | Preview link |
---|---|
brick |
Preview |
ceramic-tiles |
Preview |
radiate |
Preview |
light-wood-planks |
Preview |
aged-wood-planks |
Preview |
dark-wood |
Preview |
grey-wood |
Preview |
rough-wood |
Preview |
Pagination
Scalable Press query APIs may be paginated. Requests for paginated resources will return 50 items by default. Query parameters can be used to change pagination behavior.
Paginated responses included information about the pagination status as well as Link
header for navigation.
Retrieve paginated resource
EXAMPLE REQUEST
curl "{{base}}{{print.event.base}}?page=3&limit=100" \
-u "{{username}}:{{apiKey}}"
EXAMPLE RESPONSE
[
{
"name": "quote",
"description": "Quote completed",
"orderId": "565f3c9a723af50277cdac12",
"createdAt": "2015-12-02T18:46:51.431Z",
"eventId": "565f3c9b723af50277cdac13"
},
{
"name": "order",
"description": "Order placed. Processing",
"orderId": "565f3c9a723af50277cdac12",
"createdAt": "2015-12-02T18:51:44.782Z",
"eventId": "565f3dc1723af50277cdac1e"
},
...
]
Arguments
Attribute | Type | Description |
---|---|---|
limit |
number | Items per page. Defaults to 50. |
page |
number | Page number to request. |
Response HTTP Headers
Field name | Description |
---|---|
X-SP-Pages |
Total number of pages for this query. |
X-SP-Count |
Total number of items of the query. |
Link |
Link headers of RFC5988. Possible rel values are: first , prev , next , and last . |
Custom order features
Additional custom features are available for your order.
- Select shipping option — select a preferred shipping option for an item in the order. Third party shipping account is required
- Custom shipping white-labeling - provide a custom from address on the shipping white label
Features Object
Attribute | Type | Description |
---|---|---|
shipping |
string | Shipping service code. Available service codes |
packing |
URL | Absolute URL for a PDF packing slip |
Select shipping option
EXAMPLE REQUEST
curl "{{base}}{{print.quote.base}}" \
-u "{{username}}:{{apiKey}}" \
-d "type=dtg" \
-d "products[0][id]=gildan-sweatshirt-crew" \
-d "products[0][color]=ash" \
-d "products[0][quantity]=12" \
-d "products[0][size]=lrg" \
-d "address[name]=My Customer" \
-d "address[address1]=123 Scalable Drive" \
-d "address[city]=West Pressfield" \
-d "address[state]=CA" \
-d "address[zip]=12345" \
-d "designId=53ed3a23b3730f0e27a66513" \
-d "features[shipping]=DHL-SM"
EXAMPLE RESPONSE
{
"total": 191.99,
"subtotal": 191.99,
"fees": 1,
"shipping": 0,
"orderToken": "c6ae6ca449719e5237d103139255ecdd",
"warnings": [ ],
"mode": "test"
}
We work with UPS, FEDEX, USPS (through Stamps.com) and DHL Global Mail to provide the best shipping option automatically. If you prefer greater control, the custom shipping feature allows you to select the exact shipping method used.
To use this feature, add one of these shipping codes to the shipping
attribute of the features object on an order item.
When selecting a custom shipping option, you can provide your own shipper billing. The postage will be charged to your shipper billing account, plus a $1/package handling fee added by Scalable Press.
Shipping Service Codes
United States Postal Service (USPS)
Code | Carrier | Services (selected by weight) |
---|---|---|
US-FC |
USPS | First Class |
US-PP |
USPS | Parcel Post |
US-PS |
USPS | Parcel Select |
US-PM |
USPS | Priority Mail |
US-FCI |
USPS | First Class International |
US-PMI |
USPS | Priority Mail International |
United Parcel Service (UPS)
Code | Carrier | Services (selected by weight) |
---|---|---|
UPS-1DA |
UPS | Next Day Air |
UPS-1DP |
UPS | Next Day Air Saver |
UPS-2DA |
UPS | 2 Day |
UPS-3DS |
UPS | 3 Day Select |
UPS-GND |
UPS | Ground |
FedEx
Code | Carrier | Services (selected by weight) |
---|---|---|
FDX-FO |
FEDEX | First Overnight |
FDX-PO |
FEDEX | Priority Overnight |
FDX-SO |
FEDEX | Standard Overnight |
FDX-2DA |
FEDEX | 2 Day AM |
FDX-2D |
FEDEX | 2 Day |
FDX-ES |
FEDEX | Express Saver |
FDX-GND |
FEDEX | Ground |
Dalsey, Hillblom & Lynn (DHL)
Code | Carrier | Services (selected by weight) |
---|---|---|
DHL-SM |
DHL | Smart Mail (SM) Parcels standard or SM Parcels plus standard |
DHL-SME |
DHL | Smart Mail (SM) Parcels expedited or SM Parcels plus expedited |
DHL-GM |
DHL | GM Packet Plus or GM Parcel Priority |
DHL-GME |
DHL | Global Mail (GM) Packet Priority PKY or GM Packet Priority PLY |
Individual items in a bulk order may use different custom shipping methods, or not use a custom shipping method at all. Items in a bulk order not using a custom shipping method will be quoted with the standard fixed shipping price.
Multiple items in a bulk order with the same destination address are shipped in one package. If such items have conflicting custom shipping methods, one of the methods will be selected.
Custom white-labeling shipping
EXAMPLE REQUEST
curl "{{base}}{{print.quote.base}}" \
-u "{{username}}:{{apiKey}}" \
-d "type=dtg" \
-d "products[0][id]=gildan-sweatshirt-crew" \
-d "products[0][color]=ash" \
-d "products[0][quantity]=12" \
-d "products[0][size]=lrg" \
-d "address[name]=My Customer" \
-d "address[address1]=123 Scalable Drive" \
-d "address[city]=West Pressfield" \
-d "address[state]=CA" \
-d "address[zip]=12345" \
-d "designId=53ed3a23b3730f0e27a66513"
-d "data[whitelabel][name]=My Customer" \
-d "data[whitelabel][company]=Scalable Press" \
-d "data[whitelabel][address1]=321 Scalable Way" \
-d "data[whitelabel][city]=East Pressfield" \
-d "data[whitelabel][state]=CA" \
-d "data[whitelabel][zip]=54321"
Custom shipping white labels can be made per-order. When generating the order’s quote, add a data[whitelabel] input. The data[whitelabel] field takes in an address object; the address object should correspond to your desired FROM address with the name input being your company’s name.
Account-wide shipping white labeling is available. Contact a sales representative for more information.
Common errors
These errors may be encountered when making quotes or orders.
Insufficient quantity
EXAMPLE RESPONSE
{
"total": 102875.64,
"subtotal": 102838.64,
"fees": 1,
"shipping": 36,
"orderToken": null,
"orderIssues": [
{
"code": "insufficient_quantity",
"path": null,
"message": "Total quantity requested for 'gildan-sweatshirt-crew, ash, med' exceeds our amount in stock.",
"product": {
"id": "gildan-sweatshirt-crew",
"color": "ash",
"size": "med",
"requestedQuantity": 15000,
"availableQuantity": 3450
}
}
],
"warnings": [ ],
"mode": "test"
}
When a quote request or bulk quote request requires more of a specific item than available, an order issue with code insufficient_quantity
is returned. To check availability of products, see listing product availability.
Invalid product
EXAMPLE RESPONSE
{
"statusCode": 400,
"issues": [
{
"code": "bad_value",
"path": "items[0][products][0]",
"message": "Color and size combination unavailable: 'red', 'xxxxs' for 'gildan-sweatshirt-crew'"
}
]
}
When a quote request or bulk quote request requires an item that is not currently carried by Scalable Press, a quote issue occurs with code bad_value
.
You can check the current availability of your product, color, and size via the Product API
Valid Sizes
Size | Description |
---|---|
xxsml |
2 x extra small |
xsml |
extra small |
sml |
small |
med |
medium |
lrg |
large |
xlg |
extra large |
xxl |
2 x extra large |
xxxl |
3 x extra large |
xxxxl |
4 x extra large |
xxxxxl |
5 x extra large |
xxxxxxl |
6 x extra large |
Not all sizes will be available for all garments. Check the Product API
Ink colors
EXAMPLE RESPONSE
{
"statusCode": 400,
"issues": [
{
"code": "bad_value",
"path": "sides[front][colors][0]",
"message": "Color 'golden muave' is not valid"
}
]
}
When making a screenprint design, the supplied colors must be from our available colors. See artwork requirements.