Shopify API Documentation

Introduction

 

Shopify enables creation of powerful eCommerce solutions by providing a variety of tools to help with setting up and running an online business. Through Cloudsto.reShopify API, AOD services can be integrated with Shopify Admin engine and automate the process of AOD product creation and order processing.

Cloudsto.re AODShopify 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 Shopify directly from the AOD client and online orders from Shopify are automatically sent to AOD fulfilment stations, print ready.

Cloudsto.re has collaborated with Shopify to develop back-end service connections in order to offer a seamless integration. For a quick setup and to get Shopify free for 14 days, use the link below to signup:

Shopify Signup

 

Accessing the API

Make all requests to: https://api.cloudsto.re/ecom/shopify

For full details of Cloudsto.re API specification including Authentication, Request and return data formats refer to Core API documentation,

Suggest edit
Last updated on April 6, 2019

Setup

Multiple Shopify Stores can be integrated to one Cloudsto.re services account. First a store needs to be setup on Shopify site and each store registered with Cloudsto.re services for API services to be active. The following setup information and steps are required:

Shopify Store Signup

⇒ Sign up for a Shopify Store through the link below:

Shopify Signup

Shopify Public App

You can connect your Shopify Store to your Cloudstore Account via the Shopify App through the link below:

Shopify App

Shopify Private App

Shopify Private App is an alternative method for connecting your Shopify store to 
Cloudstore. If you have installed the Public App, there is no need to install this step.

⇒ Add a private app with following details and note the credentials required by next 
section (refer to Shopify Documentation for full guide):

♦ Private app name: cloudstore
♦ Emergency developer email: info@cloudsto.re

Grant Read/Write access for :
 Orders - View or manage orders, transactions and fulfilment
 Product listings - View or manage product or collection listings
 Products - View or manage products, variants and collections

⇒ Under Store settings, tap Notifications and Configure a webhook using the Shopify 
admin, setting the following parameters:
♦ Event : Order creation
♦ Callback URL https://api.cloudsto.re/ecom/shopify/order
♦ FormatJSON

Cloudstore

⇒ Provide Cloudstore with the following required information on the Store created above, from Shopify admin section:

♦ Shopstorename.myshopify.com
♦ Websitewww.storename.com
♦ Admin API key4768dd5cbaeb41784ed3ec3f17d380f4
♦ Admin API Password : 5e53d5247370bae0f1d55065c01ee4c4
♦ Admin API Shared Secret: 5ef327a8709d7af0c5f604ea8a5282be
Suggest edit
Last updated on March 5, 2021

Available Endpoints

Endpoint Description Functions
/collections Work with shopify collections from associated Shopify store · Get all collections
/order Work with shopify orders from associated Shopify store · Create Order
/options Work with details of Options associated with a Shopify store · Get All Options
/options/submit Submit list of Options for the Shopify store · Submit Options
/products work with products on Shopify Store
/products/export Export list of Products for the Shopify store · Export Products
/products/submit Submit list of Products for the Shopify store · Submit Products
/stores Work with stores associated with account · Get All Store Names
/stores/info Get  website address for a specific store · Get Store Website
/variants Work with details of Variants associated with a Shopify store · Get All Variants
/variants/submit Submit a list of Variants for the Shopify store · Submit Variants
Suggest edit
Last updated on July 12, 2019

Collections

/collections

 

Request a list of all collections for the given store accessible for this account.

 

Request 

{ 
  "APIKey": "x-a3A1qLrXStYDgThU3dfA",
  "Store" : "artstore.myshopify.com",
}

 

Parameters

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

Response

{
   "Count":4,
   "Collections":[
     {
      "ID" : "78950924400",
      "Title" : "Front Page",
     },
     {
      "ID" : "80449798256",
      "Title" : "Trending",
     },
     {
       "ID" : "138639638614",
       "Title" : "Top Seller",
     },
     {
      "ID" : "80448356464",
      "Title" : "Sale",
     }            
   ]
}

 

Parameters

Name Type Description
Count integer Count of items returned
Collections array List of collection information (objects)
ID string Collection ID
Title string Collection Title

 

JQuery Example

$.ajax({
    url: "https://api.cloudsto.re/ecom/shopify/collections",
    contentType: 'application/x-www-form-urlencoded',
    dataType: 'json',
    type: 'POST', 
    data: JSON.stringify({“APIKey”:“x-a3A1qLrXStYDgThU3dfA”}),    
    success: function(response) {
          $.each(response.Collections, function(index, value) {
               // process returns
          });
    },
    error: function(err) {
               // handle error
    }
});

 

cURL Example

$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' \
      -X POST https://api.cloudsto.re/ecom/shopify/collections
Suggest edit
Last updated on July 19, 2019

Order

/order

 

This endpoint can be connected to Shopify 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.

Suggest edit
Last updated on April 4, 2019

Options

/options

 

Request a list of all options for the given store accessible for this account

 

Request 

{ 
  "APIKey": "x-a3A1qLrXStYDgThU3dfA",
  "Store" : "artstore.myshopify.com",
}

 

Parameters

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

Response

{
   "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
          }
        ]
      }            
    ]
}

 

Parameters

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.
CanvasBorderType string Border type for Finish type Canvas: ‘mirror’, ‘none’, ‘colour’, ‘average’, ‘stretch’, ‘image’. Default value is mirror

Examples

$.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
Suggest edit
Last updated on April 9, 2019

Submit

/options/submit

 

Submit list of all options for the given store accessible for this account.

 

Request 

{ 
  "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"
       }
    ]
}

 

Parameters

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

Response

{
   "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
          }
        ]
      }            
    ]
}

 

Parameters

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.

 

JQuery Example

$.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 Example

$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' \
      -X POST https://api.cloudsto.re/ecom/shopify/options
Suggest edit
Last updated on April 26, 2019

Products

Work with products on Shopify Store

Suggest edit
Last updated on April 4, 2019

Export

/products/export

 

Export a list of all products for the given store accessible for this account to a csv file ready for Import to Shopify.

 

Request 

{ 
  "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 
        }
      ]
    }
  ]
}

 

Parameters

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

Response

{
   "Name": "20190404_142704_268.csv",
   "Source": "https://s3.amazonaws.com/shopify/exports/artstore.myshopify.com/20190404_142704_268.csv"
}

 

Parameters

Name Type Description
Name string Filename of exported csv file
Source url URL  of export file for download

 

JQuery Example

$.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 Example

$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA","Products":[{"PublisherID":"15","ImageID":"4009"}]}' \
      -X POST https://api.cloudsto.re/ecom/shopify/products/export
Suggest edit
Last updated on July 12, 2019

Submit

/products/submit

 

Submit a list of all products for the given store accessible for this account.

 

Request 

{ 
  "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 
        }
      ]
    }
  ]
}

 

Parameters

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

Response

{
   "Count": 1,
   "Products":["2026704404566"]
}

 

Parameters

Name Type Description
Count integer Count of items added
Products array List of Product IDs returned from Shopify (strings)

 

JQuery Example

$.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 Example

$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA","Products":[{"PublisherID":"15","ImageID":"4009"}]}' \
      -X POST https://api.cloudsto.re/ecom/shopify/products/submit
Suggest edit
Last updated on May 20, 2020

Stores

/stores

 

Request a list of all stores accessible for this account.

 

Request 

{ 
  "APIKey": "x-a3A1qLrXStYDgThU3dfA",
}

 

Parameters

Name Type Description Required
APIKey string Authorisation key unique to account Yes

Response

{
   "Count" : 2,
   "Stores" : [ "artstore.myshopify.com", "printstore.myshopify.com"]
}

 

Parameters

Name Type Description
Count integer Count of items returned
Stores array List of Store names (strings)

 

JQuery Example

$.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 Example

$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' \
      -X POST https://api.cloudsto.re/ecom/shopify/stores
Suggest edit
Last updated on April 4, 2019

Info

/stores/info

 

Request information for a specific store accessible for this account.

 

Request 

{ 
  "APIKey": "x-a3A1qLrXStYDgThU3dfA",
  "Store" : "artstore.myshopify.com",
}

 

Parameters

Name Type Description Required
APIKey string Authorisation key unique to account Yes
Store string Shopify store name Yes

Response

{
   "Count": 1,
   "Stores": ["https://artsto.re"]
}

 

Parameters

Name Type Description
Count integer Count of items returned
Stores array List of Store Websites (strings)

 

JQuery Example

$.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 Example

$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA", "Store" : "artstore.myshopify.com"}' \
      -X POST https://api.cloudsto.re/ecom/shopify/stores/info
Suggest edit
Last updated on April 12, 2019

Variants

/variants

 

Request a list of all variants for the given store accessible for this account.

 

Request 

{ 
  "APIKey": "x-a3A1qLrXStYDgThU3dfA",
  "Store" : "artstore.myshopify.com",
}

 

Parameters

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

Response

{
   "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,
     }            
   ]
}

 

Parameters

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.

 

JQuery Example

$.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 Example

$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' \
      -X POST https://api.cloudsto.re/ecom/shopify/variants
Suggest edit
Last updated on April 4, 2019

Submit

/variants/submit

 

Submit a list of all variants for the given store accessible for this account.

 

Request 

{ 
  "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
    }   
  ]
}

 

Parameters

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

Response

{
   "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,
     }            
   ]
}

 

Parameters

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.

 

JQuery Example

$.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 Example

$curl -d '{"APIKey" : "x-a3A1qLrXStYDgThU3dfA"}' \
      -X POST https://api.cloudsto.re/ecom/shopify/variants/submit
Suggest edit
Last updated on April 26, 2019
Suggest Edit
Back to top

Shopping Cart