Skip to main content

Get Documents

Method: GET
/api/v1/documents


Description

This endpoint retrieves a list of documents based on various filters such as document status, user roles, document types, and other criteria.


🔑 Authentication

This endpoint requires authentication via headers.

ParamValueType
tenantId{{tenantId}}string
countryCode{{countryCode}}string (optional)
userId{{userId}}string

Query Parameters

NameTypeDescription
byDocumentConfigIdsstringFilter by document configuration IDs.
byUploadedBystringFilter by who uploaded the document (SELLER, BUYER, ADMIN).
activeDocumentsstringFilter by active status (0 for inactive, 1 for active).
byDocumentStatusesstringFilter by document status (PENDING, AWAITING_APPROVAL, APPROVED, REJECTED).
byDocumentModelIdsstringFilter by document model IDs.
byDocumentUserIdsstringFilter by document user IDs.
byDocumentModelTypesstringFilter by document model types (PRODUCT, TRADE).
orderstringSort results by ASC (ascending) or DESC (descending) order.
pagestringSpecify the page number for paginated results.
limitstringSpecify the number of results per page.

Response: 200 OK

A successful response returns a list of documents matching the specified criteria.

Example Response:

[
{
"documentId": "12345",
"name": "Invoice",
"status": "APPROVED",
"uploadedBy": "SELLER",
"modelType": "TRADE",
"createdAt": "2025-02-12T04:04:39.986Z"
},
{
"documentId": "67890",
"name": "Product Specification",
"status": "PENDING",
"uploadedBy": "BUYER",
"modelType": "PRODUCT",
"createdAt": "2025-02-10T11:22:30.000Z"
}
]

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/documents \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!