---
title: Searchs for orders.
slug: cms-12/api/searchs-for-orders
docTags: 
createdAt: 2026-08-28T13:16:06.833Z
---

{
  "id": "hgSjhP5PSx2vtfC6J7GZ-",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "/api/episerver/v3.0/orders/search",
    "servers": [],
    "name": "Searchs for orders.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "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": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "The seach parameters",
          "customType": "orderSearchFilter",
          "schema": [
            {
              "name": "statuses",
              "kind": "optional",
              "type": "array",
              "nullable": true,
              "description": "Specified that only orders having statuses should be returned.",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "marketIds",
              "kind": "optional",
              "type": "array",
              "nullable": true,
              "description": "Specified that only orders created in these markets should be returned.",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "modifiedFrom",
              "kind": "optional",
              "type": "string<date-time>",
              "description": "Specifies the time that returned orders were modified after.",
              "format": "date-time"
            },
            {
              "name": "modifiedTo",
              "kind": "optional",
              "type": "string<date-time>",
              "description": "Specifies the time that returned orders were modified before.",
              "format": "date-time"
            },
            {
              "name": "customerId",
              "kind": "optional",
              "type": "string<uuid>",
              "description": "<p>Specifies that only carts/orders created by specified customer should be returned.</p>",
              "format": "uuid"
            },
            {
              "name": "startingIndex",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "Gets or sets the starting index.",
              "format": "int32"
            },
            {
              "name": "recordsToRetrieve",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "Gets or sets the number of records to retrieve.",
              "format": "int32"
            },
            {
              "name": "searchTerm",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "The customer name or email to search for"
            }
          ],
          "modelRef": "#/components/schemas/orderSearchFilter",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "Represents a purchase order.",
            "customType": "order[]",
            "schema": [
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "The order name."
              },
              {
                "name": "orderNumber",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "The order number."
              },
              {
                "name": "customerId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "The customer the order belongs to.",
                "format": "uuid"
              },
              {
                "name": "market",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "The market in which the order was placed."
              },
              {
                "name": "currency",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "The currency of the market in which the order was placed."
              },
              {
                "name": "shipments",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "The shipments of the order.",
                "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 of the order.",
                "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": "totals",
                "kind": "optional",
                "type": "object",
                "description": "Represents cart totals.",
                "modelRef": "#/components/schemas/totals",
                "customType": "totals",
                "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",
                    "nullable": true,
                    "description": "The shipping totals.",
                    "modelRef": "#/components/schemas/shippingTotals",
                    "customType": "shippingTotals[]",
                    "schema": [
                      {
                        "name": "shipmentId",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "The shipping id.",
                        "format": "int32"
                      },
                      {
                        "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",
                        "nullable": true,
                        "description": "The line item prices.",
                        "modelRef": "#/components/schemas/lineItemPrices",
                        "customType": "lineItemPrices[]",
                        "schema": [
                          {
                            "name": "lineItemId",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "The line item id.",
                            "format": "int32"
                          },
                          {
                            "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"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "name": "lastUpdated",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "The last updated timestamp.",
                "format": "date-time"
              },
              {
                "name": "orderDate",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "The order date",
                "format": "date-time"
              },
              {
                "name": "couponCodes",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "The coupon codes.",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/order",
            "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": "GHsNn-1QhveRymk6vz3Ng",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url /api/episerver/v3.0/orders/search \\\n     --header 'accept: application/json'"
        },
        {
          "id": "sNCpfzYWv0VJ2bZDRNLVN",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/api/episerver/v3.0/orders/search\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "gvayb-jP8nrIChk3zllhu",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/episerver/v3.0/orders/search\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Lji7lxXCK2Ois3mvDSZrk",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/episerver/v3.0/orders/search\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "GHsNn-1QhveRymk6vz3Ng"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"name\": \"\",\n    \"orderNumber\": \"\",\n    \"customerId\": \"\",\n    \"market\": \"\",\n    \"currency\": \"\",\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    \"totals\": {\n      \"total\": \"\",\n      \"subTotal\": \"\",\n      \"shippingTotal\": \"\",\n      \"handlingTotal\": \"\",\n      \"taxTotal\": \"\",\n      \"discountTotal\": \"\",\n      \"shippingTotals\": [\n        {\n          \"shipmentId\": \"\",\n          \"shippingCost\": \"\",\n          \"shippingTax\": \"\",\n          \"itemsTotal\": \"\",\n          \"lineItemPrices\": [\n            {\n              \"lineItemId\": \"\",\n              \"extendedPrice\": \"\",\n              \"discountedPrice\": \"\"\n            }\n          ]\n        }\n      ]\n    },\n    \"lastUpdated\": \"\",\n    \"orderDate\": \"\",\n    \"couponCodes\": [\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": ""
    }
  ]
}