Home > @poq/sdk-sfcc > CartService > getCart
Method returns user cart or new when cart does not exist.
Signature:
getCart(authInfo: AuthInfo, customerId: string, appIdentifier: string, poqUserId: string, currencyCode: string, isGuest: boolean, locale?: string): Promise<PoqResponse<CartWithProductsResponse>>;
Parameter | Type | Description |
---|---|---|
authInfo | AuthInfo | The auth info to make request (credentials or token). |
customerId | string | The customer id. |
appIdentifier | string | The unique guid v4 app identifier. |
poqUserId | string | The unique identifier of the poq user. |
currencyCode | string | The ISO currency code is the three-letter alphabetic code that represent the various currencies used throughout the world. |
isGuest | boolean | The flag indicates whether user is guest. |
locale | string | (Optional) The indicator carries information about locale. |
Returns:
Promise<PoqResponse<CartWithProductsResponse>>
The user’s Cart with products.