| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Get Attachment by ID from UW Task
Retrieves the full file content of a single attachment from a UW task ticket, identified by its attachment ID. The response includes the Base64-encoded file data along with the file name and MIME type, allowing the caller to reconstruct and display or save the original document.
Endpoint
GET /api/v1/uwTasks/ticket/getAttachmentById
Authentication
Basic HTTP Authentication required.
Encode username:password in Base64 and pass in the Authorization header:
Authorization: Basic {base64(username:password)}
When to use
Use this endpoint when you need to download or display a specific document that was previously uploaded to a UW task ticket. Typically, you first call GET /api/v1/uwTasks/ticket/getAttachmentsByTicketId to get the list of attachment IDs for a ticket, then use this endpoint to fetch the content of a particular file. Useful for reviewing a driver's license, bank statement, or any other document submitted during the underwriting process.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (int32) | Yes | Merchant profile ID that owns the UW task |
| ticketId | integer (int32) | Yes | ID of the UW task ticket that contains the attachment |
| attachId | integer (int32) | Yes | ID of the specific attachment to retrieve |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| data.content | string (byte/base64) | Base64-encoded file content |
| data.fileName | string | Original file name including extension |
| data.mimeType | string | MIME type of the file (e.g., application/pdf) |
| status | string (enum) | HTTP status name, e.g., "OK" |
| error | string | Error message if the operation failed |
| warning | string | Non-fatal warning message |
| validationResults | array | Field-level validation errors, if any |
| requestId | integer | Unique identifier for this API request |
{
"data": {
"content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9...",
"fileName": "john_smith_dl.pdf",
"mimeType": "application/pdf"
},
"status": "OK",
"error": null,
"warning": null,
"validationResults": [],
"requestId": 88512
}Error Codes
| Code | When it happens |
|---|---|
| 400 | One or more of id, ticketId, or attachId is missing or not a valid integer |
| 401 | Invalid or missing Basic Auth credentials |
| 403 | User does not have permission for this operation |
| 404 | Merchant, ticket, or attachment not found |
| 500 | Internal server error |
Common Mistakes
- Confusing
attachIdwithticketId— these are distinct identifiers;attachIdis the ID of a specific file, not the task itself. - Not first listing attachments via
GET /api/v1/uwTasks/ticket/getAttachmentsByTicketIdto find validattachIdvalues. - Forgetting to Base64-decode the
data.contentfield before writing or displaying the file.
Related Endpoints
GET /api/v1/uwTasks/ticket/getAttachmentsByTicketId— list all attachment metadata for a ticket (provides validattachIdvalues)POST /api/v1/uwTasks/ticket/addAttachment— upload a new attachment to a ticketGET /api/v1/uwTasks/getByMerchantId— get the list of UW tickets for a merchant
Example
curl -X GET "https://hq.staging.netevia.dev/api/v1/uwTasks/ticket/getAttachmentById?id=48201&ticketId=1073&attachId=5519" \
-H "Authorization: Basic $(echo -n 'username:password' | base64)"