---
schema_version: "1"
id: 301a1e668cce0421231ae7fd6d39d23584b7a50eaca6c3637c13254961a2c031
title: Get Insurance Quote Details Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/actions_obj_quote_details.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/actions_obj_quote_details.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: db3860f790ed10fe816528dacad6bbdc5565d5cdecf24d5df537a3ec5934a6fc
description: Get the details of an insurance quote.
---
# Get Insurance Quote Details Action

Get the details of an insurance quote.

This action is available in API version 63.0 and later.

## Supported REST HTTP Methods

**URI**: /services/data/vXX.X/actions/standard/getInsuranceQuoteDetails

Where XX.X is the latest API version.

**Formats**: JSON

**HTTP Methods**: GET, POST

**Authentication**: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

## Inputs

| Input | Type | Description |
| --- | --- | --- |
| quoteId | String | Required. ID of the insurance quote to get the details for. |
| filters | String | Optional. The filters used to filter the insurance quote or line items associated with the insurance quote. |

## Outputs

<table class="featureTable sort_table" summary="">


          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d543105e158">Output</th>

              <th class="featureTableHeader  " id="d543105e161">Details</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d543105e158" data-title="Output"><span class="keyword parmname">contextId</span></td>

              <td class="entry" headers="d543105e161" data-title="Details">
                <strong class="ph b">Type</strong>
                <p class="p">String</p>
                <strong class="ph b">Description</strong>
                <p class="p">Context ID of the insurance quote that's
                  created.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d543105e158" data-title="Output"><span class="keyword parmname">contextJson</span></td>

              <td class="entry" headers="d543105e161" data-title="Details">
                <strong class="ph b">Type</strong>
                <p class="p">Map&lt;String, Object&gt;</p>
                <strong class="ph b">Description</strong>
                <p class="p">List of insurance context
                  details.</p>
              </td>

            </tr>

          </tbody>

        </table>

## Example

Sample Request

{
  "inputs": 
  \[
      {
        "quoteId": "0Q0xx0000004CXECA2"
      }
  \]
}

This is a sample request to call this invocable action from Apex code.

// Sample Apex call for getInsuranceQuoteDetails invocable action
public class GetInsuranceQuoteDetailsInvoke {
    private static final String ACTION\_NAME = 'getInsuranceQuoteDetails';

    public static Boolean invokeMethod(Map<String, Object> inputs, Map<String, Object> output) {
        if (output == null) {
            output = new Map<String, Object>();
        }

        try {
            Invocable.Action action = Invocable.Action.createStandardAction(ACTION\_NAME);

            // Optional inputs
            setInvocationParameter(action, inputs, 'quoteId', false);
            setInvocationParameter(action, inputs, 'filters', false);

            List<Invocable.Action.Result> results = action.invoke();
            if (results != null && !results.isEmpty() && results\[0\].isSuccess()) {
                output.put('output', results\[0\].getOutputParameters());
                output.put('success', true);
                return true;
            }

            output.put('success', false);
            if (results != null && !results.isEmpty()) {
                output.put('errors', results\[0\].getErrors());
            }
            return false;
        } catch (Exception e) {
            output.put('success', false);
            output.put('errorMessage', e.getMessage());
            return false;
        }
    }

    private static void setInvocationParameter(
        Invocable.Action action,
        Map<String, Object> payload,
        String attribute,
        Boolean serializeJson
    ) {
        if (payload != null && payload.containsKey(attribute) && payload.get(attribute) != null) {
            if (serializeJson) {
                action.setInvocationParameter(attribute, JSON.serialize(payload.get(attribute)));
            } else {
                action.setInvocationParameter(attribute, payload.get(attribute));
            }
        }
    }
}

Sample Response

\[
  {
    "actionName": "getInsuranceQuoteDetails",
    "errors": null,
    "invocationId": null,
    "isSuccess": true,
    "outcome": null,
    "outputValues": {
      "contextId": "0000000i18tq18g00291753491555889e8ef669a59f0453fade5acbe4595a3d6",
      "contextJson": {
        "SalesTransaction": \[
          {
            "Status": "Draft",
            "Account": null,
            "BillingCity": null,
            "Subtotal": 1350,
            "businessObjectType": "Quote",
            "SalesTransactionName": "Multi Auto",
            "TotalAmount": 1350,
            "ShippingStreet": null,
            "SalesTransactionItem": \[
              {
                "ProrationPolicy": "0muxx000000004sAAA",
                "ProductName": "Medical Payments",
                "ProductCode": "STA-3",
                "ProductSellingModel": "0jPxx000000004sEAA",
                "SpecificationType": "Coverage",
                "TaxTreatment": "1ttxx000000004rAAA",
                "SalesTransactionItemParent": "0Q0xx0000004CE1CAM",
                "Quantity": 1,
                "Product": "01txx0000006i7KAAQ",
                "businessObjectType": "QuoteLineItem",
                "PricebookEntry": "01uxx0000008ybrAAA",
                "PricingTermCount": 1,
                "StartDate": "2023-10-19T00:00:00Z",
                "NetUnitPrice": 750,
                "UnitPrice": 750,
                "id": "0QLxx0000004CIpGAM"
              },
              {
                "ProrationPolicy": null,
                "ProductName": "Collision",
                "ProductCode": "STA-2",
                "ProductSellingModel": "0jPxx000000004tEAA",
                "SpecificationType": "Coverage",
                "TaxTreatment": "1ttxx000000004rAAA",
                "SalesTransactionItemParent": "0Q0xx0000004CE1CAM",
                "Quantity": 1,
                "Product": "01txx0000006i7JAAQ",
                "businessObjectType": "QuoteLineItem",
                "PricebookEntry": "01uxx0000008ybsAAA",
                "PricingTermCount": 1,
                "StartDate": null,
                "NetUnitPrice": 500,
                "UnitPrice": 500,
                "id": "0QLxx0000004CIqGAM"
              }
            \],
            "BillingCountry": null,
            "BillingStreet": null,
            "Pricebook": "01sxx0000005pyfAAA",
            "Opportunity": null,
            "ShippingPostalCode": null,
            "SalesTransactionSource": "0Q0xx0000004CE1CAM",
            "ShippingCountry": null,
            "ShippingCity": null,
            "ShippingState": null,
            "BillingPostalCode": null,
            "id": "0Q0xx0000004CE1CAM",
            "Contract": null,
            "BillingState": null
          }
        \]
      }
    },
    "sortOrder": -1,
    "version": 1
  }
\]