POST api/productdbs/{id}/products
Create/Update/Delete the products in product catalog.
It is allowed to only pass the attribute values of the product that need to be updated
Notes:
1. The default value of MatchKeyField is ID, which can be set to VendorSKU. If set to VendorSKU, the product's VendorSKU needs to be passed as a non empty string.
2. The default value of OverWrite is false. If you want to clear all existing old product datas in the product catalog, set it to true.
3. Update_Keep_Existing is best to set it to true, so it will keep the estimation values which may be updated in M8. otherwise, the product will be updated with default estimation value if you do not transfer estimation properties.
4. The default value of Update_Del_Existing is false. If you want to delete the existing products that are not in the passed updated product list, set it to true.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id |
product catalog id |
string |
Required |
Body Parameters
product datas
Fep.Cloud.M2CoreExtension.PdbSyncDatasName | Description | Type | Additional information |
---|---|---|---|
Products |
The products to be created/updated |
Collection of Fep.Cloud.M2CoreExtension.CloudFullProduct |
None. |
MatchKeyField |
Specify the Key for product matching, for example, the value can be set to VendorSku |
string |
None. |
OverWrite |
Update or overwrite the productdatabase |
boolean |
None. |
Update_Keep_Existing |
If update productdatabase, whether keep the existing product properties |
boolean |
None. |
Update_Del_Existing |
If update productdatabase, whether delete the existing products which not in passed products |
boolean |
None. |
Request Formats
application/json, text/json
{ "Products": [ { "Path": "sample string 1", "Images": [ "sample string 1", "sample string 2" ], "Width": "sample string 2", "Length": "sample string 3", "Thickness": "sample string 4", "HoriRepeat": "sample string 5", "VertRepeat": "sample string 6", "HoriDrop": "sample string 7", "VertDrop": "sample string 8", "EstimatingWidth": "sample string 9", "EstimatingLength": "sample string 10", "WidthMargin": "sample string 11", "LengthMargin": "sample string 12", "TileCalcMethod": "sample string 13", "TileMinimumWaste": "sample string 14", "TileShape": "sample string 15", "TileEdgeSize": "sample string 16", "WasteAddon": "sample string 17", "IsAddOn": true, "AddOns": [ { "ID": "sample string 1", "Method": "sample string 2" }, { "ID": "sample string 1", "Method": "sample string 2" } ], "Datas": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" }, "NoPiecingTogether": true, "ID": "sample string 19", "Type": "sample string 20", "Trade": "sample string 21", "Desc": "sample string 22", "Vendor": "sample string 23", "VendorSku": "sample string 24", "Color": "sample string 25", "Unit": "sample string 26", "Manufacturer": "sample string 27", "SalesPrice": "sample string 28", "CostPrice": "sample string 29", "BoxName": "sample string 30", "SellByBox": true, "BoxSalesPrice": "sample string 31", "BoxCostPrice": "sample string 32", "UnitsPerBox": "sample string 33", "Taxable": true }, { "Path": "sample string 1", "Images": [ "sample string 1", "sample string 2" ], "Width": "sample string 2", "Length": "sample string 3", "Thickness": "sample string 4", "HoriRepeat": "sample string 5", "VertRepeat": "sample string 6", "HoriDrop": "sample string 7", "VertDrop": "sample string 8", "EstimatingWidth": "sample string 9", "EstimatingLength": "sample string 10", "WidthMargin": "sample string 11", "LengthMargin": "sample string 12", "TileCalcMethod": "sample string 13", "TileMinimumWaste": "sample string 14", "TileShape": "sample string 15", "TileEdgeSize": "sample string 16", "WasteAddon": "sample string 17", "IsAddOn": true, "AddOns": [ { "ID": "sample string 1", "Method": "sample string 2" }, { "ID": "sample string 1", "Method": "sample string 2" } ], "Datas": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" }, "NoPiecingTogether": true, "ID": "sample string 19", "Type": "sample string 20", "Trade": "sample string 21", "Desc": "sample string 22", "Vendor": "sample string 23", "VendorSku": "sample string 24", "Color": "sample string 25", "Unit": "sample string 26", "Manufacturer": "sample string 27", "SalesPrice": "sample string 28", "CostPrice": "sample string 29", "BoxName": "sample string 30", "SellByBox": true, "BoxSalesPrice": "sample string 31", "BoxCostPrice": "sample string 32", "UnitsPerBox": "sample string 33", "Taxable": true } ], "MatchKeyField": "sample string 1", "OverWrite": true, "Update_Keep_Existing": true, "Update_Del_Existing": true }
application/xml, text/xml
<PdbSyncDatas> <Products> <CloudFullProduct> <ID>sample string 19</ID> <Type>sample string 20</Type> <Trade>sample string 21</Trade> <Desc>sample string 22</Desc> <Vendor>sample string 23</Vendor> <VendorSku>sample string 24</VendorSku> <Color>sample string 25</Color> <Unit>sample string 26</Unit> <Manufacturer>sample string 27</Manufacturer> <SalesPrice>sample string 28</SalesPrice> <CostPrice>sample string 29</CostPrice> <BoxName>sample string 30</BoxName> <SellByBox>true</SellByBox> <BoxSalesPrice>sample string 31</BoxSalesPrice> <BoxCostPrice>sample string 32</BoxCostPrice> <UnitsPerBox>sample string 33</UnitsPerBox> <Taxable>true</Taxable> <Width>sample string 2</Width> <Length>sample string 3</Length> <Thickness>sample string 4</Thickness> <HoriRepeat>sample string 5</HoriRepeat> <VertRepeat>sample string 6</VertRepeat> <HoriDrop>sample string 7</HoriDrop> <VertDrop>sample string 8</VertDrop> <WidthMargin>sample string 11</WidthMargin> <LengthMargin>sample string 12</LengthMargin> <TileCalcMethod>sample string 13</TileCalcMethod> <TileMinimumWaste>sample string 14</TileMinimumWaste> <TileShape>sample string 15</TileShape> <TileEdgeSize>sample string 16</TileEdgeSize> <WasteAddon>sample string 17</WasteAddon> <IsAddOn>true</IsAddOn> <AddOns> <CloudProductAddOn> <ID>sample string 1</ID> <Method>sample string 2</Method> </CloudProductAddOn> <CloudProductAddOn> <ID>sample string 1</ID> <Method>sample string 2</Method> </CloudProductAddOn> </AddOns> <Datas> <item key="sample string 1" value="sample string 2" /> <item key="sample string 3" value="sample string 4" /> </Datas> <NoPiecingTogether>true</NoPiecingTogether> <Images> <string>sample string 1</string> <string>sample string 2</string> </Images> <Path>sample string 1</Path> </CloudFullProduct> <CloudFullProduct> <ID>sample string 19</ID> <Type>sample string 20</Type> <Trade>sample string 21</Trade> <Desc>sample string 22</Desc> <Vendor>sample string 23</Vendor> <VendorSku>sample string 24</VendorSku> <Color>sample string 25</Color> <Unit>sample string 26</Unit> <Manufacturer>sample string 27</Manufacturer> <SalesPrice>sample string 28</SalesPrice> <CostPrice>sample string 29</CostPrice> <BoxName>sample string 30</BoxName> <SellByBox>true</SellByBox> <BoxSalesPrice>sample string 31</BoxSalesPrice> <BoxCostPrice>sample string 32</BoxCostPrice> <UnitsPerBox>sample string 33</UnitsPerBox> <Taxable>true</Taxable> <Width>sample string 2</Width> <Length>sample string 3</Length> <Thickness>sample string 4</Thickness> <HoriRepeat>sample string 5</HoriRepeat> <VertRepeat>sample string 6</VertRepeat> <HoriDrop>sample string 7</HoriDrop> <VertDrop>sample string 8</VertDrop> <WidthMargin>sample string 11</WidthMargin> <LengthMargin>sample string 12</LengthMargin> <TileCalcMethod>sample string 13</TileCalcMethod> <TileMinimumWaste>sample string 14</TileMinimumWaste> <TileShape>sample string 15</TileShape> <TileEdgeSize>sample string 16</TileEdgeSize> <WasteAddon>sample string 17</WasteAddon> <IsAddOn>true</IsAddOn> <AddOns> <CloudProductAddOn> <ID>sample string 1</ID> <Method>sample string 2</Method> </CloudProductAddOn> <CloudProductAddOn> <ID>sample string 1</ID> <Method>sample string 2</Method> </CloudProductAddOn> </AddOns> <Datas> <item key="sample string 1" value="sample string 2" /> <item key="sample string 3" value="sample string 4" /> </Datas> <NoPiecingTogether>true</NoPiecingTogether> <Images> <string>sample string 1</string> <string>sample string 2</string> </Images> <Path>sample string 1</Path> </CloudFullProduct> </Products> <MatchKeyField>sample string 1</MatchKeyField> <OverWrite>true</OverWrite> <Update_Keep_Existing>true</Update_Keep_Existing> <Update_Del_Existing>true</Update_Del_Existing> </PdbSyncDatas>
Response Information
Resource Description
whether success
booleanResponse Formats
application/json, text/json
true
application/xml, text/xml
<boolean>true</boolean>