---
title: Gets a cart.
slug: cms-12/api/gets-a-cart
docTags: 
createdAt: 2026-08-28T13:16:06.833Z
---

{
  "id": "dnSzc4_rzP5W3MswPNIf5",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/api/episerver/v3.0/carts/{cartId}",
    "servers": [],
    "name": "Gets a cart.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "cartId",
          "type": "integer<int32>",
          "description": "The cart id.",
          "format": "int32"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "application/problem+json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Represents a cart.",
            "customType": "cart",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "The cart id.",
                "format": "int32"
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "The cart name."
              },
              {
                "name": "customerId",
                "kind": "optional",
                "type": "string<uuid>",
                "nullable": true,
                "description": "The customer the cart belongs to.",
                "format": "uuid"
              },
              {
                "name": "market",
                "kind": "required",
                "type": "string",
                "description": "The market in which the cart is valid."
              },
              {
                "name": "currency",
                "kind": "required",
                "type": "string",
                "description": "The currency of the market in which the cart is valid."
              },
              {
                "name": "lastUpdated",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "The last updated timestamp.",
                "format": "date-time"
              },
              {
                "name": "shipments",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "The shipments.",
                "modelRef": "#/components/schemas/shipment",
                "customType": "shipment[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "The shipping id.",
                    "format": "int32"
                  },
                  {
                    "name": "shippingAddress",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Represents a customer address\r\ntodo: associate with commerce customers via business foundation?\r\ntodo: add more properties.</p>",
                    "modelRef": "#/components/schemas/address",
                    "customType": "address",
                    "schema": [
                      {
                        "name": "firstName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The first name."
                      },
                      {
                        "name": "lastName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The last name."
                      },
                      {
                        "name": "line1",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The line1."
                      },
                      {
                        "name": "line2",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The line2."
                      },
                      {
                        "name": "city",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The city."
                      },
                      {
                        "name": "countryName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The country name."
                      },
                      {
                        "name": "countryCode",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The country code."
                      },
                      {
                        "name": "postalCode",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The postal code"
                      },
                      {
                        "name": "regionName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "<p>The region name/state</p>"
                      },
                      {
                        "name": "email",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The email."
                      },
                      {
                        "name": "phoneNumber",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The phone number."
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The name."
                      }
                    ]
                  },
                  {
                    "name": "shippingMethodId",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "The shipping method id.",
                    "format": "uuid"
                  },
                  {
                    "name": "lineItems",
                    "kind": "optional",
                    "type": "array",
                    "nullable": true,
                    "description": "the line items that belong to the cart.",
                    "modelRef": "#/components/schemas/lineItem",
                    "customType": "lineItem[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "The line item id.",
                        "format": "int32"
                      },
                      {
                        "name": "contentId",
                        "kind": "optional",
                        "type": "string<uuid>",
                        "description": "The content id.",
                        "format": "uuid"
                      },
                      {
                        "name": "code",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The sku code."
                      },
                      {
                        "name": "placedPrice",
                        "kind": "optional",
                        "type": "number<decimal>",
                        "description": "The placed price.",
                        "format": "decimal"
                      },
                      {
                        "name": "quantity",
                        "kind": "required",
                        "type": "number<decimal>",
                        "description": "The quantity.",
                        "format": "decimal"
                      },
                      {
                        "name": "displayName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The display name."
                      },
                      {
                        "name": "isGift",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "Indicates whether the line item is a gift item."
                      }
                    ]
                  }
                ]
              },
              {
                "name": "payments",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "The payments.",
                "modelRef": "#/components/schemas/payment",
                "customType": "payment[]",
                "schema": [
                  {
                    "name": "amount",
                    "kind": "optional",
                    "type": "number<decimal>",
                    "description": "Gets or sets the amount.",
                    "format": "decimal"
                  },
                  {
                    "name": "authorizationCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the authorization code."
                  },
                  {
                    "name": "billingAddress",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Represents a customer address\r\ntodo: associate with commerce customers via business foundation?\r\ntodo: add more properties.</p>",
                    "modelRef": "#/components/schemas/address",
                    "customType": "address",
                    "schema": [
                      {
                        "name": "firstName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The first name."
                      },
                      {
                        "name": "lastName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The last name."
                      },
                      {
                        "name": "line1",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The line1."
                      },
                      {
                        "name": "line2",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The line2."
                      },
                      {
                        "name": "city",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The city."
                      },
                      {
                        "name": "countryName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The country name."
                      },
                      {
                        "name": "countryCode",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The country code."
                      },
                      {
                        "name": "postalCode",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The postal code"
                      },
                      {
                        "name": "regionName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "<p>The region name/state</p>"
                      },
                      {
                        "name": "email",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The email."
                      },
                      {
                        "name": "phoneNumber",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The phone number."
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The name."
                      }
                    ]
                  },
                  {
                    "name": "savedBillingAddressName",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the billing address."
                  },
                  {
                    "name": "customerName",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the name of the customer."
                  },
                  {
                    "name": "paymentId",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "Gets the payment identifier.",
                    "format": "int32"
                  },
                  {
                    "name": "systemKeyword",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the name of the payment method."
                  },
                  {
                    "name": "paymentType",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the type of the payment."
                  },
                  {
                    "name": "providerTransactionID",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the provider transaction identifier."
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the status."
                  },
                  {
                    "name": "transactionID",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the transaction identifier."
                  },
                  {
                    "name": "transactionType",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the type of the transaction."
                  },
                  {
                    "name": "validationCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the validation code."
                  },
                  {
                    "name": "extendedProperties",
                    "kind": "optional",
                    "type": "array",
                    "nullable": true,
                    "description": "Custom properties added by partner or customer.",
                    "modelRef": "#/components/schemas/extendedProperty",
                    "customType": "extendedProperty[]",
                    "schema": [
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "Name of the property"
                      },
                      {
                        "name": "value",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The property value."
                      }
                    ]
                  }
                ]
              },
              {
                "name": "couponCodes",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "The coupon codes.",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/cart",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "sJ9Kvj2BLubegWisJCNEJ",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /api/episerver/v3.0/carts/{cartId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "HFvjbSm1SAcF_pRojjbCN",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/api/episerver/v3.0/carts/{cartId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "gHKOhwPddTieMNPm5yGXj",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/episerver/v3.0/carts/{cartId}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "3xvk0Xdcog9eeLRCg52A3",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/episerver/v3.0/carts/{cartId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "sJ9Kvj2BLubegWisJCNEJ"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"customerId\": \"\",\n  \"market\": \"\",\n  \"currency\": \"\",\n  \"lastUpdated\": \"\",\n  \"shipments\": [\n    {\n      \"id\": \"\",\n      \"shippingAddress\": {\n        \"firstName\": \"\",\n        \"lastName\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"city\": \"\",\n        \"countryName\": \"\",\n        \"countryCode\": \"\",\n        \"postalCode\": \"\",\n        \"regionName\": \"\",\n        \"email\": \"\",\n        \"phoneNumber\": \"\",\n        \"name\": \"\"\n      },\n      \"shippingMethodId\": \"\",\n      \"lineItems\": [\n        {\n          \"id\": \"\",\n          \"contentId\": \"\",\n          \"code\": \"\",\n          \"placedPrice\": \"\",\n          \"quantity\": \"\",\n          \"displayName\": \"\",\n          \"isGift\": false\n        }\n      ]\n    }\n  ],\n  \"payments\": [\n    {\n      \"amount\": \"\",\n      \"authorizationCode\": \"\",\n      \"billingAddress\": {\n        \"firstName\": \"\",\n        \"lastName\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"city\": \"\",\n        \"countryName\": \"\",\n        \"countryCode\": \"\",\n        \"postalCode\": \"\",\n        \"regionName\": \"\",\n        \"email\": \"\",\n        \"phoneNumber\": \"\",\n        \"name\": \"\"\n      },\n      \"savedBillingAddressName\": \"\",\n      \"customerName\": \"\",\n      \"paymentId\": \"\",\n      \"systemKeyword\": \"\",\n      \"paymentType\": \"\",\n      \"providerTransactionID\": \"\",\n      \"status\": \"\",\n      \"transactionID\": \"\",\n      \"transactionType\": \"\",\n      \"validationCode\": \"\",\n      \"extendedProperties\": [\n        {\n          \"name\": \"\",\n          \"value\": \"\"\n        }\n      ]\n    }\n  ],\n  \"couponCodes\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Not Found\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}