Need companies PATCH API Example

Hi Support,

I am using companies PATCH api and it will gives me an error like this:

“{“status”:“error”,“message”:“resource not found”,“correlationId”:“bcc87d85-2ec6-4048-870b-0d55be51ac03”}”

I am going to attach my API call as well with request json. Below is my API call URL, you will find request json in attachment:"
URL: https://api.hubapi.com/crm/v3/objects/companies/10189869688

Please help me about this.
Thank you,

Smit Karbhari

Hey, @skarbhari :waving_hand: Can we try a simplified test? We’ll use the example for this endpoint and update only one company property.

  • Link

  • Endpoint PATCH/crm/v3/objects/companies/{companyId}

  • Request

    curl --request PATCH \
     --url https://api.hubapi.com/crm/v3/objects/companies/10202231613 \
     --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
     --header 'content-type: application/json' \
     --data '{
     "properties": {
     "state": "New Jersey"
     }
    }'​
    
  • Response

    HTTP 200
    
    {
     "id": "10202231613",
     "properties": {
     "createdate": "2022-11-29T19:11:33.392Z",
     "hs_all_accessible_team_ids": "12073943",
     "hs_all_owner_ids": "198670650",
     "hs_all_team_ids": "12073943",
     "hs_created_by_user_id": "10233975",
     "hs_lastmodifieddate": "2022-11-30T18:19:31.603Z",
     "hs_object_id": "10202231613",
     "hs_pipeline": "companies-lifecycle-pipeline",
     "hs_updated_by_user_id": "10233975",
     "hs_user_ids_of_all_owners": "10233975",
     "hubspot_owner_assigneddate": "2022-11-29T19:11:33.392Z",
     "hubspot_owner_id": "198670650",
     "hubspot_team_id": "12073943",
     "lifecyclestage": "opportunity",
     "state": "New Jersey"
     },
     "createdAt": "2022-11-29T19:11:33.392Z",
     "updatedAt": "2022-11-30T18:19:31.603Z",
     "archived": false
    }​
    

If you use the above example and test only updating State, will it work as expected?

Best,

Jaycee