Product.addSources

Attaches a consignment source (shipment type = "Own Warehouse") to an already existing product.

Request

JSON example:

[  
   {  
      "api":1,
      "method":"auth",
      "params":{  
         "username":"...",
         "password":"..."
      },
      "id":1
   },
   {  
      "api":1,
      "method":"Product.addSources",
      "params":{  
         "productsInfo":[  
            {  
               "seller":"2118",
               "product_id":"7634",
               "seller_sku":"dupe-bgs,s-39",
               "sku":"DU805SHAA2AYNAFAMZ-7634",
               "shipment_type":"1",
               "product_identifier":null
            },
            {  
               "seller":"2118",
               "product_id":"7635",
               "seller_sku":"dup-bgss-37",
               "sku":"DU805SHAA2AYNAFAMZ-7635",
               "shipment_type":"1",
               "product_identifier":null
            }
         ]
      },
      "id":1
   }
]

Request fields:

Field name

Type

Value

Description

method

string

"Product.addSources"

Action name

seller

string

"784"

Seller Id

product_id

string

"9871891847"

Endpoint product id

seller_sku

string

"ABC-123"

Seller given product SKU

sku

string

"DU805SHAA2AYNAFAMZ-7635"

Product SKU

shipment_type

string

"1"

Always "1", means "Own Warehouse"

product_identifier

string

undefined

optional

Response

JSON example:

[  
   {  
      "api":1,
      "result":[  
         {  
            "status":"success",
            "product":{  
               "seller_sku":"Seller46",
               "sku":"CA623FAAAQ1J-68679",
               "id":"68679",
               "config_id":"33751",
               "updated_at":"2015-08-21 12:29:13"
            }
         },
         {  
            "status":"success",
            "product":{  
               "seller_sku":"Seller56",
               "sku":"CA623FAAAQ17-68667",
               "id":"68667",
               "config_id":"33739",
               "updated_at":"2015-08-21 12:29:14"
            }
         },
         {  
            "status":"success",
            "product":{  
               "seller_sku":"Seller86",
               "sku":"CA623FAAAQ1E-68674",
               "id":"68674",
               "config_id":"33746",
               "updated_at":"2015-08-21 12:29:14"
            }
         },
         {  
            "status":"failure",
            "error":{  
               "message":"Config ID not found. Product probably doesn...",
               "code":404,
               "trace":"Zend_Application->run()\n#17 {main}"
            }
         },
      ],
      "id":1
   }
]

Response fields:

Field name

Type

Value

Description

status

string

"success"

Update status:

  • success;
  • failure.

message

string

"Config ID not found. Product probably doesn…"

Optional Must be set only in case of error. Error message explaining the issue

code

undefined

404

Optional Must be set only in case of error. Error code

trace

string

"Zend_Application->run()\n#17 {main}"

Optional Must be set only in case of error. Error trace

seller_sku

string

"DCSWS 1"

Seller given SKU

sku

string

"RA301OTADBFYEGAMZ-243427"

Product SKU

id

string

"243427"

Endpoint product id

config_id

string

"154798"

Endpoint product set id

updated_at

string

"2014-04-14 12:44:06"

Update date

undefined undefined undefined