FoodMaster API Documentation

 

Customers

This endpoint handles everything concerning the customers. It can read customer info, but is also capable of creating new customers or update an existing customer. The info regarding this call, is also the invoice info of the customer. It is not possible to have multiple invoice addresses for one customer. All the invoice info is directly set on the customer.

When returning the info of a customer there are 3 important variables in FoodMaster that determine if a customer should be deactivated or not. These variables are: active, e-commerce customer and sales stop. If one of these 3 factors determine that the customer should not be active on de e-commerce side, deactivate will be TRUE. Whether a customer should be deleted on the web side when his account is deactivated in FoodMaster or not, is up to the web developers and the company owner to decide.


Action

Create

POST /customer

 

Read 1

GET /customer

 

Update

PUT /customer

 

Read all

GET /customer/all

 

Read incremental

GET /customer/incremental

 

Count

GET /customer/count


Input

Create

Provide the call with a json like this example:

If the answer of this call is a 200 response and the klant-nr variable is set, the customer is created, or it already exists. FoodMaster checks the btw-nr and e-mail variables. If there is a match in the Database the crud variable will be set to R in the output, and the call will be handled as a read. (So no info will be created or updated.)

The klant-nr variable should be 0 when using POST and should be correct when using PUT.

 

Read 1

dossiernr = company within FoodMaster klant-nr = customer ID

 

Update

The same json object provided with create. Only now, make sure to add the klant-nr variable. Always provide this endpoint with all adjustable info. If you leave an adjustable field blanc, it we put as blanc in FoodMaster. So do not only provide the changes, but all the info.

 

Read all

dossiernr = company within FoodMaster pag = page number lim = page size

 

Read incremental

dossiernr = company within FoodMaster since = changes since 1900-01-01T00:00:00 for ‘since last call’

 

Count

dossiernr = company within FoodMaster


Output

There are more fields in the return json than there are in the POST or PUT json. Notice the voornaam and achternaam variable where put together in the voornaam variable. Also all address variables are put together in straat.

The prijscode variable indicates what's the standard price is for this customer. It is linked with the price codes call and the article calls.

The klgroep variable indicates the 'category' or group the customer is in. This variable too can have influence on the price the customer might pay. It has influence on the special prices call.

The transport variable indicates whether the customer should pay transport costs or not. transpTariefCode indicates in which class of cost the customer is in.

See following example: