Get Document Types
The get-document-types
endpoint is an essential part of the Document API, designed to provide users with information
about the different types of document categories and subcategories available within our platform.
This endpoint is crucial for understanding the types of documents that can be uploaded, downloaded, and managed through the API.
Usage
This endpoint leverages filtering, sorting, and paging to refine and organize the results returned by passing parameters in the request body.
Filtering
By default, this endpoint returns all document types the requester has access to.
To filter the result set, include name
, description
, or both in the request body.
This enables the retrieval of document types that specifically match your criteria.
Paging
Handling large volumes of data is made easier with paging:
- Default Page Size: 25 records. This can be customized by specifying the size attribute in the request body.
- Page Navigation: Use the page attribute in the request body to specify the page number you wish to retrieve.
For responses that contain more records than the size of one page, you will need to make additional requests with the page attribute incremented to access more data.
Sorting
Organize your results with sorting options:
- Default Sorting: Results are sorted by name in ascending order.
- Custom Sorting: Adjust the sorting behavior by including sortBy (the attribute you wish to sort by, e.g.,
name
ordescription
) and sortMode (ascend
for ascending,descend
for descending) in the request body.
Request
- Schema
- Example
Attribute Name | Data Type | Description |
---|---|---|
name | string | Name of the document type to search |
description | string | Short description of the document type to search |
page | integer | Page of the results list to return |
size | integer | Size of the page(s) returned |
sortBy | string | Sort method of the results returned. Default: name |
sortMode | string | Sort direction of the results returned (ascend or descend ) |
{
"name": "New Accounts Documents",
"description": "New Accounts Documents",
"page": 1,
"size": 100,
"sortBy": "name",
"sortMode": "Ascend"
}
Response
The data
attribute in the response represents an array of document type objects available for use within the API.
- Schema
- Example
Attribute Name | Data Type | Description |
---|---|---|
id | String | A unique identifier for the document type. |
name | String | The name of the document type. |
description | String | A brief description of the document type. |
references | Array<String> | An array of subcategory or type identifiers related to the document type. |
{
"statusCode": 200,
"message": "Request successful.",
"data": [
{
"id": "2a3ad870-f7b5-e811-8113-005056b90b30",
"name": "New Accounts Documents",
"description": "New Accounts Documents",
"references": [
"RGSP",
"BBL",
"PLDG",
"HSLD",
"INVC",
"WILL",
"NEWA",
"W8IM",
"407L",
"FRRG",
"CHAR",
"EDEL",
"FASF",
"CASH",
"IPO2",
"W8BN",
"ADOP",
"SOLE",
"POAL",
"PICT",
"MARR",
"TRAU",
"EMRG",
"ADOP-Traditional",
"LOA",
"OPTS",
"NONC",
"FCRT",
"ADOP-Roth",
"DCRT",
"POAF",
"SAPA",
"DVDC",
"W8BE",
"UNIK",
"NOSL",
"MRGN",
"LTR",
"SLOA",
"ADOP-Simple",
"TCRT",
"TOD",
"BEOW",
"OTHR",
"PART",
"CORP",
"TRST",
"SEP",
"W9",
"ASSC",
"CRTA",
"PSPN",
"BRTC",
"DSCR",
"BLAW"
]
}
],
"errors": [],
"traceId": "00-61bfc07b3a120b4a17bc4ac38ad3208e-d3a16dbe00b7a283-00",
"hasErrors": false
}