MyCloud Logo

MyCloud API Documentation

Product Model

The Product model defines a product in your shop. Products are warehoused at MyCloud and are avaialable to be added to Orders via OrderItems.

RESTful Calls

Get All Products

GET/products

Get all Products associated with your shop.

Request Parameters

This request has no parameters.

Response

Name
Type
Example
Description
products
product[]
The list of products defined by your shop.
product
Object
 
A product object.
id
integer
342
This is the product's database key.
sku
string
MAI002
This is the product's MyCloud SKU. This is assigned by MyCloud and cannot be changed.
shop_sku
string
UPC_230458300
This is the shop's product SKU. This is the SKU assigned by the shop.
name
string
Cool Glasses
The name of the product as it should be presented to the buyer.
cost
double
129.00
The is the amount that the shop pays to buy the product.
price
double
199.00
This is price that the shop typically sells the product for. This can be overridden within an order when defining the orderitem for this product.
description
string
Brand name glasses with no magnification perfect for a fashion statement.
This is the product description that will be presented to the buyer.
supplier_reference
string
REF_987324_BA_1
This may be used for any purpose, but is intended to represent the reference that the product supplier uses to communicate with the shop for this product.

Get Product

GET/products/{product_id}

Get a product by it's ID.

Request Parameters

Parameter
Type
Required
Example
Description
product_id
mixed
Yes
sku_12345
The product identity. This method allows you to identify the product with one of three different values:
  • ID - the database ID
  • SKU - the MyCloud assigned SKU
  • ShopSku - the shop assigned SKU

Response

Name
Type
Example
Description
product
Object
 
A product object.
id
integer
342
This is the product's database key.
sku
string
MAI002
This is the product's MyCloud SKU. This is assigned by MyCloud and cannot be changed.
shop_sku
string
UPC_230458300
This is the shop's product SKU. This is the SKU assigned by the shop.
name
string
Cool Glasses
The name of the product as it should be presented to the buyer.
cost
double
129.00
The is the amount that the shop pays to buy the product.
price
double
199.00
This is price that the shop typically sells the product for. This can be overridden within an order when defining the orderitem for this product.
description
string
Brand name glasses with no magnification perfect for a fashion statement.
This is the product description that will be presented to the buyer.
supplier_reference
string
REF_987324_BA_1
This may be used for any purpose, but is intended to represent the reference that the product supplier uses to communicate with the shop for this product.

Create Product

POST/products

Create a new product with the specified attributes.

Request Parameters

Parameter
Type
Required
Example
Description
shop_sku
string
No
sku_7832598
The SKU assigned by the shop.
name
string
Yes
Cool Glasses
The name of the product being created.
description
string
Yes
Fashionable glasses with no magnification.
The description of the product being created.
cost
double
No
129.00
The price the shop pays to purchase this product.
price
double
Yes
199.00
The price the shop charges buyers to purchase this product.

Response

Name
Type
Example
Description
product
Object
 
A product object.
id
integer
342
This is the product's database key.
sku
string
MAI002
This is the product's MyCloud SKU. This is assigned by MyCloud and cannot be changed.
shop_sku
string
UPC_230458300
This is the shop's product SKU. This is the SKU assigned by the shop.
name
string
Cool Glasses
The name of the product as it should be presented to the buyer.
cost
double
129.00
The is the amount that the shop pays to buy the product.
price
double
199.00
This is price that the shop typically sells the product for. This can be overridden within an order when defining the orderitem for this product.
description
string
Brand name glasses with no magnification perfect for a fashion statement.
This is the product description that will be presented to the buyer.
supplier_reference
string
REF_987324_BA_1
This may be used for any purpose, but is intended to represent the reference that the product supplier uses to communicate with the shop for this product.

Update Product

PATCH/products/{product_id}

Update an existing product with the specified parameters. You can provide any of the update parameters. Parameters specified will update those fields of the product in the database. Other fields will be left as is.

Request Parameters

Parameter
Type
Required
Example
Description
product_id
mixed
Yes
sku_12345
The product identity. This method allows you to identify the product with one of three different values:
  • ID - the database ID
  • SKU - the MyCloud assigned SKU
  • ShopSku - the shop assigned SKU
shop_sku
string
No
sku_7832598
The SKU assigned by the shop.
name
string
No
Cool Glasses
The name of the product being created.
description
string
No
Fashionable glasses with no magnification.
The description of the product being created.
cost
double
No
129.00
The price the shop pays to purchase this product.
price
double
No
199.00
The price the shop charges buyers to purchase this product.

Response

Name
Type
Example
Description
product
Object
 
A product object.
id
integer
342
This is the product's database key.
sku
string
MAI002
This is the product's MyCloud SKU. This is assigned by MyCloud and cannot be changed.
shop_sku
string
UPC_230458300
This is the shop's product SKU. This is the SKU assigned by the shop.
name
string
Cool Glasses
The name of the product as it should be presented to the buyer.
cost
double
129.00
The is the amount that the shop pays to buy the product.
price
double
199.00
This is price that the shop typically sells the product for. This can be overridden within an order when defining the orderitem for this product.
description
string
Brand name glasses with no magnification perfect for a fashion statement.
This is the product description that will be presented to the buyer.
supplier_reference
string
REF_987324_BA_1
This may be used for any purpose, but is intended to represent the reference that the product supplier uses to communicate with the shop for this product.

Delete Product

DELETE/products/{product_id}

Delete an existing product.

Request Parameters

Parameter
Type
Required
Example
Description
product_id
mixed
Yes
sku_12345
The product identity. This method allows you to identify the product with one of three different values:
  • ID - the database ID
  • SKU - the MyCloud assigned SKU
  • ShopSku - the shop assigned SKU

Response

Name
Type
Example
Description
product
Object
 
A product object.
id
integer
342
This is the product's database key.
sku
string
MAI002
This is the product's MyCloud SKU. This is assigned by MyCloud and cannot be changed.
shop_sku
string
UPC_230458300
This is the shop's product SKU. This is the SKU assigned by the shop.
name
string
Cool Glasses
The name of the product as it should be presented to the buyer.
cost
double
129.00
The is the amount that the shop pays to buy the product.
price
double
199.00
This is price that the shop typically sells the product for. This can be overridden within an order when defining the orderitem for this product.
description
string
Brand name glasses with no magnification perfect for a fashion statement.
This is the product description that will be presented to the buyer.
supplier_reference
string
REF_987324_BA_1
This may be used for any purpose, but is intended to represent the reference that the product supplier uses to communicate with the shop for this product.