---
title: Get All Legal Holds for the Tenant
slug: api-documentation/get-all-legal-holds-for-the-tenant
docTags: 
createdAt: 2026-08-27T17:03:03.147Z
---

{
  "id": "jQ1kF1vlcxwg7_lOG-ge1",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.upstartcommerce.com/v1/customer/legal-hold",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/customer/legal-hold"
      }
    ],
    "name": "Get All Legal Holds for the Tenant",
    "description": "Returns the list of all customers under legal hold for the requesting tenant.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "x-upstart-tenant",
          "type": "string",
          "description": "Tenant identifier associated with the site."
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "page",
          "type": "integer<int32>",
          "description": "<p>Zero-based page number. Defaults to 0.</p>",
          "default": 0,
          "format": "int32",
          "minimum": 0
        },
        {
          "kind": "optional",
          "name": "pageSize",
          "type": "integer<int32>",
          "description": "<p>Number of items per page. Defaults to 20, maximum 1000.</p>",
          "default": 20,
          "format": "int32",
          "minimum": 1,
          "maximum": 1000
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAccess",
          "name": "X-Upstart-Api-Key",
          "kind": "optional",
          "type": "apiKey",
          "description": "Api key based authorization.",
          "in": "header"
        },
        {
          "id": "SessionIdAccess",
          "name": "X-Upstart-Session-Id",
          "kind": "optional",
          "type": "apiKey",
          "description": "Session based authorization. This authentication is required for clients to interact with any of the management APIs.",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Paginated list of customers under legal hold.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Paginated list of customers under legal hold.",
            "customType": "LegalHoldPagedResponse",
            "schema": [
              {
                "name": "page",
                "kind": "required",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "pageSize",
                "kind": "required",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "hasNextPage",
                "kind": "required",
                "type": "boolean",
                "description": "True if a subsequent page exists."
              },
              {
                "name": "items",
                "kind": "required",
                "type": "array",
                "description": "Active legal hold details for a customer.",
                "modelRef": "#/components/schemas/LegalHoldResponse",
                "customType": "LegalHoldResponse[]",
                "schema": [
                  {
                    "name": "tenant",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "siteId",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "customerId",
                    "kind": "required",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "holdReason",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "createdAt",
                    "kind": "required",
                    "type": "string<date-time>",
                    "description": "",
                    "format": "date-time"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/LegalHoldPagedResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "The request contained information that the server was unable to process. Appropriate errors are provided in the response body.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "Error response for validation errors.",
            "customType": "ValidationErrorResponse[]",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ValidationErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "The provided credentials were not valid for this endpoint.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "UnauthorizedErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/UnauthorizedErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "User's roles are insufficient for this endpoint.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "There was an internal server error.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "FyRjkq5XlSYgXN2RuxN6p",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.upstartcommerce.com/v1/customer/legal-hold?page=integer%3Cint32%3E&pageSize=20' \\\n     --header 'accept: application/json' \\\n     --header 'x-upstart-tenant: string'"
        },
        {
          "id": "uCD7KSz7xzIFngTTN1INl",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-upstart-tenant\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/v1/customer/legal-hold?page=integer<int32>&pageSize=20\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "h-HWfH7VEixaghlmsFZeJ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/customer/legal-hold?page=integer<int32>&pageSize=20\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-upstart-tenant\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "e6Lg6yvdbg2oEkaPrix_R",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/customer/legal-hold?page=integer<int32>&pageSize=20\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-upstart-tenant': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "FyRjkq5XlSYgXN2RuxN6p"
    },
    "results": {
      "languages": [
        {
          "id": "yxU7Jb-KkAxANHylNmwkh",
          "language": "200",
          "code": "// Paginated list of customers under legal hold.\n{\n  \"page\": \"\",\n  \"pageSize\": \"\",\n  \"hasNextPage\": false,\n  \"items\": [\n    {\n      \"tenant\": \"\",\n      \"siteId\": \"\",\n      \"customerId\": \"\",\n      \"holdReason\": \"\",\n      \"createdAt\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "2Iidp9DKpvN0fmb7FFl_F",
          "language": "400",
          "code": "// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.\n[\n  {\n    \"name\": \"\",\n    \"code\": \"\",\n    \"detail\": \"\",\n    \"reason\": \"\"\n  }\n]"
        },
        {
          "id": "Y_JJDC7qfT9V4gK8U192l",
          "language": "401",
          "code": "// The provided credentials were not valid for this endpoint.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "vmEgEYFY_Z8f_TOXtIacu",
          "language": "403",
          "code": "// User's roles are insufficient for this endpoint.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "213fmaUvad8_j45j6KyEt",
          "language": "500",
          "code": "// There was an internal server error.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "yxU7Jb-KkAxANHylNmwkh"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}