POST BulkProductUpdate
Create/Update a list of products.
This feature must be enabled for your account.
A maximum of 50 records can be updated per request.
Input and output parameters
*denotes required field.
Input Parameter Name |
Type/Info |
id |
id of the product in the system, provide this if you want to update. |
sku* |
sku of the product. If no "id" is provided, we'll use this to update your product. |
api_reference_id |
your reference to identify the product. |
group_type* |
parent-product|child-product|standalone-product. |
name* |
Name of product. |
description* |
Product details. |
barcode |
Product barcode. |
uri |
URL path to product in your system. |
price_tax |
Cost of the tax applied to product. |
original_price |
Cost of product, ie RRP. |
price* |
Cost of product. |
price_inc_tax* |
Product price with tax. |
weight |
float quantity of weight specified by weight_unit. |
weight_unit |
kg|g|lb|oz. |
stock_quantity |
Integer of items in stock. |
product_create_date* |
Date product created in your system YYYY-MM-DD HH:MM:SS. |
product_update_date* |
Date product updated in your system YYYY-MM-DD HH:MM:SS. |
visibility* |
not-individually|public|private. |
status* |
active|disabled|deleted|partial. |
product_links |
Array of links.
- link_product_sku - link to product by sku.
- link_type - associated|crosssell|related|upsell
|
product_options |
Array of options.
- name - Option name, ie size, colour etc.
- value - Option value, ie 12, 14, Small, Large, red, yellow.
- position - order of options (optional).
|
product_images |
Array of images.
- uri - path to the image.
- name - Assign a name to this image.
- position - order of images (optional).
|
product_categories |
Array of categories.
- name - category name.
- path - category structure, ie /mens/shoes/, /sale/womens/shoes/.
- client_reference - (optional) your reference for the category.
|
parent_variation_skus |
- array containting the sku of the parent products.
|
child_variation_skus |
- array containing the sku of the child products.
|
custom_fields |
Array of key value pairs for any custom fields data
Key is the field name then value assigned:
|
Outputs: |
|
- index - row index the data passed to the API
- id - system id for the product
- status - http status code
- message - action performed
- error - only present during failure
|
Examples
curl --request POST \
--url https://api.wiredplus.com/v1/BulkProductUpdate \
--header 'content-type: application/json' \
--data '[{"id":"abc","api_reference_id":"1234","sku":"ABCD-1234","group_type":"standalone-product","name":"Myproduct","description":"Allaboutmyfantasicproduct.","barcode":"11223344","uri":"http://your-site.com/products/ABCD-1234","price_tax":"20.00","original_price":"16.00","price":"20.00","price_inc_tax":"24.00","weight":"5","weight_unit":"lb","stock_quantity":100,"product_create_date":"2019-08-0914:02:10","product_update_date":"2019-08-0914:02:10","visibility":"public","status":"active","product_links":[{"link_product_sku":"ABCD-1234","link_type":"crosssell"}],"product_options":[{"name":"Size","value":"S","position":0},{"name":"Size","value":"M","position":1}],"product_images":[{"uri":"http://your-site.com/imgs/products/ABCD-1234-1.png","name":"Frontimage","position":0,},{"uri":"http://your-site.com/imgs/products/ABCD-1234-2.png","name":"Backimage","position":1,}],"product_categories":[{"name":"Sales","path":"/sales/","client_reference":"1111"},{"name":"SaleShoes","path":"/sales/shoes/","client_reference":"2222"}]},{"id":"abc","api_reference_id":"1234","sku":"ABCD-1234","group_type":"standalone-product","name":"Myproduct","description":"Allaboutmyfantasicproduct.","barcode":"11223344","uri":"http://your-site.com/products/ABCD-1234","price_tax":"20.00","original_price":"16.00","price":"20.00","price_inc_tax":"24.00","weight":"5","weight_unit":"lb","stock_quantity":100,"product_create_date":"2019-08-0914:02:10","product_update_date":"2019-08-0914:02:10","visibility":"public","status":"active","product_links":[{"link_product_sku":"ABCD-1234","link_type":"crosssell"}],"product_options":[{"name":"Size","value":"S","position":0},{"name":"Size","value":"M","position":1}],"product_images":[{"uri":"http://your-site.com/imgs/products/ABCD-1234-1.png","name":"Frontimage","position":0,},{"uri":"http://your-site.com/imgs/products/ABCD-1234-2.png","name":"Backimage","position":1,}],"product_categories":[{"name":"Sales","path":"/sales/","client_reference":"1111"},{"name":"SaleShoes","path":"/sales/shoes/","client_reference":"2222"}]}]'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.wiredplus.com/v1/BulkProductUpdate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '[{"id":"abc","api_reference_id":"1234","sku":"ABCD-1234","group_type":"standalone-product","name":"Myproduct","description":"Allaboutmyfantasicproduct.","barcode":"11223344","uri":"http://your-site.com/products/ABCD-1234","price_tax":"20.00","original_price":"16.00","price":"20.00","price_inc_tax":"24.00","weight":"5","weight_unit":"lb","stock_quantity":100,"product_create_date":"2019-08-0914:02:10","product_update_date":"2019-08-0914:02:10","visibility":"public","status":"active","product_links":[{"link_product_sku":"ABCD-1234","link_type":"crosssell"}],"product_options":[{"name":"Size","value":"S","position":0},{"name":"Size","value":"M","position":1}],"product_images":[{"uri":"http://your-site.com/imgs/products/ABCD-1234-1.png","name":"Frontimage","position":0,},{"uri":"http://your-site.com/imgs/products/ABCD-1234-2.png","name":"Backimage","position":1,}],"product_categories":[{"name":"Sales","path":"/sales/","client_reference":"1111"},{"name":"SaleShoes","path":"/sales/shoes/","client_reference":"2222"}]},{"id":"abc","api_reference_id":"1234","sku":"ABCD-1234","group_type":"standalone-product","name":"Myproduct","description":"Allaboutmyfantasicproduct.","barcode":"11223344","uri":"http://your-site.com/products/ABCD-1234","price_tax":"20.00","original_price":"16.00","price":"20.00","price_inc_tax":"24.00","weight":"5","weight_unit":"lb","stock_quantity":100,"product_create_date":"2019-08-0914:02:10","product_update_date":"2019-08-0914:02:10","visibility":"public","status":"active","product_links":[{"link_product_sku":"ABCD-1234","link_type":"crosssell"}],"product_options":[{"name":"Size","value":"S","position":0},{"name":"Size","value":"M","position":1}],"product_images":[{"uri":"http://your-site.com/imgs/products/ABCD-1234-1.png","name":"Frontimage","position":0,},{"uri":"http://your-site.com/imgs/products/ABCD-1234-2.png","name":"Backimage","position":1,}],"product_categories":[{"name":"Sales","path":"/sales/","client_reference":"1111"},{"name":"SaleShoes","path":"/sales/shoes/","client_reference":"2222"}]}]',
CURLOPT_HTTPHEADER => array(
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var data = [
{
"id": "abc",
"api_reference_id": "1234",
"sku": "ABCD-1234",
"group_type": "standalone-product",
"name": "My product",
"description": "All about my fantasic product.",
"barcode": "11223344",
"uri": "http://your-site.com/products/ABCD-1234",
"price_tax": "20.00",
"original_price": "16.00",
"price": "20.00",
"price_inc_tax": "24.00",
"weight": "5",
"weight_unit": "lb",
"stock_quantity": 100,
"product_create_date": "2019-08-09 14:02:10",
"product_update_date": "2019-08-09 14:02:10",
"visibility": "public",
"status": "active",
"product_links": [
{
"link_product_sku": "ABCD-1234",
"link_type": "crosssell"
}
],
"product_options": [
{
"name": "Size",
"value": "S",
"position": 0
},
{
"name": "Size",
"value": "M",
"position": 1
}
],
"product_images": [
{
"uri": "http://your-site.com/imgs/products/ABCD-1234-1.png",
"name": "Front image",
"position": 0,
},
{
"uri": "http://your-site.com/imgs/products/ABCD-1234-2.png",
"name": "Back image",
"position": 1,
}
],
"product_categories": [
{
"name": "Sales",
"path": "/sales/",
"client_reference": "1111"
},
{
"name": "Sale Shoes",
"path": "/sales/shoes/",
"client_reference": "2222"
}
],
"parent_variation_skus":[
"111",
"222"
],
"child_variation_skus":[
"abc",
"def"
],
"custom_fields":{
"Favorite Colour": "Red"
}
},
{
"id": "abc",
"api_reference_id": "1234",
"sku": "ABCD-1234",
"group_type": "standalone-product",
"name": "My product",
"description": "All about my fantasic product.",
"barcode": "11223344",
"uri": "http://your-site.com/products/ABCD-1234",
"price_tax": "20.00",
"original_price": "16.00",
"price": "20.00",
"price_inc_tax": "24.00",
"weight": "5",
"weight_unit": "lb",
"stock_quantity": 100,
"product_create_date": "2019-08-09 14:02:10",
"product_update_date": "2019-08-09 14:02:10",
"visibility": "public",
"status": "active",
"product_links": [
{
"link_product_sku": "ABCD-1234",
"link_type": "crosssell"
}
],
"product_options": [
{
"name": "Size",
"value": "S",
"position": 0
},
{
"name": "Size",
"value": "M",
"position": 1
}
],
"product_images": [
{
"uri": "http://your-site.com/imgs/products/ABCD-1234-1.png",
"name": "Front image",
"position": 0,
},
{
"uri": "http://your-site.com/imgs/products/ABCD-1234-2.png",
"name": "Back image",
"position": 1,
}
],
"product_categories": [
{
"name": "Sales",
"path": "/sales/",
"client_reference": "1111"
},
{
"name": "Sale Shoes",
"path": "/sales/shoes/",
"client_reference": "2222"
}
],
"parent_variations": [
{
"parent_product_id": "1acfcb90dc3c4c9ebb757c0cafc385d1",
"parent_product_sku": "EFGH-1234",
"product_id": "0704ce0691d64ffeb680c0bc32762abd",
"product_sku": "ABCD-1234",
"date_created": "2019-12-11 15:52:45"
}
],
"child_variations": [
{
"parent_product_id": "0704ce0691d64ffeb680c0bc32762abd",
"parent_product_sku": "ABCD-1234",
"product_id": "013d01f3442a4205934690520191d0ba",
"product_sku": "ABCD-Yellow",
"date_created": "2019-12-11 15:52:45"
},
{
"parent_product_id": "0704ce0691d64ffeb680c0bc32762abd",
"parent_product_sku": "ABCD-1234",
"product_id": "008a82f555994400b3d6afdd99378d75",
"product_sku": "ABCD-Orange",
"date_created": "2019-12-11 15:52:45"
}
],
"custom_fields":{
"Favorite Colour": "Blue"
}
}
]
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.wiredplus.com/v1/BulkProductUpdate",
"method": "POST",
"headers": {},
"processData": false,
"contentType": false,
"mimeType": "application/json",
"data": JSON.stringify(data)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Result Format JSON