Documents
GET
https://leads.qreq.com/api/documents
curl --request GET \
--url 'https://leads.qreq.com/api/documents' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/documents' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Documents retrieved successfully.",
"data": [
{
"id": 101,
"name": "Contract_A_2025.pdf",
"type_id": 1,
"type_name": "Passport",
"uploaded_by": 33,
"file_url": "https://cdn.qreq.com/files/contract_a_2025.pdf",
"size": 245760,
"status": "active",
"created_at": "2025-11-04T10:00:00.000000Z",
"updated_at": "2025-11-04T10:05:00.000000Z"
},
{
"id": 102,
"name": "UtilityBill_B_2025.jpg",
"type_id": 2,
"type_name": "Utility Bill",
"uploaded_by": 34,
"file_url": "https://cdn.qreq.com/files/utilitybill_b_2025.jpg",
"size": 123456,
"status": "inactive",
"created_at": "2025-11-04T11:10:00.000000Z",
"updated_at": "2025-11-04T11:15:00.000000Z"
}
]
}
GET
https://leads.qreq.com/api/documents/{document_id}
curl --request GET \
--url 'https://leads.qreq.com/api/documents/{document_id}' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/documents/{document_id}' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Document retrieved successfully.",
"data": {
"id": 101,
"name": "Contract_A_2025.pdf",
"type_id": 1,
"type_name": "Passport",
"uploaded_by": 33,
"file_url": "https://cdn.qreq.com/files/contract_a_2025.pdf",
"size": 245760,
"status": "active",
"created_at": "2025-11-04T10:00:00.000000Z",
"updated_at": "2025-11-04T10:05:00.000000Z"
}
}
POST
https://leads.qreq.com/api/documents
| Parameter | Einzelheiten | Beschreibung |
|---|---|---|
| name | ErforderlichZeichenfolge | Document filename e.g. “Contract_A_2025.pdf” |
| type_id | ErforderlichGanzzahl | ID of the document type (from document-types list) |
| file (multipart/form-data) | ErforderlichDatei | The actual file to upload |
| description | OptionalZeichenfolge | Description or notes about the document |
curl --request POST \
--url 'https://leads.qreq.com/api/documents' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name="Contract_A_2025.pdf"' \
--form 'type_id=1' \
--form 'file=@/path/to/Contract_A_2025.pdf' \
--form 'description="Contract for Q4 clients"'
--url 'https://leads.qreq.com/api/documents' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name="Contract_A_2025.pdf"' \
--form 'type_id=1' \
--form 'file=@/path/to/Contract_A_2025.pdf' \
--form 'description="Contract for Q4 clients"'
{
"status": "success",
"message": "Document created successfully.",
"data": {
"id": 103,
"name": "Contract_A_2025.pdf",
"type_id": 1,
"type_name": "Passport",
"uploaded_by": 33,
"file_url": "https://cdn.qreq.com/files/contract_a_2025.pdf",
"size": 245760,
"status": "active",
"created_at": "2025-11-04T12:00:00.000000Z",
"updated_at": "2025-11-04T12:00:00.000000Z"
}
}
PUT
https://leads.qreq.com/api/documents/{document_id}
curl --request PUT \
--url 'https://leads.qreq.com/api/documents/{document_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Updated_Contract_A_2025.pdf", "description": "Updated description for Q4 contract", "status": "inactive" }'
--url 'https://leads.qreq.com/api/documents/{document_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Updated_Contract_A_2025.pdf", "description": "Updated description for Q4 contract", "status": "inactive" }'
{
"status": "success",
"message": "Document updated successfully.",
"data": {
"id": 103,
"name": "Updated_Contract_A_2025.pdf",
"description": "Updated description for Q4 contract",
"status": "inactive",
"updated_at": "2025-11-04T12:10:00.000000Z"
}
}
DELETE
https://leads.qreq.com/api/documents/{document_id}
curl --request DELETE \
--url 'https://leads.qreq.com/api/documents/{document_id}' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/documents/{document_id}' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Document deleted successfully."
}