Upload a single document
Upload a single document with client_id and document_type. The document will be stored in blob storage with path structure: {client_id}/{document_type}/{YYYY-MM-DD}/{filename} If a document with the same blob_url already exists, it will be updated instead of creating a duplicate.
Endpoint URL
https://api.neudociq.com/api/v1/documents/uploadOverview
Upload a single document with client_id and document_type. The document will be stored in blob storage with path structure: {client_id}/{document_type}/{YYYY-MM-DD}/{filename} If a document with the same blob_url already exists, it will be updated instead of creating a duplicate.
Purpose
Upload a single document
Use Case
Use multipart uploads from browsers or server-side form-data clients when sending files.
Authentication
- APIKeyHeader: API key in header (X-API-Key).
Header Example
X-API-Key: ndq_test_api_keyHeaders
No parameters.
Query Parameters
No parameters.
Path Parameters
No parameters.
Request Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| client_id | string | Required | Client identifier | client_id_value |
| document_type | string | Required | Document type (e.g., invoice, receipt, contract) | document_type_value |
| file | string | Required | Document file to upload | file_value |
Request Default
Copy-ready examples with real endpoint paths and authentication placeholders.
const url = "https://api.neudociq.com/api/v1/documents/upload";
const formData = new FormData();
formData.append('client_id', "client_id_value");
formData.append('document_type', "document_type_value");
formData.append('file', "file_value");
formData.append('metadata', "string_value");
const response = await fetch(url, {
method: 'POST',
headers: {
'X-API-Key': 'ndq_test_api_key',
},
body: formData,
});
const data = await response.json();
console.log(data);Best Practices
- Validate required fields client-side before sending requests.
- Log request identifiers and HTTP status codes for supportability.
- Retry only when the operation is safe or your workflow is idempotent.
- Check file size and content type before upload to avoid unnecessary transfer failures.