I am creating an app using HubSpot API and I used legacy contact update API for initial data migration from my database and now using,
POST
/crm/v3/objects/contacts/batch/create
- for create bulk contacts
POST
/crm/v3/objects/contacts/batch/update
- for update bulk contacts
there are some scenarios when we send data as create but some accounts already exists or we send data as update but some accounts doesn’t exist. So in these Situations the easiest method to us is just use Legacy contact update API for both tasks and it will check contact status and act accordingly. and i have also build my own Upsert function with only using V3 Endpoints.
In there I am checking the API response ERROR CODE and then filter data and then send back to above bulk create or update enpoints.
ex: lets say i am sending 50 contact data through create api endpoint and if there is any email or unique property value exist, the whole batch will be stopped and give me an errorCode = 409 or if its an update request and there is any non existing contact then it gives me errorCode = 400 , then i make search API request with same 50 contact emails and split existing and non-existing contacts into 2 lists and pass them separatly to Create API Endpoint or Update API Endpoint and its working fine upto now.
I have two question regarding thise whole thing,
1. If I prefer to use Legacy contact update API , will this Endpoint be deprecated any soon and if its is, how much time will hubSpot give us to make the necessary changes ?
2. If I use my own function above mentioned, is there any solid error code mechanism which provides same error code (Existing Contacts - 409, Non-Existing Contacts - 400) which will not be changed in near future because the entire Retrying logic is based on that Error code ?