This method allows to book and close an order with the desired products.
It creates a new order in Booked status, acking you the numerical id of the order created. The products, if previously added to the reservation, will be automatically removed from reservation (created with Reserve) and added to this one.
Remember to authenticate properly, using HTTP Basic Authentication with your API-Key as username and your password.
The request body contains a list of desired products that will join the created order. Each product has two attributes:
- stock_id : the numerical id of the model of the product
- quantity : the quantity desired in the order
The quantity can be less, equal or greater than the quantities in the reservation:
- less : the remaining quantities are kept in the reservation.
- equal : the stock has removed from the reservation.
- greater : if there are available stocks they are added to the order, otherwise a “not found” error has returned.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <supplierorder> <products> <product stock_id="59" quantity="10"/> <product stock_id="10" quantity="7"/> <product stock_id="29" quantity="13"/> </products> </supplierorder>
The response body contains a number which represents the order_id of the created order.
The maximum addable quantity of a model is dipendent on the available quantity. You can't exceed this quantity: if you require more than the available quantity, only the available quantity will be added and no error or message will be returned. In order to make sure that all your models are correctly added to your order make sure to have reserved them (using Reserve) before calling this API
If the request body contains not existing stock_id, this will cause the abort of the order creation. Some of the required quantites may have been added to your reservation. We recommend you to always add all required quantities to your reservation before trying to use this API so you don't get any error caused by missing items
The platform does not check the stock_id of the products belongs to the content of the order.
If the request body contains errors this will cause the abort of the order creation. The http status code 429 will be returned and request body contains the error message.