Hubspot Configuration

Hi the configuration is pretty straightforward: 

1) get your hapikey here
2) Paste the code below in the Generic Rest API extractor
3) copy the enpoint of the desired call  from the hubspot api documentation.
(You need to click on the particular call for this: look at the picture)


The config below will work though only for GET calls.


{
  "parameters": {
    "api": {
      "baseUrl": "https://api.hubapi.com",
      "authentication": {
        "type": "url.query"
      },
      "query": {
        "hapikey": {
          "attr": "hkey"
        }
      },
      "pagination.method": "offset",
      "pagination.limit": 20
    },
    "config": {
      "id": "Hubspot",
      "hkey": "YOUR-API -KEY",
      "http": {
        "headers": {
          "Accept": "application/json"
        }
      },
      "jobs": [
        {
          "endpoint": "INSERT-THE-END-POINT-HERE",
          "dataType": "companies",
          "dataField": "results"
        },
        {
          "endpoint": "deals/v1/deal/recent/created",
          "dataType": "deals",
          "dataField": "results"
        }
      ]
    }
  }
}

The config below will work for CONTACTS table:
{
  "parameters": {
    "api": {
      "baseUrl": "https://api.hubapi.com",
      "authentication": {
        "type": "url.query"
      },
      "query": {
        "hapikey": {
          "attr": "hkey"
        }
      },
      "pagination": {
        "method": "response.param",
        "limit": 100,
        "responseParam": "vid-offset",
        "queryParam": "vidOffset"
      }
    },
    "config": {
      "id": "Hubspot",
      "hkey": "YOUR-API-KEY",
      "http": {
        "headers": {
          "Accept": "application/json"
        }
      },
      "jobs": [
        {
          "endpoint": "contacts/v1/lists/all/contacts/all",
          "dataType": "contacts",
          "dataField": "contacts",
          "params": {
            "showListMemberships": "true"
          }
        }
      ]
    }
  }
}


Comments