Retrieve a Quote

This tutorial guides you through using the /api/v2/quote/{quote_id} endpoint. This is the most direct method to retrieve detailed information for a single, specific quote from DealHub when you already know its unique dealhub_quote_id.

Prerequisites

Before you begin, ensure you have:

  • Your DealHub Authentication Token.
  • A dealhub_quote_id.

How to Retrieve a Quote

To get information about a specifc quote, you will use the /api/v2/quote/ endpoint, providing the the quote's ID and feature parameters to specify which details you want to receive.

Step 1: Construct the Basic Request

To begin, make a GET request with the dealhub_quote_id placed directly in the URL path.

curl --location 'https://<YOUR_DEALHUB_URL>/api/v2/quote/<YOUR_QUOTE_ID>' \
--header 'Authorization: Bearer <SECRET_TOKEN_PROVIDED_BY_CPQ_ADMIN>'

By default, without any feature parameters, the API returns a minimal response containing only the dealhub_quote_id, its current status, and whether a quote_upgrade_required is needed.

Step 2: Use feature Parameters to Add Detail

To get meaningful data, you must add one or more feature query parameters to your request. This allows you to retrieve only the specific parts of the quote that you need. The following table describes every information you can get using the feature parameter:

FeatureWhat it ReturnsWhen to Use It
infoGeneral quote information, including the external opportunity ID, customer details, and key dates.When you need to link the quote back to your CRM or get basic metadata.
summaryThe quote's financial summary, including total list price, net price, and discounts.For high-level financial overviews, such as populating a dashboard.
deal_room_infoThe URL for the quote's associated DealRoom (if published).To get a direct link to the customer-facing DealRoom for a specific quote.
line_itemsA detailed list of all products in the quote, including SKU, quantity, pricing, and discounts.For in-depth analysis of products sold or for archiving detailed transaction records.
answersAll questions from the Playbook and the specific answers provided for that quote.When analyzing the configuration choices that led to a quote's creation.
approvalsThe quote's approval history, including approvers, status, and comments.To track discount approval workflows and for auditing purposes.
allAll of the features listed above in a single response.Use this for a specific quote where you need to retrieve all available information at once.

The following code block shares a request example to get information about a specific quote, where features info and summary are requested:

curl --location 'https://<YOUR_DEALHUB_URL>/api/v2/quote/<YOUR_QUOTE_ID>?feature=info&feature=summary' \
--header 'Authorization: Bearer <SECRET_TOKEN_PROVIDED_BY_CPQ_ADMIN>'

Step 3: Handle the Response

A successful request will return a 200 OK status and a single JSON object representing the quote. This object will contain nested objects, one for each feature you requested.

{
  "dealhub_quote_id": "12345zWIwGV12344",
  "status": "ReadyToBeSent",
  "quote_upgrade_required": false,
  "info": {
    "external_opportunity_id": "2077636",
    "account_name": "Example Ltd",
    "dealhub_quote_name": "3 year quote",
    "currency": "USD"
    // ... more info fields
  },
  "summary": {
    "currency": "USD",
    "total_list_price": 458154.42,
    "total_net_price": 238042.66
    // ... more summary fields
  }
}

📘

Understanding quote_upgrade_required

If a Draft quote has this flag set to true, it means the quote was created in an older, now-inactive version. In this state, the API will not return any requested feature data. A user must first open the quote in the DealHub UI and save it to update it to the latest active version.

Next Steps

Now that you learned how to retrieve a quote, move forward to: