REST Hook API hookUrl

When a contact add or edit to Infusionsoft after save the data Infusionsoft calling the hookUrl page with some data.

When I am grabbing the data on the hookUrl page then I am seeing that a bunch of contacts array with json format not individually contact.

My question is why a bunch of array return on hookUrl page like below code:

{"event_key":"contact.edit","object_type":"contact","object_keys":[{"apiUrl":"","id":17738,"timestamp":"2018-03-29T10:55:37Z"},{"apiUrl":"","id":183754,"timestamp":"2018-03-29T10:55:27Z"},{"apiUrl":"","id":135369,"timestamp":"2018-03-29T10:55:22Z"},{"apiUrl":"","id":18786,"timestamp":"2018-03-29T10:55:22Z"}],"api_url":""}

Here (above code) you can see 4 contacts in one array(json format), but I need each contact with individual array like below code:

 {"event_key":"contact.edit","object_type":"contact","object_keys":[{"apiUrl":"","id":17738,"timestamp":"2018-03-29T10:55:37Z"}],"api_url":""}
{"event_key":"contact.edit","object_type":"contact","object_keys":[{"apiUrl":"","id":183754,"timestamp":"2018-03-29T10:55:27Z"}],"api_url":""}
{"event_key":"contact.edit","object_type":"contact","object_keys":[{"apiUrl":"","id":135369,"timestamp":"2018-03-29T10:55:22Z"}],"api_url":""}
{"event_key":"contact.edit","object_type":"contact","object_keys":[{"apiUrl":"","id":18786,"timestamp":"2018-03-29T10:55:22Z"}],"api_url":""}

How it’s possible?

We batch multiple changes to the same event into the same post so as not to DDOS receiving services. You should be able to manipulate the sent data in the same manner as any other JSON content, via whatever manner your implementation language provides in libraries.

How it’s possible multiple changes to the same event in a same time?

You can see here this (17738) contact edited at 10:55:37 and this (183754) contact edited at 10:55:27 and this (135369) contact edited at 10:55:22 and this (18786) contact edited at (10:55:22), these contacts are edited at same time, deference between them 5-10 seconds and also last two are same time, is it possible?

Why does it matter? Run your webhook responder by using a foreach loop and your problem is solved. You don’t change what you have to work with, you change how you work with what you have.