Skip to main content
GET
/
api
/
v1
/
locations
/
{locationId}
/
carts
/
{cartId}
Retrieve a Cart
curl --request GET \
  --url https://api.cravejs.com/api/v1/locations/{locationId}/carts/{cartId} \
  --header 'X-API-Key: <api-key>'
{
  "id": "64a7b8c9d1e2f3a4b5c6d7e8",
  "locationId": "64a7b8c9d1e2f3a4b5c6d7e9",
  "items": [
    {
      "id": "64a7b8c9d1e2f3a4b5c6d7ea",
      "productId": "64a7b8c9d1e2f3a4b5c6d7eb",
      "productName": "Margherita Pizza",
      "quantity": 2,
      "price": "33.98",
      "modifiers": [
        {
          "groupName": "Size",
          "optionName": "Large (14\")",
          "price": "3.00"
        }
      ],
      "specialInstructions": "Extra cheese please"
    }
  ],
  "discountCode": "SAVE10",
  "currency": "usd",
  "fulfilmentMethod": "takeout",
  "statementDescriptor": "Downtown Pizza",
  "subTotal": "33.98",
  "discountTotal": "3.40",
  "waiterTipTotal": "6.12",
  "taxAndFeeTotal": "4.58",
  "taxTotal": "2.72",
  "serviceFeeTotal": "0.86",
  "deliveryFeeTotal": "1.00",
  "orderTotalWithServiceFee": "41.28",
  "orderTotalWithServiceFeeAmount": 4128,
  "restaurantDisplayName": "Downtown Pizza",
  "orderTime": "12:30 PM",
  "orderDate": "Mon, Jan 15 2024",
  "fees": {
    "enterpriseFeeRate": "0.0000",
    "enterpriseFeeFix": "0.00",
    "serviceFeeRate": "0.025",
    "serviceFeeFix": "0.00",
    "taxRate": "0.0875",
    "tipRate": "0.18",
    "deliveryFeeFix": "1.00",
    "deliveryFeeRate": "0.0000"
  },
  "tableServiceInfo": {
    "tableNumber": ""
  },
  "roomServiceInfo": {
    "lastName": "",
    "roomNumber": ""
  },
  "deliveryInfo": {
    "deliveryAddress": "123 Main St, San Francisco CA 94102",
    "lat": 37.7749,
    "lng": -122.4194
  },
  "pickupType": "ASAP",
  "fulfillmentIdentifier": "takeout",
  "totalQuantity": 2,
  "checkoutUrl": "https://checkout.craveup.com/locations/64a7b8c9d1e2f3a4b5c6d7e9/carts/64a7b8c9d1e2f3a4b5c6d7e8"
}

Path Parameters

locationId
string
required
The unique identifier for the restaurant location
cartId
string
required
The unique identifier for the cart
{
  "id": "64a7b8c9d1e2f3a4b5c6d7e8",
  "locationId": "64a7b8c9d1e2f3a4b5c6d7e9",
  "items": [
    {
      "id": "64a7b8c9d1e2f3a4b5c6d7ea",
      "productId": "64a7b8c9d1e2f3a4b5c6d7eb",
      "productName": "Margherita Pizza",
      "quantity": 2,
      "price": "33.98",
      "modifiers": [
        {
          "groupName": "Size",
          "optionName": "Large (14\")",
          "price": "3.00"
        }
      ],
      "specialInstructions": "Extra cheese please"
    }
  ],
  "discountCode": "SAVE10",
  "currency": "usd",
  "fulfilmentMethod": "takeout",
  "statementDescriptor": "Downtown Pizza",
  "subTotal": "33.98",
  "discountTotal": "3.40",
  "waiterTipTotal": "6.12",
  "taxAndFeeTotal": "4.58",
  "taxTotal": "2.72",
  "serviceFeeTotal": "0.86",
  "deliveryFeeTotal": "1.00",
  "orderTotalWithServiceFee": "41.28",
  "orderTotalWithServiceFeeAmount": 4128,
  "restaurantDisplayName": "Downtown Pizza",
  "orderTime": "12:30 PM",
  "orderDate": "Mon, Jan 15 2024",
  "fees": {
    "enterpriseFeeRate": "0.0000",
    "enterpriseFeeFix": "0.00",
    "serviceFeeRate": "0.025",
    "serviceFeeFix": "0.00",
    "taxRate": "0.0875",
    "tipRate": "0.18",
    "deliveryFeeFix": "1.00",
    "deliveryFeeRate": "0.0000"
  },
  "tableServiceInfo": {
    "tableNumber": ""
  },
  "roomServiceInfo": {
    "lastName": "",
    "roomNumber": ""
  },
  "deliveryInfo": {
    "deliveryAddress": "123 Main St, San Francisco CA 94102",
    "lat": 37.7749,
    "lng": -122.4194
  },
  "pickupType": "ASAP",
  "fulfillmentIdentifier": "takeout",
  "totalQuantity": 2,
  "checkoutUrl": "https://checkout.craveup.com/locations/64a7b8c9d1e2f3a4b5c6d7e9/carts/64a7b8c9d1e2f3a4b5c6d7e8"
}

Authorizations

X-API-Key
string
header
required

Path Parameters

locationId
string
required

The unique identifier for the restaurant location

cartId
string
required

The ID of the cart to retrieve.

Response

Cart retrieved successfully.

id
string

The unique ID of the cart.

locationId
string

The location ID associated with the cart.

items
object[]

An array of cart items with details.

discountCode
string

Applied discount code

currency
string

Currency code (e.g., 'usd')

fulfilmentMethod
string

Fulfillment method (e.g., 'takeout', 'delivery')

statementDescriptor
string

Statement descriptor for payment

subTotal
string

Subtotal amount as formatted string

discountTotal
string

Total discount amount

waiterTipTotal
string

Total tip amount calculated from tip rate (formatted currency string)

taxAndFeeTotal
string

Combined tax and fee total

taxTotal
string

Total tax amount

serviceFeeTotal
string

Total service fee

deliveryFeeTotal
string

Total delivery fee

orderTotalWithServiceFee
string

Final order total including service fee

orderTotalWithServiceFeeAmount
integer

Final order total in cents

restaurantDisplayName
string

Restaurant display name

orderTime
string

Order time (e.g., '12:30 PM')

orderDate
string

Order date (e.g., 'Mon, Jan 15 2024')

fees
object

Fee configuration details

tableServiceInfo
object
roomServiceInfo
object
deliveryInfo
object
pickupType
string

Pickup type (e.g., 'ASAP')

fulfillmentIdentifier
string

Fulfillment identifier

totalQuantity
integer

Total quantity of all items

checkoutUrl
string

URL for checkout