improved

Attendance API: improved failure handling for attendance batch POST

Pushing large sets of attendance periods into Personio via the API used to be difficult because every "incorrect" element in the list caused an interruption in the whole POST process.

With the improvement we just implemented, other elements in the list are still pushed to Personio, even if one or more of them is incorrect. For each incorrect element, the response will now include an error message with the specific reason why it failed. This will allow you to identify and process issues afterwards.

{
	"success":false
		"error":{
			"code":400
			"message":"Error when trying to insert Attendances periods rows"
			"detailed_message":[
				0:{
        			"success":true
        			"error_msg":NULL
        			"id":1
        			"employee":1234
        			"date":"2017-01-01"
        			"start_time":"09:00"
        			"end_time":"18:00"
        			"break":60
        			"comment":""
				}
  				1:{
          			"success":false
          			"error_msg":"Existing overlapping attendances periods"
          			"id":NULL
          			"employee":1234
          			"date":"2017-01-01"
          			"start_time":"09:00"
          			"end_time":"18:00"
          			"break":60
          			"comment":""
				}
			]
		}
}