{
  "openapi": "3.0.1",
  "info": {
    "x-metadata": {
      "apiId": [
        "Class Partner v1"
      ],
      "tags": [
        "Class Partner"
      ]
    },
    "title": "Document Management Service (DMS)",
    "version": "1.0.2",
    "description": "The Document Management Service (DMS) API allows you to upload documents, search for documents, tag documents and download documents in the Class DMS.\n\nThe key features of the API:\n\n* **Documents**: Ability to upload new documents, list or search for documents, download documents or delete documents.\n* **Tags**: Ability to list available tags at business level or per document, create new custom tags, update or delete tags on specific documents.\n\n\n<div class=\"env-panel\" data-component-name=\"EnvPanel\"><div class=\"env-panel__header\">Servers</div><div class=\"env-panel__body\"><div class=\"env-row\"><div class=\"env-name\">Partner Integration Environment (Sandbox)</div><div class=\"env-url-row\"><span class=\"env-url\">https://apigateway.class-pie.com.au/api/1.0</span><button type=\"button\" class=\"copy-btn\" data-copy=\"https://apigateway.class-pie.com.au/api/1.0\" aria-label=\"Copy\"><svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.16667 2.66667C5.16667 2.57462 5.24129 2.5 5.33333 2.5H12C12.092 2.5 12.1667 2.57462 12.1667 2.66667V10.6667C12.1667 10.7587 12.092 10.8333 12 10.8333H10H5.33333C5.24129 10.8333 5.16667 10.7587 5.16667 10.6667V4.66667V2.66667ZM4.16667 4.16667V2.66667C4.16667 2.02233 4.689 1.5 5.33333 1.5H12C12.6443 1.5 13.1667 2.02233 13.1667 2.66667V10.6667C13.1667 11.311 12.6443 11.8333 12 11.8333H10.5V13.3333C10.5 13.6428 10.3771 13.9395 10.1583 14.1583C9.9395 14.3771 9.64275 14.5 9.33333 14.5H2.66667C2.35725 14.5 2.0605 14.3771 1.84171 14.1583C1.62292 13.9395 1.5 13.6428 1.5 13.3333V5.33333C1.5 5.02391 1.62292 4.72717 1.84171 4.50838C2.0605 4.28958 2.35725 4.16667 2.66667 4.16667H4.16667ZM9.5 11.8333V13.3333C9.5 13.3775 9.48244 13.4199 9.45118 13.4512C9.41993 13.4824 9.37754 13.5 9.33333 13.5H2.66667C2.62246 13.5 2.58007 13.4824 2.54882 13.4512C2.51756 13.4199 2.5 13.3775 2.5 13.3333V5.33333C2.5 5.28913 2.51756 5.24674 2.54882 5.21548C2.58007 5.18423 2.62246 5.16667 2.66667 5.16667H4.16667V10.6667C4.16667 11.311 4.689 11.8333 5.33333 11.8333H9.5Z\" fill=\"currentColor\"/></svg></button></div></div><div class=\"env-row\"><div class=\"env-name\">Production Environment</div><div class=\"env-url-row\"><span class=\"env-url\">https://apigateway.class.com.au/api/1.0</span><button type=\"button\" class=\"copy-btn\" data-copy=\"https://apigateway.class.com.au/api/1.0\" aria-label=\"Copy\"><svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.16667 2.66667C5.16667 2.57462 5.24129 2.5 5.33333 2.5H12C12.092 2.5 12.1667 2.57462 12.1667 2.66667V10.6667C12.1667 10.7587 12.092 10.8333 12 10.8333H10H5.33333C5.24129 10.8333 5.16667 10.7587 5.16667 10.6667V4.66667V2.66667ZM4.16667 4.16667V2.66667C4.16667 2.02233 4.689 1.5 5.33333 1.5H12C12.6443 1.5 13.1667 2.02233 13.1667 2.66667V10.6667C13.1667 11.311 12.6443 11.8333 12 11.8333H10.5V13.3333C10.5 13.6428 10.3771 13.9395 10.1583 14.1583C9.9395 14.3771 9.64275 14.5 9.33333 14.5H2.66667C2.35725 14.5 2.0605 14.3771 1.84171 14.1583C1.62292 13.9395 1.5 13.6428 1.5 13.3333V5.33333C1.5 5.02391 1.62292 4.72717 1.84171 4.50838C2.0605 4.28958 2.35725 4.16667 2.66667 4.16667H4.16667ZM9.5 11.8333V13.3333C9.5 13.3775 9.48244 13.4199 9.45118 13.4512C9.41993 13.4824 9.37754 13.5 9.33333 13.5H2.66667C2.62246 13.5 2.58007 13.4824 2.54882 13.4512C2.51756 13.4199 2.5 13.3775 2.5 13.3333V5.33333C2.5 5.28913 2.51756 5.24674 2.54882 5.21548C2.58007 5.18423 2.62246 5.16667 2.66667 5.16667H4.16667V10.6667C4.16667 11.311 4.689 11.8333 5.33333 11.8333H9.5Z\" fill=\"currentColor\"/></svg></button></div></div></div></div>",
    "contact": {
      "name": "Class Partners",
      "email": "partners@class.com.au"
    },
    "termsOfService": "https://www.class.com.au/api-terms"
  },
  "servers": [
    {
      "url": "https://apigateway.class-pie.com.au/api/1.0",
      "description": "Partner Integration Environment (Sandbox)"
    },
    {
      "url": "https://apigateway.class.com.au/api/1.0",
      "description": "Production Environment"
    }
  ],
  "tags": [
    {
      "name": "Documents",
      "description": "List all the documents for a given fund. When providing additional criteria, search results are filtered. Allows documents to be uploaded, downloaded or deleted."
    },
    {
      "name": "Tags",
      "description": "List all the tags for a given fund. When providing additional criteria, search results are filtered. Allows tags to be added or removed from documents."
    }
  ],
  "security": [
    {
      "Class_oAuth": [
        "fund.read",
        "fund.maintain"
      ]
    }
  ],
  "paths": {
    "/f/{businessCode}/{fundCode}/dms/documents": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Fund documents",
        "description": "Retrieves all the documents related to the specificentity within a business.\nThe system **document date** is derived differently for specific Class generated documents, see below for some examples:\n|Document Type| Date Logic| Financial year tag|\n|----|----|----|\n|Actuarial Certificate|30 June of requested year|Yes|\n|Audit report|30 June of requested year|Yes|\n|Property Valuation|Date of request|Yes|\n|Direct Connect Doc feed|Statement period end date|Yes|\n|Data feed authority form|Date uploaded|No|\n|Client View|Date msg sent|Yes|\n|Title search|Date of request|Yes|\n|Class docusign envelope|Date envelope completed (last signer)|No|\n",
        "operationId": "GetAllFundDocuments",
        "parameters": [
          {
            "name": "documentDateFrom",
            "in": "query",
            "required": false,
            "description": "Retrieve the documents based on a specified from date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentDateTo",
            "in": "query",
            "required": false,
            "description": "Retrieve the documents based on a specified to date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Available values:\n  - description\n  - createdby\n  - created\n  - source\n  - status\n  - effectivetime <br></br>\n\nMultiple values can be provided if they are comma-separated.\n  - To denote descending order, prefix the name with a   '-'    , e   .g., `SortBy=-created` (sorts by created date in descending order).\n  - Example: `SortBy=description,-createdby`\n    - Sorts by 'description' in ascending order.\n    - Then sorts by 'createdby' in descending order.\n",
            "schema": {
              "type": "string",
              "example": "created"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "required": false,
            "description": "Page number must be a valid number between 1 and 500000. Default value is 1.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Page size must be a valid number between 1 and 500. Default value is 500.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/businessCodeParam"
          },
          {
            "$ref": "#/components/parameters/fundCodeParam"
          },
          {
            "$ref": "#/components/parameters/versionParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Success (Ok)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error Message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ErrorResponse"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnauthorizedErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ForbiddenErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not available or user does not have access to the fund",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceUnavailableErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/f/{businessCode}/{fundCode}/dms/tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "Fund tags",
        "description": "Returns all tags available for the given fund, which includes all custom tags and system tags<br/><br/> Tags available at community level will be available at the entity level by default. For Custom tags the Id and ExternalId is the same <br/> For System tags the Id has a unique value and ExternalId should be null <br/> For all other tags the Id and ExternalId will always be different.",
        "operationId": "GetAllFundTags",
        "parameters": [
          {
            "name": "searchText",
            "in": "query",
            "required": false,
            "description": "Allows you to filter tags based on a search string, it will check if the display name of the tag contains the search text the user entered.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagTypes",
            "in": "query",
            "required": false,
            "description": "Available values:\n  - Custom\n  - System\n  - Member\n  - Account\n  - Investment</br>\n\nIf a user wants all tag types then:\ntagTypes = Custom,System,Member,Account,Investment\n",
            "schema": {
              "type": "string",
              "example": "Account"
            }
          },
          {
            "name": "includeInactiveTags",
            "in": "query",
            "required": false,
            "description": "Indicates whether to include any external tags (Member, Account and Investment tag types) that are cancelled but still actively attached to a document.",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "includeTagsForDocumentId",
            "in": "query",
            "required": false,
            "description": "Indicates whether to include tags based on a documentId.",
            "schema": {
              "type": "string",
              "example": "ce10f1db-47e7-4f12-8b80-68581822c249"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "required": false,
            "description": "Available values:\n  - description\n  - createdby\n  - created\n  - source\n  - status\n  - effectivetime <br></br>\n\nMultiple values can be provided if they are comma       -separated.\n  - To denote descending order, prefix the name with a '-'    , e   .g., `SortBy=-created` (sorts by created date in         descending order).\n  - Example: `SortBy=description,-createdby`\n    - Sorts by 'description' in ascending order.\n    - Then sorts by 'createdby' in descending order.\n",
            "schema": {
              "type": "string",
              "example": "created"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "required": false,
            "description": "Value must be greater than 0",
            "schema": {
              "type": "string",
              "example": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Value must be greater than 0",
            "schema": {
              "type": "string",
              "example": 1
            }
          },
          {
            "$ref": "#/components/parameters/businessCodeParam"
          },
          {
            "$ref": "#/components/parameters/fundCodeParam"
          },
          {
            "$ref": "#/components/parameters/versionParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Success (Ok)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error Message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ErrorResponse"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnauthorizedErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ForbiddenErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not available or user does not have access to the fund",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceUnavailableErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/f/{businessCode}/{fundCode}/dms/documents/{documentId}/download": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Document download link by doc id",
        "description": "Returns a pre-signed link to download the document for a specific fund within the business by providing a documentId in the path of the endpoint.",
        "operationId": "GetDocumentDownloadLinkByDocId",
        "parameters": [
          {
            "name": "documentId",
            "description": "Document Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "8e4cbebe-61e2-4629-aa19-4dc804d7f7ae"
            }
          },
          {
            "$ref": "#/components/parameters/businessCodeParam"
          },
          {
            "$ref": "#/components/parameters/fundCodeParam"
          },
          {
            "$ref": "#/components/parameters/versionParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Success (Ok)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDownloadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error Message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ErrorResponse"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnauthorizedErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ForbiddenErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not available or user does not have access to the fund",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceUnavailableErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/f/{businessCode}/{fundCode}/dms/documents/{documentId}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Fund document by doc id",
        "description": "Retrieves a document from the system by a unique document Id.",
        "operationId": "GetFundDocumentByDocId",
        "parameters": [
          {
            "name": "documentId",
            "description": "Document Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "8e4cbebe-61e2-4629-aa19-4dc804d7f7ae"
            }
          },
          {
            "$ref": "#/components/parameters/businessCodeParam"
          },
          {
            "$ref": "#/components/parameters/fundCodeParam"
          },
          {
            "$ref": "#/components/parameters/versionParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Success (Ok)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error Message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ErrorResponse"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnauthorizedErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ForbiddenErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not available or user does not have access to the fund",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceUnavailableErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Documents"
        ],
        "summary": "Delete fund document by doc id",
        "description": "Deletes a document of a fund within a business by providing the unique document GUID id.",
        "operationId": "DeleteFundDocumentByDocId",
        "parameters": [
          {
            "name": "documentId",
            "description": "Document Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "8e4cbebe-61e2-4629-aa19-4dc804d7f7ae"
            }
          },
          {
            "$ref": "#/components/parameters/businessCodeParam"
          },
          {
            "$ref": "#/components/parameters/fundCodeParam"
          },
          {
            "$ref": "#/components/parameters/versionParam"
          }
        ],
        "responses": {
          "204": {
            "description": "Document deleted successfully"
          },
          "400": {
            "description": "Error Message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ErrorResponse"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnauthorizedErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ForbiddenErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not available or user does not have access to the fund",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceUnavailableErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/f/{businessCode}/{fundCode}/dms/documents/{documentId}/tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "Fund document tags by doc id",
        "description": "Returns all tags associated with a document by providing a GUID document id.",
        "operationId": "GetFundDocumentTagsByDocId",
        "parameters": [
          {
            "name": "documentId",
            "description": "Document Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "8e4cbebe-61e2-4629-aa19-4dc804d7f7ae"
            }
          },
          {
            "$ref": "#/components/parameters/businessCodeParam"
          },
          {
            "$ref": "#/components/parameters/fundCodeParam"
          },
          {
            "$ref": "#/components/parameters/versionParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Success (Ok)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentTagsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error Message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ErrorResponse"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnauthorizedErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ForbiddenErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not available or user does not have access to the fund",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceUnavailableErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Tags"
        ],
        "summary": "Save fund document tags by doc id",
        "description": "Saves tags for a document identified by a unique GUID document Id.",
        "operationId": "SaveFundDocumentTagsByDocId",
        "parameters": [
          {
            "name": "documentId",
            "description": "Document Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "8e4cbebe-61e2-4629-aa19-4dc804d7f7ae"
            }
          },
          {
            "$ref": "#/components/parameters/businessCodeParam"
          },
          {
            "$ref": "#/components/parameters/fundCodeParam"
          },
          {
            "$ref": "#/components/parameters/versionParam"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentTagsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success (Ok)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentTagsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error Message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ErrorResponse"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnauthorizedErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ForbiddenErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not available or user does not have access to the fund",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceUnavailableErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/f/{businessCode}/{fundCode}/dms/documents/search": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Search documents by fund",
        "description": "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",
        "operationId": "SearchDocumentsByFund",
        "parameters": [
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Available values:\n  - description\n  - createdby\n  - created\n  - source\n  - status\n  - effectivetime <br></br>\n\nMultiple values can be provided if they are comma         -separated.\n  - To denote descending order, prefix the name with a   '-'    , e   .g., `sortBy=-created` (sorts by   created date in         descending order).\n  - Example: `sortBy=description,-createdby`\n    - Sorts by 'description' in ascending order.\n    - Then sorts by 'createdby' in descending order.\n",
            "schema": {
              "type": "string",
              "example": "created"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "required": false,
            "description": "Value must be greater than 0",
            "schema": {
              "type": "number",
              "example": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Value must be greater than 0",
            "schema": {
              "type": "number",
              "example": 1
            }
          },
          {
            "$ref": "#/components/parameters/businessCodeParam"
          },
          {
            "$ref": "#/components/parameters/fundCodeParam"
          },
          {
            "$ref": "#/components/parameters/versionParam"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success (Ok)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error Message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ErrorResponse"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnauthorizedErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ForbiddenErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not available or user does not have access to the fund",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceUnavailableErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/f/{businessCode}/{fundCode}/dms/documents/presigned-upload": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Upload documents by fund",
        "description": "This API endpoint is designed to facilitate secure and time-limited file uploads using presigned URLs. Here's how it works:\n\n\n**Generate Presigned URL**\n\nWhen you call the API endpoint, it returns a presigned URL based on the document metadata you provide.\nThe presigned URL is valid for 5 minutes only. This URL is configured for a PUT request, which allows you to upload the     file directly to the storage location.\n\n\n**Upload the File**\n\nUse the presigned URL to upload your document.\nEnsure you include the required headers when making the PUT request.\n\n\n**Uploading Multiple Documents**\n\nTo upload multiple files, structure your request to include multipe document metadata entries in the body.\nThe API will return a list of presigned URLs, one for each document.\n You must then upload each file individually using its corresponding       presigned URL.\nTo ensure successful upload, the following conditions must be met:\n\n**Required JSON Body Fields:**\n- `Documents.Filename`\n  Name of the file to be uploaded. Must not exceed 50 characters Supported file types include \"bmp\",\"csv\",\"doc\",\"docx\",\"eml\",\"gif\",\"gz\",\"jpeg\",\"jpg\",\"msg\",\"pdf\",\"png\",\"rtf\",\"tif\",\"tiff\",\"txt\",\"xls\",\"xlsm\",\"xlsx\",\"xml\",\"zip\",\"mp4\",\"heic\". You MUST specify the extension of the file type at the end of the filename. Example: \"Tax Statement.pdf\"\n- `Documents.SHA256`\n    SHA-256 hash of the file content used for integrity verification. Must match the hash of the uploaded file. This value can be generated - Most programming languages provide built-in libraries or functions to compute SHA256 hashes. Below is a sample of using Python library.\n\n        ```\n        python\n        import hashlib\n        data = \"your string or file content here\".encode('utf-8')\n        sha256_hash = hashlib.sha256(data).hexdigest()\n        print(sha256_hash)\n        ```\n\n\n- `Documents.Filesize`\n  Size of the file in bytes. Must match the actual file size. Largest file size is 200mb.\n\n**Optional JSON Body Fields:**\n- `Documents.Description`\n  Description of the document. Max 1000 characters. Allowed special characters: `. , ; : ! ? \\ - ( ) & ' \" / \\`\n- `Documents.EffectiveTime`\n  Timestamp indicating as Document Date within the application.\n- `Tags.id`\n  Unique identifier for the tag used to categorise the document.\n- `Tags.externalId`\n  External system identifier for the tag.\n- `Tags.tagType`\n  Type of tag (e.g., `Custom` for user-defined tags).\n- `IgnoreDefaultTag`\n  If `\"true\"`, default tags will be ignored during upload.\n  If `\"false\"`, the relevant financial year system tag will be added. i.e FY2026\n- `UseUniqueName`\n  If `\"true\"`, appends a number to the filename to avoid duplication.\n- `KeepName`\n  If `\"true\"`, allows duplicate uploads with the same filename.\n\n\n**Required Headers must be supplied to the Presigned URL:**\n- `x-amz-meta-sha256` Must match the value of   Documents.SHA256\n- `Content-Type` Must reflect the actual file type. Example: application/pdf if a pdf document is uploaded.\n- `Content-Length` Must match the file size provided   in the body\n- `Host` value must be the baseurl/domain of the presigned url returned from the POST request. In our example it is : https://class-dms-staging-pie.s3.ap-southeast-2.amazonaws.com\n  Be mindful of the environment for the presigned url in our example it displays as \"-pie\", where this value can change depending on the environment where you call our endpoint. \"-prod\" if its referencing to our Production environment.\n",
        "operationId": "UploadDocumentsByFund",
        "parameters": [
          {
            "$ref": "#/components/parameters/businessCodeParam"
          },
          {
            "$ref": "#/components/parameters/fundCodeParam"
          },
          {
            "$ref": "#/components/parameters/versionParam"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentUploadLinkRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success (Ok). Pre-signed URL successfully generated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentUploadLinkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error Message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": null
                      }
                    }
                  }
                },
                "examples": {
                  "FileNameInvalid": {
                    "summary": "Invalid file name",
                    "value": {
                      "errors": [
                        {
                          "code": "API_FILE_NAME_INVALID",
                          "message": "File name is invalid or not provided"
                        }
                      ]
                    }
                  },
                  "FileSizeInvalid": {
                    "summary": "Invalid file size",
                    "value": {
                      "errors": [
                        {
                          "code": "API_FILE_SIZE_INVALID",
                          "message": "File size is invalid or not provided"
                        }
                      ]
                    }
                  },
                  "ContentTypeInvalid": {
                    "summary": "Invalid content type",
                    "value": {
                      "errors": [
                        {
                          "code": "API_CONTENT_TYPE_INVALID",
                          "message": "Content type is invalid or not provided"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnauthorizedErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ForbiddenErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not available or user does not have access to the fund",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceUnavailableErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InternalErrorCommon"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Class_oAuth": {
        "type": "oAuth2",
        "description": "Class uses oAuth2 and OpenID for authentication and authorisation",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://apigateway.class-pie.com.au/connect/authorize",
            "tokenUrl": "https://apigateway.class-pie.com.au/connect/token",
            "scopes": {
              "fund.read": "View all fund information",
              "fund.maintain": "View and maintain all fund information"
            }
          },
          "password": {
            "tokenUrl": "https://apigateway.class-pie.com.au/connect/token",
            "scopes": {
              "fund.read": "View all fund information",
              "fund.maintain": "View and maintain all fund information"
            }
          }
        }
      }
    },
    "parameters": {
      "businessCodeParam": {
        "name": "businessCode",
        "in": "path",
        "description": "Class business code",
        "required": true,
        "schema": {
          "type": "string",
          "example": "demo-business"
        }
      },
      "fundCodeParam": {
        "name": "fundCode",
        "description": "Class entity code",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "demo-fund"
        }
      },
      "versionParam": {
        "name": "version",
        "description": "API version",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "1.0"
        }
      }
    },
    "schemas": {
      "InternalErrorCommon": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "string",
            "example": "API_INTERNAL_ERROR"
          },
          "Message": {
            "type": "string",
            "example": "An unexpected error occurred on the server. Please try again later."
          }
        },
        "xml": {
          "name": "Error"
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ForbiddenErrorCommon": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "string",
            "example": "FORBIDDEN"
          },
          "Message": {
            "type": "string",
            "example": "You do not have permission to access this resource."
          }
        },
        "xml": {
          "name": "Error"
        }
      },
      "ResourceUnavailableErrorCommon": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "string",
            "example": "API_NOT_FOUND"
          },
          "Message": {
            "type": "string",
            "example": "Resource not available or user does not have access to the fund."
          }
        },
        "xml": {
          "name": "Error"
        }
      },
      "UnauthorizedErrorCommon": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "string",
            "example": "API_NOT_AUTHORISED"
          },
          "Message": {
            "type": "string",
            "example": "Not authorised"
          }
        },
        "xml": {
          "name": "Error",
          "wrapped": false
        }
      },
      "DocumentDownloadLinkResponse": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier for the document.",
            "example": "1f41a318-3179-4734-b9f5-9b95811bc270"
          },
          "url": {
            "type": "string",
            "nullable": true,
            "description": "Pre-signed URL to download the document.",
            "example": "https://class-dms-staging-pie.s3.ap-southeast-2.amazonaws.com/blob/example.blob"
          },
          "filename": {
            "type": "string",
            "nullable": true,
            "description": "The name of the file as stored or uploaded.",
            "example": "Tax Statement.pdf"
          },
          "expires": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp indicating when the pre-signed URL expires.",
            "example": "2025-09-16T14:38:18.7738637+10:00"
          }
        },
        "additionalProperties": false
      },
      "DocumentDownloadResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true,
            "description": "Pre-signed URL to download the document.",
            "example": "https://class-dms-staging-pie.s3.ap-southeast-2.amazonaws.com/blob/example.blob"
          },
          "expires": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp indicating when the pre-signed URL expires.",
            "example": "2025-09-16T14:38:18.7738637+10:00"
          }
        },
        "additionalProperties": false
      },
      "DocumentIdsRequest": {
        "type": "object",
        "properties": {
          "isRestricted": {
            "type": "boolean",
            "description": "Indicates whether the documents are restricted.",
            "example": false
          },
          "documentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "description": "List of unique document identifiers.",
            "example": [
              "1f41a318-3179-4734-b9f5-9b95811bc270",
              "8e4cbebe-61e2-4629-aa19-4dc804d7f7ae"
            ]
          }
        },
        "additionalProperties": false
      },
      "DocumentRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier for the document.",
            "example": "1f41a318-3179-4734-b9f5-9b95811bc270"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "A brief description or title of the document.",
            "example": "Tax Statement.pdf"
          },
          "fileName": {
            "type": "string",
            "nullable": true,
            "description": "The name of the file as stored or uploaded.",
            "example": "Tax Statement.pdf"
          },
          "createdBy": {
            "type": "string",
            "nullable": true,
            "description": "Email address of the user who created the document.",
            "example": "Bob.Jones@class.com.au"
          },
          "createdTime": {
            "type": "string",
            "nullable": true,
            "description": "Timestamp indicating when the document was created.",
            "example": "2024-04-23T10:27:51.643869"
          },
          "effectiveTime": {
            "type": "string",
            "nullable": true,
            "description": "The date and time when the document becomes effective or valid.",
            "example": "2023-06-30T00:00:00"
          },
          "effectiveStatusCode": {
            "type": "string",
            "nullable": true,
            "description": "Status code indicating the current effective state of the document.",
            "example": "Active"
          },
          "isClassManaged": {
            "type": "boolean",
            "description": "Indicates whether the document is managed by a class-based system.",
            "example": false
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "General status of the document (e.g., verified, unverified).",
            "example": "unverified"
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "Origin or source of the document (e.g., uploaded manually, system-generated).",
            "example": "unspecified"
          },
          "isRestricted": {
            "type": "boolean",
            "description": "Indicates whether access to the document is restricted.",
            "example": false
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentTagRequest"
            },
            "nullable": true,
            "description": "List of tags associated with the document."
          }
        },
        "additionalProperties": false
      },
      "DocumentResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier for the document.",
            "example": "1f41a318-3179-4734-b9f5-9b95811bc270"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "A brief description or title of the document.",
            "example": "Tax Statement.pdf"
          },
          "fileName": {
            "type": "string",
            "nullable": true,
            "description": "The name of the file as stored or uploaded.",
            "example": "Tax Statement.pdf"
          },
          "createdBy": {
            "type": "string",
            "nullable": true,
            "description": "Email address of the user who created the document.",
            "example": "Bob.Jones@class.com.au"
          },
          "createdTime": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp indicating when the document was created.",
            "example": "2024-04-23T10:27:51.643869"
          },
          "effectiveTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time when the document becomes effective or valid.",
            "example": "2023-06-30T00:00:00"
          },
          "updatedBy": {
            "type": "string",
            "nullable": true,
            "description": "Email address of the user who last updated the document.",
            "example": "Bob.Jones@class.com.au"
          },
          "updatedTime": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp indicating when the document was last updated.",
            "example": "2024-04-23T10:27:51.877835"
          },
          "effectiveStatusCode": {
            "type": "string",
            "nullable": true,
            "description": "Status code indicating the current effective state of the document.",
            "example": "Active"
          },
          "isClassManaged": {
            "type": "boolean",
            "description": "Indicates whether the document is managed by a class-based system.",
            "example": false
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "General status of the document (e.g., verified, unverified).",
            "example": "unverified"
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "Origin or source of the document (e.g., uploaded manually, system-generated).",
            "example": "unspecified"
          },
          "isRestricted": {
            "type": "boolean",
            "description": "Indicates whether access to the document is restricted.",
            "example": false
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentTagResponse"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "DocumentSearchRequest": {
        "type": "object",
        "properties": {
          "documentDateFrom": {
            "type": "string",
            "nullable": true,
            "description": "Filter documents with a document date on or after this date.",
            "example": "2023-01-01"
          },
          "documentDateTo": {
            "type": "string",
            "nullable": true,
            "description": "Filter documents with a document date on or before this date.",
            "example": "2025-12-31"
          },
          "createdDateFrom": {
            "type": "string",
            "nullable": true,
            "description": "Filter documents created on or after this date.",
            "example": "2023-01-01"
          },
          "createdDateTo": {
            "type": "string",
            "nullable": true,
            "description": "Filter documents created on or before this date.",
            "example": "2025-12-31"
          },
          "updatedDateFrom": {
            "type": "string",
            "nullable": true,
            "description": "Filter documents updated on or after this date.",
            "example": "2023-01-01"
          },
          "updatedDateTo": {
            "type": "string",
            "nullable": true,
            "description": "Filter documents updated on or before this date.",
            "example": "2025-12-31"
          },
          "searchText": {
            "type": "string",
            "nullable": true,
            "description": "Free text search string to filter documents by name or description.",
            "example": "Tax Statement"
          },
          "tagIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "description": "List of tag IDs to filter documents by.",
            "example": [
              "6014071d-1a37-4019-92c2-04bb15fc0c63"
            ]
          },
          "tagExternalId": {
            "type": "string",
            "description": "Include documents that have a tag where the tag external Id matches the specified value.",
            "nullable": true,
            "example": "385deb74-cd09-42d0-8ef4-88782fc3211c"
          },
          "ensureIdIncluded": {
            "type": "string",
            "description": "It will include the document that has the specified value in the search results regardless of the other search criteria.",
            "nullable": true,
            "example": "1f41a318-3179-4734-b9f5-9b95811bc270"
          },
          "onlyUntagged": {
            "type": "boolean",
            "description": "It will only include documents with no tags.",
            "example": false
          },
          "onlyRestricted": {
            "type": "boolean",
            "description": "It will only include documents that have IsRestricted status set to true.",
            "example": false
          }
        },
        "additionalProperties": false
      },
      "DocumentTagRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier for the tag.",
            "example": "6014071d-1a37-4019-92c2-04bb15fc0c63"
          },
          "externalId": {
            "type": "string",
            "nullable": true,
            "description": "External system identifier associated with the tag.",
            "example": "385deb74-cd09-42d0-8ef4-88782fc3211c"
          },
          "displayName": {
            "type": "string",
            "nullable": true,
            "description": "Human-readable name or label for the tag.",
            "example": "Ms Ellyse Perry: Accumulation"
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "Internal code used to reference the tag.",
            "example": null
          },
          "tagType": {
            "type": "string",
            "nullable": true,
            "description": "Category or classification of the tag (e.g. Custom, System, Member, Account, Investment).",
            "example": "Account"
          },
          "isProtected": {
            "type": "boolean",
            "description": "Indicates whether the tag is protected from deletion or modification.",
            "example": false
          }
        },
        "additionalProperties": false
      },
      "DocumentTagResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier for the tag.",
            "example": "6014071d-1a37-4019-92c2-04bb15fc0c63"
          },
          "externalId": {
            "type": "string",
            "nullable": true,
            "description": "External system identifier associated with the tag.",
            "example": "385deb74-cd09-42d0-8ef4-88782fc3211c"
          },
          "displayName": {
            "type": "string",
            "nullable": true,
            "description": "Human-readable name or label for the tag.",
            "example": "Ms Ellyse Perry: Accumulation"
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "Internal code used to reference the tag.",
            "example": null
          },
          "tagType": {
            "type": "string",
            "nullable": true,
            "description": "Category or classification of the tag (e.g. Custom, System, Member, Account, Investment).",
            "example": "Account"
          },
          "isProtected": {
            "type": "boolean",
            "description": "Indicates whether the tag is protected from deletion or modification.",
            "example": false
          }
        },
        "additionalProperties": false
      },
      "DocumentTagsRequest": {
        "type": "object",
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentTagRequest"
            },
            "nullable": true,
            "description": "List of tags to associate with the document."
          }
        },
        "additionalProperties": false
      },
      "DocumentTagsResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32",
            "readOnly": true,
            "description": "The total number of tags returned.",
            "example": 3
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentTagResponse"
            },
            "nullable": true,
            "description": "List of tags associated with the document."
          }
        },
        "additionalProperties": false
      },
      "DocumentsDownloadRequest": {
        "type": "object",
        "properties": {
          "documentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "description": "List of unique document identifiers to download.",
            "example": [
              "1f41a318-3179-4734-b9f5-9b95811bc270",
              "8e4cbebe-61e2-4629-aa19-4dc804d7f7ae"
            ]
          }
        },
        "additionalProperties": false
      },
      "DocumentsDownloadResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32",
            "readOnly": true,
            "description": "The total number of documents returned.",
            "example": 2
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentDownloadLinkResponse"
            },
            "nullable": true,
            "description": "List of document download links."
          }
        },
        "additionalProperties": false
      },
      "DocumentsResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "description": "The total number of documents returned by the query."
          },
          "pageSize": {
            "type": "integer",
            "format": "int32",
            "example": 500,
            "description": "The number of documents included per page of results."
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "description": "The current page number being viewed or returned."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "description": "The total number of pages available based on the total and pageSize."
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentResponse"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "DocumentUploadLinkRequest": {
        "type": "object",
        "properties": {
          "Documents": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "Filesize",
                "Filename",
                "SHA256"
              ],
              "properties": {
                "Filename": {
                  "type": "string",
                  "description": "Name of the file to be uploaded. Must not exceed 50     characters. Supported file types include PDF, MP4, HEIC, and other     standard document formats.\n",
                  "example": "Refresh Token and Access Token Usage.pdf"
                },
                "Filesize": {
                  "type": "string",
                  "description": "Size of the file in bytes. Large files in MBs/GBs are     supported but may require additional validation.\n",
                  "example": "70000"
                },
                "SHA256": {
                  "type": "string",
                  "description": "SHA-256 hash of the file content used for integrity     verification. Must match the hash of the uploaded file.\n",
                  "example": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b78    52b854"
                },
                "Description": {
                  "type": "string",
                  "description": "Description of the document. Must not exceed 1000     characters. Only allowed special characters are . , ; : ! ? \\ - ( ) & '     \" / \\\n",
                  "example": "2025_08_26 - My New Text File"
                },
                "EffectiveTime": {
                  "type": "string",
                  "description": "Timestamp indicating the document creation time. Displayed in the application as the CreatedBy time.\n",
                  "example": "2025-08-26"
                },
                "Tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier for the tag used to categorise the     document.\n",
                        "example": "301afb8a-0193-4c87-a16f-636565f7cd66"
                      },
                      "externalId": {
                        "type": "string",
                        "description": "External identifier for the tag, used for integration with    external     systems.\n",
                        "example": "301afb8a-0193-4c87-a16f-636565f7cd66"
                      },
                      "tagType": {
                        "type": "string",
                        "description": "Type of the tag. For example, 'Custom' indicates a user    -defined tag.\n",
                        "example": "Custom"
                      }
                    }
                  }
                }
              }
            }
          },
          "IgnoreDefaultTag": {
            "type": "string",
            "description": "Flag to indicate whether default tags should be ignored during     upload. Accepts 'true' or 'false'.\n",
            "example": "false"
          },
          "UseUniqueName": {
            "type": "string",
            "description": "Flag to append a unique number to the filename to avoid     duplication. Accepts 'true' or 'false'.\n",
            "example": "false"
          },
          "KeepName": {
            "type": "string",
            "description": "Flag to allow duplicate uploads with the same filename. Accepts 'true' or 'false'.\n",
            "example": "false"
          }
        },
        "required": [
          "Documents"
        ],
        "additionalProperties": false
      },
      "DocumentUploadLinkResponse": {
        "type": "object",
        "properties": {
          "messageGroupId": {
            "type": "object",
            "description": "Unique identifier for the upload message group.",
            "example": "fdf9c2da-4042-4498-bd4a-1a0118cfdd0c"
          },
          "documents": {
            "type": "array",
            "description": "List of documents with their pre-signed upload URLs.",
            "items": {
              "type": "object",
              "properties": {
                "uploadId": {
                  "type": "string",
                  "description": "Unique identifier for this upload.",
                  "example": "938b136f-7fd5-4628-894d-9ed5a0197fa3"
                },
                "url": {
                  "type": "string",
                  "description": "Pre-signed URL to upload the document to.",
                  "example": "https://class-dms-staging-pie.s3.ap-southeast-2.amazonaws.com/blob/938b136f-7fd5-4628-894d-9ed5a0197fa3.blob?X-Amz-Expires=300&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAoaDmFwLXNvdXRoZWFzdC0yIkcwRQIhAJl5L789S3SMkDmLdrDCBWljTX9pWObu53mSNHur%2Bzc8AiB9rqGUHDGmGmastfkil4Hi%2FxcUw6jXtUg1AOo4KV9CkSqLBAiD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAQaDDEyMjMwMzc1MDI1OCIMDhWyfNB%2FCgaID1CvKt8DKFKhSjK7AfBirPXJzHAoaxo%2Ff1tpUGYASjn8524R5GNYPm7ccERugBCHKoL%2BYPN9EZ72Fx2Hb%2F8GEu8ri8mLXzm65V1L4NjRrrL5%2BUI%2FvwgSlIlYyM3NmUB3uiOTc8UW31jpcDCN4a5LHsjn0UHoDTZTclFVDRlQvBkW4EtNIOCI3rHpSjpAr9xDUn3ZTiWXBuHWH3M%2BJyi%2BE3YDEMwwhWeH%2Bk0vK3ZsYvr3jlkKMnzEPS5AF9lGOu2RnLx8VrcECDCwhEV38UDSRKNjrE4bC7phyNiUAQ%2B%2BF89lyutSCQobVGZ9bA7luJF0All3JZoYGGhpWcrPjbIiFg9OiuqeqJ5lNeojGex1X%2FSuwZusznkL5pJEllsFp7xPx1DMbcQu3ViWQSBPN0ihfVXHZF6MokNvQNCg2khSGBM3IuLnQ%2BSD3kQGSX0n8skXw7Lu0kdZOJ9Ci%2FWiMQK61v0vVIwtVV9AQfL0vIOb%2BIIEzHrTWkbKtXEhiRq%2Fz083HcGJIYOj0O5i%2Bt4UsB8cPSZiFyfsadN6dVpczIxR8gWRabG%2FfZKutrMmXqeTt2tHNLT1CaOjWiZ9dMcL%2FRWmA9cilwMxr%2BH1mL6xNOhpT925xPuciZ%2Ba40FYZfqDS%2FpPV2TQqxUwo46jxgY6pQHC%2Fz2I6VrMEx998yrjOq7NDsWfKszSAInD3vmH6PZVjaJEqaVx675Bs2rBTrvyA5tVp84euZznyFURlmRQ5tqitu4X6GIutWOg4oEANDKhA9JUp7ZSyfxeGG4JaoRomliEKONUKkXiOJGShmyu2wV%2B8gnEMPIdBPm9vmIvocT9MyiUp6yUs6%2FWF7fqPY6CtJDjrZNJeUUP02fSpFmvZ6c4oWdrsiM%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIARY6O7EBZAOJMTPKK%2F20250916%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20250916T043318Z&X-Amz-SignedHeaders=content-length%3Bcontent-type%3Bhost%3Bx-amz-meta-sha256&X-Amz-Signature=c933ca20b3accb172bbff065bc474291cf02a7b5e4faca75006e7d7cf33d26bd"
                },
                "filename": {
                  "type": "string",
                  "description": "The name of the file being uploaded.",
                  "example": "Refresh Token and Access Token Usage.pdf"
                },
                "expires": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp indicating when the pre-signed URL expires.",
                  "example": "2025-09-16T14:38:18.7738637+10:00"
                }
              }
            }
          }
        }
      },
      "TagRequest": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "nullable": true,
            "description": "Human-readable name or label for the tag.",
            "example": "Ms Ellyse Perry: Accumulation"
          }
        },
        "additionalProperties": false
      },
      "TagResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier for the tag.",
            "example": "6014071d-1a37-4019-92c2-04bb15fc0c63"
          },
          "externalId": {
            "type": "string",
            "nullable": true,
            "description": "External system identifier associated with the tag.",
            "example": "385deb74-cd09-42d0-8ef4-88782fc3211c"
          },
          "displayName": {
            "type": "string",
            "nullable": true,
            "description": "Human-readable name or label for the tag.",
            "example": "Ms Ellyse Perry: Accumulation"
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "Internal code used to reference the tag.",
            "example": null
          },
          "tagType": {
            "type": "string",
            "nullable": true,
            "description": "Category or classification of the tag (e.g. Default, Custom).",
            "example": "Custom"
          },
          "effectiveStatusCode": {
            "type": "string",
            "nullable": true,
            "description": "Status code indicating the current effective state of the tag.",
            "example": "Active"
          },
          "createdTime": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp indicating when the tag was created.",
            "example": "2024-04-23T10:27:51.643869"
          }
        },
        "additionalProperties": false
      },
      "TagsResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "The total number of documents returned by the query.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "format": "int32",
            "description": "The number of documents included per page of results.",
            "example": 500
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32",
            "description": "The current page number being viewed or returned.",
            "example": 1
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The total number of pages available based on the total and pageSize.",
            "example": 1
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagResponse"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}