This documentation is a general guideline for the FoodMasterAPI created by We solve IT. The FoodMasterAPI is a tool for getting data from and pushing data to the FoodMaster ERP software. The main use case for the API, is the connection with a third party e-commerce / web shop for companies. This of course exclusively for companies who use FoodMaster as their ERP.
The specific URL needed for you to call the API will be provided via e-mail after contacting We solve IT.. For each call you need to make, the specific endpoint is given in this documentation.
SECURITY
The FoodMasterAPI is only accessible via HTTPS. By using the login call, you can get the cookie needed the get access to all other calls. You do not need to get a new cookie for each call. You only need a new cookie of your current cookie expires.
INCREMENTAL DATA
When data changes are requested incremental, all changed data since the last request will always be pushed. In case the ‘since’ date is set, all changes since that date will be pushed, including all new changes. If only the changed records are needed, the variable since should be set as following:
&since=1900-01-01T00:00:00The incremental data does not have an action code when it is returned. If a record needs to be updated or deleted, it should be done by the rec-id.
If you can find the rec-id already in your DB, the record should be updated.
If you can not find the ID in your DB, the record should be inserted.
If only the rec-id is filled and the rest of the data fields are empty, the record should be deleted.
- It is possible that you receive a delete for a record that does not exist yet in your DB.
UPDATING DATA
When using the
PUTstatement in any of the calls, any value that does not need to change, needs to be included in de data JSON. Variables that are left empty or are not given in the JSON will be set as empty.
| Parameters | Use |
|---|---|
| dossiernr | Integer This is the same value in every call. This represents the company in the FoodMaster ERP In this document, the example value will always be 1 |
| since | Datetime This parameter is used in all the incremental calls. It tells the API to get all incremental changes since this timestamp Example: 2019-10-25T10:00:00 > All changes since 25 October 2019 10:00uExample: 1900-01-01T00:00:00 > All changes since the last time the specific call was executed |
| pag | Integer Page number when getting big data in small pages Example: 1 |
| lim | Integer Page size when getting big data in small pages Example: 50 |
| klant-nr | Integer Customer number in the FoodMaster ERP Example: 102001 |
| b-date | Date Begin date Example: 2019-10-25 |
| e-date | Date End date Example: 2019-10-25 |
| datum_lev | Date Delivery date Example: 2019-10-25 |
| artikelsrt | Integer Kind of article 0 = Normal article1 = Raw material |
| artikelnr | String Article ID Example: BIN1712 |
| hoev_be | Decimal Amount ordered Example: 15 |
| beenh | String Order unit code Example ST |
| doc-nr | Integer Document number Example: 14556 |
| doc-date | Date ‘Registration date’ of a FoodMaster document idatum output parameter in the invoices callExample: 2019-12-18 |
| tp_korting | Type of discount1 = % 2 = € / unit 3 = € / kg4 = € |
| ln_korting | Line discount value |
| gl_korting | Global discount value |