# Returning Primary company using API

**URL:** <https://community.hubspot.com/t/returning-primary-company-using-api/67176>\
**Category:** APIs & Integrations\
**Created:** [October 14, 2022, 5:01pm UTC](https://community.hubspot.com/t/returning-primary-company-using-api/67176 "2022-10-14T17:01:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PAtlan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/patlan/32/42298_2.png) [@PAtlan](https://community.hubspot.com/u/PAtlan)\
**Post date:** [October 14, 2022, 5:01pm UTC](https://community.hubspot.com/t/returning-primary-company-using-api/67176/1 "2022-10-14T17:01:58Z")

</div>

The v4 Associations api mentions that it’s possible to fetch the primary company of a contact, but I can’t for the life of me figure out how. I’ve listed all available Contact / Company associations, but I never see the label primary.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [October 17, 2022, 4:11pm UTC](https://community.hubspot.com/t/returning-primary-company-using-api/67176/2 "2022-10-17T16:11:38Z")

</div>

Hi, @PAtlan 👋 Thanks for reaching out. One question – can you provide a specific example request and response, please? This can help the community to better understand the issue.

I ran a quick test:

Endpoint

`GET /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}`

Request

```lia-code-sample
curl --request GET \
 --url 'https://api.hubapi.com/crm/v4/objects/0-1/451/associations/0-2?limit=500' \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

```

Response

```lia-code-sample
HTTP 200

{
 "results": [
 {
 "toObjectId": 9291675216,
 "associationTypes": [
 {
 "category": "HUBSPOT_DEFINED",
 "typeId": 1,
 "label": "Primary"
 },
 {
 "category": "HUBSPOT_DEFINED",
 "typeId": 279,
 "label": null
 }
 ]
 },
 {
 "toObjectId": 9359036308,
 "associationTypes": [
 {
 "category": "HUBSPOT_DEFINED",
 "typeId": 279,
 "label": null
 }
 ]
 }
 ]
}

```

Thanks for the additional details! — Jaycee
