| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Get Attachments by Ticket ID
Returns the metadata for all attachments currently associated with a given ticket. Each item in the response includes the attachment ID, filename, upload date, type, and the user who uploaded it. Use the returned attachment IDs with the Get Attachment by ID endpoint to download individual files.
Endpoint
GET /api/v1/tickets/getAttachmentsByTicketId
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 to audit all documents submitted on a ticket or to identify which files have already been uploaded before adding new ones. This is the first step in a file-retrieval workflow — call this endpoint to get attachment IDs, then call GET /api/v1/tickets/getAttachmentById to download specific files.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer (int32) | Yes | Merchant profile ID associated with the ticket. |
ticketId | integer (int32) | Yes | ID of the ticket whose attachments to list. |
Response
200 OK
| Field | Type | Description |
|---|---|---|
data | array | List of attachment metadata objects. |
data[].id | integer | Unique attachment ID. Use this with getAttachmentById. |
data[].fileName | string | Original filename including extension. |
data[].dateTime | string (date-time) | ISO 8601 timestamp of when the attachment was uploaded. |
data[].type | string | Attachment category (e.g., VoidCheck, ProcessingStatements). |
data[].riskDocument | boolean | true if the file is flagged as a risk document. |
data[].userName | string | Username of the person who uploaded the attachment. |
requestId | integer | Internal request tracking ID. |
success | boolean | true if the list was retrieved successfully. |
error | string | Error message if the operation failed. |
validationErrors | array | List of field-level validation issues. |
{
"data": [
{
"id": 1034,
"fileName": "voided_check.pdf",
"dateTime": "2026-05-15T10:23:00Z",
"type": "VoidCheck",
"riskDocument": false,
"userName": "[email protected]"
},
{
"id": 1035,
"fileName": "processing_statement_march.pdf",
"dateTime": "2026-05-15T10:45:00Z",
"type": "ProcessingStatements",
"riskDocument": false,
"userName": "[email protected]"
}
],
"requestId": 98127,
"success": true,
"error": null,
"validationErrors": []
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing or invalid query parameters (id or ticketId). |
| 401 | Invalid or missing Basic Auth credentials. |
| 403 | User does not have permission for this operation. |
| 404 | Ticket not found for the given ticketId. |
| 500 | Internal server error. |
Common Mistakes
- Omitting the
id(merchant profile ID) parameter — it is required alongsideticketId. - Expecting file content in this response — this endpoint returns metadata only; use
getAttachmentByIdto download the actual file. - Calling this on a ticket with no attachments and treating an empty
dataarray as an error — an empty array withsuccess: trueis a valid response.
Related Endpoints
GET /api/v1/tickets/getAttachmentById— Download the content of a specific attachment using theidfrom this response.POST /api/v1/tickets/attachment— Upload a new attachment to the ticket.GET /api/v1/tickets/getTicketById— Check thehasAttachmentflag before calling this endpoint.
Example
curl -X GET "https://hq.staging.netevia.dev/api/v1/tickets/getAttachmentsByTicketId?id=70269&ticketId=48291" \
-H "Authorization: Basic $(echo -n 'username:password' | base64)"