Hubspot documentation does not have proper documentation for specific tech

272 Views Asked by At

I tried to use the documentation indicated here, but unfortunately the example code is really difficult to follow.

For example:

enter image description here

The code from the image above returns 400 error. However, if I tried the one from the repo it works. Like so:

$response = $hubspot->crm()->companies()->basicApi()->getPage();

The toObjectType does not have description on how to use it too. Maybe there is a separate documentation?

Any idea with this?

1

There are 1 best solutions below

0
On BEST ANSWER

Just for future reference, don't get mad at me.

  • Just go to https://developers.hubspot.com/docs/api/overview
  • Go to CRM section then under Objects > click Companies (for my case it is for companies) on the left sidebar.
  • Click the Endpoints tab.
  • Click Endpoints for this page dropdown to select what endpoint do you need. For my case I selected List of companies under Basic type since there is 2 types of API which is the Association and the Basic.
  • You will see an example code on the right side of the page.