Skip to main content

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.

POST
/document-api/v1/get-document-types

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 or description) and sortMode (ascend for ascending, descend for descending) in the request body.

Request

Attribute NameData TypeDescription
namestringName of the document type to search
descriptionstringShort description of the document type to search
pageintegerPage of the results list to return
sizeintegerSize of the page(s) returned
sortBystringSort method of the results returned. Default: name
sortModestringSort direction of the results returned (ascend or descend)

Response

The data attribute in the response represents an array of document type objects available for use within the API.

Attribute NameData TypeDescription
idStringA unique identifier for the document type.
nameStringThe name of the document type.
descriptionStringA brief description of the document type.
referencesArray<String>An array of subcategory or type identifiers related to the document type.