# Get Cart v2.0Beta

The Get Cart endpoint retrieves an entire cart. A cart record will be returned with all items and their options.

# Request

GET /v2.0/customers/{profileKey}/carts/{cartId}

# Authorization

An OAuth 2.0 Bearer token with the Cart.Read scope is required. For more information, see Authentication.

# Path Parameters

A list of the supported path parameters is described below.

Name Required Type Description
profileKey true guid The profile key for the customer. This value can be retrieved from the profileKey claim in the token returned from our SSO solution.
cartId true guid The cart id for the cart. This value is returned when a cart is created.

# Response

200
OK
Returns a Cart resource wrapped in an ApiResponse envelope.

# Response Body

The endpoint returns our ApiResponse envelope. The data property of the response will contain a Cart resource.

# Sample

{
    "message": "The operation succeeded!",
    "notifications": [],
    "data": {
        "id": "672fb54a-db33-4549-b55e-90963b721e23",
        "profileKey": "25b7726e-8416-5b13-a54a-b7fae6518b8g",
        "restaurantKey": 1352,
        "partnerKey": "0013",
        "items": [
            {
                "id": "c0b7c57d-7da4-400f-b67a-7b85fd709c0c",
                "menuKey": "ROCO-ZA-3",
                "menuVersion": 202107,
                "menuItemKey": 811000176,
                "displayName": "Classic Cheese Burger",
                "currency": "ZAR",
                "price": 69.00,
                "quantity": 1,
                "value": 88.00,
                "options": [
                    {
                        "optionSetKey": 861000001,
                        "optionSetItemKey": 811000011,
                        "displayName": "Beef",
                        "currency": "ZAR",
                        "price": 0.00
                    },
                    {
                        "optionSetKey": 861000035,
                        "optionSetItemKey": 811000205,
                        "displayName": "Bacon",
                        "currency": "ZAR",
                        "price": 19.00
                    }
                ],
                "specialInstructions": null
            }
        ],
        "platform": "Branded App",
        "orderingChannel": "Call and Order",
        "fulfilmentChannel": "Takeaway",
        "currency": "ZAR",
        "subtotal": 88.00,
        "paymentTotal": 88.00,
        "tip": 0.00,
        "total": 88.00,
        "balance": 0.00,
        "payments": [
			{
				"paymentId": "349d54c0-4e9e-49c8-b82f-02dda08d69f9",
				"currency": "ZAR",
				"amount": 88.00,
				"createdOn": "2021-10-19T14:56:55.5214013+00:00"
			}
		],
        "note": "This is just an order level note for order.",
        "specialInstructions": "These are special instructions. They are special. Treat them with care",
        "expiresOn": "2021-10-19T15:27:07+00:00",
        "createdOn": "2021-10-19T14:51:05.5214013+00:00",
        "modifiedOn": "2021-10-19T14:57:07+00:00"
    }
}

# Errors

The standard error responses apply.

401
Unauthorized
When authentication fails.
403
Forbidden
When authorisation fails.
404
Not Found
When the cart cannot be found.