Evidence Upload Guide

How to upload a file of type evidence to the system

Evidence File Upload API

This guide will walk you through the process of uploading evidence documents to the files-API for your chargeback cases.

After you upload the file, you can attach it to Chargeback as evidence. The submission will happen asynchronously and can notify you via webhook or by the submitId.


Endpoint URL

Upload your screenshot to the following endpoint:

POST https://api.justt.ai/v1/files

Request Parameters

Headers

HeaderValueDescription
AuthorizationBearer {token}See authentication documentation
Content-Typemultipart/form-dataRequired for file uploads

Body Parameters

ParameterTypeRequiredDescription
purposestringYesMust be evidence_file
fileFileYesThe screenshot image file

File Requirements

  • Supported formats: PDF
  • Maximum file size: 6MB

Example Request

POST /v1/files HTTP/1.1
Host: api.justt.ai
Authorization: Bearer your_token_here
Content-Type: multipart/form-data

--boundary
Content-Disposition: form-data; name="purpose"

evidence_image
--boundary
Content-Disposition: form-data; name="metadata"

--boundary
Content-Disposition: form-data; name="file"; filename="evidence.png"
Content-Type: image/png

<file_binary_data>
--boundary--

Response Handling

Successful Response

Status Code: 200 OK

{
  "fileId": "1234567890"
}

Upon successful upload, the API returns a response with the file ID. Use this response to verify the upload and associate the file ID with your chargeback records.

Error Response

Status Code: 4xx or 5xx

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Detailed error message"
  }
}

Common errors include:

  • Invalid parameters
  • Authentication failures
  • Exceeding file size limits
  • Unsupported file formats

For detailed error handling, see error handling documentation.

Best Practices

  1. Validate file size before upload to avoid unnecessary API calls
  2. Use appropriate file formats that preserve document quality and readability
  3. Organize files clearly with descriptive filenames
  4. Handle errors gracefully with retry logic for transient failures
  5. Store file IDs securely for future reference and case management