v3 Bulk Exports API

I have a process which does a bulk sync between an external database and HubSpot CRM. The process exports all contacts & companies to ensure the external data-store is kept up to date.

So esentially, I’m trying to export the all companies and contacts.

If the export is a CSV & a “VIEW” export will the resultant file(s) contain every contact, or is there some caveat that’s not covered by the docs?

import requests

url = "https://api.hubapi.com/crm/v3/exports/export/async"

payload = "{\"exportType\":\"VIEW\",\"format\":\"CSV\"}"
headers = {
 'accept': "application/json",
 'content-type': "application/json",
 'authorization': "Bearer YOUR_ACCESS_TOKEN"
 }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

You need to refer back to this and attempt some tests out
You are missing the object type, and other required items that will help you get there.

I like to do these types of tests in postman or bruno, where I can set up the api call and review the results, checking back against the HS Crm data to ensure everything is coming over properly