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
* Parameters
This method Lists Printaura's Current Brands.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (listbrands) String Sample Success Returns
{"status":true,"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
* Parameters
This method Lists Printaura’s Current Sizes and Their Groups.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (listsizes) String Sample 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
* Parameters
This method Lists Printaura's Current Colors.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (listcolors) String Sample 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
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (listproducts) String Sample 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
* Parameters
This method Lists Printaura’s Current Shipping Methods and details for each.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (listshipping) String Sample 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
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (listmyimages) String Sample 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
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (downloadimage) String image_id
*
Image ID – Can be retrieved using method listmyimages Integer Sample Success Returns
{“result”:1,”results”:{“url”:”https://printaura.com/download.php?image=DAfdg432Ffssder343r2rFw345345GReWRRTT4345fsf345gt”}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
listadditionalsettings
Note
* Parameters
Lists the current prices of additional settings provided by Printaura such as hang_tag_removalName Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (listadditionalsettings) String Sample 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
* Parameters
This method is used to get pricing details. Please note that for parameters front_print and back_print, one or both can be set.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (getpricing) String product_id
*
Product ID – Can be retrieved using method listproducts Integer brand_id
*
Brand ID – Can be retrieved using method listbrands Integer color_id
*
Color ID – Can be retrieved using method listcolors Integer size_id
*
Size ID – Can be retrieved using method listsizes Integer shipping_id
*
Shipping Method ID – Can be retrieved using method listshipping Integer front_print
If set indicates a front print is to be done Boolean back_print
if set indicates a back print is to be done Boolean quantity
If not set, 1 is assumed Integer Sample Success Returns
{“result”:1,”results”:{“price”:27.75}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
getprintingprice
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (getprintingprice) String product_id
*
Product ID – Can be retrieved using method listproducts Integer brand_id
*
Brand ID – Can be retrieved using method listbrands Integer color_id
*
Color ID – Can be retrieved using method listcolors Integer size_id
*
Size ID – Can be retrieved using method listsizes Integer front_print
If set indicates a front print is to be done Boolean back_print
if set indicates a back print is to be done Boolean quantity
If not set, 1 is assumed Integer Sample Success Returns
{“result”:1,”results”:{“printingprice”:27.75}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
getallpricing
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (getallpricing) String product_id
*
Product ID – Can be retrieved using method listproducts Integer brand_id
*
Brand ID – Can be retrieved using method listbrands Integer color_id
*
Color ID – Can be retrieved using method listcolors Integer size_id
*
Size ID – Can be retrieved using method listsizes Integer front_print
If set indicates a front print is to be done Boolean back_print
if set indicates a back print is to be done Boolean quantity
If not set, 1 is assumed Integer Sample 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
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (uploadimage) String file
*
Image File – Allowed File Types: png, jpg, eps, ai, psd – We prefer images as 200-300 DPI transparent PNG files. File Sample Success Returns
{“result”:1,”image_id”:”1234″}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
uploadimagefromurl
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (uploadimagefromurl) String url
*
Image url – Allowed File Types: png, jpg, eps, ai, psd – We prefer images as 200-300 DPI transparent PNG files String Sample 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.Parameters
* ParametersName Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (addorder) String businessname
*
Business Name String businesscontact
*
Business Contact (addorder) String email
*
Your Compnay Email Address String your_order_id
*
Your Order ID String returnlabel
*
Return Label – Separate new lines with “\n” String clientname
*
Customer Client Name String address1
*
Customer Address1 String address2
Customer Address2 String city
*
Customer City String state
*
Customer state/province String zip
*
Customer Zip code String country
*
Customer Country
You can get the list of country code from HEREString customerphone
Customer Phone Number – Only required for international orders String packingslip
Packing Slip File shipping_id
*
Shipping Method ID – Can be retrieved using method listshipping String instructions
Special Instructions String hang_tag_removal_price
Hang Tag Removal Boolean tag_application_price
Tag Application Boolean additional_material_price
Additional Materials in Package Boolean attach_hang_tag
attach an tag that hangs from the shirt on the outside Boolean rush
set order as rush Boolean items
*
An array with "key = items" contain an array of attribute:values.
* Item attributes*
Example:
{"items":[{"product_id":12,"brand_id":1,"front_print":186189,"front_mockup":186190,"color_id":38,"size_id":6,"quantity":3}]}product_id
*
Product ID – Can be retrieved using method listproducts Integer brand_id
*
Brand ID – Can be retrieved using method listbrands Integer color_id
*
Color ID – Can be retrieved using method listcolors Integer size_id
*
Size ID – Can be retrieved using method listsizes Integer front_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer front_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer quantity
If not set, 1 is assumed Integer Array Sample 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
* Parameters
Let’s you place a new Order with Printaura using your print aura 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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (addorder1) String businessname
*
Business Name String businesscontact
*
Business Contact (addorder) String email
*
Your Compnay Email Address String your_order_id
*
Your Order ID String returnlabel
*
Return Label – Separate new lines with “\n” String shippingaddress
*
Full Shipping Address – Separate new lines with “\n” String customerphone
Customer Phone Number – Only required for international orders String packingslip
Packing Slip File shipping_id
*
Shipping Method ID – Can be retrieved using method listshipping String instructions
Special Instructions String hang_tag_removal_price
Hang Tag Removal Boolean tag_application_price
Tag Application Boolean additional_material_price
Additional Materials in Package Boolean items
*
An array with "key = items" contain an array of attribute:values.
* Item attributes*
Example:
{"items":[{"product_id":12,"brand_id":1,"front_print":186189,"front_mockup":186190,"color_id":38,"size_id":6,"quantity":3}]}product_id
*
Product ID – Can be retrieved using method listproducts Integer brand_id
*
Brand ID – Can be retrieved using method listbrands Integer color_id
*
Color ID – Can be retrieved using method listcolors Integer size_id
*
Size ID – Can be retrieved using method listsizes Integer front_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer front_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer quantity
If not set, 1 is assumed Integer Array Sample 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
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (listorders) String Sample 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
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (updateorder) String order_id
*
order_id to be updated, may be retrieved using method listorders Integer businessname
Business Name String businesscontact
Business Contact (addorder) String email
Your Email Address String returnlabel
Return Label – Separate new lines with “\n” String shippingaddress
Full Shipping Address – Separate new lines with “\n” String customerphone
Customer Phone Number – Only required for international orders String packingslip
Packing Slip (Only Pdf,docx and doc files are allowed) File shipping_id
Shipping Method ID – Can be retrieved using method listshipping String instructions
Special Instructions String hang_tag_removal_price
Hang Tag Removal Boolean tag_application_price
Tag Application Boolean additional_material_price
Additional Materials in Package Boolean Sample Success Returns
{“result”:1,”results”:{“order_id”:”1234″}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
cancelorder
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (cancelorder) String order_id
*
order_id to be updated, may be retrieved using method listorders Integer Sample Success Returns
{“result”:1,”results”:{“order_id”:”1234″}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
additem
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (additem) String order_id
*
order_id to be updated, may be retrieved using method listorders Integer product_id
*
Product ID – Can be retrieved using method listproducts Integer brand_id
*
Brand ID – Can be retrieved using method listbrands Integer color_id
*
Color ID – Can be retrieved using method listcolors Integer size_id
*
Size ID – Can be retrieved using method listsizes Integer front_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer front_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer quantity
If not set, 1 is assumed Integer Sample Success Returns
{“result”:1,”results”:{“item_id”:”1234″}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
removeitem
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (removeitem) String item_id
*
item_id to be removed, may be retrieved using method listorders Integer Sample Success Returns
{“result”:1,”results”:{“item_id”:”1234″}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
updateitem
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (updateitem) String item_id
*
item_id to be updated, may be retrieved using method listorders Integer product_id
Product ID – Can be retrieved using method listproducts Integer brand_id
Brand ID – Can be retrieved using method listbrands Integer color_id
Color ID – Can be retrieved using method listcolors Integer size_id
Size ID – Can be retrieved using method listsizes Integer front_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer front_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer quantity
If not set, 1 is assumed Integer Sample Success Returns
{“result”:1,”results”:{“item_id”:”1234″}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
viewproducts
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (viewproducts) String paproduct_id
If set, Only details for this product will be returned Integer Sample 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.* General Parameters
Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (addproduct) String product_id
*
Product ID – Can be retrieved using method listproducts Integer brand_id
*
Brand ID – Can be retrieved using method listbrands Integer colors
*
An array with "key = colors" contain an array of id:attributes.
Example:
{"colors":{"1":{"normal_price":13,"plus_price":17,"default":1},"7":{"normal_price":15,"plus_price":20}}}
Color ID – Can be retrieved using method listcolors.Array apps
*
An array of APP id's to activate this Product in. APP ID – Can be retrieved using method viewshops Array storeimages
*
An array of image_id:id. Example:
[{"image_id":186226,"default":1},{"image_id":186227}]
Image ID – Must be a valid image ID returned by methods uploadimage or listmyimages.Array front_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer front_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer sku
*
Product SKU String title
*
Product Title String description
*
Product Description (HTML is allowed) String weight
*
Product Weight Number tags
*
Product Tags separated by comma. Example: "Men, T-shirt" String
* Shopify Parameters
product_type
*
Shopify Product Type String product_vendor
*
Shopify Product Vendor String collections
String of assigned collections separated by comma.
Example: "25426101,28498192"String
* Storenvy Parameters
product_price
*
Storenvy product price Number storenvy_collection
String of assigned collections separated by comma.
Example: "976119,1003805"String storenvy_shipping
*
Id of Storenvy shipping method Number st_marketplace
*
marketplace id Number st_preorder
0 / 1 Integer st_on_sale
0 / 1 Integer
* WooCommerce Parameters
woocommerce_cat
*
Array of WooCommerce category ID's. Array woocommerce_shortdesc
WooCommerce short description. String woocommerce_shipping_id
*
WooCommerce shipping ID. String
* Etsy Parameters
etsycategory
*
Etsy Category ID. String whomadeit
*
Who made it. Example : 'collective' String whenmade
*
When made. Example : "made_to_order" String issupply
*
0 / 1 Integer price
*
Product price. Number etsysection
*
Etsy section ID. Integer etsyshipping
*
Etsy shipping ID. Integer etsymaterials
*
List of product materials separated by comma. String etsyoccasion
*
Etsy Occasion. String etsystyle
*
List of etsy styles separated by comma. Example : 'Fantasy,Burlesque' String etsyrecipient
*
Etsy recipient ID. Integer
* BigCommerce Parameters
bigcommercefeaturedproduct
0 / 1 Integer bigcommercebrand
*
BigCommerce brand ID. Integer bigcommercecategory
*
BigCommerce category ID. Integer bigcommerceinfo
*
BigCommerce product additional information. String
* OpenCart Parameters
meta_tags
List of meta tags separated by comma. Example : "tag1,tag2" String opencartModel
*
OpenCart Moadel. String opencartCategory
OpenCart category ID. Integer meta_tag_description
Meta Tag Description. String meta_tag_keywords
OpenCart Meta Tag Keywords. String
Sample Success Returns
{"status":true,"result":1,"results":{"product_id":88215145,"shops":[{"shop":"woocommerce","id":4126,"warnings":null}]}}
with shopify:
{"status":true,"result":1,"results":{"product_id":88215145,"shopify_id": 123456,"shops":[{"shop":"woocommerce","id":4126,"warnings":null}]}}
Failure Returns
{"status":false,"error_code":1,"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 Print Aura 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.* General Parameters
Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (editproduct) String paproduct_id
*
Printaura product id. Integer product_id
*
Product ID – Can be retrieved using method listproducts Integer brand_id
*
Brand ID – Can be retrieved using method listbrands Integer colors
*
An array with "key = colors" contain an array of id:attributes.
Example:
{"colors":{"1":{"normal_price":13,"plus_price":17,"default":1},"7":{"normal_price":15,"plus_price":20}}}
Color ID – Can be retrieved using method listcolors.Array apps
*
An array of APP id's to activate this Product in. APP ID – Can be retrieved using method viewshops Array storeimages
*
An array of image_id:id. Example:
[{"image_id":186226,"default":1},{"image_id":186227}]
Image ID – Must be a valid image ID returned by methods uploadimage or listmyimages.Array front_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer front_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_print
Must be a valid image ID returned by methods uploadimage or listmyimages Integer back_mockup
Must be a valid image ID returned by methods uploadimage or listmyimages Integer sku
*
Product SKU String title
*
Product Title String description
*
Product Description (HTML is allowed) String weight
*
Product Weight Number tags
*
Product Tags separated by comma. Example: "Men, T-shirt" String
* Shopify Parameters
product_type
*
Shopify Product Type String product_vendor
*
Shopify Product Vendor String collections
String of assigned collections separated by comma.
Example: "25426101,28498192"String
* Storenvy Parameters
product_price
*
Storenvy product price Number storenvy_collection
String of assigned collections separated by comma.
Example: "976119,1003805"String storenvy_shipping
*
Id of Storenvy shipping method Number st_marketplace
*
marketplace id Number st_preorder
0 / 1 Integer st_on_sale
0 / 1 Integer
* WooCommerce Parameters
woocommerce_cat
*
Array of WooCommerce category ID's. Array woocommerce_shortdesc
WooCommerce short description. String woocommerce_shipping_id
*
WooCommerce shipping ID. String
* Etsy Parameters
etsycategory
*
Etsy Category ID. String whomadeit
*
Who made it. Example : 'collective' String whenmade
*
When made. Example : "made_to_order" String issupply
*
0 / 1 Integer price
*
Product price. Number etsysection
*
Etsy section ID. Integer etsyshipping
*
Etsy shipping ID. Integer etsymaterials
*
List of product materials separated by comma. String etsyoccasion
*
Etsy Occasion. String etsystyle
*
List of etsy styles separated by comma. Example : 'Fantasy,Burlesque' String etsyrecipient
*
Etsy recipient ID. Integer
* BigCommerce Parameters
bigcommercefeaturedproduct
0 / 1 Integer bigcommercebrand
*
BigCommerce brand ID. Integer bigcommercecategory
*
BigCommerce category ID. Integer bigcommerceinfo
*
BigCommerce product additional information. String
* OpenCart Parameters
meta_tags
List of meta tags separated by comma. Example : "tag1,tag2" String opencartModel
*
OpenCart Moadel. String opencartCategory
OpenCart category ID. Integer meta_tag_description
Meta Tag Description. String meta_tag_keywords
OpenCart Meta Tag Keywords. String Sample Success Returns
{"status":true,"result":1,"results":{"product_id":88215145,"shops":[{"shop":"woocommerce","id":4126,"warnings":null}]}}
with shopify:
{"status":true,"result":1,"results":{"product_id":88215145,"shopify_id": 123456,"shops":[{"shop":"woocommerce","id":4126,"warnings":null}]}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
deleteproduct
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (deleteproduct) String paproduct_id
If set, Only details for this product will be returned Integer Sample Success Returns
{“result”:1,”results”:{“paproduct_id”:”345780″}}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
viewapps
Note
* Parameters
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.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (viewapps) String Sample 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
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.Parameters
* ParametersName Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (uninstallapp) String app_id
*
app_id to uninstall, must be a valid app_id retrieved using method viewapps String Sample Success Returns
{“result”:1,”app_id”:1}Failure Returns
{“result”:0,”message”:”HUMAN READABLE ERROR”} -
editmybrand
Note
* Parameters
This method let’s you edit you Printaura Brand.Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (editmybrand) String packingslip
whether or not packingslip is enabled Boolean logo
packingslip file to be uploaded File packingslip_email
email to use in the packingslip file String packingslip_phone
phone to use in the packingslip file String special_note
email to use in the packingslip file String return_lable
whether or not packingslip is enabled Boolean address1
Address1 String address2
Address2 String city
city to use in the address of the return label String state
state to use in the address of the return label String zip
Zip code String heatpress_tag
whether or not heat press tag is enabled Boolean heatpress_tag_location
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 Integer attach_hang_tag
whether or not attach hang tag is enabled Boolean attach_hang_tag_location
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 Integer packin
whether or not packin is enabled Boolean packin_description
packin description String custom_packaging
whether or not custom packaging is enabled Boolean custom_packaging_description
custom packaging description String rush_orders
whether or not rush orders is enabled Boolean firstclass_shipping
whether or not rush orders is enabled Boolean removetag
whether or not remove neck label is enabled Boolean individual_bagging
whether or not rindividual bagging is enabled Boolean -
gettransactions
Note
This method let’s you get Transactions history'sParameters
Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (gettransactions) String page
*
Page index. Integer page_rows
*
Number of rows per page. Integer
Success Returns
{"status":true,"result":1,"results":[{"Date":"03\/09\/2016 03:55:02 PM","Order #":25,"Transaction":"-","Amount":20,"Balance After":30}]} -
editbranduser
Note
This method let’s you edit your brandParameters
Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (editbranduser) String packingslip
*
Paking Slip (0 / 1) Integer logo
*
Image logo. String serviceemail
*
e-mail. String servicephone
*
Phone number. String specialnote
*
Special note with Packing Slip String firstclassshipping
*
(0 / 1) Integer removetag
*
(0 / 1 ) Integer heatpresstag
*
(0 / 1 ) Integer heatpresstaglocation
*
Heat press tag location Integer packin
*
(0 / 1) Integer packindescription
*
Description for Pack Ins String attachhangtag
*
(0 / 1) Integer attachhangtaglocation
*
attach hang tag location Integer rushorders
*
(0 / 1) Integer individualbagging
*
(0 / 1) Integer custompackaging
*
(0 / 1) Integer custompackagingdescription
*
Custom packaging description String address1
*
address 1 String address2
*
address 2 String city
*
City String state
*
State String zip
*
Zip Code String
Success Returns
{"status":true,"result":1,"results":{"first_class_shipping":1,"remove_tag":1,"packin":1,"packin_description":"packin description","rush_order":1,"individual_bagging":1,"custom_packaging":1,"custom_packaging_desc":"description","heat_press_tag":1,"heat_press_tag_location":"tag location","attach_hang_tag":1,"attach_hang_tag_location":"hang tag_location","generated_packing_slips":1,"packing_slips_image_id":123,"service_email":"E-mail","service_phone":"Phone","special_note":"Special Note","address1":"zip","address2":"address2"}} -
editprofile
Note
This method let's you edit your profileParameters
Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (editprofile) String password
*
Your Password. String confirm_password
*
Password Confirmation. String business_name
*
Business Name. String full_address
*
Address. String phone_number
*
Phone number. String web_site
Your web site String
Success Returns
{"status":true,"result":1,"results":[{"field":"password","value":"Hashed Password"},{"field":"business_name","value":"Busness Name"},{"field":"fullname","value":"Full Name"},{"field":"full_address","value":"Address"},{"field":"phone_number","value":"Phone"},{"field":"web_site","value":"URL"}]} -
adduser
Note
This method let’s you add new user if you have permission given by administration.Parameters
Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (adduser) String user_email
*
E-mail. String user_name
*
New user name. String business_name
*
New business name. String
On success The new user email will receive the generated password.
Success Returns
{"status":true,"result":1,"results":{"api_key":"API KEY","apihash":"API HASH"}} -
geterrors
Note
This method let’s you get all errors message with numbers.Parameters
Name Description Format key
*
API Key String hash
*
API Hash String method
*
Method Name (geterrors) String Success Returns
{"status":true,"result":1,"results":{"lists_errors":[{"code":0,"message":"No errors"},{"code":1,"message":"Uknown method"},{"code":2,"message":"You must set variable front_print or back_print, both can be set as well."},{"code":3,"message":"product_id must be set, please use method listproducts to retrieve all products provided by Printaura."}]}}
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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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_removalParameters
key (API Key)
hash (API Hash)
method (listadditionalsettings)
Code Example
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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.Parameters
key (API Key)
hash (API Hash)
method (uploadimage)
file (imagefile)
Code Example
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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 print aura 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 -
addorder1
Note
Let’s you place a new Order with Printaura using your print aura 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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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 print aura 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.Parameters
key (API Key)
hash (API Hash)
method (listorders)
Code Example
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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 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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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 which is activated in :
Printaura Shopify APP
Printaura Storenvy APP
Printaura Etsy APP
Printaura WooCommerce APP
Printaura OpenCart APP
Printaura Ecwid APP
Printaura BigCommerce APPCode Example
<?php
$call["key"] = YOUR_API_KEY;
$call["hash"] = YOUR_API_HASH;
$call['method']='addproduct';
$call['apps'] = base64_encode(json_encode(array(1, 2, 3, 4, 5, 7, 8)));
$call['storeimages'] =
base64_encode(json_encode(array(array('image_id'=>186226,'default'=>1),array('image_id'=>186227))));
$call['colors'] =
base64_encode(json_encode(array("colors"=>array("9"=>array('normal_price'=>15,"plus_price"=>17,
'default'=>1)))));
$call['front_print'] = '186224';
$call['back_print'] = '186224';
$call['front_mockup'] = '186224';
$call['back_mockup'] = '186224';
$call['product_id'] = '200';
$call['brand_id'] = '1';
// Product Details
$call['title'] = "Product Title";
$call['sku'] = 'myproduct-sku';
$call['description'] = 'html is allowed';
$call['weight'] = 1;
$call['tags'] = 'tag1, tag2, tag3';
// 1 - shopify product
$call['product_type'] = "Snowboard";
$call['product_vendor'] = "Burton";
$call['collections'] = "25426101,25457273,28498192";
// 2 - storenvy product
$call['product_price'] = '33.75';
$call['storenvy_collection'] = '976119,1003805,966522';
$call['storenvy_shipping'] = 602787;
$call['st_marketplace'] = 313;
$call['st_preorder'] = 0;
$call['st_on_sale'] = 1;
// 3 - etsy product
$call['etsycategory'] = '447';
$call['etsynewproduct'] = 0;
$call['whomadeit'] = 'collective';
$call['whenmade'] = 'made_to_order';
$call['issupply'] = 0;
$call['price'] = 24.50;
$call['etsysection'] = 16358332;
$call['etsyshipping'] = 8457691478;
$call['etsymaterials'] = 'cloud materiel,cloud file';
$call['etsyoccasion'] = "cinco_de_mayo";
$call['etsystyle'] = 'Fantasy,Burlesque';
$call['etsyrecipient'] = 266817085;
// 4 - woocommerce product
$call['woocommercenewproduct'] = 0;
$call['woocommerce_cat'] = '41';
$call['woocommerce_shortdesc'] = 'Short description';
$call['woocommerce_shipping_id'] = '6';
// 5 - opencart product
$call['model'] = 'product_model';
$call['tax_class_id'] = '9';
$call['opencart_category'] = 0;
$call['meta_description'] = 'meta desc';
$call['meta_keyword'] = 'meta keyword';
$call['meta_tags'] = 't1,t2,t3';
// 7 - ecwid product
$call['ecwid_category'] = '0';
$call['ecwid_upc'] = 'JAN';
$call['ecwid_brand'] = 'Manufacturer';
// 8 - bigcommerce product
$call['bigcommercefeaturedproduct'] = 1;
$call['bigcommercebrand'] = 24;
$call['bigcommercecategory'] = 8;
$call['bigcommerceinfo'] = 'additional informations.';
// 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, $call);
$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 edit a Printaura Product which is activated in :
Printaura Shopify APP
Printaura Storenvy APP
Printaura Etsy APP
Printaura WooCommerce APP
Printaura OpenCart APP
Printaura Ecwid APP
Printaura BigCommerce APPCode Example
<?php
$call["key"] = YOUR_API_KEY;
$call["hash"] = YOUR_API_HASH;
$call['method']='editproduct';
$call['paproduct_id'] = 88029260;
$call['apps'] = base64_encode(json_encode(array(1, 2, 3, 4, 5, 7, 8)));
$call['storeimages'] =
base64_encode(json_encode(array(array('image_id'=>186226,'default'=>1),array('image_id'=>186227))));
$call['colors'] =
base64_encode(json_encode(array("colors"=>array("9"=>array('normal_price'=>15,"plus_price"=>17,
'default'=>1)))));
$call['front_print'] = '186224';
$call['back_print'] = '186224';
$call['front_mockup'] = '186224';
$call['back_mockup'] = '186224';
$call['product_id'] = '200';
$call['brand_id'] = '1';
// Product Details
$call['title'] = "Product Title";
$call['sku'] = 'myproduct-sku';
$call['description'] = 'html is allowed';
$call['weight'] = 1;
$call['tags'] = 'tag1, tag2, tag3';
// 1 - shopify product
$call['product_type'] = "Snowboard";
$call['product_vendor'] = "Burton";
$call['collections'] = "25426101,25457273,28498192";
// 2 - storenvy product
$call['product_price'] = '33.75';
$call['storenvy_collection'] = '976119,1003805,966522';
$call['storenvy_shipping'] = 602787;
$call['st_marketplace'] = 313;
$call['st_preorder'] = 0;
$call['st_on_sale'] = 1;
// 3 - etsy product
$call['etsycategory'] = '447';
$call['etsynewproduct'] = 0;
$call['whomadeit'] = 'collective';
$call['whenmade'] = 'made_to_order';
$call['issupply'] = 0;
$call['price'] = 24.50;
$call['etsysection'] = 16358332;
$call['etsyshipping'] = 8457691478;
$call['etsymaterials'] = 'cloud materiel,cloud file';
$call['etsyoccasion'] = "cinco_de_mayo";
$call['etsystyle'] = 'Fantasy,Burlesque';
$call['etsyrecipient'] = 266817085;
// 4 - woocommerce product
$call['woocommercenewproduct'] = 0;
$call['woocommerce_cat'] = '41';
$call['woocommerce_shortdesc'] = 'Short description';
$call['woocommerce_shipping_id'] = '6';
// 5 - opencart product
$call['model'] = 'product_model';
$call['tax_class_id'] = '9';
$call['opencart_category'] = 0;
$call['meta_description'] = 'meta desc';
$call['meta_keyword'] = 'meta keyword';
$call['meta_tags'] = 't1,t2,t3';
// 7 - ecwid product
$call['ecwid_category'] = '0';
$call['ecwid_upc'] = 'JAN';
$call['ecwid_brand'] = 'Manufacturer';
// 8 - bigcommerce product
$call['bigcommercefeaturedproduct'] = 1;
$call['bigcommercebrand'] = 24;
$call['bigcommercecategory'] = 8;
$call['bigcommerceinfo'] = 'additional informations.';
// 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, $call);
$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
?> -
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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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
$url = "http://www.api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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 Print Aura when ordered.Code Example
$url = "https://api.printaura.com/api.php";$postfields["key"] = YOUR_API_KEY;
$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 print aura