CRM

sgupta046
Member

How to get all the note Ids for a given file Id using API ?

I want to know the notes which are using a particular file, and thus want the list of all noteIds associated with a file (i.e. noteIds for all the note which are having file as an attachment)  using Hubspot API.

Currently API available is to get the attachment id for a particular note.

0 Upvotes
4 Replies 4
PamCotton
Community Manager
Community Manager

How to get all the note Ids for a given file Id using API ?

Hey @sgupta046, thank you for posting in our Community!

 

Use the existing API endpoint to get the attachment IDs associated with the file ID you're interested in. This is the current API you mentioned. Once you have the attachment IDs, you can then use another API endpoint to retrieve the note IDs associated with those attachment IDs.

 

To our top experts @Anton and @franksteiner79 do you have any recommendations for @sgupta046 matter?

 

Thank you,

Pam

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes
sgupta046
Member

How to get all the note Ids for a given file Id using API ?

Can you let me know the API to get noteIds associated with a particular attachment Id.

0 Upvotes
PamCotton
Community Manager
Community Manager

How to get all the note Ids for a given file Id using API ?

Hey @sgupta046 To retrieve all note IDs associated with a specific attachment ID in HubSpot using the API, you would typically utilize the HubSpot CRM Associations API. This API allows you to fetch associations between different types of objects, such as contacts, companies, deals, and attachments. Specifically, you'll want to focus on the GET /crm-associations/v1/associations endpoint.

 

Kindly,

Pam

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes
sgupta046
Member

How to get all the note Ids for a given file Id using API ?

Hey @PamCotton, I have read the entire documentation, but there is no API in associations for getting all noteIds associated with attachment. This association API is for objects like deals,tickets, notes, etc. and attachment is not an object.

Also my use case is to get all the noteIds for a particular attachmentId (not the vice versa of it). The issue is to get attachment Ids, I need to make 2 API calls.
First, get all the engagement ids(noteIds) for a particular deal(object). Second, for each engagementId (by iterating each one of them) and check whether that particular attachment Id is there or not (by making another API call). And this complete operation is time taking. 

So I just need an API (if there is any) from which I can directly get all the noteIds for a particular attachment.

0 Upvotes