This endpoint handles everything concerning the delivery addresses of the customers. It can read addresses, but is also capable of creating, updating or deleting an address. It is not possible to set a delivery address as the invoice address. The invoice info should be directly set on the customer.
POST /customerAdress
GET /customerAdress
PUT /customerAdress
DELETE /customerAdress
GET /customerAdress/all
GET /customerAdress/incremental
GET /customerAdress/count
Provide the call with a json like this example:
xxxxxxxxxx{ "dsCustAdress": { "ttCustAdressInfo": [ { "dossiernr": 1, // company within FoodMaster "klant-nr": 8, // customer id "lev_adres" : "FOO", // delivery address code "naam": "Main adress", // address name "naam2": "", // address name 2 "adres": "Bankstreet 2", // address (street + number) "land": "BE", // address country "postnr": "1000", // address postal code "woonpl": "Brussels", // address city "telefoon": "", // address phone number "gsm": "", // address mobile phone number "e-mail": "foo@bar.com", // address e-mail "commentaar": "" // address comment } ] }}You can choose to fill the lev_adres (kind of an ID) field yourself, or to leave it empty. If you leave it empty, or don't add the variable in the json object, FoodMaster will generate a correct value.
dossiernr = company within FoodMaster
klant-nr = customer ID
The same json object provided with create. Only now, make sure to add the correct value for the lev_adres 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.
When deleting one of the customers addresses, these 3 key variables are enough.
xxxxxxxxxx{ "dsCustAdress": { "ttCustAdressInfo": [ { "dossiernr": 1, // company within FoodMaster "klant-nr": 8, // customer id "lev_adres" : "FOO", // delivery address code } ] }}
dossiernr = company within FoodMaster
pag = page number
lim = page size
dossiernr = company within FoodMaster
since = changes since 1900-01-01T00:00:00 for ‘since last call’
dossiernr = company within FoodMaster
See following example:
xxxxxxxxxx{ "dsCustAdress": { "ttCustAdressInfo": [ { "dossiernr": 1, // company within FoodMaster "klant-nr": 8, // customer id "lev_adres": "FOO", // delivery address code "naam": "Main adress", // address name "naam2": "", // address name 2 "adres": "Bankstreet 2", // address (street + number) "land": "BE", // address country "postnr": "1000", // address postal code "woonpl": "Brussels", // address city "telefoon": "", // address phone number "gsm": "", // address mobile phone number "email": "", // address e-mail "commentaar": "", // address comment "rec-id": 164006, // record id "crud": "C" // crud action } ] }}