From the error it looks like the expected PUT body needs to be an array say {"contacts":[12,123]}. What you are giving is {"contacts":12}
There are 2 options:
Put the integer in an array. ie. request.put("contacts",[contact])
since your delete request already handles multiple ids, why use dataprovider, simply send the array in one go in contacts.