WooCommerce is the world’s most popular open-source eCommerce solution which is built on WordPress. Add the WooCommerce plugin to any WordPress site and set up a new store in minutes. Through Cloudsto.re–WooCommerce API, AOD services can be integrated with WooCommerce Admin engine and automate the process of AOD product creation and order processing.
Cloudsto.re AOD–WooCommerce Integration enables the AOD customers to have a quick and easy online presence to sell via an eCommerce shop with minimum setup. The integration minimises any complexity on print fulfilment by creating a seamless end-to-end solution. AOD products can be added to WooCommerce directly from the AOD client and online orders from WooCommerce are automatically sent to AOD fulfilment stations, print ready.
Make all requests to: https://api.cloudsto.re/ecom/woocommerce
For full details of Cloudsto.re API specification including Authentication, Request and return data formats refer to Core API documentation,
Multiple WooCommerce Stores can be integrated to one Cloudsto.re services account. First a WooCommerce store needs to be setup and each store registered with Cloudsto.re services for API services to be active. The following setup information and steps are required:
To use the latest version of the REST API you must be using:
Pre-generated keys are used to authenticate use of the REST API endpoints. New keys can be generated through the WordPress admin interface. To create or manage keys for a specific WordPress user, go to WooCommerce > Settings > Advanced > REST API.
Click the “Add Key” button. In the next screen, add a description and select the WordPress user you would like to generate the key for. Use of the REST API with the generated keys will conform to that user’s WordPress roles and capabilities.
Choose the level of access for this REST API key, which should be Read/Write access. Then click the “Generate API Key” button and Woo-commerce will generate REST API keys for the selected user.
Now that keys have been generated, you should see two new keys, a QRCode, and a Revoke API Key button. These two keys are your Consumer Key and Consumer Secret. Make a note of theses two keys as you will need them for the next section to activate the store on Cloudstore Console.
If the WordPress user associated with an API key is deleted, the API key will cease to function. API keys are not transferred to other users.
In Cloudstore Console go to Integration/WooCommerce section and press Add button to connect your new Woo-commerce store. Enter store URL as the name and enter the consumer key and secret from the previous section here under API Key and Secret. Press Add to complete the process.
Endpoint | Description | Functions |
---|---|---|
/categories | Work with WooCommerce categories from associated Woo store | · Get all categories |
/order | Work with WooCommerce orders from associated Woo store | · Receive Order |
/options | Work with details of Options associated with a Woo store | · Get All Options |
/options/submit | Submit list of Options for the Woo store | · Submit Options |
/products | work with products on Woo Store | |
/products/submit | Submit list of Products for the Woo store | · Submit Products |
/stores | Work with stores associated with account | · Get All Stores Info |
/stores/info | Get website address for a specific store | · Get Store Info |
/variants | Work with details of Variants associated with a Shopify store | · Get All Variants |
/variants/submit | Submit a list of Variants for the Woo store | · Submit Variants |
Request a list of all categories for the given store accessible for this account.
{ "APIKey": "x-a3A1qLrXStYDgThU3dfA", "Store" : "printsto.re", }
Name | Type | Description | Required |
---|---|---|---|
APIKey | string | Authorisation key unique to account | Yes |
Store | string | Woo store name, must be supplied for accounts with multiple stores. Default: first store associated with account | No |
{ "Count":4, "Categories":[ { "id" : "78950924400", "name" : "Front Page", }, { "id" : "80449798256", "name" : "Trending", }, { "id" : "138639638614", "name" : "Top Seller", }, { "id" : "80448356464", "name" : "Sale", } ] }
Name | Type | Description |
---|---|---|
Count | integer | Count of items returned |
Collections | array | List of collection information (objects) |
id | string | Category ID |
name | string | Category Name |
$.ajax({ url: "https://api.cloudsto.re/ecom/woocommerce/categories", contentType: 'application/x-www-form-urlencoded', dataType: 'json', type: 'POST', data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”}), success: function(response) { $.each(response.Categories, function(index, value) { // process returns }); }, error: function(err) { // handle error } });
$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' -X POST https://api.cloudsto.re/ecom/woocommerce/categories
This endpoint can be connected to WooCommerce order Webhook to receive Store orders. All orders for AOD products are then automatically packaged and sent to the printing station specified in the setup.
Request a list of all options for the given store accessible for this account
{ "APIKey": "x-a3A1qLrXStYDgThU3dfA", "Store" : "printsto.re", }
Name | Type | Description | Required |
---|---|---|---|
APIKey | string | Authorisation key unique to account | Yes |
Store | string | Woo store name, must be supplied for accounts with multiple stores. Default: first store associated with account | No |
{ "Count":2, "Options":[ { "Attribute" : "Size", "AttributeID" : 2, "Option" : "50x50", "Template" : "Square-MD", }, { "Attribute" : "Finish", "AttributeID" : 4, "Option" : "Matte", "Media" : "Factory Queue 1" } ] }
Name | Type | Description |
---|---|---|
Count | integer | Count of items returned |
Options | array | List of Option information (objects) |
Option | string | Option name |
Attribute | string | Attribute Name |
AttributeID | integer | Attribute ID |
Template | string | Template used in the print job. |
Media | string | Media ID |
$.ajax({ url: "https://api.cloudsto.re/ecom/woocommerce/options", contentType: 'application/x-www-form-urlencoded', dataType: 'json', type: 'POST', data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”}), success: function(response) { $.each(response.Options, function(index, value) { // process returns }); }, error: function(err) { // handle error } });
Submit list of all options for the given store accessible for this account.
{ "APIKey": "x-a3A1qLrXStYDgThU3dfA", "Store" : "artstore.myshopify.com", "Options" : [ { "Option" : "100x100 cm", "Name" : "Size", "Width" : 1000, "Height" : 1000 }, { "Option" : "50x50 cm", "Name" : "Size", "Width" : 500, "Height" : 500 }, { "Option" : "Print Only", "Name" : "Finish", "Media" : "Traditional Photo Paper 1440", }, { "Option" : "Canvas", "Name" : "Finish", "Media" : "Canvas Rag Paper 720", "CanvasBorderSize" : 25, "CanvasBorderType" : "average" } ] }
Name | Type | Description | Required |
---|---|---|---|
APIKey | string | Authorisation key unique to account | Yes |
Store | string | Shopify store name, must be supplied for accounts with multiple stores. Default: first store associated with account | No |
Options | array | List of options to be submitted (objects). If empty array then the current options will be cleared. | Yes |
Option | string | Option Label | Yes |
Name | string | Option Name | No |
Width | float | Width of the print job in mm. This field is for option type size. | No |
Height | float | Height of the print job in mm. This field is for option type size. | No |
Media | string | Media ID | No |
CanvasBorderSize | float | Size border in mm for Finish type Canvas. | No |
CanvasBorderType | string | Border type for Finish type Canvas: ‘mirror’, ‘none’, ‘colour’, ‘average’, ‘stretch’, ‘image’. Default value is mirror | No |
{ "Count":2, "Options":[ { "Name" : "Size", "Values" : [ { "Option" : "100x100 cm", "Width" : 1000, "Height" : 1000 }, { "Option" : "50x50 cm", "Width" : 500, "Height" : 500 } ] }, { "Name" : "Finish", "Values" : [ { "Option" : "Print Only", "Media" : "Traditional Photo Paper 1440", }, { "Option" : "Canvas", "Media" : "Canvas Rag Paper 720", "CanvasBorderSize" : 25 } ] } ] }
Name | Type | Description |
---|---|---|
Count | integer | Count of items returned |
Options | array | List of Option information (objects) |
Name | string | Option name |
Values | array | List of values (object) associated with this option. |
Option | string | Option label |
Width | float | Width of the print job in mm. This field is for option type size. |
Height | float | Height of the print job in mm. This field is for option type size. |
Media | string | Media ID |
CanvasBorderSize | float | Size border in mm for Finish type Canvas. |
$.ajax({ url: "https://api.cloudsto.re/ecom/shopify/options", contentType: 'application/x-www-form-urlencoded', dataType: 'json', type: 'POST', data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”}), success: function(response) { $.each(response.Options, function(index, value) { // process returns }); }, error: function(err) { // handle error } });
$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' -X POST https://api.cloudsto.re/ecom/shopify/options
Work with products on Shopify Store
Export a list of all products for the given store accessible for this account to a csv file ready for Import to Shopify.
{ "APIKey": "x-a3A1qLrXStYDgThU3dfA", "Store" : "artstore.myshopify.com", "Locale" : "en", "Products" : [ { "PublisherID" : "15", "ImageID" : "4004", "Title: : "Sunset in London", "Vendor" : "Per Gudnitz", "SKU" : "PG-5643", "BodyHTML" : "<strong>Sunset by Hammersmith bridge</strong>" "ProductType" : "Photography", "Collection" : "Trending", "Published" : true, "Variants" : [ { "Option1" : "100x100 cm", "Option2: : "Print Only", "Price" : 120 }, { "Option1" : "50x50 cm", "Option2" : "Print Only", "Price" : 60, "Position" : 1 } ] } ] }
Name | Type | Description | Required |
---|---|---|---|
APIKey | string | Authorisation key unique to account | Yes |
Store | string | Shopify store name, must be supplied for accounts with multiple stores. Default: first store associated with account | No |
Locale | string | determines what Locale Tags to be used for the mage keywords. When not included ALL is the default. | No |
Products | array | List of product details to be added (objects) | Yes |
PublisherID | string | Image Publisher ID | Yes |
ImageID | string | Image ID | Yes |
Title | string | Image Title | No |
Vendor | string | Image Vendor/Artist Name | No |
SKU | string | Image Reference | No |
BodyHTML | string | Product description accepts (HTML tags) | No |
ProductType | string | Product type | No |
Collection | string | Collection Title. Must be a valid existing Collection Title | No |
Published | boolean | =false the product is added to Shopify but not published online. =true the product will be available online immediately. Default is true | No |
Variants | array | List of variants associated with the product. If not present then the default set of variants for the store is used. | No |
Option1 | string | variant Option 1 value | No |
Option2 | string | variant Option 2 value | No |
Option3 | string | variant Option 3 value | No |
Price | float | variant price | No |
Position | integer | when Position=1 the variant is default choice on the store for the product. | No |
{ "Name": "20190404_142704_268.csv", "Source": "https://s3.amazonaws.com/shopify/exports/artstore.myshopify.com/20190404_142704_268.csv" }
Name | Type | Description |
---|---|---|
Name | string | Filename of exported csv file |
Source | url | URL of export file for download |
$.ajax({ url: "https://api.cloudsto.re/ecom/shopify/products/export", contentType: 'application/x-www-form-urlencoded', dataType: 'json', type: 'POST', data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”,"Products":[{"PublisherID":"15","ImageID":"4009"}]}), success: function(response) { $.each(response.Variants, function(index, value) { // process returns }); }, error: function(err) { // handle error } });
$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA","Products":[{"PublisherID":"15","ImageID":"4009"}]}' -X POST https://api.cloudsto.re/ecom/shopify/products/export
Submit a list of all products for the given store accessible for this account.
{ "APIKey": "x-a3A1qLrXStYDgThU3dfA", "Store" : "artstore.myshopify.com", "Locale" : "en", "Products" : [ { "PublisherID" : "15", "ImageID" : "4004", "Title: : "Sunset in London", "Vendor" : "Per Gudnitz", "SKU" : "PG-5643", "BodyHTML" : "<strong>Sunset by Hammersmith bridge</strong>" "ProductType" : "Photography", "Collection" : ["80448356464"], "Published" : true, "Variants" : [ { "Option1" : "100x100 cm", "Option2: : "Print Only", "Price" : 120 }, { "Option1" : "50x50 cm", "Option2" : "Print Only", "Price" : 60, "Position" : 1 } ] } ] }
Name | Type | Description | Required |
---|---|---|---|
APIKey | string | Authorisation key unique to account | Yes |
Store | string | Shopify store name, must be supplied for accounts with multiple stores. Default: first store associated with account | No |
Locale | string | determines what Locale Tags to be used for the mage keywords. When not included ALL is the default. | No |
Products | array | List of product details to be added (objects) | Yes |
PublisherID | string | Image Publisher ID | Yes |
ImageID | string | Image ID | Yes |
Title | string | Image Title | No |
Vendor | string | Image Vendor/Artist Name | No |
SKU | string | Image Reference | No |
BodyHTML | string | Product description accepts (HTML tags) | No |
ProductType | string | Product type | No |
Collection | array | List of Collection IDs. Must be valid existing collection IDs (string) | No |
Published | boolean | =false the product is added to Shopify but not published online. =true the product will be available online immediately. Default is true | No |
Variants | array | List of variants associated with the product. If not present then the default set of variants for the store is used. | No |
Option1 | string | variant Option 1 value | No |
Option2 | string | variant Option 2 value | No |
Option3 | string | variant Option 3 value | No |
Price | float | variant price | No |
Position | integer | when Position=1 the variant is default choice on the store for the product. | No |
{ "Count": 1, "Products":["2026704404566"] }
Name | Type | Description |
---|---|---|
Count | integer | Count of items added |
Products | array | List of Product IDs returned from Shopify (strings) |
$.ajax({ url: "https://api.cloudsto.re/ecom/shopify/products/submit", contentType: 'application/x-www-form-urlencoded', dataType: 'json', type: 'POST', data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”,"Products":[{"PublisherID":"15","ImageID":"4009"}]}), success: function(response) { $.each(response.Variants, function(index, value) { // process returns }); }, error: function(err) { // handle error } });
$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA","Products":[{"PublisherID":"15","ImageID":"4009"}]}' -X POST https://api.cloudsto.re/ecom/shopify/products/submit
Request a list of all stores accessible for this account.
{ "APIKey": "x-a3A1qLrXStYDgThU3dfA", }
Name | Type | Description | Required |
---|---|---|---|
APIKey | string | Authorisation key unique to account | Yes |
{ "Count" : 2, "Stores" : [ "artstore.myshopify.com", "printstore.myshopify.com"] }
Name | Type | Description |
---|---|---|
Count | integer | Count of items returned |
Stores | array | List of Store names (strings) |
$.ajax({ url: "https://api.cloudsto.re/ecom/shopify/stores", contentType: 'application/x-www-form-urlencoded', dataType: 'json', type: 'POST', data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”}), success: function(response) { $.each(response.Stores, function(index, value) { // process returns }); }, error: function(err) { // handle error } });
$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' -X POST https://api.cloudsto.re/ecom/shopify/stores
Request information for a specific store accessible for this account.
{ "APIKey": "x-a3A1qLrXStYDgThU3dfA", "Store" : "artstore.myshopify.com", }
Name | Type | Description | Required |
---|---|---|---|
APIKey | string | Authorisation key unique to account | Yes |
Store | string | Shopify store name | Yes |
{ "Count": 1, "Stores": ["https://artsto.re"] }
Name | Type | Description |
---|---|---|
Count | integer | Count of items returned |
Stores | array | List of Store Websites (strings) |
$.ajax({ url: "https://api.cloudsto.re/ecom/shopify/stores/info", contentType: 'application/x-www-form-urlencoded', dataType: 'json', type: 'POST', data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”,"Store":"artstore.myshopify.com"}), success: function(response) { $.each(response.Stores, function(index, value) { // process returns }); }, error: function(err) { // handle error } });
$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA", "Store" : "artstore.myshopify.com"}' -X POST https://api.cloudsto.re/ecom/shopify/stores/info
Request a list of all variants for the given store accessible for this account.
{ "APIKey": "x-a3A1qLrXStYDgThU3dfA", "Store" : "artstore.myshopify.com", }
Name | Type | Description | Required |
---|---|---|---|
APIKey | string | Authorisation key unique to account | Yes |
Store | string | Shopify store name, must be supplied for accounts with multiple stores. Default: first store associated with account | No |
{ "Count":4, "Variants":[ { "Title" : "100x100 cm / Print Only", "Option1" : "100x100 cm", "Option2: : "Print Only", "Price" : 120 }, { "Title" : "100x100 cm / Canvas", "Option1" : "100x100 cm", "Option2" : "Canvas", "Price" : 160 }, { "Title" : "50x50 cm / Print Only", "Option1" : "50x50 cm", "Option2" : "Print Only", "Price" : 60, "Position" : 1 }, { "Title" : "50x50 cm / Canvas", "Option1" : "50x50 cm", "Option2" : "Canvas", "Price" : 100, } ] }
Name | Type | Description |
---|---|---|
Count | integer | Count of items returned |
Variants | array | List of variant information (objects) |
Title | string | Variant Title |
Option1 | string | Option 1 value |
Option2 | string | Option 2 value |
Option3 | string | Option 3 value |
Price | float | variant price |
Position | integer | when Position=1 the variant is default choice on the store for the product. |
$.ajax({ url: "https://api.cloudsto.re/ecom/shopify/variants", contentType: 'application/x-www-form-urlencoded', dataType: 'json', type: 'POST', data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”}), success: function(response) { $.each(response.Variants, function(index, value) { // process returns }); }, error: function(err) { // handle error } });
$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' -X POST https://api.cloudsto.re/ecom/shopify/variants
Submit a list of all variants for the given store accessible for this account.
{ "APIKey": "x-a3A1qLrXStYDgThU3dfA", "Store" : "artstore.myshopify.com", "Variants" : [ { "Title" : "100x100 cm / Print Only", "Option1" : "100x100 cm", "Option2: : "Print Only", "Price" : 120 }, { "Title" : "100x100 cm / Canvas", "Option1" : "100x100 cm", "Option2" : "Canvas", "Price" : 160 }, { "Title" : "50x50 cm / Print Only", "Option1" : "50x50 cm", "Option2" : "Print Only", "Price" : 60, "Position" : 1 }, { "Title" : "50x50 cm / Canvas", "Option1" : "50x50 cm", "Option2" : "Canvas", "Price" : 100 } ] }
Name | Type | Description | Required |
---|---|---|---|
APIKey | string | Authorisation key unique to account | Yes |
Store | string | Shopify store name, must be supplied for accounts with multiple stores. Default: first store associated with account | No |
Variants | array | List of variants to be submitted (objects). If empty array then the current default variants will be cleared. | Yes |
Title | string | Variant Title | Yes |
Option1 | string | Option 1 value | No |
Option2 | string | Option 2 value | No |
Option3 | string | Option 3 value | No |
Price | float | Variant Price | No |
Position | number | when Position=1 the variant is default choice on the store for the product. | No |
{ "Count":4, "Variants":[ { "Title" : "100x100 cm / Print Only", "Option1" : "100x100 cm", "Option2: : "Print Only", "Price" : 120 }, { "Title" : "100x100 cm / Canvas", "Option1" : "100x100 cm", "Option2" : "Canvas", "Price" : 160 }, { "Title" : "50x50 cm / Print Only", "Option1" : "50x50 cm", "Option2" : "Print Only", "Price" : 60, "Position" : 1 }, { "Title" : "50x50 cm / Canvas", "Option1" : "50x50 cm", "Option2" : "Canvas", "Price" : 100, } ] }
Name | Type | Description |
---|---|---|
Count | integer | Count of items returned |
Variants | array | List of variant information (objects) |
Title | string | Variant Title |
Option1 | string | Option 1 value |
Option2 | string | Option 2 value |
Option3 | string | Option 3 value |
Price | float | variant price |
Position | number | when Position=1 the variant is default choice on the store for the product. |
$.ajax({ url: "https://api.cloudsto.re/ecom/shopify/variants/submit", contentType: 'application/x-www-form-urlencoded', dataType: 'json', type: 'POST', data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”}), success: function(response) { $.each(response.Variants, function(index, value) { // process returns }); }, error: function(err) { // handle error } });
$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' -X POST https://api.cloudsto.re/ecom/shopify/variants/submit