Update some product fields for a specific product. For example update product stock quantity or product price.
Note that it is not required to set all request parameters. For example, if you just want to update the stock value, there is no need to set the NewName parameter as well.
- Request
- Response
Parameters
ArticleNumber **
String
Details
You can use either AirtcleNumber or EAN to select the product to be updated.
EAN **
String
Details
You can use either AirtcleNumber or EAN to select the product to be updated.
CategoryName
String
Details
The name of the category to associate the product with.
CategoryCreateIfMissing
Boolean (true|false)
Details
Defaults to false. Whether to create the category or not if it does not exist. If set to false (default) the product will not be added if the category is not found.
NewName
String
Details
The updated productname
NewSupplierArticleNumber
String
Details
The updated articlenumber used by the product's supllier
NewDescription
String
Details
The updated product description
NewSalePrice
Float
Details
The update product sale price
NewStockQty
Float
Details
If you want to update the products stock quantity, enter the amount here.
StockUpdateMode
String
Details
Choose either "Relative" or "Absolute" (defaults to Relative). Relative means: add the specified amount in the 'NewStockQty' parameter to the product stock quantity. Absolute means: set the product stock quantity to the value of 'NewStockQty'
NewStockMutationComment
String
Details
An optional description for this stock mutation
NewStockMutationPurchasePrice
Float
Details
The purchase costs for this stock modification (only applicable if stock is added / if NewStockQty is a positive value).
NewVATPercentage
Float
Details
The VAT percentage for this product, identified by a numeric %. Example value: 21 to update the VAT to 21%.
TaxCode
String
Details
The VAT percentage for this product, idenitifed by it's tax code. For example if you have multiple tax codes with the same percentage, you can identify a specific tax code with this parameter.
NewUnit
String
Details
The name of the product unit (for example: 'piece' or 'hour')
NewPurchasePrice
Float
Details
The purchase price (for the main / default supplier)
NewPurchasePriceVATPercentage
Float
Details
The purchase price VAT percentage, indentified by a numeric %. Example value: 21 to update the VAT to 21%.
TaxCodePurchase
String
Details
The purchase price VAT percentage for this product, idenitifed by it's tax code. For example if you have multiple tax codes with the same percentage, you can identify a specific tax code with this parameter.
Archived
Boolean (true|false)
Details
If set to true the product will be archived. Defaults to false.
Product_CustomField
Array
Details
An array of custom field values to add to the product. Custom field with specified label must already be created in Silvasoft (Product module settings)
Product_CustomField > Label
String
Details
The label of the custom field. This must match the label as specified in Silvasoft.
Product_CustomField > FieldType
String
Details
The fieldtype. Must correspond with the field type as specified in Silvasoft. Possible field types: Integer, Date, Decimal, TextSmall, TextLarge, Hyperlink, Checkbox, List
Product_CustomField > IntValue
Integer
Details
If FieldType is Integer you can specify the integer value here
Product_CustomField > DecimalValue
Float
Details
If FieldType is Decimal you can specify the decimal value here
Product_CustomField > BooleanValue
Boolean (true|false)
Details
If FieldType is Checkbox you can specify the boolean value here
Product_CustomField > StringValue
String
Details
If FieldType is TextSmall or TextLarge or List or Hyperlink you can specify the string value here
Product_CustomField > DateTimeValue
Date String (dd-MM-yyyy)
Details
If FieldType is Date you can specify the date string here
BatchStockUpdateMode
String
Details
Used in combination with the "Product_Batch" parameters below. Choose either "Relative" or "Absolute" (defaults to Relative). This setting applies to the stock updates performed for batches (see below). Relative means: add the specified amount in the 'BatchStockQty' parameter to the batch stock quantity. Absolute means: set the batch stock quantity to the value of 'BatchStockQty'.
BatchMatchMode
String
Details
Used in combination with the "Product_Batch" parameters below. Choose either "Description" or "Description_and_date". When set to "Description" we will search for a matching batch based on only the description. When set to "Description_and_date" we will search for a matching batch based on both the description and the expiry date. If no match is found we will create a new batch.
Product_Batch
Array
Details
An array of batch- or serienumbers to add or update for the product. If an existing batch is found the existing batch will be updated. Otherwise a new batch will be added to the product.
Product_Batch > Description
String
Details
The description of the batch to be updated / added.
Product_Batch > BatchExpiryDate
Date String (dd-MM-yyyy)
Details
The expiry date for the batch.
Product_Batch > BatchStockQty
Float
Details
The new stock quantity for the batch. Leave empty if you do not want to update the stock quantity.
CURL Example
1 |
curl -X PUT -H "Content-Type: application/json" -H "ApiKey: b7d343Bnhd436f3ec3bd3504582" -H "Username: [email protected]" "https://rest-api.silvasoft.nl/rest/updateproduct/" |
Parameters
Name
String
More info
The updated product name
ArticleNumber
String
More info
The article number (not nessecarily numeric)
SupplierArticleNumber
String
More info
The articlenumber of the default supplier for this article.
Category
String
More info
Category name for this product
EAN
String
More info
Product EAN code
Description
String
More info
Product description, limited to 400 characters
StockQty
Float
More info
The actual stock quantity
PurchasePrice
Float
More info
The latest purchase price
Price
Float
More info
The default sale price excluding VAT
VATPercentage
Float
More info
The VAT percentage
MinimalStockQty
Float
More info
The minimal required stock quantity for this product as configured in Silvasoft.
UnitsPerPackage
Float
More info
The suppliers units per package. In Silvasoft this is known as 'verpakkingseenheid'.
Unit
String
More info
The product unit (for example: 'piece' or 'hour')
CreatedOn
String
More info
An UNIX timestamp in seconds reflecting the date and time of creation.
ChangedOn
String
More info
An UNIX timestamp in seconds reflecting the date and time of last change.
ProductResponse_CustomField
Array
More info
An array of custom fields and their values for this product
ProductResponse_CustomField > Label
String
More info
The custom field name / label
ProductResponse_CustomField > DataType
String
More info
The datatype of this custom field. Can be used to determine which value field is needed. Possible data types: Decimal, Boolean, String, Integer, DateTime
ProductResponse_CustomField > DateTimeValue
String Date (dd-MM-yyyy)
More info
The date value of the custom field
ProductResponse_CustomField > DecimalValue
Float
More info
The decimal value of the custom field
ProductResponse_CustomField
Boolean (true|false)
More info
The boolean value of the custom field
ProductResponse_CustomField > StringValue
String
More info
The string value of the custom field
ProductResponse_CustomField > IntValue
Integer
More info
The integer value of the custom field
ProductResponse_CustomField > FieldType
String
More info
The field type as specified in Sivasoft. Possible field types: Integer, Date, Decimal, TextSmall, TextLarge, Hyperlink, Checkbox, List
Response JSON Example
The response order can vary from the parameter order above
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
{ "Category":"Electronics", "EAN":"123456789120", "Description":"Product description", "StockQty":0, "Price":110, "ArticleNumber":"1204", "PurchasePrice":101.95, "VATPercentage":19, "Name":"BENQ Monitor 24 inch", "Unit":"Piece", "MinimalStockQty":"50", "SupplierArticleNumber":"Han16-AC", "CreatedOn":1598340866, "ChangedOn":1599849807, "ProductResponse_CustomField":[ { "DateTimeValue":null, "DecimalValue":"0.0", "BooleanValue":false, "Label":"Weight", "DataType":"Integer", "StringValue":null, "IntValue":25, "FieldType":"Integer" }, { "DateTimeValue":null, "DecimalValue":"0.0", "BooleanValue":false, "Label":"Description Spanish", "DataType":"String", "StringValue":"Buenos Dias", "IntValue":0, "FieldType":"TextSmall" } ] } |