How to "attach" a project to a contact using the REST apis?

lock
push_pin
done
Besvart
3

We are making an export from our systems into SuperOffice, and the goal is to export all contacts, projects and persons.

So far all separate collections has been exported and works as expected, in that we can find them in the CRM.

But it seems to be a possibility for "attaching" both persons and projects to a contact, but we cannot figure out how when using the REST api

By looking at the Contact api (https://docs.superoffice.com/en/api/reference/restful/rest/Contact/v1ContactEntity_PostContactEntity.html) the only thing I can find is the links-section, but that does not seem like the right thing.

I believe I can do a GET to Contact/{id}/projects, but I cannot find a POST Contact/{id}/projects

Basically, when opening a contact in the CRM, I would like to see both 'Contacts' and 'Projects' in the lower half populated.

Please advice

- Thomas

11. feb. 2025 | 08:36 p.m.

Alle Svar (3)

Hi Thomas,

Projects are linked to a person (and to the company of that person) using a projectmember. 

See https://docs.superoffice.com/en/api/reference/restful/rest/ProjectMember/index.html

Note: projects can only be linked to a company by linking a person of that company to the project, you can't link a company directly.

11. feb. 2025 | 08:44 p.m.
Thank you for your assistance David, and I am glad I asked because that would have taken me ages to figure out :)
12. feb. 2025 | 07:20 a.m.

Just another perspective. Checkout all the database table reference charts under the Technical Resources area.

12. feb. 2025 | 07:59 a.m.

Legg til svar