How to get the Company Field Id after adding via HQ

How to get the Company Field Id after adding via HQ

ifrankel
Participant Participant
742 Views
3 Replies
Message 1 of 4

How to get the Company Field Id after adding via HQ

ifrankel
Participant
Participant

This is my second post on this subject. I'll try to be more concise this time around.

 

I'm trying to add companies to projects using the fieldapi/companies/v1/add_to_projects api. The problem is I don't have the necessary Field id for each company. I've added these companies via the POST hq/v1/accounts/:account_id/companies. I see them when I retrieve using the GET hq/v1/accounts/:account_id/companies api, but don't see them when I use the GET fieldapi/companies/v1 api. How can I get the Field api for a company I've added via the HQ api?
 
BTW, I'm able to get the field id for projects I've added via HQ without problem.
 
(Also, see my previous post for problems trying to add projects using the Field api.)

0 Likes
Accepted solutions (1)
743 Views
3 Replies
Replies (3)
Message 2 of 4

mikako_harada
Community Manager
Community Manager

Hi ifrankel, 

 

 

We had a similar inquiry in the past.  Unfortunately, there is no method to get the direct association between the two.  

 

 

https://forums.autodesk.com/t5/bim-360-api-forum/link-between-field-companies-and-bim360-hq-companie...

 

I logged a wish against this: 

 

EA-6326  Link between Field company ID and HQ company ID 

 

Our colleague tells me that for some projects, they use prefix to the company name which comes from their internal ERP system. Other than that, you will need to use names at this point as a workaround.  

I know it's not ideal.  But still adding a note.  

 


Mikako Harada
Developer Technical Services
0 Likes
Message 3 of 4

ifrankel
Participant
Participant

Therefore, if I need to add a list of companies for each Field project, instead of using the fieldapi/companies/v1/add_to_projects api (which requires the company Field Id)  I will need to create a company spreadsheet for each project and have the user import it--the same as I'm doing with project locations. Is this correct?

 

0 Likes
Message 4 of 4

mikako_harada
Community Manager
Community Manager
Accepted solution

Hi ifrankel, 

 

Using an excel import in UI seems to be the best option here.  

 

As a side note, I see 

 

GET /fieldapi/companies/v1 

 

returns list of companies. Without project_id, all companies from the user's account will be returned. 

 

It has hq_identifier and id. But I also notice that the account is based on "current" project in the Field UI.  So if your last project happens to be not under your own account, this does not work.  

 


Mikako Harada
Developer Technical Services