Digest API
Upload a file to Digest for parsing and ingestion.
This endpoint accepts a single file (PDF, CSV, XLSX, or TXT) and returns a reference to the stored file once it’s successfully processed.
Endpoint
POST https://commissionconnector.com/api/digest
Authentication
Every request must include your API key in the header:
x-api-key: YOUR_API_KEY
Request
Headers
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | string | ✅ | Your unique API key for authentication |
Content-Type | multipart/form-data | ✅ | Automatically set when sending form data |
Body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
file | File (binary) | ✅ | The file to upload. Accepted types: .pdf, .csv, .xlsx, .txt |
The file must be attached using the key
file.
Response
200 OK
Example successful response:
{
"status": "digested",
"file": {
"id": "9c681f6b-d3fd-418c-b347-8c8ba6878146",
"name": "filename123.xlsx"
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
status | string | The current processing status. Possible values: digested, skipped_duplicate, not_recognized, or rejected. |
file.id | string (UUID) | The unique identifier assigned to the uploaded file. Use this ID to reference the file in other API calls. |
file.name | string | The original filename uploaded. |
Error Responses
| HTTP Code | Error | Description |
|---|---|---|
400 | Bad Request | Missing required field file, or invalid multipart structure. |
401 | Unauthorized | Invalid or missing x-api-key. |
413 | Payload Too Large | File exceeds the maximum allowed size. |
415 | Unsupported Media Type | File type not supported. |
422 | Unprocessable Entity | File unreadable, corrupted, or password-protected. |
429 | Too Many Requests | Rate limit exceeded. |
500 / 503 | Server Error | Temporary or internal failure; retry later. |
Examples
cURL
curl -X POST "https://commissionconnector.com/api/digest" \ -H "x-api-key: YOUR_API_KEY" \ -F "file=@/path/to/filename123.xlsx"
HTTPie
http -f POST https://commissionconnector.com/api/digest \ x-api-key:YOUR_API_KEY \ file@/path/to/filename123.xlsx
JavaScript (fetch)
const form = new FormData();
form.append("file", new File(["..."], "filename123.xlsx"));
const res = await fetch("https://commissionconnector.com/api/digest", {
method: "POST",
headers: { "x-api-key": "YOUR_API_KEY" },
body: form
});
const data = await res.json();
console.log(data);
/*
{
status: "digested",
file: {
id: "9c681f6b-d3fd-418c-b347-8c8ba6878146",
name: "filename123.xlsx"
}
}
*/
Python (requests)
import requests
with open("0000266321_06-25-2024.xlsx", "rb") as f:
files = {"file": ("filename123.xlsx", f, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}
headers = {"x-api-key": "YOUR_API_KEY"}
r = requests.post("https://commissionconnector.com/api/digest", headers=headers, files=files)
print(r.json())
Notes
- Only one file can be uploaded per request.
- File must be valid and not password-protected.
- A successful upload will return
status: "digested".
Change Log
2025-10-14 — Endpoint documented with
x-api-keyauthentication and updated response format:{ "status": "digested", "file": { "id": "<uuid>", "name": "<filename>" } }
Comments
0 comments
Please sign in to leave a comment.