How To

New: Revamped Analytics & Expense Tracking

We just released the ability to create expenses for your shop and specific orders.  You can also see profit/loss charts for individual orders too.

Lastly we revamped out analytics features to be faster and easier to use.  You can now see:

  • Total sales
  • Total sales by user
  • Quotes/Invoices created by date
  • Revenue/expenses by date
  • Sales tax generated by date
  • Sales by line item category

This update is for all Printavo plans, enjoy!

How To Use Printavo’s API – Updating Orders

An API is a way to pull and push data into one application from another.  We built an API to allow our customers to connect 3rd party applications on the web to Printavo which helps you be even more efficient.  Beware, this article might get a bit technical for some folks.

In this example, we’ll be updating an existing order using PUT to your Printavo account.  <a href=”http://blog.teamtreehouse.com/its-time-to-httparty” target=”_blank”>Read more</a> about sending data to APIs. Note that if you add an ID to a line item or fee attribute, it will update the existing object. If there’s no ID, a new object will be created.

Here’s is an example JSON object you would PUT to our API:

{
 "key": "your_api_key",
 "id": existing_order_id,
 "sales_tax": 10.0,
 "discount": 5.0,
 "discount_as_percentage": false,
 "customer_id": 91167,
 "user_id": 25,
 "orderstatus_id": 1546,
 "production_notes": "",
 "order_nickname": "",
 "formatted_due_date": "05/01/2016",
 "formatted_customer_due_date": "05/01/2016",
 "lineitems_attributes": [{
   "id": 1270394,
   "style_description": "Gildan 2000 100% Cotton 2",
   "taxable": true,
   "style_number": "G2000",
   "color": "White",
   "size_other": null,
   "size_yxs": null,
   "size_ys": null,
   "size_ym": null,
   "size_yl": null,
   "size_yxl": null,
   "size_xs": null,
   "size_s": null,
   "size_m": null,
   "size_l": 15,
   "size_xl": null,
   "size_2xl": null,
   "size_3xl": 30,
   "size_4xl": null,
   "size_5xl": null,
   "size_6xl": null,
   "unit_cost": 9.5
 }, {
   "id": 1270395,
   "style_description": "Gildan 2000 100% Cotton",
   "taxable": true,
   "style_number": "G2000",
   "color": "Blue",
   "size_other": null,
   "size_yxs": null,
   "size_ys": null,
   "size_ym": null,
   "size_yl": null,
   "size_yxl": null,
   "size_xs": null,
   "size_s": null,
   "size_m": null,
   "size_l": 40,
   "size_xl": 15,
   "size_2xl": null,
   "size_3xl": 1,
   "size_4xl": null,
   "size_5xl": null,
   "size_6xl": null,
   "unit_cost": 7.0
 }],
 "order_fees_attributes": [{
   "id": insert_existing_id
   "amount": 15.0,
   "description": "Shipping Fee",
   "taxable": true
 }]
 }

View full documentation

How To Use Printavo’s API – Creating Orders

An API is a way to pull and push data into one application from another.  We built an API to allow our customers to connect 3rd party applications on the web to Printavo which helps you be even more efficient.  Beware, this article might get a bit technical for some folks.

In this example, we’ll be POSTing a new order to your Printavo account.  Read more about sending data to APIs.

Here’s is an example JSON object you would POST to our API:

{
 "key": "your_api_key",
 "sales_tax": 10.0,
 "discount": 5.0,
 "discount_as_percentage": false,
 "customer_id": insert_customer_id,
 "user_id": insert_user_id,
 "orderstatus_id": insert_orderstatus_id,
 "production_notes": "",
 "order_nickname": "",
 "formatted_due_date": "05/01/2016",
 "formatted_customer_due_date": "05/01/2016",
 "lineitems_attributes": [{
    "style_description": "Gildan 2000 100% Cotton",
    "taxable": true,
    "style_number": "G2000",
    "color": "White",
    "size_other": null,
    "size_yxs": null,
    "size_ys": null,
    "size_ym": null,
    "size_yl": null,
    "size_yxl": null,
    "size_xs": null,
    "size_s": null,
    "size_m": null,
    "size_l": 15,
    "size_xl": null,
    "size_2xl": null,
    "size_3xl": 30,
    "size_4xl": null,
    "size_5xl": null,
    "size_6xl": null,
    "unit_cost": 6.5
 }, {
    "style_description": "Gildan 2000 100% Cotton",
    "taxable": true,
    "style_number": "G2000",
    "color": "Blue",
    "size_other": null,
    "size_yxs": null,
    "size_ys": null,
    "size_ym": null,
    "size_yl": null,
    "size_yxl": null,
    "size_xs": null,
    "size_s": null,
    "size_m": null,
    "size_l": 40,
    "size_xl": 15,
    "size_2xl": null,
    "size_3xl": 1,
    "size_4xl": null,
    "size_5xl": null,
    "size_6xl": null,
    "unit_cost": 5.0
 }],
 "order_fees_attributes": [{
    "amount": 15.0,
    "description": "Shipping Fee",
    "taxable": true
 }]
}

View full documentation