Connect with our API and we can print and ship your t-shirt orders. Printaura offers a Print on Demand API that lets you choose from 100s of t-shirts fulfilled easily. With our t-shirt API we handle your orders from your own website. No more worrying about sending your orders over to a t-shirt printer who only accepts email. View all of our print on demand t-shirts using direct to garment technology.
Overview:
Printaura's API was developed to give you access to all the features that are available in our Sellers Management section for t-shirt fulfillment via an easy to use API. You can now integrate your own application or website with our API and have access to the many features available such as:
- Get an up to date list of all the available products.
- Get up to date prices for different product combinations , shipping methods and extra features to grow your brand such as hangtag removal, tagless label application.
- Retrieve up to date information regarding the colors and sizes each product is available in.
- Upload images and artwork to your Image library, or get details about your image library.
- Place new Orders with all the options that are available in the Sellers section.
- Retrieve details regarding your already placed orders and the status of the order as well as tracking information when shipped.
Printaura Products:
Printaura Products let's you easily create your own Printaura Products which can then be used to order T-shirts or activated in one of our APPs. This means when the product is ordered on your Shop it will be automatically processed by Printaura.
You may also Manage your Printaura products by visiting our Manage Products interface.
General Outlook:
The API consists of different methods which you may use to build your application / plugin. To give you a general outlook of the system, For a normal eCommerce plugin, This is the process that should be followed to place a new order using the API:
- At Printaura, Brands consist of different products, Products are available in different pre-defined sizes and colors therefor firstly using method listbrands a full list of the brands should be retrieved, saving the information needed as well as the brand_id.
- For the Brands that you would like to retrieve products for, using the already saved brand_id and method listproducts a full list of the products should be retrieved saving all the details required as well as size_id and color_id
- If you would like to retrieve info about the sizes and colors that the specific product is available in, You may do so using methods listcolors and listsizes and the unique ID's saved in the last step.
- Retrieve Shipping methods available using method listshipping and save the shipping_id
- Using all the information saved on steps above, place a new order using method addorder
Developer Notes:
- All parameters are to be POSTed to the API.
- In the "API Functions" section below, the successful outputs are limited to 2 items, this is to simply to show the sample output, the methods do usually return more than two items.
- $result is always 0 when the API call fails and a $message is then provided with a human readable error. $result is always 1 when the API call was successful and a $results array returned with the results of the call.
- You can view API error codes here
Getting Started:
To activate API for your Seller account please visit our Seller API page. From here you may Activate API access for your account and retrieve the API Key & Hash that is to be used to authenticate your requests.
API Functions:
-
listbrands
Note
This method Lists Printaura's Current Brands.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listbrands) Format: STRING - REQUIREDSample Success Returns
{"result":1,"results":[{"brand_id":"1","brand_name":"Gildan"},{"brand_id":"2","brand_name":"American Apparel"}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
listsizes
Note
This method Lists Printaura's Current Sizes and Their Groups.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listsizes) Format: STRING - REQUIREDSample Success Returns
{"result":1,"results":[{"size_id":"1","size_name":"Small","size_group":"Adult","plus_size_charge":"0.00"},{"size_id":"2","size_name":"X-Small","size_group":"Adult","plus_size_charge":"0.00"}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
listcolors
Note
This method Lists Printaura's Current Colors.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listcolors) Format: STRING - REQUIREDSample Success Returns
{"result":1,"results":[{"color_id":"1","color_name":"White","color_code":"FFFFFF","color_group":"White"},{"color_id":"2","color_name":"Army Green","color_code":"65734B","color_group":"Color"}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
listproducts
Note
This method Lists Printaura's Current Products. The method will also list available sizes and colors for each product. Please note that, Product, Brand, Color, Size and shipping details for each are returned in the form of their ID, please use the relevant method to retrieve details for each, for example use listcolors method to retrieve details such as color name and color html code, for the color_id. This is done to keep your Application and our API as dynamic as possible.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listproducts) Format: STRING - REQUIRED
Name: product_id Description: Specify what product you want Format: INTEGER- OPTIONAL
Name: show_mockups Description: Add Mockup information to the return Format: BOOLEAN - OPTIONALSample Success Returns
{"result":1,"results":[{"product_id":"1","product_name":"Men\\'s T-Shirt","brand_id":"1","shipping_id":"1","price":"3.25","color_price":"4.25","colors":{"67":["1","3","4","5","6"],"66":["1","3","4","5","6"],"64":["1","3","4","5","6","7"],"63":["1","3","4","5","6"],"62":["1","3","4","5","6","7"],"61":["1","3","4","5","6","7"],"60":["1","3","4","5","6","7","8","9"],"57":["1","3","4","5","6","7"],"55":["1","3","4","5","6","7"],"54":["1","3","4","5","6","7","8","9"],"50":["1","3","4","5","6","7"],"49":["1","3","4","5","6"],"44":["1","3","4","5","6","7"],"41":["1","3","4","5","6","7","8","9"],"43":["1","3","4","5","6","7"],"40":["1","3","4","5","6","7"],"38":["1","3","4","5","6","7"],"34":["1","3","4","5","6"],"31":["1","3","4","5","6","7"],"28":["1","3","4","5","6","7"],"27":["1","3","4","5","6","7"],"26":["1","3","4","5","6","7"],"25":["1","3","4","5","6"],"22":["1","3","4","5","6"],"21":["1","3","4","5","6","7"],"19":["1","3","4","5","6","7"],"17":["1","3","4","5","6","7"],"11":["1","3","4","5","6","7"],"10":["1","3","4","5","6","7"],"9":["1","3","4","5","6","7"],"7":["1","3","4","5","6","7","8","9"],"3":["1","3","4","5","6","7","8","9"],"1":["1","3","4","5","6","7","8","9"],"69":["1","3","4","5","6","7"]}},{"product_id":"2","product_name":"Ladies T-Shirt","brand_id":"1","shipping_id":"1","price":"3.50","color_price":"4.50","colors":{"67":["1","3","4","5","6"],"60":["1","3","4","5","6"],"54":["1","3","4","5","6"],"52":["1","3","4","5","6"],"41":["1","3","4","5","6"],"34":["1","3","4","5","6"],"31":["1","3","4","5","6"],"22":["1","3","4","5","6"],"7":["1","2","3","4","5","6","7"],"1":["1","2","3","4","5","6","7"],"69":["1","3","4","5","6"]}}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
listshipping
Note
This method Lists Printaura's Current Shipping Methods and details for each.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listshipping) Format: STRING - REQUIREDSample Success Returns
{"result":1,"results":{"1":[{"shipping_id":"1","shipping_name":"T-Shirts","shipping_option_name":"USPS - Priority (United States","shipping_company":"USPS","shipping_zone":"USA","shipping_group":"1","first_item_price":"5.50","additional_item_price":"0.75"},{"shipping_id":"2","shipping_name":"T-Shirts","shipping_option_name":"USPS - Standard (Canada)","shipping_company":"USPS","shipping_zone":"Canada","shipping_group":"1","first_item_price":"8.00","additional_item_price":"1.00"}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
listmyimages
Note
Lists the files uploaded under your seller account and their Image ID which you may use on other methods. Please note that this methods lists images uploaded both from the API and Sellers Web section.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listmyimages) Format: STRING - REQUIREDSample Success Returns
{"result":1,"results":[{"image_id":"433","file_name":"arrows_green_red.png","file_size":"151843","date_uploaded":"2012-11-27 22:28:13"},{"image_id":"505","file_name":"testing.png","file_size":"5306","date_uploaded":"2012-11-28 11:54:35"}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
downloadimage
Note
This method will let you download a Image you have previously uploaded to Printaura using our Image Library or the API. This method will return a secure download link for you download your image.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (downloadimage) Format: STRING - REQUIRED
Name: image_id Description: Image ID - Can be retrieved using method listmyimages Format: INTEGER - REQUIREDSample Success Returns
{“result”:1,”results”:{“url”:"https://printaura.com/download.php?image=DAfdg432Ffssder343r2rFw345345GReWRRTT4345fsf345gt"}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
listadditionalsettings
Note
Lists the current prices of additional settings provided by Printaura such as hang_tag_removalParamaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listadditionalsettings) Format: STRING - REQUIREDSample Success Returns
{"result":1,"results":{"hang_tag_removal_price":"0.50","tag_application_price":"0.50","additional_material_price":"0.00"}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
getpricing
Note
This method is used to get pricing details. Please note that for parameters front_print and back_print, one or both can be set.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (getpricing) Format: STRING - REQUIRED
Name: product_id Description: Product ID - Can be retrieved using method listproducts Format: INTEGER - REQUIRED
Name: brand_id Description: Brand ID - Can be retrieved using method listbrands Format: INTEGER - REQUIRED
Name: color_id Description: Color ID - Can be retrieved using method listcolors Format: INTEGER - REQUIRED
Name: size_id Description: Size ID - Can be retrieved using method listsizes Format: INTEGER - REQUIRED
Name: shipping_id Description: Shipping Method ID - Can be retrieved using method listshipping Format: INTEGER - REQUIRED
Name: front_print Description: If set indicates a front print is to be done Format: BOOLEAN - OPTIONAL
Name: back_print Description: if set indicates a back print is to be done Format: BOOLEAN - OPTIONAL
Name: quantity Description: If not set, 1 is assumed Format: INTEGER - OPTIONALSample Success Returns
{"result":1,"results":{"price":27.75}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
getprintingprice
Note
This method is used to get printing pricing details. Please note that for parameters front_print and back_print, one or both can be set.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (getprintingprice) Format: STRING - REQUIRED
Name: product_id Description: Product ID - Can be retrieved using method listproducts Format: INTEGER - REQUIRED
Name: brand_id Description: Brand ID - Can be retrieved using method listbrands Format: INTEGER - REQUIRED
Name: color_id Description: Color ID - Can be retrieved using method listcolors Format: INTEGER - REQUIRED
Name: size_id Description: Size ID - Can be retrieved using method listsizes Format: INTEGER - REQUIRED
Name: front_print Description: If set indicates a front print is to be done Format: BOOLEAN - OPTIONAL
Name: back_print Description: if set indicates a back print is to be done Format: BOOLEAN - OPTIONAL
Name: quantity Description: If not set, 1 is assumed Format: INTEGER - OPTIONALSample Success Returns
{"result":1,"results":{"printingprice":27.75}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
getallpricing
Note
This method is used to get pricing details for all shipping methods. Please note that for parameters front_print and back_print, one or both can be set.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (getallpricing) Format: STRING - REQUIRED
Name: product_id Description: Product ID - Can be retrieved using method listproducts Format: INTEGER - REQUIRED
Name: brand_id Description: Brand ID - Can be retrieved using method listbrands Format: INTEGER - REQUIRED
Name: color_id Description: Color ID - Can be retrieved using method listcolors Format: INTEGER - REQUIRED
Name: size_id Description: Size ID - Can be retrieved using method listsizes Format: INTEGER - REQUIRED
Name: front_print Description: If set indicates a front print is to be done Format: BOOLEAN - OPTIONAL
Name: back_print Description: if set indicates a back print is to be done Format: BOOLEAN - OPTIONAL
Name: quantity Description: If not set, 1 is assumed Format: INTEGER - OPTIONALSample Success Returns
{"result":1,"results":[{"shipping_id":1,"base_price":"3.25","printing_price":14,"tagremoval":0,"tagapplication":0,"additionalmaterial":0,"shipping_cost":"5.50","total_charge":22.75},{"shipping_id":2,"base_price":"3.25","printing_price":14,"tagremoval":0,"tagapplication":0,"additionalmaterial":0,"shipping_cost":"8.00","total_charge":25.25},{"shipping_id":3,"base_price":"3.25","printing_price":14,"tagremoval":0,"tagapplication":0,"additionalmaterial":0,"shipping_cost":"12.00","total_charge":29.25}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
uploadimage
Note
Lets you upload an image to Printaura, on successful upload an image ID will be returned which then you may use on AddOrder as a Image or Mockup Image.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (uploadimage) Format: STRING - REQUIRED
Name: file Description: Image File - Allowed File Types: png, jpg, eps, ai, psd - We prefer images as 200-300 DPI transparent PNG files. Format: FILE - REQUIREDSample Success Returns
{"result":1,"image_id":"1234"}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
uploadbase64image
Note
Lets you upload an image to Printaura, on successful upload an image ID will be returned which then you may use on AddOrder as a Image or Mockup Image.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (uploadimage) Format: STRING - REQUIREDName: ext Description: extension portion of filename Format: STRING - REQUIRED
Name: name Description: name portion of of filename Format: STRING - REQUIRED
Name: image Description: Image File, encoded in base64 - Allowed File Types: png, jpg, eps, ai, psd - We prefer images as 200-300 DPI transparent PNG files. Format: BASE64 - REQUIREDSample Success Returns
{"result":1,"image_id":"1234"}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
uploadimagefromurl
Note
Let's you upload an image to Printaura, on successful upload an image ID will be returned which then you may use on AddOrder as a Image or Mockup Image.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (uploadimagefromurl) Format: STRING - REQUIRED
Name: url Description: Image url - Allowed File Types: png, jpg, eps, ai, psd - We prefer images as 200-300 DPI transparent PNG files. Format: FILE - REQUIREDSample Success Returns
{"result":1,"image_id":"1234"}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
addorder
Note
Let's you place a new Order with Printaura. This method on success will return the order_id, total price and a item_id for each item that you have added to the order. Please note that the item_id's are returned on the same order that you have submitted them. Also please note that if one of the items within the order fails validation for whatever reason, the order will not be successful and an appropriate error will be returned.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (addorder) Format: STRING - REQUIRED
Name: businessname Description: Business Name Format: STRING - REQUIRED
Name: businesscontact Description: Business Contact (addorder) Format: STRING - REQUIRED
Name: email Description: Your Compnay Email Address Format: STRING - REQUIRED
Name: your_order_id Description: Your Order ID Format: STRING - REQUIRED
Name: returnlabel Description: Return Label - Separate new lines with "\n" Format: STRING - REQUIREDName: clientname Description:Customer Client Name Format: STRING - REQUIRED
Name: address1 Description:Customer Address1 Format: STRING - REQUIRED
Name: address2 Description:Customer Address2 Format: STRING - OPTIONAL
Name: city Description:Customer City Format: STRING - REQUIRED
Name: state Description:Customer state/province Format: STRING - REQUIRED
Name: zip Description:Customer Zip code Format: STRING - REQUIRED
Name: country Description:Customer Country Format: STRING - REQUIRED. CASE SENSITIVE!
You can get the list of country code from this url: http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm
Name: customerphone Description:Customer Phone Number - Only required for international orders Format: STRING - REQUIRED
Name: packingslip Description: Packing Slip Format: FILE - OPTIONAL (Only Pdf,docx and doc files are allowed)
Name: shipping_id Description:Shipping Method ID - Can be retrieved using method listshipping Format: STRING - REQUIRED
Name: instructions Description: Special Instructions Format: STRING - OPTIONAL
Name: hang_tag_removal_price Description: Hang Tag Removal Format: BOOLEAN (or 0/1) - OPTIONAL
Name: tag_application_price Description: Tag Application Format: BOOLEAN (or 0/1) - OPTIONAL
Name: additional_material_price Description: Additional Materials in Package Format: BOOLEAN (or 0/1)- OPTIONAL
Name: attach_hang_tag Description: attach an tag that hangs from the shirt on the outside Format: BOOLEAN (or 0/1) - OPTIONAL
Name: rush Description: set order as rush Format: BOOLEAN (or 0/1) - OPTIONALitems{}
Name: product_id Description: Product ID - Can be retrieved using method listproducts Format: INTEGER - REQUIRED
Name: brand_id Description: Brand ID - Can be retrieved using method listbrands Format: INTEGER - REQUIRED
Name: color_id Description: Color ID - Can be retrieved using method listcolors Format: INTEGER - REQUIRED
Name: size_id Description: Size ID - Can be retrieved using method listsizes Format: INTEGER - REQUIRED
Name: front_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: front_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: quantity Description: If not set, 1 is assumed Format: INTEGER - OPTIONALSample Success Returns
{“result”:1,”results”:[{"order_id":"1234","total_price":"25.50","items":{"item_id":"1234","item_id":"2345"}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
addorder1
Note
Let's you place a new Order with Printaura using your Printaura products. This method on success will return the order_id, total price and a item_id for each item that you have added to the order. Please note that the item_id's are returned on the same order that you have submitted them. Also please note that if one of the items within the order fails validation for whatever reason, the order will not be successful and an appropriate error will be returned.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (addorder) Format: STRING - REQUIRED
Name: businessname Description: Business Name Format: STRING - REQUIRED
Name: businesscontact Description: Business Contact (addorder) Format: STRING - REQUIRED
Name: email Description: Your Email Address Format: STRING - REQUIRED
Name: your_order_id Description: Your Order ID Format: STRING - REQUIRED
Name: returnlabel Description: Return Label - Separate new lines with "\n" Format: STRING - REQUIRED
Name: shippingaddress Description: Full Shipping Address - Separate new lines with "\n" Format: STRING - REQUIRED
Name: customerphone Description:Customer Phone Number - Only required for international orders Format: STRING - REQUIRED
Name: packingslip Description: Packing Slip Format: FILE - OPTIONAL(Only Pdf,docx and doc files are allowed)
Name: shipping_id Description:Shipping Method ID - Can be retrieved using method listshipping Format: STRING - REQUIRED
Name: instructions Description: Special Instructions Format: STRING - OPTIONAL
Name: hang_tag_removal_price Description: Hang Tag Removal Format: BOOLEAN - OPTIONAL
Name: tag_application_price Description: Tag Application Format: BOOLEAN - OPTIONAL
Name: additional_material_price Description: Additional Materials in Package Format: BOOLEAN - OPTIONAL
Name: rush Description: set order as rush Format: BOOLEAN (or 0/1) - OPTIONALName: clientname Description:Customer Client Name Format: STRING - REQUIRED
Name: address1 Description:Customer Address1 Format: STRING - REQUIRED
Name: address2 Description:Customer Address2 Format: STRING - OPTIONAL
Name: city Description:Customer City Format: STRING - REQUIRED
Name: state Description:Customer state/province Format: STRING - REQUIRED
Name: zip Description:Customer Zip code Format: STRING - REQUIRED
Name: country Description:Customer Country Format: STRING - REQUIRED. CASE SENSITIVE!
You can get the list of country code from this url: http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm
Name: customerphone Description:Customer Phone Number - Only required for international orders Format: STRING - REQUIREDitems{}
Name: product_id Description: Your Printaura Product ID - Can be retrieved using method viewproducts Format: INTEGER - REQUIRED
Name: color_id Description: Color ID - Can be retrieved using method listcolors Format: INTEGER - REQUIRED
Name: size_id Description: Size ID - Can be retrieved using method listsizes Format: INTEGER - REQUIRED
Name: quantity Description: If not set, 1 is assumed Format: INTEGER - OPTIONALSample Success Returns
{“result”:1,”results”:[{"order_id":"1234","total_price":"25.50","items":{"item_id":"1234","item_id":"2345"}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
listorders
Note
This method Lists current orders under your account, as well as items and notes for each order. If a order_id is specified, only details for that order will be returned. Please note that, Product, Brand, Color, Size and shipping details for each item are returned in the form of their ID, please use the relevant method to retrieve details for each, for example use listcolors method to retrieve details such as color name and color html code, for the color_id. This is done to keep your Application and our API as dynamic as possible.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listorders) Format: STRING - REQUIREDSample Success Returns
{"result":1,"results":[{"order_id":"4510065","businessname":"some business name","businesscontact":"business contact","youremail":"test@email.com","returnlabel":"line 1 \n line 2 \n line 3 \n","your_order_id":"123456","shipping_id":"1","shippingaddress":"line 1 \n line 2 \n line 3 \n","customerphone":"0132456789","packingslip":"","tagremoval":"Yes","tagapplication":"No","additionalmaterial":"No","instructions":"","status":"New","order_total":"26.50","shipping_price":"5.50","items":[{"item_id":"88","product_id":"29","brand_id":"2","color_id":"1","size_id":"1","quantity":"1","font_print":null,"front_mockup":"test.png","back_print":"test.png","back_mockup":"test.png","status":"New","shipping_id":"","tracking":"","shipped_date":"0000-00-00 00:00:00","cost":"20.50","printing_price":"14.00"}]}]}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
updateorder
Note
This method let's you update an already placed order. Please note that the order can only be updated if the status is still New , You may retrieve an order's status using method listorders. Except order_id all other parameters are optional, if set it indicates that the parameter is to be updated using the new value.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (updateorder) Format: STRING - REQUIRED
Name: order_id Description: order_id to be updated, may be retrieved using method listorders Format: INTEGER - REQUIRED
Name: businessname Description: Business Name Format: STRING - OPTIONAL
Name: businesscontact Description: Business Contact (addorder) Format: STRING - OPTIONAL
Name: email Description: Your Email Address Format: STRING - OPTIONAL
Name: your_order_id Description: Your Order ID Format: STRING - OPTIONAL
Name: returnlabel Description: Return Label - Separate new lines with "\n" Format: STRING - OPTIONAL
Name: shippingaddress Description: Full Shipping Address - Separate new lines with "\n" Format: STRING - OPTIONAL
Name: customerphone Description:Customer Phone Number - Only required for international orders Format: STRING - OPTIONAL
Name: packingslip Description: Packing Slip Format: FILE - OPTIONAL(Only Pdf,docx and doc files are allowed)
Name: shipping_id Description:Shipping Method ID - Can be retrieved using method listshipping Format: STRING - OPTIONAL
Name: instructions Description: Special Instructions Format: STRING - OPTIONAL
Name: hang_tag_removal_price Description: Hang Tag Removal Format: BOOLEAN - OPTIONAL
Name: tag_application_price Description: Tag Application Format: BOOLEAN - OPTIONAL
Name: additional_material_price Description: Additional Materials in Package Format: BOOLEAN - OPTIONALSample Success Returns
{“result”:1,”results”:{“order_id”:"1234"}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
cancelorder
Note
This method let's you cancel an already placed order. Please note that the order can only be cancelled if the status is still New , You may retrieve an order's status using method listorders.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (cancelorder) Format: STRING - REQUIRED
Name: order_id Description: order_id to be updated, may be retrieved using method listorders Format: INTEGER - REQUIREDSample Success Returns
{“result”:1,”results”:{“order_id”:"1234"}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
additem
Note
This method let's you add an extra item to an already placed order. Please note that the item may only be added if the status is still New , You may retrieve an order's status using method listorders.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (cancelorder) Format: STRING - REQUIRED
Name: order_id Description: order_id to be updated, may be retrieved using method listorders Format: INTEGER - REQUIREDName: product_id Description: Product ID - Can be retrieved using method listproducts Format: INTEGER - REQUIRED
Name: brand_id Description: Brand ID - Can be retrieved using method listbrands Format: INTEGER - REQUIRED
Name: color_id Description: Color ID - Can be retrieved using method listcolors Format: INTEGER - REQUIRED
Name: size_id Description: Size ID - Can be retrieved using method listsizes Format: INTEGER - REQUIRED
Name: front_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: front_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: quantity Description: If not set, 1 is assumed Format: INTEGER - OPTIONALSample Success Returns
{“result”:1,”results”:{“item_id”:"1234"}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
removeitem
Note
This method let's you remove an item from an already placed order. Please note that the item me only be removed if the status of the order is still New , You may retrieve an order's status using method listorders.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (cancalorder) Format: STRING - REQUIRED
Name: item_id Description: item_id to be removed, may be retrieved using method listorders Format: INTEGER - REQUIREDSample Success Returns
{“result”:1,”results”:{“item_id”:"1234"}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
updateitem
Note
This method let's you update an item within an already placed order. Please note that the item may only be updated if the status of the order is still New , You may retrieve an order's status using method listorders.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (cancalorder) Format: STRING - REQUIRED
Name: item_id Description: item_id to be updated, may be retrieved using method listorders Format: INTEGER - REQUIRED
Name: product_id Description: Product ID - Can be retrieved using method listproducts Format: INTEGER - OPTIONAL
Name: brand_id Description: Brand ID - Can be retrieved using method listbrands Format: INTEGER - OPTIONAL
Name: color_id Description: Color ID - Can be retrieved using method listcolors Format: INTEGER - OPTIONAL
Name: size_id Description: Size ID - Can be retrieved using method listsizes Format: INTEGER - OPTIONAL
Name: front_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: front_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: quantity Description: If not set, 1 is assumed Format: INTEGER - OPTIONALSample Success Returns
{“result”:1,”results”:{“item_id”:"1234"}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
viewproducts
Note
This method let's you View your Printaura Products, You may also view and manage your Printaura products by visiting our Manage Products interface. Please note that if a paproduct_id is set, then details only for that product are returned, otherwise all the products in your account will be returned.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (cancalorder) Format: STRING - REQUIRED
Name: paproduct_id Description: If set, Only details for this product will be returned Format: INTEGER - OPTIONALSample Success Returns
{“result”:1,”results”:{“product_id”:"1234"}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
addproduct
Note
This method let's you add a Printaura Product to your Account, You may also manage your Printaura products by visiting our Manage Products interface. You may also use this method to activate your product in one of our Custom Apps such as Shopify or Storenvy , Please note to do this you will also need to pass the custom parameters that the selected app/s requires, Please retrieve this using the method viewapps.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (addproduct) Format: STRING - REQUIRED
Name: product_id Description: Product ID - Can be retrieved using method listproducts Format: INTEGER - REQUIRED
Name: brand_id Description: Brand ID - Can be retrieved using method listbrands Format: INTEGER - REQUIREDcolors{}
Array Key: color_id{} Description: Color ID as array key - Can be retrieved using method listcolors Format: INTEGER - REQUIRED
Array member: normal_price Description: Normal Sizes Price to use Format: INTEGER - REQUIRED
Array member: plus_price Description: Plus Sizes Price to use Format: INTEGER - REQUIRED
Array member: default Description: set color as default Format: INTEGER - OptionalName: sku Description: Product SKU Format: STRING - REQUIRED
Name: title Description: Product Title Format: STRING - REQUIRED
Name: description Description: Product Description (HTML is allowed) Format: STRING - REQUIRED
Name: front_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: front_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: product_price Description: Storenvy product price Format: FLOAT - OPTIONAL
Name: weight Description: Weight of product. If unknown just provide 1. Format: Integer - REQUIRED
Name: storenvy_shipping Description: Storenvy shipping_id Format: INTEGER - OPTIONAL
Name: storenvy_collection Description: Array of storenvy collection id Format: Array - OPTIONAL
apps{}
Name: app_id Description: The APP to activate this Product in. APP ID - Can be retrieved using method viewshops Format: INTEGER - REQUIREDstoreimages{}
Name: image_id Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - REQUIRED
Name: default Description: If set, This image will be used as the default image Format: BOOLEAN - OPTIONALSample Success Returns
without shopify: {“result”:1,”results”:{“product_id”:"1234"}}
with shopify: {“result”:1,”results”:{“product_id”:"1234","shopify_id":"54867445"}}
Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
editproduct
Note
This method let's you Edit your Printaura Products, You may also view and manage your Printaura products by visiting our Manage Products interface. You may also use this method to Activate your existing products in one the Printaura APPs such as Shopify or Storenvy , Please note to do this you will also need to pass the custom parameters that the selected app/s requires, Please retrieve this using the method viewapps.Paramaters
Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (editproduct) Format: STRING - REQUIRED
Name: paproduct_id Description: Product ID - Can be retrieved using method listproducts Format: INTEGER - REQUIREDcolors{}
Name: color_id{} Description: Color ID - Can be retrieved using method listcolors Format: INTEGER - REQUIRED
Name: normal_price Description: Normal Sizes Price to use Format: INTEGER - REQUIRED
Name: plus_price Description: Plus Sizes Price to use Format: INTEGER - REQUIREDName: sku Description: Product SKU Format: STRING - REQUIRED
Name: title Description: Product Title Format: STRING - REQUIRED
Name: description Description: Product Description (HTML is allowed) Format: STRING - REQUIRED
Name: front_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: front_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_print Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: back_mockup Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - OPTIONAL
Name: product_price Description: Storenvy product price Format: FLOAT - OPTIONAL
Name: storenvy_shipping Description: Storenvy shipping_id Format: INTEGER - OPTIONAL
Name: storenvy_collection Description: Array of storenvy collection id Format: Array - OPTIONAL
apps{}
Name: app_id Description: The APP to activate this Product in. APP ID - Can be retrieved using method viewshops Format: INTEGER - REQUIREDstoreimages{}
Name: image_id Description: Must be a valid image ID returned by methods uploadimage or listmyimages Format: INTEGER - REQUIRED
Name: default Description: If set, This image will be used as the default image Format: BOOLEAN - OPTIONALNote:Remember to json_encode then base64_encode all arrays
Sample Success Returns
without shopify: {“result”:1,”results”:{“product_id”:"1234"}}
with shopify: {“result”:1,”results”:{“product_id”:"1234","shopify_id":"54867445"}}
Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
deleteproduct
Note
This method let's you delete a Printaura Product, Please note if the product is activated in one of Printaura's APPs such as Shopify or Storenvy , it will also be deleted from the APP and no longer processed.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (deleteproduct) Format: STRING - REQUIRED
Name: paproduct_id Description: Must be a valid paproduct_id returned using methods such as viewproducs or addproduct Format: STRING - REQUIREDSample Success Returns
{"result":1,"results":{"paproduct_id":"345780"}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
viewapps
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (viewapps) Format: STRING - REQUIREDNote
This method let's you View the Printaura APPs you have active such as Shopify or Storenvy , Please note this method also returns the custom parameters that the selected app/s requires for a product to be activated in methods such as addproduct or editproduct.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (viewapps) Format: STRING - REQUIREDSample Success Returns
{"result":1,"results":{"apps":{"1":{"app_id":1,"app_name":"shopify","shop_url":"printauratest.myshopify.com","date_added":"2013-03-14 03:24:56","custom_parameters":["product_type","product_vendor","product_tags"]},"2":{"app_id":2,"app_name":"storenvy","shop_url":"printauratest.storenvy.com","date_added":"2013-02-20 00:00:19","custom_parameters":["product_price"]}}}}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
uninstallapp
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (uninstallapp) Format: STRING - REQUIRED
Name: app_id Description: The app to uninstall, Must be a valid app_id which can be retrieved using method viewapps Format: INTEGER - REQUIREDNote
This method will let you uninstall a Printaura APP such as Shopify or Storenvy , Please note, If a product is activated in a APP which you uninstall, Those products will be automatically de-activated and no longer processed by Printaura when ordered.Paramaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (uninstallapp) Format: STRING - REQUIRED
Name: app_id Description: app_id to uninstall, must be a valid app_id retrieved using method viewapps Format: STRING - REQUIREDSample Success Returns
{"result":1,"app_id":1}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
editmybrand
Note
This method let's you edit you Printaura Brand.Paramaters
Name: packingslip Description: whether or not packingslip is enabled Format: Boolean or 0/1 - OPTIONAL
Name: logo Description:packingslip file to be uploaded Format: file - OPTIONAL
Name: packingslip_email Description:email to use in the packingslip file Format: string - OPTIONAL
Name: packingslip_phone Description:phone to use in the packingslip fileFormat: string - OPTIONAL
Name: special_note Description:special note to use in the packingslip file Format: string - OPTIONALName: return_lable Description: whether or not packingslip is enabled Format: Boolean or 0/1 - OPTIONAL
Name: address1 Description: address2Format: string - REQUIRED if retunr_lable is active
Name: address2 Description: address2Format: string - OPTIONAL
Name: city Description: city to use in the address of the return label string - OPTIONAL
Name: state Description: state to use in the address of the return label Format: string - OPTIONAL
Name: zip Description: zip Format: string - OPTIONALName: heatpress_tag Description: whether or not heat press tag is enabled Format: Boolean or 0/1 - OPTIONAL
Name: heatpress_tag_location Description: location of heat press tag , values accepted : 115=>Inside neck,116=>Outside Neck,117=>Left Front Hem,118=>Right Front Hem,119=>Left Sleeve,120=>Right Sleeve Format: int - OPTIONALName: attach_hang_tag Description: whether or not attach hang tag is enabled Format: Boolean or 0/1 - OPTIONAL
Name: attach_hang_tag_location Description: location of heat press tag , values accepted : 110=>Left Sleeve Cuff,111=>Right Sleeve Cuff,112=>Left Armpit,113=>Right Armpit,114=>Collar Back,115=>Inside Neck,116=>Outside Neck,117=> Left Front Hem,118=>Right Front Hem,119=>Left Sleeve,120=>Right Sleeve Format: int - OPTIONALName: packin Description: whether or not packin is enabledFormat: Boolean or 0/1 - OPTIONAL
Name: packin_description Description: packin description Format: string - OPTIONALName: custom_packaging Description: whether or not custom packaging is enabled Format: Boolean or 0/1 - OPTIONAL
Name: custom_packaging_description Description: custom packaging description Format: string - OPTIONAL
Name: rush_orders Description: whether or not rush orders is enabledFormat: Boolean or 0/1 - OPTIONAL
Name: firstclass_shipping Description: whether or not rush orders is enabled Format: Boolean or 0/1 - OPTIONAL
Name: removetag Description: whether or not remove neck label is enabled Format: Boolean or 0/1 - OPTIONAL
Name: individual_bagging Description: whether or not rindividual bagging is enabled Format: Boolean or 0/1 - OPTIONAL -
listmockupsets
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listmockupsets) Format: STRING - REQUIREDParamaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listmockupsets) Format: STRING - REQUIRED
Sample Success Returns
{"result":1,"app_id":1}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
get_mockups_products
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (get_mockups_products) Format: STRING - REQUIRED
Name: product_id Description: Product ID Format: STRING - REQUIREDParamaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (get_mockups_products) Format: STRING - REQUIRED
Name: product_id Description: product_id you want mockup information for Format: STRING - REQUIREDSample Success Returns
{"result":1,"app_id":1}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
listmockup_groups
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listmockup_groups) Format: STRING - REQUIREDParamaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (listmockup_groups) Format: STRING - REQUIREDSample Success Returns
{"result":1,"app_id":1}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"} -
get_mockups_colors
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (get_mockups_colors) Format: STRING - REQUIREDParamaters
Name: key Description: API Key Format: STRING - REQUIRED
Name: hash Description: API Hash Format: STRING - REQUIRED
Name: method Description: Method Name (get_mockups_colors) Format: STRING - REQUIREDSample Success Returns
{"result":1,"app_id":1}Failure Returns
{"result":0,"message":"HUMAN READABLE ERROR"}
ChangeLog :
Update 7/22/2013: You can now select a default color for your each of your listings. Example: If you want the color white to display by default in your store maybe because it is the least expensive shirt.
Adding "default" field in colors array. set the field to 1 of you want the color to be set as default.
Update 7/24/2013: Images that are used by Printaura for printing of shirts (i.e. actual print image and the placement mockup) are separated below from the images used in the apps.
these fiedls are removed from addproduct method: front_print_as_store_image,front_mockup_as_store_image,back_print_as_store_image,back_mockup_as_store_image
update 7/26/2013 : added new function "uploadimagefromurl"
update 10/18/2013 : added new function "getprintingprice"
update 10/25/2013 : Now you can set shipping group and collection from API . added storenvy_shipping ( integer) and storenvy_collection : array of storenvy collection ids
update 10/26/2013 : removed shippingaddress from addorder/addorder1 method and replacement with clientname, address1, address2, city, state , zip , country field
update 11/05/2013 : added method 'getallpricing'
update 12/12/2013 : implementation and fix upload packing slip in 'addorder' method, only pdf,docx and doc files are allowed
update 12/13/2013 : replacing encoding of all array sent from using php serialize to language neutral way ( json format )
update 5/13/2014 : adding attach hang tag support
update 5/24/2014 : adding rush order support
Code Examples:
-
PHP Code Examples
-
listbrands
Note
This method Lists Printaura's Current Brands.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "listbrands";// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of brands with all the details - use json_decode() to convert into a PHP Array -
listsizes
Note
This method Lists Printaura's Current Sizes and Their Groups.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "listsizes";// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of sizes with all the details - use json_decode() to convert into a PHP Array -
listcolors
Note
This method Lists Printaura's Current Colors.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "listcolors";// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of colors with all the details - use json_decode() to convert into a PHP Array -
listproducts
Note
This method Lists Printaura's Current Products. The method will also list available sizes and colors for each product. Please note that, Product, Brand, Color, Size and shipping details for each are returned in the form of their ID, please use the relevant method to retrieve details for each, for example use listcolors method to retrieve details such as color name and color html code, for the color_id. This is done to keep your Application and our API as dynamic as possible.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "listproducts";// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of products with all the details - use json_decode() to convert into a PHP Array
-
listshipping
Note
This method Lists Printaura's Current Shipping Methods and details for each.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "listshipping";// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of shipping methods with all the details - use json_decode() to convert into a PHP Array -
listmyimages
Note
Lists the files uploaded under your seller account and their Image ID which you may use on other methods. Please note that this methods lists images uploaded both from the API and Sellers Web section.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "listmyimages";// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of your uploaded images details for each - use json_decode() to convert into a PHP Array -
downloadimage
Note
This method will let you download a Image you have previously uploaded to Printaura using our Image Library or the API. This method will return a secure download link for you download your image.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "downloadimage";
$postfields["image_id"] = 1234;// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array which includes the url of your image to download - use json_decode() to convert into a PHP Array -
listadditionalsettings
Note
Lists the current prices of additional settings provided by Printaura such as hang_tag_removalParamaters
key (API Key)
hash (API Hash)
method (listadditionalsettings)
Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "listadditionalsettings";// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of your additional settings and price for each - use json_decode() to convert into a PHP Array -
getpricing
Note
This method is used to get pricing details. Please note that for parameters front_print and back_print, one or both can be set.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "getpricing";$postfields["front_print"] = TRUE;
$postfields["product_id"] = $product_id; // Retrieve using method listproducts
$postfields["brand_id"] = $brand_id; // Retrieve using method listbrands
$postfields["color_id"] = $color_id; // Retrieve using method listcolors
$postfields["size_id"] = $size_id; // Retrieve using method listsizes
$postfields["shipping_id"] = $shipping_id; // Retrieve using method listshipping
$postfields["quantity"] = 1; // Can be left unset, in which case 1 is assumed.// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of the price for the selected config. -
uploadimage
Note
Let's you upload an image to Printaura, on successful upload an image ID will be returned which then you may use on AddOrder as a Image or Mockup Image.Paramaters
key (API Key)
hash (API Hash)
method (uploadimage)
file (imagefile)
Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "uploadimage";
$postfields["file"] = "@FILE_PATH_HERE";// Send the query to Printaura API using CURL and upload the image
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of the image_id which you may use on other methods - Use jason_decode to convert into a PHP array -
addorder
Note
Let's you place a new Order with Printaura. This method on success will return the order_id, total price and a item_id for each item that you have added to the order. Please note that the item_id's are returned on the same order that you have submitted them. Also please note that if one of the items within the order fails validation for whatever reason, the order will not be successful and an appropriate error will be returned.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "addorder";// Order Details
$postfields["businessname"] = "My Business Name";
$postfields["businesscontact"] = "Mr A Z";
$postfields["email"] = "email@domain.com";
$postfields["your_order_id"] = "123546789";
$postfields["returnlabel"] = "Return Label Line 1 \n Return Label Line 2";
$postfields["shippingaddress"] = "Shipping Address Line 1 \n Shipping Address Line 2";
$postfields["customerphone"] = "01132501401";
$postfields["packingslip"] = "@packingslip.doc";
$postfields["shipping_id"] = 1;
$postfields["attach_hang_tag"] = 1;
$postfields["hang_tag_removal_price"] = 1;
$postfields["tag_application_price"] = 1;
$postfields["additional_material_price"] = 1;
$postfields["instructions"] = "Special Instructions!";// Item 1
$itemsarray = array();
$itemsarray["items"]['0']['product_id'] = 1;
$itemsarray["items"]['0']['brand_id'] = 1;
$itemsarray["items"]['0']['color_id'] = 66;
$itemsarray["items"]['0']['size_id'] = 1;
$itemsarray["items"]['0']['front_print'] = 508;
$itemsarray["items"]['0']['front_mockup'] = 508; // Set if you require front_mockup
$itemsarray["items"]['0']['back_print'] = 508; // Set if you require back_print
$itemsarray["items"]['0']['back_mockup'] = 508; // set if you require back_mockup
$itemsarray["items"]['0']['quantity'] = 1;// Item 2
$itemsarray["items"]['1']['product_id'] = 1;
$itemsarray["items"]['1']['brand_id'] = 1;
$itemsarray["items"]['1']['color_id'] = 66;
$itemsarray["items"]['1']['size_id'] = 1;
$itemsarray["items"]['1']['front_print'] = 508;
$itemsarray["items"]['1']['front_mockup'] = 508; // Set if you require front_mockup
$itemsarray["items"]['1']['back_print'] = 508; // Set if you require back_print
$itemsarray["items"]['1']['back_mockup'] = 508; // set if you require back_mockup
$itemsarray["items"]['1']['quantity'] = 1;// Arrays in Printaura API are always serialized and then base64_encoded
//(update 12/13/2013) New way: array in Printaura are decoded in json format and then base64_encoded
//$postfields["items"] = base64_encode(serialize($itemsarray)); (old way)
$postfields["items"] = base64_encode(json_encode($itemsarray)); // New way// Send the query to Printaura and Place a new order
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of all your orders also an array of the items within the order - use json_decode() to convert into a PHP Array -
addorder1
Note
Let's you place a new Order with Printaura using your Printaura products. This method on success will return the order_id, total price and a item_id for each item that you have added to the order. Please note that the item_id's are returned on the same order that you have submitted them. Also please note that if one of the items within the order fails validation for whatever reason, the order will not be successful and an appropriate error will be returned.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "addorder1";// Order Details
$postfields["businessname"] = "My Business Name";
$postfields["businesscontact"] = "Mr A Z";
$postfields["email"] = "email@domain.com";
$postfields["your_order_id"] = "123546789";
$postfields["returnlabel"] = "Return Label Line 1 \n Return Label Line 2";
$postfields["shippingaddress"] = "Shipping Address Line 1 \n Shipping Address Line 2";
$postfields["customerphone"] = "01132501401";
$postfields["packingslip"] = "@packingslip.doc";
$postfields["shipping_id"] = 1;
$postfields["instructions"] = "Special Instructions!";// Item 1
$itemsarray = array();
$itemsarray["items"]['0']['product_id'] = 1;//the user product id
$itemsarray["items"]['0']['color_id'] = 66;
$itemsarray["items"]['0']['size_id'] = 1;
$itemsarray["items"]['0']['quantity'] = 1;// Item 2
$itemsarray["items"]['1']['product_id'] = 1; // the user product id
$itemsarray["items"]['1']['color_id'] = 66;
$itemsarray["items"]['1']['size_id'] = 1;
$itemsarray["items"]['1']['quantity'] = 1;//(update 12/13/2013) New way: array in Printaura are decoded in json format and then base64_encoded
//$postfields["items"] = base64_encode(serialize($itemsarray)); (old way)
$postfields["items"] = base64_encode(json_encode($itemsarray)); // New way// Send the query to Printaura and Place a new order
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of all your orders also an array of the items within the order - use json_decode() to convert into a PHP Array -
listorders
Note
This method Lists current orders under your account, as well as items and notes for each order. If a order_id is specified, only details for that order will be returned. Please note that, Product, Brand, Color, Size and shipping details for each item are returned in the form of their ID, please use the relevant method to retrieve details for each, for example use listcolors method to retrieve details such as color name and color html code, for the color_id. This is done to keep your Application and our API as dynamic as possible.Paramaters
key (API Key)
hash (API Hash)
method (listorders)
Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "listorders";// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of all your orders also an array of the items within the order - use json_decode() to convert into a PHP Array -
updateorder
Note
This method let's you update an already placed order. Please note that the order can only be updated if the status is still New , You may retrieve an order's status using method listorders.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "updateorder";// Order Details
$postfields["order_id"] = 123;
$postfields["businessname"] = "My Business Name";
$postfields["businesscontact"] = "Mr A Z";
$postfields["email"] = "email@domain.com";
$postfields["your_order_id"] = "123546789";
$postfields["returnlabel"] = "Return Label Line 1 \n Return Label Line 2";
$postfields["shippingaddress"] = "Shipping Address Line 1 \n Shipping Address Line 2";
$postfields["customerphone"] = "01132501401";
$postfields["packingslip"] = "@packingslip.doc";
$postfields["shipping_id"] = 1;
$postfields["instructions"] = "Special Instructions!";// Send the query to Printaura
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of all the results - use json_decode() to convert into a PHP Array -
viewproducts
Note
This method let's you View your Printaura Products, You may also view and manage your Printaura products by visiting our Manage Products interface.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "viewproducts";
$postfields["paproduct_id"] = 345780; // remove this to retrieve all PA products under your account// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of PA products – use json_decode() to convert into a PHP Array -
addproduct
Note
This method let's you add a Printaura Product to your Account, You may also manage your Printaura products by visiting our Manage Products interface. You may also use this method to activate your product in one of our Custom Apps such as Shopify or Storenvy , Please note to do this you will also need to pass the custom parameters that the selected app/s requires, Please retrieve this using the method viewapps.Following Example creates a Printaura Product with 2 colors selected which is also activated in Printaura Shopify APP
Code Example
// Select the Brand and Product , You can retrieve these by using methods listbrands and listproducts
$postfields["key"] = YOUR_API_KEY;
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "addproduct";
$postfields["brand_id"] = "1";
$postfields["product_id"] = "1";// Product Details
$postfields["sku"] = "myproduct-sku";
$postfields["title"] = "Product Title";
$postfields["description"] = "html is allowed";// Must be a valid image ID returned by methods uploadimage or listmyimages
$postfields["front_print"] = "1780";
$postfields["back_print"] = "1780";// We are also going to use the front_print image as a storeimage
//
// Below is an array of the Color IDs (1 and 2) retrieved using listcolors each mentioning a normal_price and a plus_price which is for plus sizes of that product.
//
$colorsarray = array();
$colorsarray["colors"][1]['normal_price'] = "25";
$colorsarray["colors"][1]['plus_price'] = "30";$colorsarray["colors"][3]['normal_price'] = "26";
$colorsarray["colors"][3]['plus_price'] = "31";//(update 12/13/2013) New way: array in Printaura are decoded in json format and then base64_encoded
//$postfields["colors"] = base64_encode(serialize($colorsarray)); (old way)
$postfields["colors"] = base64_encode(json_encode($colorsarray)); // New way//
// Below is an array of the apps the product is to be activated in
//
$appsarray = array();
$appsarray[] = 1; // must be a valid app_id - can be retrieved using method viewapps// Arrays in Printaura API are always serialized and then base64_encoded
//(update 12/13/2013) New way: array in Printaura are decoded in json format and then base64_encoded//$postfields["apps"] = base64_encode(serialize($appsarray)); old way
$postfields["apps"] = base64_encode(json_encode($appsarray));// Below are the custom parameters needed for the selected app (Shopify in this example) - These parameters can be retrieved for different apps using method viewapps
$postfields["product_type"] = "my type";
$postfields["product_vendor"] = "my vendor";
$postfields["product_tags"] = "tag1,tag2,tag3";//
// Below are the Store Images to be uploaded to the APPs selected for the product to be activated in
//
$storeimages = array();
$storeimages[0]['image_id'] = "1780"; // Must be a valid image ID returned by methods uploadimage or listmyimages
$storeimages[0]['default'] = 1; // Sets this image as the default image ( 1 for default 0 for normal)$storeimages[1]['image_id'] = "1780"; // Must be a valid image ID returned by methods uploadimage or listmyimages
// Arrays in Printaura API are always serialized and then base64_encoded
//(update 12/13/2013) New way: array in Printaura are decoded in json format and then base64_encoded//$postfields["storeimages"] = base64_encode(serialize($appsarray)); old way
$postfields["storeimages"] = base64_encode(json_encode($appsarray));// New Way// Send the query to Printaura API using CURL and upload the image
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of the paproduct_id which you may use on other methods – Use json_decode to convert into a PHP array -
editproduct
Note
This method let's you Edit your Printaura Products, You may also view and manage your Printaura products by visiting our Manage Products interface. You may also use this method to Activate your existing products in one the Printaura APPs such as Shopify or Storenvy , Please note to do this you will also need to pass the custom parameters that the selected app/s requires, Please retrieve this using the method viewapps.Following Example edits a Printaura Product with 3 colors selected and also activates it in the Storenvy APP .
Code Example
-
deleteproduct
Note
This method let's you delete a Printaura Product, Please note if the product is activated in one of Printaura's APPs such as Shopify or Storenvy , it will also be deleted from the APP and no longer processed.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "viewproducts";
$postfields["paproduct_id"] = 345780; // remove this to retrieve all PA products under your account// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array with the results – use json_decode() to convert into a PHP Array -
viewapps
Note
This method let's you View the Printaura APPs you have active such as Shopify or Storenvy , Please note this method also returns the custom parameters that the selected app/s requires for a product to be activated in methods such as addproduct or editproduct.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;
$postfields["method"] = "viewapps";// Send the query to Printaura API using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of your active APPs and details for each – use json_decode() to convert into a PHP Array -
uninstallapp
Note
This method will let you uninstall a Printaura APP such as Shopify or Storenvy , Please note, If a product is activated in a APP which you uninstall, Those products will be automatically de-activated and no longer processed by Printaura when ordered.Code Example
$postfields["key"] = YOUR_API_KEY;
$url = "https://api.printaura.com/api.php";
$postfields["hash"] = YOUR_API_HASH;$postfields["method"] = "uninstallapp";
$postfields["app_id"] = 1;// Send the query to Printaura API using CURL and upload the image
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
// $data now contains a json array of the results – Use jason_decode to convert into a PHP array
-
Your Printaura