API Method: POST /api/v1/uwTasks/ticket/addAttachment
Description:
This API endpoint is used to add an attachment to a specific Underwriting (UW) task ticket. Underwriting tasks often require supporting documentation (such as a driver's license, passport, or SSN) to complete the merchant application review. This endpoint allows users to upload files associated with a task for review by the underwriting team.
Request:
- HTTP Method: POST
- Endpoint:
/api/v1/uwTasks/ticket/addAttachment
- Content-Type:
application/json
Request Body Parameters:
The request must be in JSON format and include the following fields:
-
ID (required):
The unique identifier of the merchant whose underwriting task is being updated with an attachment.- Type:
int32
- Example:
"ID": 12345
- Type:
-
ticketId (required):
The identifier of the specific underwriting task (ticket) to which the attachment is being added.- Type:
int32
- Example:
"ticketId": 67890
- Type:
-
attachmentType (required):
The type of document being attached. This can be one of the following values:- "Driver license"
- "Bank statements"
- "Any other..."
- Type:
string
- Example:
"attachmentType": "Driver license"
-
fileName (required):
The name of the file being uploaded as an attachment.- Type:
string
- Example:
"fileName": "driver_license.pdf"
- Type:
-
data (required):
The file data in base64 encoding. This is the actual content of the file being uploaded.- Type:
string
(base64 encoded) - Example:
"data": "base64EncodedDataHere"
- Type:
-
comment (optional):
Any additional comments or notes related to the attachment.- Type:
string
- Example:
"comment": "Driver license for identity verification"
- Type:
Response:
-
Status Code:
200 OK
: If the attachment is successfully added to the UW task.400 Bad Request
: If required fields are missing or invalid.500 Internal Server Error
: If there is an issue processing the request.
-
Response Body:
A confirmation message or details of the newly added attachment.
Example Request:
POST /api/v1/uwTasks/ticket/addAttachment
Content-Type: application/json
{
"ID": 12345,
"ticketId": 67890,
"attachmentType": "Driver license",
"fileName": "driver_license.pdf",
"data": "base64EncodedDataHere",
"comment": "Driver license for identity verification"
}
Example Response:
{
"status": "success",
"message": "Attachment added successfully to UW task with ticketId 67890 for merchant ID 12345"
}
Use Case:
This API method is used by ISO/ISV, administrators, or underwriting teams to upload required documentation (such as identification or tax information) to specific underwriting tasks. The attachment helps complete the underwriting process by providing necessary documents for review, ensuring the merchant's application is properly evaluated.