# Associations v4 documentation need some correction (python)

**URL:** <https://community.hubspot.com/t/associations-v4-documentation-need-some-correction-python/85709>\
**Category:** APIs & Integrations\
**Tags:** python\
**Created:** [July 19, 2023, 10:14pm UTC](https://community.hubspot.com/t/associations-v4-documentation-need-some-correction-python/85709 "2023-07-19T22:14:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TGJW](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@TGJW](https://community.hubspot.com/u/TGJW)\
**Post date:** [July 19, 2023, 10:14pm UTC](https://community.hubspot.com/t/associations-v4-documentation-need-some-correction-python/85709/1 "2023-07-19T22:14:27Z")

</div>

Im trying to do association between two object in workflow and Im able to trigger it inside the documentation page however the coding will not work in visual studio code or Hubspot workflow custom code

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fapi-reference%2Fcrm-associations-v4%2Fguide)**

and figuare out out the funtion display on documentation and the physical libraries’s function is different.

 ![TGJW_1-1689804645190.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/d/1d275dcc93c0f4ed713e5ab3b531e181e01d2c0f.png)

issue line \>\> api\_response = client.crm.associations.v4.basic\_api.put\_crm\_v4\_objects\_from\_object\_type\_from\_object\_id\_associations\_default\_to\_object\_type\_to\_object\_id(from\_object\_type=“ID”, from\_object\_id=ID, to\_object\_type=“ID”, to\_object\_id=ID)

function to change to make it work.

- from (show on documentation)
  - put\_crm\_v4\_objects\_from\_object\_type\_from\_object\_id\_associations\_default\_to\_object\_type\_to\_object\_id

- to (for code editor) inside the libraies of basic\_api.py file line 348 is the funtion that make it work
  - create\_default

another issues is this libraries does not work in workflow custom code

---

<div class="post-metadata">

**Author:** ![TGJW](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@TGJW](https://community.hubspot.com/u/TGJW)\
**Post date:** [August 17, 2023, 4:47pm UTC](https://community.hubspot.com/t/associations-v4-documentation-need-some-correction-python/85709/2 "2023-08-17T16:47:35Z")

</div>

Thank you for the reply, yes after change to create\_default it work.
