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

{
  "id": "9QTJMUv8XB12mGSrMIakd",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://localhost:65349//api/episerver/v2.0/orders/{orderNumber}",
    "servers": [
      {
        "url": "http://localhost:65349//api/episerver/v2.0/orders/{orderNumber}"
      }
    ],
    "name": "Gets a order.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "orderNumber",
          "type": "string",
          "description": "The order number."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "text/json",
            "application/xml",
            "text/xml"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Represents a purchase order.",
            "customType": "OrderApiModel",
            "schema": [
              {
                "name": "OrderNumber",
                "kind": "optional",
                "type": "string",
                "description": "The order number."
              },
              {
                "name": "CustomerId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "The customer the order belongs to.",
                "example": "00000000-0000-0000-0000-000000000000",
                "format": "uuid"
              },
              {
                "name": "Market",
                "kind": "optional",
                "type": "string",
                "description": "The market in which the order was placed."
              },
              {
                "name": "Currency",
                "kind": "optional",
                "type": "string",
                "description": "The currency of the market in which the order was placed."
              },
              {
                "name": "Shipments",
                "kind": "optional",
                "type": "array",
                "description": "The shipments of the order.",
                "modelRef": "#/components/schemas/ShipmentModel",
                "customType": "ShipmentModel[]",
                "schema": [
                  {
                    "name": "Id",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "The shipping id.",
                    "example": "00000000-0000-0000-0000-000000000000",
                    "format": "uuid"
                  },
                  {
                    "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/AddressModel",
                    "customType": "AddressModel",
                    "schema": [
                      {
                        "name": "FirstName",
                        "kind": "optional",
                        "type": "string",
                        "description": "The first name."
                      },
                      {
                        "name": "LastName",
                        "kind": "optional",
                        "type": "string",
                        "description": "The last name."
                      },
                      {
                        "name": "Line1",
                        "kind": "optional",
                        "type": "string",
                        "description": "The line1."
                      },
                      {
                        "name": "Line2",
                        "kind": "optional",
                        "type": "string",
                        "description": "The line2."
                      },
                      {
                        "name": "City",
                        "kind": "optional",
                        "type": "string",
                        "description": "The city."
                      },
                      {
                        "name": "CountryName",
                        "kind": "optional",
                        "type": "string",
                        "description": "The country name."
                      },
                      {
                        "name": "PostalCode",
                        "kind": "optional",
                        "type": "string",
                        "description": "The postal code"
                      },
                      {
                        "name": "RegionName",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>The region name/state</p>"
                      },
                      {
                        "name": "Email",
                        "kind": "optional",
                        "type": "string",
                        "description": "The email."
                      },
                      {
                        "name": "PhoneNumber",
                        "kind": "optional",
                        "type": "string",
                        "description": "The phone number."
                      }
                    ]
                  },
                  {
                    "name": "ShippingMethodId",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "The shipping method id.",
                    "example": "00000000-0000-0000-0000-000000000000",
                    "format": "uuid"
                  },
                  {
                    "name": "LineItems",
                    "kind": "optional",
                    "type": "array",
                    "description": "the line items that belong to the cart.",
                    "modelRef": "#/components/schemas/LineItemModel",
                    "customType": "LineItemModel[]",
                    "schema": [
                      {
                        "name": "Id",
                        "kind": "optional",
                        "type": "string<uuid>",
                        "description": "The line item id.",
                        "example": "00000000-0000-0000-0000-000000000000",
                        "format": "uuid"
                      },
                      {
                        "name": "ContentId",
                        "kind": "optional",
                        "type": "string<uuid>",
                        "description": "The content id.",
                        "example": "00000000-0000-0000-0000-000000000000",
                        "format": "uuid"
                      },
                      {
                        "name": "Code",
                        "kind": "optional",
                        "type": "string",
                        "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",
                        "description": "The display name."
                      },
                      {
                        "name": "IsGift",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "Indicates whether the line item is a gift item."
                      }
                    ]
                  }
                ]
              },
              {
                "name": "Totals",
                "kind": "optional",
                "type": "object",
                "description": "Represents cart totals.",
                "modelRef": "#/components/schemas/TotalsModel",
                "customType": "TotalsModel",
                "schema": [
                  {
                    "name": "Total",
                    "kind": "optional",
                    "type": "number<decimal>",
                    "description": "The total.",
                    "format": "decimal"
                  },
                  {
                    "name": "SubTotal",
                    "kind": "optional",
                    "type": "number<decimal>",
                    "description": "The subtotal.",
                    "format": "decimal"
                  },
                  {
                    "name": "ShippingTotal",
                    "kind": "optional",
                    "type": "number<decimal>",
                    "description": "The shipping total.",
                    "format": "decimal"
                  },
                  {
                    "name": "HandlingTotal",
                    "kind": "optional",
                    "type": "number<decimal>",
                    "description": "The handling total.",
                    "format": "decimal"
                  },
                  {
                    "name": "TaxTotal",
                    "kind": "optional",
                    "type": "number<decimal>",
                    "description": "The tax total.",
                    "format": "decimal"
                  },
                  {
                    "name": "DiscountTotal",
                    "kind": "optional",
                    "type": "number<decimal>",
                    "description": "The order form discount total.",
                    "format": "decimal"
                  },
                  {
                    "name": "ShippingTotals",
                    "kind": "optional",
                    "type": "array",
                    "description": "The shipping totals.",
                    "modelRef": "#/components/schemas/ShippingTotalsModel",
                    "customType": "ShippingTotalsModel[]",
                    "schema": [
                      {
                        "name": "ShipmentId",
                        "kind": "optional",
                        "type": "string<uuid>",
                        "description": "The shipping id.",
                        "example": "00000000-0000-0000-0000-000000000000",
                        "format": "uuid"
                      },
                      {
                        "name": "ShippingCost",
                        "kind": "optional",
                        "type": "number<decimal>",
                        "description": "The shipping cost.",
                        "format": "decimal"
                      },
                      {
                        "name": "ShippingTax",
                        "kind": "optional",
                        "type": "number<decimal>",
                        "description": "The shipping tax.",
                        "format": "decimal"
                      },
                      {
                        "name": "ItemsTotal",
                        "kind": "optional",
                        "type": "number<decimal>",
                        "description": "The extended price total for the line items in the shipment.",
                        "format": "decimal"
                      },
                      {
                        "name": "LineItemPrices",
                        "kind": "optional",
                        "type": "array",
                        "description": "The line item prices.",
                        "modelRef": "#/components/schemas/LineItemPricesModel",
                        "customType": "LineItemPricesModel[]",
                        "schema": [
                          {
                            "name": "LineItemId",
                            "kind": "optional",
                            "type": "string<uuid>",
                            "description": "The line item id.",
                            "example": "00000000-0000-0000-0000-000000000000",
                            "format": "uuid"
                          },
                          {
                            "name": "ExtendedPrice",
                            "kind": "optional",
                            "type": "number<decimal>",
                            "description": "The extended price.",
                            "format": "decimal"
                          },
                          {
                            "name": "DiscountedPrice",
                            "kind": "optional",
                            "type": "number<decimal>",
                            "description": "The discounted price.",
                            "format": "decimal"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/OrderApiModel",
            "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": "1pA2Ch6etdOFL4U0m8kMo",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url http://localhost:65349//api/episerver/v2.0/orders/{orderNumber} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "pCs0_bom74_ccTR68SLzG",
          "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(\"http://localhost:65349//api/episerver/v2.0/orders/{orderNumber}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "D32R5pMdTwakq-HKM8A9P",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:65349//api/episerver/v2.0/orders/{orderNumber}\")\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": "hE4s7mlJID9Avd_UL3C4p",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:65349//api/episerver/v2.0/orders/{orderNumber}\"\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": "1pA2Ch6etdOFL4U0m8kMo"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"OrderNumber\": \"\",\n  \"CustomerId\": \"00000000-0000-0000-0000-000000000000\",\n  \"Market\": \"\",\n  \"Currency\": \"\",\n  \"Shipments\": [\n    {\n      \"Id\": \"00000000-0000-0000-0000-000000000000\",\n      \"ShippingAddress\": {\n        \"FirstName\": \"\",\n        \"LastName\": \"\",\n        \"Line1\": \"\",\n        \"Line2\": \"\",\n        \"City\": \"\",\n        \"CountryName\": \"\",\n        \"PostalCode\": \"\",\n        \"RegionName\": \"\",\n        \"Email\": \"\",\n        \"PhoneNumber\": \"\"\n      },\n      \"ShippingMethodId\": \"00000000-0000-0000-0000-000000000000\",\n      \"LineItems\": [\n        {\n          \"Id\": \"00000000-0000-0000-0000-000000000000\",\n          \"ContentId\": \"00000000-0000-0000-0000-000000000000\",\n          \"Code\": \"\",\n          \"PlacedPrice\": \"\",\n          \"Quantity\": \"\",\n          \"DisplayName\": \"\",\n          \"IsGift\": false\n        }\n      ]\n    }\n  ],\n  \"Totals\": {\n    \"Total\": \"\",\n    \"SubTotal\": \"\",\n    \"ShippingTotal\": \"\",\n    \"HandlingTotal\": \"\",\n    \"TaxTotal\": \"\",\n    \"DiscountTotal\": \"\",\n    \"ShippingTotals\": [\n      {\n        \"ShipmentId\": \"00000000-0000-0000-0000-000000000000\",\n        \"ShippingCost\": \"\",\n        \"ShippingTax\": \"\",\n        \"ItemsTotal\": \"\",\n        \"LineItemPrices\": [\n          {\n            \"LineItemId\": \"00000000-0000-0000-0000-000000000000\",\n            \"ExtendedPrice\": \"\",\n            \"DiscountedPrice\": \"\"\n          }\n        ]\n      }\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": ""
    }
  ]
}