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.
| Param | Value | Type |
|---|---|---|
tenantId | {{tenantId}} | string |
countryCode | {{countryCode}} | string (optional) |
userId | {{userId}} | string |
Query Parameters
| Name | Type | Description |
|---|---|---|
byDocumentConfigIds | string | Filter by document configuration IDs. |
byUploadedBy | string | Filter by who uploaded the document (SELLER, BUYER, ADMIN). |
activeDocuments | string | Filter by active status (0 for inactive, 1 for active). |
byDocumentStatuses | string | Filter by document status (PENDING, AWAITING_APPROVAL, APPROVED, REJECTED). |
byDocumentModelIds | string | Filter by document model IDs. |
byDocumentUserIds | string | Filter by document user IDs. |
byDocumentModelTypes | string | Filter by document model types (PRODUCT, TRADE). |
order | string | Sort results by ASC (ascending) or DESC (descending) order. |
page | string | Specify the page number for paginated results. |
limit | string | Specify 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
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!