Partial Commit of Contacts Batch

We’re using Hubspot API to push a list of contacts to Hubspot using below API endpoint –

https://api.hubapi.com/contacts/v1/contact/batch/

This end point accepts a batch not exceeding 1000 contacts, and pushes them all at once to Hubspot. According to the API documentation, If one record in the batch has issues, the whole batch is rejected and even the successful records are not committed to Hubspot.

Is there a way to enable the partial commit on Husbpot side(Valid contacts from the batch should be saved)? Perhaps by setting some property in the input JSON?

Hey @jwalants, No that’s not possible; if a contact in the batch is invalid, the whole batch fails. There’s no property we can add to the JSON body to override this behavior. That said, the error message should have details about which contact(s) failed, so you can retry the batch without the invalid contact(s).

Is there a easy way to remove invalid contacts from the batch?

error messages are different so we can not predict the error so should i remove those inavlid contacts from the batch and execute valid batch?