• POST rest/addorder/

      • Add a sales order

This POST method allows you to create a new order with multiple orderlines, associated to a customer.

Notes:

  • Maximum 75 orderlines per order allowed.
  • If CustomerNumber is used to identify the customer, the parameters CustomerName and CustomerEmail will be ignored.
  • If CustomerName or CustomerEmail is used to identify the customer, and you have multiple customers that match, we will use the first found match.
  • The parameters CustomerName and CustomerEmail can also be used combined. When both parameters are submitted, the system will search for relations where both name and e-mail match with the submitted parameters.
  • Submitting an address is optional, if no address is submitted the default address for the relation will be used. When an address is submitted we will add the address to the relation file (CRM), if the address does not already exist. You can submit both a billing and shipping address using the ‘Address_Type’ field.
  • When submitting attachments you can either submit it by URL (Silvasoft will download the file from the URL) or as a binary string in the field ‘FileContent’. In both cases the file will be mime checked and it cannot be greater than 10mb. When using ‘FileContent’ you must supply a name as well.
  • Request
  • Response

Parameters

CustomerNumber ** Integer Details
The customer, identified by its customer number, to be associated with the order
CustomerName ** String Details
The customer, identified by its name, to be associated with the order
CustomerEmail ** String Details
The customer, identified by its e-mailaddress, to be associated with the order
OrderDate Date String (dd-MM-yyyy) Details
The order date in format dd-MM-yyyy. (http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html) Defaults to current date.
CreatedOn Long Details
An UNIX timestamp in seconds reflecting the date and time of creation.
ChangedOn Long Details
An UNIX timestamp in seconds reflecting the date and time of last change.
OrderNotes String Details
Custom order notes / order description
OrderDiscountPc Float Details
Discount % to be applied to the order. This will always be deducted from the total, even if you submit "SubTotalInclTax" for your orderlines.
OrderStatus String Details
Optional orderstatus to be associated with the order. If the status is not present in your Silvasoft administration the order will still be added, but the status will not be added to the order.
DeliveryPeriod Integer Details
The delivery period (in days) for this order
GeneralStatus String Details
Choose between: "concept_quote", "final_quote" and "order". If concept_quote it will be created as a concept quote in Silvasoft. If final_quote it will be created as a final quote in Silvasoft. If order (default) it will be created as order in Silvasoft. This impacts in which overview and with which status the quote/order will be shown in Silvasoft.
OrderReference String Details
Order reference number or text (max. 150 characters)
HtmlAsPlainText Boolean (true|false) Details
Whether the response rich-text fields will be returned as plain text or not. Defaults to false.
PackingSlipNotes String Details
Extra notes for the packing slip
Order_Orderline * Array Details
An JSON array of orderlines
Order_Orderline > ProductNumber ** String Details
The productnumber of the product to be associated with the orderline.
Order_Orderline > ProductEAN ** String Details
The product EAN code of the product to be associated with the orderline.
Order_Orderline > Quantity * Float Details
Quantity of items in this orderline
Order_Orderline > UnitPriceExclTax Float Details
Price per ordered unit
Order_Orderline > TaxPc Float Details
The VAT percentage for this order line, identified by a numeric %. Example value: 21 to use VAT 21%. Please note that this percentage must be available within your Silvasoft administration. If no tax details are submitted Silvasoft will use the tax percentage as configured for the product.
Order_Orderline > TaxCode String Details
The VAT percentage for this order line, 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. If no tax details are submitted Silvasoft will use the tax percentage as configured for the product.
Order_Orderline > SubTotalInclTax Float Details
The orderline subtotal, including taxes. When this parameter is set, the price per unit will be ignored and automatically calculated. If this parameter is not submitted then the subtotal will be the "Quantity" times "UnitPriceExclTax" times tax. Please note that this field behaves as a line total, including taxes, including line discount, excluding order discount. So this price will never change, except when an order discount is submitted ("OrderDiscountPc").
Order_Orderline > Description String Details
Orderline description
Order_Orderline > IsTextLine Boolean (true|false) Details
If this is a text line you can set this to true and omit price and tax fields
Order_Orderline > TextLineCategory String Details
Optionally submit the name of the text category. If nothing is submitted the default text category will be used.
Order_Orderline > DiscountPc String Details
Orderline discount %. Please note that the behaviour of line discount depends on how your submit your line total. If you submit the "SubTotalInclTax" then the discount will be added, but not change the line total since the "SubTotalInclTax" behaves as a subtotal, AFTER discount. However, if you submit only a "Quantity" and a "UnitPriceExclTax" then the discount will be applied to the subtotal of "Quantity" times "UnitPriceExclTax" since this combination behaves as a total price BEFORE discount.
Order_Orderline > DiscountAmountInclTax String Details
Orderline discount amount in EUR. Please note that the behaviour of line discount depends on how your submit your line total. If you submit the "SubTotalInclTax" then the discount will be added, but not change the line total since the "SubTotalInclTax" behaves as a subtotal, AFTER discount. However, if you submit only a "Quantity" and a "UnitPriceExclTax" then the discount will be applied to the subtotal of "Quantity" times "UnitPriceExclTax" since this combination behaves as a total price BEFORE discount.
Order_Orderline > UseArticlePrice Boolean (true|false) Details
If set to true (default is false) you will not need to supply any price details for this line. Silvasoft will get the default product price and discount rules for the article or article category, as configured within your administration.
Order_Address Array Details
A JSON array of addresses. If no address is submitted the default address for the relation will be used.
Order_Address > Address_City String Details
The address (city) to be used for the invoice. If the address does not already exist it will be added as a new address to the customer (CRM).
Order_Address > Address_Street String Details
The address (street) to be used for the invoice. If the address does not already exist it will be added as a new address to the customer (CRM).
Order_Address > Address_PostalCode String Details
The address (postalcode) to be used for the invoice. If the address does not already exist it will be added as a new address to the customer (CRM).
Order_Address > Address_CountryCode String Details
The address (ISO 3166 (A2) countrycode) to be used for the invoice. If the address does not already exist it will be added as a new address to the customer (CRM).
Order_Address > Address_Unit String Details
The address (unit) to be used for the invoice. If the address does not already exist it will be added as a new address to the customer (CRM).
Order_Address > Address_UnitAppendix String Details
The address (unit appendix) to be used for the invoice. If the address does not already exist it will be added as a new address to the customer (CRM).
Order_Address > Address_Type String Details
Allowed values: ShippingAddress and BillingAddress. Shipping_Address will be used for the packing slip. If no ShippingAddress is submitted the billing address will be used for the packing slip.
Order_Attachment Array Details
An array of attachments to add to this order.
Order_Attachment > FileUrl String Details
Method 1: Add an attachment by using a URL pointing to the file to be attached to the order. The file will be downloaded and added as attachment to the order. If the file is not downloadable, the order will still be created but without the attachment. The file URL must end with one of the following file extensions in order for it to be added to the order: .jpg, .png, .pdf, .doc, .docx, .xls, .xlsx
Order_Attachment > FileContent String Details
Method 2: Add a file as a binary string. When this field is submitted you MUST submit a FileName as well.
Order_Attachment > Internal Boolean (true|false) Details
Whether the attachment is 'Internal' (true) or 'Public' (false). Defaults to false.
Order_Attachment > FileName String Details
The name of the attachment WITH extension. Required when using 'FileContent'. Optional when using 'FileUrl'. If left empty a name will be auto-generated based on the current timestamp.

CURL Example

Parameters

OrderTotalInclTax Float More info
The order total value, including taxes and optional discounts.
OrderNumber Integer More info
The automatically determined ordernumber
Order_Address Array More info
A JSON array of order addresses. At the moment this will never contain more then one address, which is the address selected for the order.
Order_Address > Address_CountryCode String More info
ISO 3166 (A2) country code of the order address
Order_Address > Address_PostalCode String More info
Postal / zip code
Order_Address > Address_Street String More info
Order_Address > Address_Unit String More info
Order_Address > Address_City String More info
Order_Address > Address_UnitAppendix String More info
Appendix (e.g. appartment/suite/floor) for the address unit
Order_Address > Address_Type String More info
Will either return 'BillingAddress' or 'ShippingAddress'. The 'BillingAddress' is the main address attached to the order. The 'ShippingAddress' is the packing slip address.
Order_Contact Array More info
A JSON array of order contacts. At the moment this will contain the main order contact and the packingslip contact (if applicable).
Order_Contact > ContactType String More info
Order|PackingSlip
Order_Contact > FirstName String More info
Order_Contact > Phone String More info
Order_Contact > Email String More info
Order_Contact > Sex String More info
Contact sex (Man|Vrouw)
Order_Contact > LastName String More info
Order_Contact > ContactNotes String More info
Custom CRM notes associated with the contact
Order_Contact > DefaultContact Boolean (true|false) More info
Whether the contact is the relations main (default) contact.
Order_Orderline Array More info
See the request parameters for all possible response parameters. In addition see parameters below.
Order_Orderline > SubTotalExclTaxExclDiscount String More info
The invoiceline total, excluding tax, excluding discounts
Order_Orderline > SubTotalInclTaxExclDiscount String More info
The invoiceline total, including tax, excluding discounts
Order_Orderline > SubTotalExclTax String More info
The invoiceline total, excluding tax, including discounts on invoice level and line level
CreatedOn Long More info
An UNIX timestamp in seconds reflecting the date and time of creation.
ChangedOn Long More info
An UNIX timestamp in seconds reflecting the date and time of last change.
OrderStatus String More info
The label / name of the current order status

Response JSON Example

The response order can vary from the parameter order above