Upload MED Response File
Upload a response file (evidence document) for a specific MED dispute. Supports PDF, DOC, DOCX, JPG, PNG and other document formats. The file is stored securely and associated with the MED for analysis purposes.
POSThttps://api.somossimpay.com.br/v3/meds/{med_id}/file/upload
curl --request POST \
--url 'https://api.somossimpay.com.br/v3/meds/{med_id}/file/upload' \
--header 'Authorization: Bearer <ACCESS_TOKEN>'Response200
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"pix_med_id": "550e8400-e29b-41d4-a716-446655440000",
"file_response": "media/pixmed/response-files/a1b2c3d4-e5f6-7890-abcd-ef1234567890.pdf",
"created_by_id": 246,
"is_psp": false,
"created_at": "2026-06-02T14:30:00Z"
}Endpoint
POST /v3/meds/{med_id}/file/uploadHeaders
| Parameter | Type | Description | Example |
|---|---|---|---|
| Authorization | String | Bearer + Access_token | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo |
Path Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| med_id | String | The unique identifier of the MED infraction report | 550e8400-e29b-41d4-a716-446655440000 |
Body Details
This endpoint uses multipart/form-data to upload files.
| Field | Type | Description | Required or Optional |
|---|---|---|---|
| file | File | Response file for the MED (PDF, DOC, DOCX, JPG, PNG). Maximum size: 10MB | required |
Request Examples
Upload PDF evidence:
POST /v3/meds/550e8400-e29b-41d4-a716-446655440000/file/upload
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: multipart/form-data
file: evidence-document.pdfUpload image evidence:
POST /v3/meds/550e8400-e29b-41d4-a716-446655440000/file/upload
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: multipart/form-data
file: screenshot-proof.pngResponse Details
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"pix_med_id": "550e8400-e29b-41d4-a716-446655440000",
"file_response": "media/pixmed/response-files/a1b2c3d4-e5f6-7890-abcd-ef1234567890.pdf",
"created_by_id": 246,
"is_psp": false,
"created_at": "2026-06-02T14:30:00Z"
}| Field | Type | Description |
|---|---|---|
| id | String | Unique identifier for the uploaded file |
| pix_med_id | String | MED ID this file is associated with |
| file_response | String | S3 storage path of the uploaded file |
| created_by_id | Integer | User ID who uploaded the file |
| is_psp | Boolean | Whether file was uploaded by PSP (always false for API uploads) |
| created_at | DateTime | Timestamp when file was uploaded (ISO 8601 format) |
Error Responses
| HTTP Code | Error Message | Description |
|---|---|---|
| 400 | Invalid file format | File format not supported. Use PDF, DOC, DOCX, JPG, PNG or TXT |
| 400 | File size exceeds maximum | File is larger than 10MB limit |
| 400 | PIXMED is not in a valid state for response file | The MED status is not WAITING. Files can only be uploaded for MEDs awaiting response |
| 401 | Unauthorized | Invalid or missing authentication token. Ensure you are sending a valid Bearer token |
| 404 | Med not found | The specified MED ID does not exist or you don't have access to it |
| 422 | Validation error | Request validation failed. Check that file field is present |
Business Rules
File Upload Requirements:
- Files can only be uploaded for MEDs with status
WAITING - You must have access to the account associated with the MED
- Maximum file size: 10 MB
- Supported formats: PDF, DOC, DOCX, TXT, JPG, JPEG, PNG
- File extension is validated against content type for security
MED Status Validation:
- MED must be in
WAITINGstatus to accept file uploads - Once MED is processed (ACCEPTED/REJECTED), no more files can be uploaded
- You can upload multiple files for the same MED while it's in WAITING status
Access Control:
- You must have
Permissions.PixMed.ANALYZEscope - You must have access to the credited account (receiver) or debited account (payer)
- MED must belong to your company
File Storage:
- Files are securely stored in S3
- File path follows pattern:
media/pixmed/response-files/{file_id}.{extension} - Files are permanently stored and associated with the MED record
- Original filename is not preserved for security reasons
Use Cases:
- Evidence Submission: Upload proof documents supporting your position in the dispute
- Communication Records: Upload screenshots of conversations or email exchanges
- Transaction Proof: Upload receipts, invoices, or transaction confirmations
- Identity Verification: Upload ID documents or account ownership proof