Help / Placing Orders

API

You can find most of the pertinent information on using the API here in our API docs. If there is something you have a question about, please send an email to help@shortrunposters.com and we'll get back with you asap.

Here's a quick overview:

Terms

Common terms you will encounter in the api documentation:

  • Base Products - The actual products that PrintOps produces, referenced by SKU
  • Template Products - A set of User Products that can be used for creating orders with custom or unique images.
  • User Products - The products that you create on PrintOps that represent the items you are selling.
  • Image - The actual, high resolution image used for printing a User Product.
  • Scale Option - How your Image should be placed onto the print area of a User Product (fit, fill, stretch or noscale).
  • Store - The parent entity that groups User Products, Orders and Shipments.
  • Order - The record of a collection of User Products and shipping details.
  • Line Item - The item in an order that represents a User Product.
  • Fulfillment - A group of User Products that ship together in one box.
  • Shipment - A record of dispatch for a Fulfillment - includes tracking information.

Authentication

We use simple token based authentication. To generate a token to use with our API, you can navigate to your settings page to the API section and generate a token here. To authenticate requests, add a Bearer Authorization header to your request with the token.

Endpoints

You can see all the endpoints here - typically you'll need to include the resource id in the url of the request. For instance, to retrieve a store with the id of 123456, the url will look like https://printops.com/api/stores/123456.

Creating an Order

When creating orders, there are a few things to keep in mind:

  • Currently, we don't support creating userProducts through the API - this is done only through the web interface. We will be adding this feature in the near future.
  • You can place orders for static or custom products, but there are a few extra steps for custom products, which you can find details on below.
  • The external_order_id field must be unique.
  • The requested_shipping field must be a "code" value from this list.
  • Each Line Item in an Order needs to have the SKU of the User Product that is being ordered.

Custom Products

If you have a scenario where some or all images you print for your customers are different, we have a two main methods to accomplish this.

First, you can include a publicly accessible url for the file to be printed, and we will download the file after order creation. You must specify this url in the image_url field for Line Items. You must also specify the image_name field as well.

Second, we can setup a shared DropBox where you will load your images prior to creating an order. You must only specify the image_name field, and all filenames must be unique. Please contact us at help@printops.com to inquire about setting up a shared DropBox.

Lastly, there are four Scale Options that you can use to specify how your custom image should be placed within the image area of the poster.

  • Fill - fill The image will be scaled proportionately to fill the image area. For instance, if you have a 9"x9" square image for a 9"x12" poster, this option will scale the image to 12"x12" and center it on the page. This will cut off 1.5" from two opposite sides.
  • Fit - fit The image will be scaled proportionately to fit within the image area. If you have a 9"x9" square image for 9"x12" poster, this option will scale the image down to 9"x9" and center it on the page. 100% of the image will be printed, but there will be 1.5" of white space on 2 opposite sides.
  • Stretch - stretch The image will be stretched to fit the print area exactly, no proportions are constrained. If you have a 9"x9" image for a 9"x12" poster, the image will be distorted to 9"x12".
  • No Scale - noscale The image will be centered and printed at 100% regardless of it's size or the poster size. If you have a 9"x12" image with bleed and crop marks, your image will be centered on the page and printed as is. This option is ideal if you have correctly sized images with bleed.

For the SKU field in Line Items, you will use the SKU of the Base Product, for instance 18x24 poster is PP18.

Please note: to use the image_url and image_name fields for custom products, you have to generate Template Products first.

To generate template products in your store, navigate to the store in question, scroll to the bottom and look for the "Settings" link on the left side at the bottom.

Click the link, and look for the Template Products row.

You should then see a "Generate Template Products" button - click this to generate.

If this button is grayed out or unclickable, the template products already exist. Keep in mind that you won't be able to see these items in your store catalog.

Webhooks

You can subscribe to webhooks either through the UI or through the API. We currently have two webhooks available: Order Status Updates and Shipments.

You are required to generate a secret through the UI to use webhooks. This secret is used as a signing request and the request will include a Signature header that will include the signature. The receiving app can use a simple sha256 Hash to confirm the payload has not been tampered with.