Arguments

id
ID!
required

The ID of the Cart

fetchBuyerIdentity
Boolean

Set to true by default. If set to true, the buyerIdentity field will be fetched in the response.

fetchCartLines
Boolean

Set to true by default. If set to true, the cartLines field will be fetched in the response.

fetchOffer
Boolean

Set to true by default. If set to true, the offers field will be fetched in the response.

fetchShippingMethods
Boolean

Set to true by default. If set to true, the shippingMethods field will be fetched in the response.

Returns

CartResponse.*
CartResponse

Any requested field from the CartResponse object.

Usage

import { RyeClient, Marketplace } from "@rye-api/rye-sdk";

const ryeClient = new RyeClient("<AUTH_HEADER>", "<SHOPPER_IP>");

const result = await ryeClient.getCart({
  id: "<CART_ID>",
  fetchBuyerIdentity: false, // Set to true to fetch buyer identity
  fetchOffer: false, // Set to true to fetch offers for each store
  fetchCartLines: false, // Set to true to fetch cart lines
  fetchShippingMethods: false, // Set to true to fetch shipping methods
});