Get Quote Document
The Get Quote Document endpoint allows you to retrieve the finalized output file (such as a PDF, Word, or Excel document) for any submitted quote. This endpoint is can be used for organizations that need to push contracts into external repositories, such as Ironclad, or integrate DealHub-generated documents into downstream systems like ERPs.
Prerequisites
Before using this endpoint, ensure you have:
-
A DealHub Authentication Token: Your API request must include a secret Bearer Token in the
Authorizationheader. -
A DealHub Quote ID: The unique identifier for the quote. You can get the ID when a quote is submitted or won via Webhook.
Submitted StatusDocument retrieval is supported for submitted quotes. It is not supported for quotes currently in
Draftstatus.
How to Get a Quote Document
To retrieve a document, you will make a GET request to the document sub-resource of a specific quote.
You need to have the dealhub_quote_id, which is returned by the API and by the Webhooks.
Step 1: Construct the Request
Send a GET request to the /api/v1/quote/{dealhub_quote_id}/document endpoint.
curl --location 'https://api.dealhub.io/api/v1/quote/<YOUR_QUOTE_ID>/document?document_type=PDF' \
--header 'Authorization: Bearer <YOUR_SECRET_TOKEN>'
By default, the API returns the document in the format used by the salesperson. You can use the document_type query parameter to request a specific format.
| Parameter | Type | Description |
|---|---|---|
document_type | Query | Optional. Specifies the format: PDF, WORD, or EXCEL. |
Excel File RequirementA quote can only be retrieved in
EXCELformat if the specific quote playbook was explicitly configured to allow Excel output.
Step 2: Handle the Response
If the request is successful, the API returns an HTTP 200 (Success) status code.
The response body contains the raw file data (application/octet-stream). Your application should save this binary stream as a file with the appropriate extension (e.g., .pdf or .docx).
Next Steps
Now that you have retrieved the quote document, you can move forward to:
-
Get DealRoom Signers: Learn how to retrieve details of who signed the contract and when.
-
Webhooks Guide: Learn how to automate this document retrieval by listening for "Won" or "Submitted" events.
Updated 11 days ago
