Product.createProducts
Creates the product based on the passed product data.
Request
JSON example:
[
{
"api":1,
"method":"auth",
"params":{
"username":"...",
"password":"..."
},
"id":1
},
{
"api":1,
"method":"Product.createProducts",
"params":{
"productsInfo":[
{
"approval_status":1,
"attribute_set":"1",
"attributes":{
"4":"active",
"50":"10",
"55":"Supa Tex Marketplace",
"58":"...",
"66":"10",
"77":"Red",
"80":"Canon",
"140":"4",
"142":"0.00",
"143":"0.00",
"236":"active",
"248":"Canon",
"249":"Canon Canon"
},
"brand":"11",
"primary_category": "1257",
"categories":[
"1264",
"1257",
"1199",
"490",
"1"
],
"config_id":null,
"description":"Canon Canon Canon Canon",
"platform_identifier":"SellerCenter",
"price":"100.00",
"product_identifier":"4260144322758",
"product_set":"90222",
"seller":"624",
"seller_sku":"Canon",
"shipment_type":"2",
"special_from_date":null,
"special_price":null,
"special_to_date":null,
"status":"active",
"stock":5000,
"tax_class":"1",
"title":"Canon",
"id_catalog_product":"174301",
"shipment_matrix_template":[
],
"rsin":"ABCD12345678"
}
]
},
"id":1
}
]
Request fields:
Field name |
Type |
Value |
Description |
---|---|---|---|
method |
string |
"Product.createProducts" |
Action name |
approval_status |
integer |
0 |
|
attribute_set |
integer |
23 |
Id of the product attribute set |
attributes |
array |
[] |
Key/Value array of attributes, depending on the attribute set, without primary attributes/properties that have their own entries (ie: brand, title, etc) |
brand |
string |
"21" |
Brand id |
primary_category |
string |
"12" |
Primary category of the product |
categories |
array |
["10", "20", …] |
Ids of categories product is assigned to |
config_id |
string |
"18674" |
Endpoint product set id |
description |
string |
"Product description" |
product description |
platform_identifier |
string |
"SellerCenter" |
Usually "SellerCenter", but can be change in SC > Maintenance > Configuration Parameters > platform_id |
price |
string |
"179.00" |
Price that customer has to pay |
product_set |
string |
"89798" |
SC product set id |
seller |
string |
"22" |
Seller Id |
seller_sku |
string |
"SO021MA57NWGIRBID-25942" |
Seller given SKU |
shipment_type |
string |
"2" |
|
specialfromdate |
string | null |
"2013-12-23 00:00:00" |
Date since when special price is valid |
special_price |
string | null |
"179.00" |
Special price during the period |
specialtodate |
string | null |
"2013-12-23 00:00:00" |
Date since when special price is not valid |
status |
string |
"active" |
"active" - product is active; "inactive" - product is inactive "deleted" - product is deleted |
stock |
integer |
100 |
Seller stock |
tax_class |
string |
"1" |
Endpoint system tax class identifier (catalogtaxclass.src_id) |
title |
string |
"Product Title" |
undefined |
shipmentmatrixtemplate |
array |
["1", "2", …] |
Optional Ids of the product shipping matrix templates |
country_city |
string |
"984731284" |
Optional is set if product has Country/City configuration |
group_name |
string |
"Group 1" |
Optional is set if product groups feature is enabled |
listing_type |
string |
"2" |
Optional is set if product listing type configuration |
product_identifier |
string |
"identifier 1" |
Optional is set if product identifier field available |
rsin |
string |
"ABCD12345678" |
RSIN assigned to the product by the deduplication service |
Response
JSON example:
[
{
"api":1,
"result":[
{
"status":"success",
"product":{
"seller_sku":"ABC-123",
"sku":"AK011MEAJPZTABCDE-468012",
"id":"468012",
"config_id":"453593",
"updated_at":"2015-08-20 14:25:42"
}
}
],
"id":1
}
]
Response fields:
Field name |
Type |
Value |
Description |
---|---|---|---|
status |
string |
"success" |
Creation status |
seller_sku |
string |
ABC-123 |
SKU given by seller |
sku |
string |
AK011MEAJPZTABCDE-468012 |
Product standard SKU |
id |
string |
468012 |
Endpoint product id |
config_id |
string |
453593 |
Endpoint product set id |
updated_at |
string |
2015-08-20 14:25:42 |
undefined |
Example failure response:
[
{
"api": 1,
"result": [
{
"status":"failure",
"error": {
"message": "No attribute set specified",
"code": 0,
}
}
],
"id": 1
}
]
Field name |
Type |
Value |
Description |
---|---|---|---|
message |
string |
"No attribute set specified" |
Message attached to error which occured while saving product. |
code |
int |
0 |
Internal error code. |
When a new Product with multiple variation is created
Seller Center will send configid as NULL since it does not have any configid yet. But Seller Center will send the same productset for all variations of one products so it can be determined on the shop side if a new products needs to get created or a variation needs to be added to a newly created product. All the variations having same productset needs to be grouped as a single product.
When a new variation is added to an existing product
Seller Center will send configid and productset values. Both of the values can be used to determine to which existing product the new variation shall be added.