# Upload Files as Dispute Evidence

Upload a file as evidence for a Dispute.

- You can upload up to 8 files; the total size of the uploaded files combined cannot exceed 10 MB.
- The allowed file formats include JPEG, PDF, PNG.
- Individual JPEG, PDF, PNG files can't exceed 1 MB.
- PNG files will be automatically converted and returned as JPEG files.

## Endpoint: 
POST /disputes/{dispute_id}/evidence  
Security: BasicAuth

## Path parameters:

- `dispute_id` (string, required)  
    The ID of Dispute.  
    Example: "DIgDv9764vkkEVu1suZNCDbR"

## Header parameters:

- `Finix-Version` (string)  
    Specify the API version of your request. For more details, see Versioning.  
    Example: "2022-02-01"

- `Content-Type` (string)  
    The data type being sent in the request body must be application/json.  
    Example: "application/json"

## Request fields (multipart/form-data):

- `file` (string)  
    The binary contents of the file.  
    Example: "@evidence.jpeg"

## Response 201 fields (application/json):

- `id` (string)  
    The ID of the resource.

- `created_at` (string)  
    Timestamp of when the object was created.

- `updated_at` (string)  
    Timestamp of when the object was last updated.

- `application` (string)  
    ID of the Application the resource was created under.

- `dispute` (string)  
    The ID of the Dispute associated with the evidence.

- `state` (string)  
    The result after uploading evidence.
    - PENDING: The evidence file has not yet been submitted to the processor. No user action is required.
    - SUCCEEDED: The evidence file has been successfully sent to the processor. No further user action is required.
    - CANCELED: The evidence file upload was not completed due to user action.
    - FAILED: The evidence file could not be processed. Check failure_code for the specific reason and failure_message for a user-safe description of the issue.
    Enum: "PENDING", "SUCCEEDED", "CANCELED", "FAILED"

- `failure_code` (string,null)  
    The reason the evidence file failed processing. Populated when state is FAILED; null otherwise.
    - MALWARE_DETECTED: The file was flagged for suspicious content and cannot be accepted.
    - GENERIC_FAILURE: An unexpected error occurred. Contact support for details.
    - FILE_SIZE_LIMIT_EXCEEDED: The file exceeds the maximum allowed file size.
    - TOTAL_COMBINED_FILE_SIZE_LIMIT_EXCEEDED: The total size of all uploaded evidence exceeds the maximum combined file size limit.
    - TOTAL_PAGE_COUNT_LIMIT_EXCEEDED: The total number of pages across all uploaded evidence exceeds the maximum allowed page count.
    Enum: "MALWARE_DETECTED", "GENERIC_FAILURE", "FILE_SIZE_LIMIT_EXCEEDED", "TOTAL_COMBINED_FILE_SIZE_LIMIT_EXCEEDED", "TOTAL_PAGE_COUNT_LIMIT_EXCEEDED"

- `failure_message` (string,null)  
    A human-readable message explaining why the evidence file failed processing. Populated when state is FAILED; null otherwise. Safe to surface directly in a UI.

- `identity` (string)  
    The ID of the seller's Identity resource. This is the Identity resource that was used to create the seller's Merchant.  
    Example: "IDpYDM7J9n57q849o9E9yNrG"

- `merchant` (string)  
    The ID of the seller's Merchant resource. This is the Merchant account the Dispute was filed against.  
    Example: "MUucec6fHeaWo3VHYoSkUySM"

- `content_type` (string)  
    The MIME type of the uploaded evidence file (e.g. application/pdf, image/jpeg).  
    Example: "application/pdf"

- `extension` (string)  
    The file extension, a suffix at the end of a file_name (letters following last period).  
    Example: "pdf"

- `file_name` (string)  
    The name of the uploaded evidence file.  
    Example: "evidence.pdf"

- `tags` (object,null)  
    Include up to 50 key: value pairs to annotate requests with custom metadata.
    - Maximum character length for individual keys is 40.
    - Maximum character length for individual values is 500.
    (For example, order_number: 25, item_type: produce, department: sales)

- `_links` (object)  
    For your convenience, every response includes several URLs which link to resources relevant to the request. You can use these _links to make your follow-up requests and quickly access relevant IDs.

- `_links.self` (object)  
    Link to the resource that was used in the request.

- `_links.self.href` (string)

## Response 400 fields (application/json):

- `total` (integer, required)  
    Total number of errors returned.

- `_embedded` (object, required)  
    Container for embedded error objects.

- `_embedded.errors` (array)  
    List of individual error objects.

- `_embedded.errors.code` (string)  
    The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request.

- `_embedded.errors.logref` (string)  
    A log reference identifier for the error, useful for debugging and support purposes.

- `_embedded.errors.message` (string)  
    A human-friendly error message.

- `_embedded.errors._links` (object)  
    Links related to this error.

- `_embedded.errors._links.self` (object)  
    Link to the resource related to the error.

- `_embedded.errors._links.self.href` (string)  
    URL of the related resource.

## Response 401 fields (application/json):

- `total` (integer, required)  
    Total number of errors returned.

- `_embedded` (object, required)  
    Container for embedded error objects.

- `_embedded.errors` (array)  
    List of individual error objects.

- `_embedded.errors.code` (string)  
    The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request.

- `_embedded.errors.logref` (string)  
    A log reference identifier for the error, useful for debugging and support purposes.

- `_embedded.errors.message` (string)  
    A human-friendly error message.

- `_embedded.errors._links` (object)  
    Links related to this error.

- `_embedded.errors._links.self` (object)  
    Link to the resource related to the error.

- `_embedded.errors._links.self.href` (string)  
    URL of the related resource.

## Response 403 fields (application/json):

- `total` (integer, required)  
    Total number of errors returned.

- `_embedded` (object, required)  
    Container for embedded error objects.

- `_embedded.errors` (array)  
    List of individual error objects.

- `_embedded.errors.code` (string)  
    The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request.

- `_embedded.errors.logref` (string)  
    A log reference identifier for the error, useful for debugging and support purposes.

- `_embedded.errors.message` (string)  
    A human-friendly error message.

- `_embedded.errors._links` (object)  
    Links related to this error.

- `_embedded.errors._links.self` (object)  
    Link to the resource related to the error.

- `_embedded.errors._links.self.href` (string)  
    URL of the related resource.

## Response 406 fields (application/json):

- `total` (integer, required)  
    Total number of errors returned.

- `_embedded` (object, required)  
    Container for embedded error objects.

- `_embedded.errors` (array)  
    List of individual error objects.

- `_embedded.errors.code` (string)  
    The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request.

- `_embedded.errors.logref` (string)  
    A log reference identifier for the error, useful for debugging and support purposes.

- `_embedded.errors.message` (string)  
    A human-friendly error message.

- `_embedded.errors._links` (object)  
    Links related to this error.

- `_embedded.errors._links.self` (object)  
    Link to the resource related to the error.

- `_embedded.errors._links.self.href` (string)  
    URL of the related resource.
