• Créditos da HubSpot: Desbloqueie ferramentas poderosas para o crescimento

    Dúvidas?

Getting Quotes file size

RSPerera1
Membro

Hi,

I have a requirement to download the quotes via API. For that im using batch read endpoint and get the hs_download_link to download the quote. But I need to get the file_size for that paticular file. How can i do that?

Also is there any way to get the published quote attachment id? If so then we can use it to get the file related details.

 

Thank you

0 Avaliação positiva
1 Solução aceita
PamCotton
Solução
Alunos da HubSpot
Alunos da HubSpot

Hey @RSPerera1, A HEAD request to hs_download_link should have minimal impact on your HubSpot API rate limits, as it doesn’t retrieve the full response body.

 

 However, it still counts as an API call, so if you're making frequent requests, it's good to monitor usage. 

 

You can check HubSpot’s API rate limits in your developer settings to ensure sustainability.

 

Pam

Exibir solução no post original

0 Avaliação positiva
3 Respostas 3
PamCotton
Alunos da HubSpot
Alunos da HubSpot

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

 

To get the file size for a quote, you can make a HEAD request to the hs_download_link. The Content-Length header in the response will provide the file size in bytes without requiring you to download the file.

Regarding the published quote attachment ID, it isn’t directly available via the Quotes API. You might need to explore related objects or associations through the CRM API to retrieve additional details.

 

To our top experts @Anton and @DanielSanchez do you have any recommendations for @RSPerera1 matter?

 

Thank you,

Pam

0 Avaliação positiva
RSPerera1
Membro

Hi @PamCotton 

Thank you for the response.

 

I just have one concern—will making a HEAD request to the hs_download_link impact the API rate limits in HubSpot? Understanding this will help me ensure the method is both efficient and sustainable.

 

Looking forward to your insights!

Best regards,

Ravidu

0 Avaliação positiva
PamCotton
Solução
Alunos da HubSpot
Alunos da HubSpot

Hey @RSPerera1, A HEAD request to hs_download_link should have minimal impact on your HubSpot API rate limits, as it doesn’t retrieve the full response body.

 

 However, it still counts as an API call, so if you're making frequent requests, it's good to monitor usage. 

 

You can check HubSpot’s API rate limits in your developer settings to ensure sustainability.

 

Pam

0 Avaliação positiva