Products
This is used to view, create, update and delete products.
Product Properties
id |
{ "id" : 255 }
The unique ID of the product |
title |
{ "title" : "XYZ" }
The title/name of the product |
description |
{ "description" : "This product does XYZ"}
The description for the product |
description2 |
{ "description2" : "..."}
The 2nd description for the product |
description3 |
{ "description3" : "..."}
The 3rd description for the product |
description4 |
{ "description4" : "..."}
The 4th description for the product |
description5 |
{ "description5" : "..."}
The 5th description for the product |
active |
{ "active" : true }
Either true or false |
deliveryPrice |
{ "deliveryPrice" : 3.00 }
A specific delivery price for the product, this is optional, set as 0 for free delivery, set as -1 to reset to NULL |
singleDeliveryPrice |
{ "singleDeliveryPrice" : true }
Whether the delivery price should only be charged once for multiple orders of the same product set to either true or false |
weight |
{ "weight" : 2.00 }
The weight of the product |
metaTitle |
{ "metaTitle" : "XYZ Page" }
The title product for the product page |
metaDescription |
{ "metaDescription" : "This is a page for XYZ." }
The meta description for the product page |
metaKeywords |
{ "metaKeywords" : "x, y, z" }
The meta keywords for the product page |
url |
{ "url" : "http://www.shopname.com/acme-shoes" }
The full URL for the product |
videoCode |
{ "videoCode" : "..." }
Embedding code for a video of the product |
sku |
{ "sku" : "ABC123" }
The SKU code for the product, do not set if the product has variations that have SKU codes, only set if you want us to manage stock for the product |
stock |
{ "stock" : 1 }
The stock quantity of the product, only used if the product has a SKU code |
comparePrice |
{ "comparePrice" : 99.95 }
The compare price (RRP) for the product |
gtin |
{ "gtin" : "ABC45678" }
The GTIN/UPC/EAN for the product |
mpn |
{ "mpn" : "ABC456" }
The MPN (Manufacturer Part Number) for the product |
new |
{ "new" : true }
Either true or false, whether the product should display the new indicator |
twoForOne |
{ "twoForOne" : true }
Either true or false, whether the product is part of a two for one offer |
vatExclusive |
{ "vatExclusive" : true }
Either true or false (set to false if VAT is charged on the product) |
vatRelief |
{ "vatRelief" : true }
Either true or false (set to true if VAT Relief is enabled on the product) |
warehouseNotes |
{ "warehouseNotes" : "ABC123" }
The warehouse notes for the product |
price |
{ "price" : 99.95 }
The normal selling price for the product (overriden by any price set for variations) |
salePrice |
{ "salePrice" : 89.95 }
The sale price, which will override the product price and any price set for variations |
excludedFromTradeDiscounts |
{ "excludedFromTradeDiscounts" : false }
Either true or false (set to false if the product isn't excluded from trade discounts) |
searchKeywords |
{ "searchKeywords" : "blue, violet, purple" }
Custom search keywords set for the product |
images |
{ "images" : [{
"id": 1,
"url": "http://static.ecommercedns.uk/images/image.jpg",
"description": "Nike Shoes",
"sortOrder": 0,
}]
}
Present only when embed=images |
brand |
{ "brand" : 123 }
Present only when embed=brand |
googleCategory |
{ "googleCategory" : 123 }
The Google category ID for the product, must be a leaf category |
googleCondition |
{ "googleCondition" : "new" }
The condition of the item, sent in the Google feed, must be either new, used, refurbished |
googleIsBundle |
{ "googleIsBundle" : false }
If the product should be submitted to the Google feed as a bundle product, mark as true, else mark as false |
googleNoIdentifierExists |
{ "googleNoIdentifierExists" : true }
Mark as true if the product should be submitted to the Google feed with the identifier_exists attribute set as false |
eBayCategory |
{ "eBayCategory" : 123 }
The eBay category ID for the product, must be a leaf category |
eBayBestOffer |
{ "eBayBestOffer" : true }
Either true or false (set to false if the product isn't eligible for the best offer) |
eBayShippingRates |
{ "eBayShippingRates" : [ 1, 2, 3, 4, 5 ] }
The IDs for eBay shiping rates, (present only when embed=ebay_shipping_rates |
categories |
{ "categories" : [
{
"id": 1,
"title": "Title",
"description": "...",
"url": "..."
"http://www.shopname.com/title",
"active": true,
"metaTitle": "...",
"metaKeywords": "...",
"metaDescription": "...",
"image": { "url": "http://static.ecommercedns.uk/images/image.jpg" }
}
]
}
The categories the product belongs to, (present only when embed=categories) |
related |
{ "related" : [ 1, 2, 3, 4, 5 ] }
The products related to the product |
extras |
{ "extras" : [
{
"id": 1,
"name": "Product Extra 1",
"price": 10
},
{
"id": 2,
"name": "Product Extra 2",
"price": 20
}
]
}
The product extras for the product |
variations |
{
"id": 5785941,
"price": 159.95,
"costPrice": -1,
"rewardPoints": 0,
"sku": "LKJH-S-GREEN",
"weight": 0,
"stock": 0,
"image": 0,
"values": [
{
"id": 5919503,
"name": "S",
"option": {
"id": 614609,
"name": "Size"
}
},
{
"id": 5919506,
"name": "Green",
"option": {
"id": 614610,
"name": "Colour"
}
}
]
},
{
"id": 5785942,
"price": 159.95,
"costPrice": -1,
"rewardPoints": 0,
"sku": "LKJH-S-BLUE",
"weight": 0,
"stock": 10,
"image": 0,
"values": [
{
"id": 5919503,
"name": "S",
"option": {
"id": 614609,
"name": "Size"
}
},
{
"id": 5919507,
"name": "Blue",
"option": {
"id": 614610,
"name": "Colour"
}
}
]
},
{
"id": 5785943,
"price": 169.95,
"costPrice": -1,
"rewardPoints": 0,
"sku": "LKJH-S-RED",
"weight": 0,
"stock": 3,
"image": 0,
"values": [
{
"id": 5919503,
"name": "S",
"option": {
"id": 614609,
"name": "Size"
}
},
{
"id": 5919508,
"name": "Red",
"option": {
"id": 614610,
"name": "Colour"
}
}
]
}
} The variation combinations for the product, see here (present only when embed=variations). Where variations are created on a product, all variations must have the same number of values and the option names and their order must match. The first declared variation combination is treated as a "blueprint". |
choices |
{ "choices" : [
{
"id": 503661,
"set": {
"id": 1006
},
"value": {
"id": 8121
},
"customPrice": 12
},
{
"id": 503662,
"set": {
"id": 1006
},
"value": {
"id": 8123
},
"customPrice": 12
}
]
}
The choices assigned to the product, see here (present only when embed=choices) |
customizationFields |
{ "customizationFields" : [
{
"id": 1,
"label": "Field 1",
"type": 1
},
{
"id": 2,
"label": "Field 2",
"type": 2
}
]
}
The customisation fields for the product (present only when embed=customization_fields) |
filters |
{ "filters": {
"2": [
"Blue",
"Green"
],
"1": [
"Small"
]
}
}
The filters applied to the product. 1 and 2 are option IDs, not unique IDs (present only when embed=filters) |
fileUploadsAllowed |
{ "fileUploadsAllowed" : 2 }
Number of file uploads allowed |
rewardPoints |
{ "rewardPoints" : 10 }
The number of points earned when the product is purchased |
customFields |
{ "customFields" : { "hard_drive_size": "256GB" } }
Custom fields assigned to the product (present only when embed=custom_fields). The key (shown in the above example as hard_drive_size) must match an existing custom field name, as defined in admin. The value can be integer (for check boxes and dates), array (for lists) or string. Dates must be Unix timestamps. |
hsCode |
{ "hsCode" : "3001000000" }
The HS Code entered for the product |
options |
{ "options" : [
{
"id": 1,
"name": "Size"
},
{
"id": 2,
"name": "Colour"
}
]
}
The product options for the product (present only when embed=options) |
digitalFiles |
{ "digitalFiles" : [ { "id": 2987813 } ] }
An array of the IDs of digital files attached to the product (present only when embed=digital_files). Specified digital files will always replace existing ones. |
slug |
{ "slug" : "acme-shoes" }
The slug for the product |
What you can do with products
GET /v1/products
Receive a list of all products
GET /v1/products/count
Count the number of products
GET /v1/products/ID
Receive a single product
POST /v1/products
Create a new product
PUT /v1/products/ID
Update a product
DELETE /v1/products/ID
Delete a product
GET /v1/products
Returns all products. By default the first 50 products (both active and inactive) are returned, sorted by creation date.
embed | images, brand, categories, related, extras, customization_fields, ebay_shipping_rates, options, vat_relief, digital_files, variations, choices, custom_fields |
fields | Comma separated list of properties to include |
sort | title or title_desc (default is creation date) |
active | 0 or 1 |
count | Count |
offset | Offset |
GET /v1/products
HTTP/1.1 200 OK [ { "id": 1, "title": "Product Title", "description": "", "description2": "", "description3": "", "description4": "", "description5": "", "active": true, "deliveryPrice": 0, "weight": 0, "metaTitle": "", "metaKeywords": "", "metaDescription": "", "url": "http://www.domain.com/product-1", "videoCode": "//www.youtube.com/embed/12345?rel=0", "sku": "SKU", "stock": 10, "comparePrice": 999.99, "gtin": "123", "mpn": "123", "new": true, "twoForOne": true, "vatExclusive": false, "warehouseNotes": "Notes", "price": 9000, "salePrice": 7000, "excludedFromTradeDiscounts": false, "searchKeywords": "", "googleCategory": 3530, "googleCondition": 1, "eBayCategory": 63073, "eBayBestOffer": false, "fileUploadsAllowed": 2 } ]
GET /v1/products/count
Returns a count of the products.
active | 0 or 1 |
GET /v1/products/count
HTTP/1.1 200 OK { "count": 99 }
GET /v1/products/ID
Returns a single product.
embed | images, brand, categories, related, extras, customization_fields, ebay_shipping_rates, options, vat_relief, digital_files, variations, choices, custom_fields |
fields | Comma separated list of properties to include |
GET /v1/products/1
HTTP/1.1 200 OK { "id": 1, "title": "Product Title", "description": "", "description2": "", "description3": "", "description4": "", "description5": "", "active": true, "deliveryPrice": 0, "weight": 0, "metaTitle": "", "metaKeywords": "", "metaDescription": "", "url": "http://www.domain.com/product-1", "videoCode": "//www.youtube.com/embed/12345?rel=0", "sku": "SKU", "stock": 10, "comparePrice": 999.99, "gtin": "123", "mpn": "123", "new": true, "twoForOne": true, "vatExclusive": false, "warehouseNotes": "Notes", "price": 9000, "salePrice": 7000, "excludedFromTradeDiscounts": false, "searchKeywords": "", "googleCategory": 3530, "googleCondition": 1, "eBayCategory": 63073, "eBayBestOffer": false, "fileUploadsAllowed": 2 }
POST /v1/products
Creates a new product. Only the title field is required.
POST /v1/products
POST /v1/products { "title": "Nike Shoes" "slug": "nike-shoes", "image": "http://www.domain.com/images/test.jpg" }
POST /v1/products
HTTP/1.1 201 Created { "id": 2, "title": "Nike Shoes", "description": "...", "description2": "", "description3": "", "description4": "", "description5": "", "active": true, "deliveryPrice": 0, "weight": 1.0, "metaTitle": "", "metaKeywords": "", "metaDescription": "", "url": "http://www.shopnname.com/nike-shoes", "videoCode": "", "sku": "", "stock": 0, "comparePrice": 0, "gtin": "", "mpn": "", "new": false, "twoForOne": false, "vatExclusive": false, "warehouseNotes": "", "price": 0, "salePrice": 0, "excludedFromTradeDiscounts": false, "searchKeywords": "", "fileUploadsAllowed": 0 }
PUT /v1/products/ID
Update a product. All object properties are allowed.
PUT /v1/products/2
PUT /v1/products/2 { "active": false }
PUT /v1/products/2
HTTP/1.1 200 OK { "id": 2, "title": "Nike Shoes", "description": "", "description2": "", "description3": "", "description4": "", "description5": "", "active": false, "deliveryPrice": 0, "weight": 0, "metaTitle": "", "metaKeywords": "", "metaDescription": "", "url": "http://www.shopname.com/product-2", "videoCode": "", "sku": "", "stock": 0, "comparePrice": 0, "gtin": "", "mpn": "", "new": false, "twoForOne": false, "vatExclusive": false, "warehouseNotes": "", "price": 0, "salePrice": 0, "excludedFromTradeDiscounts": false, "searchKeywords": "", "fileUploadsAllowed": 0 }
DELETE /v1/products/ID
Deletes an existing product.
Returns 204 No Content on success.