# getMasterCarts Method

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

## Class

## Input Parameters

| 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

```
{"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"}
```
