Get Attachment by ID

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Get Attachment by ID

Retrieves the binary content of a single ticket attachment, returned as a Base64-encoded string along with the original filename and MIME type. Use this endpoint when you need to download or display a specific document that was previously attached to a ticket.

Endpoint

GET /api/v1/tickets/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 to retrieve the actual file content of an attachment — for example, to download a voided check, processing statement, or compliance document that was uploaded to a ticket. First call GET /api/v1/tickets/getAttachmentsByTicketId to obtain the attachment ID, then use this endpoint to fetch the file content.

Query Parameters

ParameterTypeRequiredDescription
idinteger (int32)YesMerchant profile ID associated with the ticket.
ticketIdinteger (int32)YesID of the ticket the attachment belongs to.
attachIdinteger (int32)YesID of the specific attachment to retrieve.

Response

200 OK

FieldTypeDescription
data.contentstring (byte)Base64-encoded file content. Decode to obtain the raw binary.
data.fileNamestringOriginal filename including extension (e.g., voided_check.pdf).
data.mimeTypestringMIME type of the file (e.g., application/pdf).
requestIdintegerInternal request tracking ID.
successbooleantrue if the attachment was retrieved successfully.
errorstringError message if the operation failed.
validationErrorsarrayList of field-level validation issues.
{
  "data": {
    "content": "JVBERi0xLjQKJcfs4AAQSkZjRgABAQAAAQABAAD...",
    "fileName": "voided_check.pdf",
    "mimeType": "application/pdf"
  },
  "requestId": 98126,
  "success": true,
  "error": null,
  "validationErrors": []
}

Error Codes

CodeWhen it happens
400Missing or invalid query parameters (id, ticketId, or attachId).
401Invalid or missing Basic Auth credentials.
403User does not have permission for this operation.
404Ticket or attachment not found for the given IDs.
500Internal server error.

Common Mistakes

  • Confusing id (merchant profile ID) with attachId (attachment ID) — all three parameters are distinct and required.
  • Using an attachId from a different ticket — each attachment ID is scoped to its parent ticket.
  • Not decoding the Base64 content field before attempting to open or display the file.
  • Calling this endpoint without first listing attachments via getAttachmentsByTicketId to confirm the attachment exists.

Related Endpoints

  • GET /api/v1/tickets/getAttachmentsByTicketId — List all attachment metadata for a ticket to obtain valid attachId values.
  • POST /api/v1/tickets/attachment — Upload a new attachment to a ticket.
  • GET /api/v1/tickets/getTicketById — Retrieve ticket details including the hasAttachment flag.

Example

curl -X GET "https://hq.staging.netevia.dev/api/v1/tickets/getAttachmentById?id=70269&ticketId=48291&attachId=1034" \
  -H "Authorization: Basic $(echo -n 'username:password' | base64)"
Query Params
int32
required
int32
required
int32
required
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/json