---
updatedAt: 2026-07-21T14:55:00.000Z
agentTools:
  projectIndex: https://docs.sikoia.com/llms.txt
---

# List all documents for an entity

### Returns a list of documents for an entity.

The list includes the `document_id` for each document, which can be used to retrieve or delete the file using the following endpoints:
*`GET /v2/documents/{document_id}`
*`DELETE /v2/documents/{document_id}`


The list includes the `document_id` for each document, which can be used to retrieve or delete the file using the following endpoints: GET `/v2/documents/{document_id}`, DELETE `v2/documents/{document_id}`

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Sikoia API",
    "termsOfService": "https://sikoia.com/About/Terms",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.sikoia.com",
      "description": "API (Production)"
    },
    {
      "url": "https://oauth2.sikoia.com",
      "description": "Authorization Server (Production)"
    },
    {
      "url": "https://api-staging.sikoia.com",
      "description": "API (Staging)"
    },
    {
      "url": "https://oauth2-staging.sikoia.com",
      "description": "Authorization Server (Staging)"
    }
  ],
  "paths": {
    "/v2/{entity_type}/{entity_id}/documents": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "List all documents for an entity",
        "description": "### Returns a list of documents for an entity.\r\n\r\nThe list includes the `document_id` for each document, which can be used to retrieve or delete the file using the following endpoints:\r\n*`GET /v2/documents/{document_id}`\r\n*`DELETE /v2/documents/{document_id}`\r\n",
        "operationId": "GET_v2-entity_type-entity_id-documents",
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "description": "The type of entity (company, person, case)",
            "required": true,
            "schema": {
              "enum": [
                "Companies",
                "Persons",
                "Cases"
              ],
              "type": "string"
            }
          },
          {
            "name": "entity_id",
            "in": "path",
            "description": "The company_id, person_id or case_id of the entity",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Documents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SikoiaSharedModels.BusinessSupport.DocumentUpload.Response.DocumentUploadResponse"
                  }
                },
                "example": [
                  {
                    "document_id": "181eba57-b6b4-4288-8c97-f8299530f071",
                    "document_uri": "https://sikoialake.blob.core.windows.net/clientid/documents/181eba57-b6b4-4288-8c97-f8299530f071.pdf?sv=2021-08-06&st=2023-05-26T14%3A49%3A36Z&se=2023-05-26T14%3A59%3A36Z&sr=b&sp=r&sig=lMhD8hOX0USZid8RpkYGDZr3DQ8ouN6PDCXM1cRNI3w%3D",
                    "entity_type": "company",
                    "entity_id": "3f615611-3dc3-418b-bed5-a53c4390c97c",
                    "file_type": ".pdf",
                    "display_name": "January 2023 Bank Statement",
                    "document_type": "BankStatement",
                    "sikoia_document_type": "BankStatement",
                    "file_name": "January-2023-Bank-Statement.pdf",
                    "status": "Complete",
                    "datetime_created": "2023-02-10T10:59:46.0260000+00:00",
                    "date_created": "string",
                    "datetime_last_modified": "2023-02-10T10:59:46.0260000+00:00",
                    "date_uploaded": "string"
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SikoiaCore.Common.SikoiaErrorResponse"
                },
                "example": {
                  "type": "InvalidToken",
                  "status": 401,
                  "title": "Invalid Token",
                  "detail": "Invalid token",
                  "correlation_id": "4fc6e876-b92d-4b48-b06e-da3f86dc5eea"
                }
              }
            }
          },
          "404": {
            "description": "Entity deleted/not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SikoiaCore.Common.SikoiaErrorResponse"
                },
                "example": {
                  "type": "ResourceNotFound",
                  "status": 404,
                  "title": "Resource Not Found",
                  "detail": "No resources found with id 85f3ce59-300a-49f5-87fc-a4365f8661cd.",
                  "correlation_id": "6483a882-a06a-45bf-9121-f9713add2c4d"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SikoiaCore.Common.SikoiaErrorResponse"
                },
                "example": {
                  "type": "RateLimit",
                  "status": 429,
                  "title": "Too Many Requests",
                  "detail": "You've exceeded the maximum API request limit per minute. Please try again later.",
                  "correlation_id": "692ec0ad-15e4-49f8-bf3e-dffa6a2df8d7"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SikoiaCore.Common.SikoiaErrorResponse"
                },
                "example": {
                  "type": "ServerError",
                  "status": 500,
                  "title": "Internal Server Error",
                  "detail": "Something has gone wrong, please try again",
                  "correlation_id": "9682c47e-922a-491d-be8d-0dc7d42a631d"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SikoiaCore.Common.SikoiaErrorResponse": {
        "title": "Error Response",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The error type",
            "readOnly": true
          },
          "status": {
            "type": "integer",
            "description": "HTTP status code of the error",
            "format": "HttpCode",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "description": "A short description of the error",
            "readOnly": true
          },
          "detail": {
            "type": "string",
            "description": "More details about what went wrong",
            "readOnly": true
          },
          "correlation_id": {
            "type": "string",
            "description": "Correlation ID, please include this in any support tickets raised",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "See the [Response Guide](https://docs.sikoia.com/docs/api-behaviour#responses) for more detail "
      },
      "SikoiaSharedModels.BusinessSupport.DocumentUpload.Response.DocumentUploadResponse": {
        "title": "Document Response",
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "description": "Sikoia ID for the document",
            "readOnly": true,
            "example": "181eba57-b6b4-4288-8c97-f8299530f071"
          },
          "document_uri": {
            "type": "string",
            "description": "The uri for the document",
            "readOnly": true,
            "example": "https://sikoialake.blob.core.windows.net/clientid/documents/181eba57-b6b4-4288-8c97-f8299530f071.pdf?sv=2021-08-06&st=2023-05-26T14%3A49%3A36Z&se=2023-05-26T14%3A59%3A36Z&sr=b&sp=r&sig=lMhD8hOX0USZid8RpkYGDZr3DQ8ouN6PDCXM1cRNI3w%3D"
          },
          "entity_type": {
            "enum": [
              "company",
              "person",
              "case"
            ],
            "type": "string",
            "description": "The type of entity",
            "readOnly": true
          },
          "entity_id": {
            "type": "string",
            "description": "The `company_id`, `person_id` or `case_id` of the entity",
            "readOnly": true,
            "example": "3f615611-3dc3-418b-bed5-a53c4390c97c"
          },
          "file_type": {
            "type": "string",
            "description": "The type of file",
            "readOnly": true,
            "example": ".pdf"
          },
          "display_name": {
            "type": "string",
            "description": "The display name of the document",
            "readOnly": true,
            "example": "January 2023 Bank Statement"
          },
          "document_type": {
            "enum": [
              "BankStatement",
              "Payslip",
              "Identity",
              "Contract",
              "FactFind",
              "Other",
              "CompanyRegistration",
              "StakeholdersDisclosure",
              "UtilityBill",
              "CreditReport",
              "SavingsStatement",
              "SA302",
              "TaxOverview",
              "P45",
              "P60",
              "EmploymentLetter",
              "EmploymentContract",
              "ChildBenefitLetter",
              "BenefitAwardLetter",
              "StudentLoanLetter",
              "PensionStatement",
              "FinancialAccounts"
            ],
            "type": "string",
            "description": "The type of document",
            "nullable": true,
            "readOnly": true,
            "example": "BankStatement"
          },
          "sikoia_document_type": {
            "enum": [
              "BankStatement",
              "Payslip",
              "Identity",
              "Contract",
              "FactFind",
              "Other",
              "CompanyRegistration",
              "StakeholdersDisclosure",
              "UtilityBill",
              "CreditReport",
              "SavingsStatement",
              "SA302",
              "TaxOverview",
              "P45",
              "P60",
              "EmploymentLetter",
              "EmploymentContract",
              "ChildBenefitLetter",
              "BenefitAwardLetter",
              "StudentLoanLetter",
              "PensionStatement",
              "FinancialAccounts"
            ],
            "type": "string",
            "description": "Document type, as classified by Sikoia's AI system",
            "nullable": true,
            "readOnly": true,
            "example": "BankStatement"
          },
          "file_name": {
            "type": "string",
            "description": "The name of the file",
            "readOnly": true,
            "example": "January-2023-Bank-Statement.pdf"
          },
          "status": {
            "type": "string",
            "description": "The status of the document upload. Possible values: `Complete`, `Failed`",
            "readOnly": true,
            "example": "Complete"
          },
          "datetime_created": {
            "type": "string",
            "description": "The time the document was created",
            "readOnly": true,
            "example": "2023-02-10T10:59:46.026Z"
          },
          "date_created": {
            "type": "string",
            "description": "Date Created",
            "format": "date-time",
            "readOnly": true,
            "deprecated": true
          },
          "datetime_last_modified": {
            "type": "string",
            "description": "The time the document was last modified",
            "readOnly": true,
            "example": "2023-02-10T10:59:46.026Z"
          },
          "date_uploaded": {
            "type": "string",
            "description": "Date Uploaded",
            "format": "date-time",
            "readOnly": true,
            "deprecated": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "authorizationHeader": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "name": "apikey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "authorizationHeader": []
    },
    {
      "apiKeyHeader": []
    }
  ]
}
```