<div class="doc-version" data-version="unstable"> <p>A cart represents the merchandise that a buyer intends to purchase, and the cost associated with the cart.</p> <div> <h2 id="on-this-page">On this page</h2> <ul> <li> <a href="#fields-unstable"> Fields </a> </li> <li> <a href="#types-that-return-cart-unstable"> Types that return Cart </a> </li> </ul> </div> <h2 id="fields-unstable"> Fields </h2> <ul class="fields"> <li> <div class="field" id="attribute-unstable"> <div class="field-name"> attribute (<a href="/api/functions/reference/discounts-allocator/graphql/common-objects/attribute"><code>Attribute</code></a>) </div> <div> <p>The attributes associated with the cart. Attributes are represented as key-value pairs.</p> </div> </div> <div class="arguments-table"> <table> <tr> <th>Argument</th> <th>Description</th> </tr> <tr class="field-argument"> <td class="argument-name"> <code>key</code> (<a href="/api/functions/reference/discounts-allocator/graphql/scalar#string-unstable"> <code>String</code> </a>) </td> <td class="argument-description"> <p>The key of the attribute to retrieve.</p> </td> </tr> </table> </div> </li> <li> <div class="field" id="buyeridentity-unstable"> <div class="field-name"> buyerIdentity (<a href="/api/functions/reference/discounts-allocator/graphql/common-objects/buyeridentity"><code>BuyerIdentity</code></a>) </div> <div> <p>Information about the buyer that is interacting with the cart.</p> </div> </div> </li> <li> <div class="field" id="cost-unstable"> <div class="field-name"> cost (<a href="/api/functions/reference/discounts-allocator/graphql/common-objects/cartcost"><code>CartCost!</code></a>) </div> <div> <p>The costs that the buyer will pay at checkout.</p> </div> </div> </li> <li> <div class="field" id="deliverablelines-unstable"> <div class="field-name"> deliverableLines (<a href="/api/functions/reference/discounts-allocator/graphql/common-objects/deliverablecartline"><code>[DeliverableCartLine!]!</code></a>) </div> <div> <p>A list of lines containing information about the items that can be delivered.</p> </div> </div> </li> <li> <div class="field" id="deliverygroups-unstable"> <div class="field-name"> deliveryGroups (<a href="/api/functions/reference/discounts-allocator/graphql/common-objects/cartdeliverygroup"><code>[CartDeliveryGroup!]!</code></a>) </div> <div> <p>The delivery groups available for the cart based on the buyer's shipping address.</p> </div> </div> </li> <li> <div class="field" id="lines-unstable"> <div class="field-name"> lines (<a href="/api/functions/reference/discounts-allocator/graphql/common-objects/cartline"><code>[CartLine!]!</code></a>) </div> <div> <p>A list of lines containing information about the items the customer intends to purchase.</p> </div> </div> </li> <li> <div class="field" id="localizedfields-unstable"> <div class="field-name"> localizedFields (<a href="/api/functions/reference/discounts-allocator/graphql/common-objects/localizedfield"><code>[LocalizedField!]!</code></a>) </div> <div> <p>The localized fields available for the cart.</p> </div> </div> <div class="arguments-table"> <table> <tr> <th>Argument</th> <th>Description</th> </tr> <tr class="field-argument"> <td class="argument-name"> <code>keys</code> (<a href="/api/functions/reference/discounts-allocator/graphql/common-objects/localizedfieldkey"> <code>[LocalizedFieldKey!]!</code> </a>) <span class="heading-flag">required</span> </td> <td class="argument-description"> <p>The keys of the localized fields to retrieve.<br>Default value: <code>[]</code></p> </td> </tr> </table> </div> </li> </ul> <h2 id="types-that-return-cart-unstable"> Types that return Cart </h2> <ul> <li> <a href="/api/functions/reference/discounts-allocator/graphql/input#cart-unstable"> <code>Input.cart</code> </a> </li> </ul> </div>