Webhook for companies for missing companies?


#1

I have change/create webhooks for companies and contacts, and when the webhook is received the receiving app immediately performs a get to https://api.hubapi.com/companies/v2/companies/ to deal with the data.

The results of that GET is
{“status”:“error”,“message”:“resource not found”,“correlationId”:“32d945db-eb9a-48e4-9604-f1a6d5ad45e8”,“requestId”:“90831497510d35dc5ba5c1d5acf2cc60”}

So, is there any potential for companies to be absent for a short while? Some kind of discrepancy between different services at hubspot? Alternately, are there cases where the objectId is incorrect?


#2

Hi @graveland

Is this something that you only saw yesterday? Or are you still seeing this today? We did have some issues yesterday which may have lead to this happening:
https://status.hubspot.com/incidents/dc8tj8v7nzlf

Outside of that, there shouldn’t be a case for you receiving a webhook for a company that you can’t get through the API yet. If you’re still seeing this, can you message me with the app that you have the webhooks set up for, and a specific company ID that you saw this with?


#3

Hello dadams,

Same issue i am facing, here is my code to create contact using auth:-

// Hapikey
$hapikey= get_option(‘hapikey’);

     $arr = array(
              'properties' => array(
                  array(
                      'property' => 'firstname',
                      'value' => 'tester'
                  )
              )
          );
          $post_json = json_encode($arr);
          $endpoint = 'https://api.hubapi.com/contacts/v1/contact/vid/46548/profile?hapikey='.$hapikey;
          $ch = @curl_init();
          @curl_setopt($ch, CURLOPT_POST, true);
          //@curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
          @curl_setopt($ch, CURLOPT_POSTFIELDS, $post_json);
          @curl_setopt($ch, CURLOPT_URL, $endpoint);
          @curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Authorization: bearer '.$access_token));
          @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
          $response = @curl_exec($ch);
          $status_code = @curl_getinfo($ch, CURLINFO_HTTP_CODE);
          $curl_errors = curl_error($ch);
          @curl_close($ch);
          print_r($response);