# Search documents by fund

Returns a list of the documents based on criteria providd in the body request. Returns the filename, created time, created by and associated tags of the document. Leave the criteria values as null to allow broad searches of the documents

Endpoint: POST /f/{businessCode}/{fundCode}/dms/documents/search
Version: 1.0.2
Security: Class_oAuth

## Security:

  - `Class_oAuth` (unknown)
    oAuth2 scopes: fund.read, fund.maintain

## Path parameters:

  - `businessCode` (string, required)
    Class business code

  - `fundCode` (string, required)
    Class entity code

  - `version` (string, required)
    API version

## Query parameters:

  - `sortBy` (string)
    Available values:
  - description
  - createdby
  - created
  - source
  - status
  - effectivetime <br></br>

Multiple values can be provided if they are comma         -separated.
  - To denote descending order, prefix the name with a   '-'    , e   .g., `sortBy=-created` (sorts by   created date in         descending order).
  - Example: `sortBy=description,-createdby`
    - Sorts by 'description' in ascending order.
    - Then sorts by 'createdby' in descending order.

  - `pageNumber` (number)
    Value must be greater than 0

  - `pageSize` (number)
    Value must be greater than 0

## Request fields (application/json):

  - `documentDateFrom` (string)
    Filter documents with a document date on or after this date.
    Example: 2023-01-01

  - `documentDateTo` (string)
    Filter documents with a document date on or before this date.
    Example: 2025-12-31

  - `createdDateFrom` (string)
    Filter documents created on or after this date.
    Example: 2023-01-01

  - `createdDateTo` (string)
    Filter documents created on or before this date.
    Example: 2025-12-31

  - `updatedDateFrom` (string)
    Filter documents updated on or after this date.
    Example: 2023-01-01

  - `updatedDateTo` (string)
    Filter documents updated on or before this date.
    Example: 2025-12-31

  - `searchText` (string)
    Free text search string to filter documents by name or description.
    Example: Tax Statement

  - `tagIds` (array)
    List of tag IDs to filter documents by.
    Example: ["6014071d-1a37-4019-92c2-04bb15fc0c63"]

  - `tagExternalId` (string)
    Include documents that have a tag where the tag external Id matches the specified value.
    Example: 385deb74-cd09-42d0-8ef4-88782fc3211c

  - `ensureIdIncluded` (string)
    It will include the document that has the specified value in the search results regardless of the other search criteria.
    Example: 1f41a318-3179-4734-b9f5-9b95811bc270

  - `onlyUntagged` (boolean)
    It will only include documents with no tags.
    Example: false

  - `onlyRestricted` (boolean)
    It will only include documents that have IsRestricted status set to true.
    Example: false

## Response 200:

  - `200` (unknown)
    Success (Ok)

## Response 200 fields (application/json):

  - `total` (integer)
    The total number of documents returned by the query.
    Example: 1

  - `pageSize` (integer)
    The number of documents included per page of results.
    Example: 500

  - `pageNumber` (integer)
    The current page number being viewed or returned.
    Example: 1

  - `totalPages` (integer)
    The total number of pages available based on the total and pageSize.
    Example: 1

  - `documents` (array)

  - `documents.id` (string)
    Unique identifier for the document.
    Example: 1f41a318-3179-4734-b9f5-9b95811bc270

  - `documents.description` (string)
    A brief description or title of the document.
    Example: Tax Statement.pdf

  - `documents.fileName` (string)
    The name of the file as stored or uploaded.
    Example: Tax Statement.pdf

  - `documents.createdBy` (string)
    Email address of the user who created the document.
    Example: Bob.Jones@class.com.au

  - `documents.createdTime` (string)
    Timestamp indicating when the document was created.
    Example: 2024-04-23T10:27:51.643869

  - `documents.effectiveTime` (string)
    The date and time when the document becomes effective or valid.
    Example: 2023-06-30T00:00:00

  - `documents.updatedBy` (string)
    Email address of the user who last updated the document.
    Example: Bob.Jones@class.com.au

  - `documents.updatedTime` (string)
    Timestamp indicating when the document was last updated.
    Example: 2024-04-23T10:27:51.877835

  - `documents.effectiveStatusCode` (string)
    Status code indicating the current effective state of the document.
    Example: Active

  - `documents.isClassManaged` (boolean)
    Indicates whether the document is managed by a class-based system.
    Example: false

  - `documents.status` (string)
    General status of the document (e.g., verified, unverified).
    Example: unverified

  - `documents.source` (string)
    Origin or source of the document (e.g., uploaded manually, system-generated).
    Example: unspecified

  - `documents.isRestricted` (boolean)
    Indicates whether access to the document is restricted.
    Example: false

  - `documents.tags` (array)

  - `documents.tags.id` (string)
    Unique identifier for the tag.
    Example: 6014071d-1a37-4019-92c2-04bb15fc0c63

  - `documents.tags.externalId` (string)
    External system identifier associated with the tag.
    Example: 385deb74-cd09-42d0-8ef4-88782fc3211c

  - `documents.tags.displayName` (string)
    Human-readable name or label for the tag.
    Example: Ms Ellyse Perry: Accumulation

  - `documents.tags.code` (string)
    Internal code used to reference the tag.
    Example: null

  - `documents.tags.tagType` (string)
    Category or classification of the tag (e.g. Custom, System, Member, Account, Investment).
    Example: Account

  - `documents.tags.isProtected` (boolean)
    Indicates whether the tag is protected from deletion or modification.
    Example: false

## Response 400:

  - `400` (unknown)
    Error Message

## Response 400 fields (application/json):

  - `Errors` (array)

  - `Errors.code` (string)

  - `Errors.message` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `Errors` (array)

  - `Errors.Code` (string)
    Example: API_NOT_AUTHORISED

  - `Errors.Message` (string)
    Example: Not authorised

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `Errors` (array)

  - `Errors.Code` (string)
    Example: FORBIDDEN

  - `Errors.Message` (string)
    Example: You do not have permission to access this resource.

## Response 404:

  - `404` (unknown)
    Resource not available or user does not have access to the fund

## Response 404 fields (application/json):

  - `Errors` (array)

  - `Errors.Code` (string)
    Example: API_NOT_FOUND

  - `Errors.Message` (string)
    Example: Resource not available or user does not have access to the fund.

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `Errors` (array)

  - `Errors.Code` (string)
    Example: API_INTERNAL_ERROR

  - `Errors.Message` (string)
    Example: An unexpected error occurred on the server. Please try again later.

## Response default:

  - `default` (unknown)
    Unexpected error

## Response default fields (application/json):

  - `Errors` (array)

  - `Errors.Code` (string)
    Example: API_INTERNAL_ERROR

  - `Errors.Message` (string)
    Example: An unexpected error occurred on the server. Please try again later.

