---
schema_version: "1"
id: 05df5b5affd0530f290f2aae5bf9d389672500b83dcf7a7399c4337359ad23bd
title: getMasterCarts Method
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-t-getmastercarts-method.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-t-getmastercarts-method.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 22101006a2fa14dd35ce38f52c71261ea80186b778da39b334874afb426af652
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# getMasterCarts Method

Returns a list of master carts (quotes and orders) for an opportunity.

<!-- Section title is the name of the method followed by "Method". If appropriate, precede the method name with the class name and a colon.-->

## Class

<!-- broken link-->

<!-- Link(s) to the class(es) to which this method belongs. If more than one class implements the same interface, use an itemized list. Don't use a link if the class itself isn't documented for users, but do list the class name.-->


## Input Parameters

<!-- If this method has separate input and output parameters, split this section into two sections titled "Input Parameters" and "Output Parameters". Some methods of classes that implement VlocityOpenInterface2 might require an "Options Parameters" section as well.-->

| Parameter | Required                         | Description     |
| --------- | -------------------------------- | --------------- |
| parentId  | Required                         | Opportunity ID. |
| cartType  | Optional: Default value is Quote | Quote or order. |

## Output Parameters

| Parameter | Description                              |
| --------- | ---------------------------------------- |
| result    | Contains an array of master cart object. |

## Example Input Data

<!-- This is usually JSON, but it could be XML or a single value. For methods of classes implementing VlocityOpenInterface2 that have options parameters, include those here.-->

```
{"parentId":"0064x000002RPeOAAW","cartType":"Quote"}
```

## Example Output Data

<!-- This is usually JSON, but it could be XML or a single value. Salesforce uses Return Type, but this takes care of that.-->

```
{"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"}
```
