This endpoint is used to send Orders to FoodMaster.
POST /Order
A few other options for delivery- and invoice-addresses are possible. This info is not standard available because it is not recommended.
The gl_korting1 is a discount on order level, the ln_korting1 is a discount on line / article level. The types of discount (tp_glkorting and tp_korting1) can never be 0, even if the discount itself is 0.
The lev_adres should be empty or one of the options given or created in the customer address endpoint.
xxxxxxxxxx{ "DsOrder":{ "TtOrder_HFD":[ { "dossiernr": 1, // company within FoodMaster "klant-nr": 84569, // customer id "Afhaling": false, // pick-up "Datum_lev": "2050-08-10", // delivery date "lev_adres": "001", // delivery address "ref-ord": "<unique id from website>", // order reference "gl_korting1": 0, // global discount "tp_glkorting1": 1, // type of global discount "IP": "", // can be used for extraa customer identification "Memo": "" // memo -- this field can be an extra comment from a customer } ], "TtOrder_DET":[ { "artikelnr":"454ABC", // article id "beenheid":"ST", // order unit "hoev_be":10, // amount ordered "ref-gewicht":0, // reference weight "ln_korting1":0.0, // line discount "tp_korting1":1 // type line discount "memo": "" // memo on line level -- this field can be an extra comment from a customer }, ] }}
The output looks largely the same as the import.
If bestelnr returns 0, the order was not received successfully. Note that the response will only return successful ttOrder_DET objects. If for example, a non-existing article number was provided, the order will return without that ttOrder_DET object.
The possible options for the variable toestand are:
Offerte: Offer / propositionBestelbon: OrderTe wegen: Ready for picking / preparing orderZendnota: Ready to be shipped / shippedTe factureren: Shipped / ready for invoice to be madeEinde: End / Invoice madeSee following example:
xxxxxxxxxx{ "dsOrder": { "ttOrder_HFD": [ { "dossiernr": 1, // company within FoodMaster "bestelnr": 49467, // order id in FoodMaster "klant-nr": 84569, // customer id "datum_bst": "2050-08-09", // order date "datum_lev": "2050-08-10", // delivery date "lev_adres": "001", // delivery address code "afhaling": false, // pick-up "toestand": "Bestelbon", // order status "oorsprong": "WEB", // origin "ref-ord": "<unique id from website>", //order reference "gl_korting1": 0.0, // global discount 1 "tp_glkorting1": 1, // type of global discount 1 "gl_korting2": 0.0, // global discount 2 "tp_glkorting2": 1, // type of global discount 2 "IP": "", // can be used for extraa customer identification "memo": "", // memo -- this field can be an extra comment from a customer "crud": "C", // crud action code "waarde_levering": 0.0, // order value "ttOrder_DET": [ { "artikelsrt": 0, // article kind "artikelnr": "454ABC", // article id "omschr": "Steak", // description "beenheid": "ST", // order unit "hoev_be": 5.0, // amount ordered "hoev_fe": 0.0, // amount invoiced "ref-gewicht": 0.0, // reference weight "prijs": 2.5, // price "ln_korting1": 0.0, // line discount "tp_korting1": 1, // type line discount "memo": "" // memo on line level -- this field can be an extra comment from a customer }, ], "ttOrder_F_ADR": [ // invoice address { "naam": "John Doe INC.", // customer/inoice name "naam2": "John Doe", // customer/inoice name 2 "adres": "Dorpsplein 1", // customer/inoice address "land": "BE", // customer/inoice country "postnr": "2800", // customer/inoice postal code "woonpl": "Mechelen", // customer/inoice city "telefoon": "015 99 99 99", // customer/inoice phone "gsm": "+32 499 99 99 99", // customer/inoice mobile phone "email": "john@johndoeinc.be" // customer/inoice e-mail } ], "ttOrder_L_ADR": [ // delivery address: only in output if 'lev_adres' defined { "naam": "John Doe", // delivery address name "naam2": "", // delivery address name 2 "adres": "Stationsstraat 1", // delivery address "land": "BE", // delivery address country "postnr": "1000", // delivery address postal code "woonpl": "Brussel", // delivery address city "telefoon": "", // delivery address phone "gsm": "+32 499 99 99 99", // delivery address mobile phone "email": "john@johndoeinc.be", // delivery address e-mail "commentaar": "" // delivery address comment/memo } ] } ] }}