---
schema_version: "1"
id: 36afe797a3492739b116beaea92713cb543db652ba1a804dc7ba8e1211495612
title: getMasterCarts Method
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_t_getmastercarts_method_215293.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_t_getmastercarts_method_215293.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a3f67ca536a37d0321aa28d0d5dbdba807537315209937c962db27794e5d94d5
description: Returns a list of master carts (quotes and orders) for an opportunity.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# getMasterCarts Method

Returns a list of master carts (quotes and orders) for an opportunity.

## Class

## Input Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d297978e44">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d297978e50">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d297978e56">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d297978e44 ">
              <p style="margin-bottom:0;">parentId</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d297978e50 ">
              <p style="margin-bottom:0;">Required</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d297978e56 ">
              <p style="margin-bottom:0;">Opportunity ID.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d297978e44 ">
              <p style="margin-bottom:0;">cartType</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d297978e50 ">
              <p style="margin-bottom:0;">Optional: Default value is Quote</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d297978e56 ">
              <p style="margin-bottom:0;">Quote or order.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Output Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d297978e127">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d297978e133">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d297978e127 ">
              <p style="margin-bottom:0;">result</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d297978e133 ">
              <p style="margin-bottom:0;">Contains an array of master cart object.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Example Input Data

```
{"parentId":"0064x000002RPeOAAW","cartType":"Quote"}
```

## Example Output Data

```
{"result":[{"attributes":{"type":"Quote","url":"/services/data/v50.0/sobjects/Quote/0Q04x000000gUjNCAU"},"Id":"0Q04x000000gUjNCAU","Name":"M-2","RecordTypeId":"0124x000000t0c8AAA"},{"attributes":{"type":"Quote","url":"/services/data/v50.0/sobjects/Quote/0Q04x000000gTvPCAU"},"Id":"0Q04x000000gTvPCAU","Name":"M-1","RecordTypeId":"0124x000000t0c8AAA"}],"error":"OK"}
```