Screenshot and File Upload Guide

Overview

Use the Files API to send Justt screenshots and supporting documents for a specific chargeback, such as a screenshot of your checkout page or a customer invoice. Justt uses them when it builds the evidence for that chargeback. Every upload goes to one endpoint, POST https://api.justt.ai/v1/files.

flowchart TB
  subgraph you["Your system"]
    direction LR
    A["<b>1. Collect the IDs</b><br/>Chargeback ID (internalId)<br/>Type ID from your Justt rep"] --> B["<b>2. Upload the file</b><br/>POST /v1/files<br/>file + purpose + metadata"] --> C["<b>3. Store the file id</b><br/>201 Created returns the id<br/>Keep it with your chargeback"]
  end
  subgraph justt["Justt, in the background"]
    direction LR
    D["<b>Justt checks the file</b><br/>Confirms the screenshot type<br/>Turns PDF pages into images"] --> E["<b>Added to the chargeback</b><br/>Matched by the internalId<br/>Evidence is regenerated"]
  end
  you -->|after the 201 response| justt

You make one call. A 201 means Justt received the file; adding it to the chargeback happens in the background.

This page does not cover sending Justt your own complete evidence package to submit for a chargeback. That is a separate flow, described in the Evidence Upload Guide.

Before you start

You need three things before your first upload.

WhatWhere to get it
Access tokenSee Authentication.
Justt chargeback ID (internalId)The Justt ID of the chargeback the file belongs to, a UUID. See Chargebacks.
Screenshot type ID (tag)Provided by your Justt representative.

Screenshot type IDs come from your Justt representative

Every screenshot must be labeled with its type, for example checkout page or customer invoice. Each type has a fixed ID (a UUID) that you send in metadata.tag.

Your Justt representative gives you the list of screenshot type IDs to use. There is no API call that returns them, so ask for the list before you start building, and ask again when you want to send a new kind of screenshot.

Request

POST https://api.justt.ai/v1/files, sent as multipart/form-data with one file per request.

Send your access token in the Authorization: Bearer YOUR_ACCESS_TOKEN header.

Body fieldRequiredDescription
fileYesThe file itself. The form field must be named exactly file. The file name can be up to 100 characters.
purposeYesWhat the file is for. See Purpose.
metadataYesA JSON object, sent as a string. See Purpose for the required fields.

The file's content must match the content type you declare for it. A PNG sent as application/pdf is rejected.

Purpose

For the uploads on this page, set purpose to evidence_image. It sets the accepted formats, the size limit and the required metadata.

purposeUse it forFormatsMax sizeRequired metadata
evidence_imageA screenshot or supporting document for a specific chargebackPNG, JPG/JPEG, WebP, PDF6 MBinternalId, tag

The API also accepts evidence_file, which belongs to the separate evidence package flow and is not covered here. Any other value returns a 400.

Upload a screenshot

Send the image with purpose set to evidence_image and a metadata object holding the two IDs from Before you start: internalId and tag.

curl -X POST https://api.justt.ai/v1/files \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -F "purpose=evidence_image" \
  -F 'metadata={"internalId":"3f1c2a9e-8b4d-4c6f-9a2e-5d7b1c0e4f8a","tag":"b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f"}' \
  -F "[email protected];type=image/png"

Each request carries one file, one chargeback and one screenshot type. To add several screenshots to a chargeback, send one request per screenshot.

Sending the same file again for the same chargeback and screenshot type is safe: Justt recognizes the duplicate and keeps a single copy.

PDFs are accepted too, for supporting documents such as an invoice. Send the file with type=application/pdf. Justt converts each page into an image and adds the pages to the chargeback.

Response and what happens next

A successful upload returns 201 Created.

{
  "id": "0b9f6c1e-2d3a-4e5f-8a7b-6c5d4e3f2a1b",
  "checksum": "9e107d9d372bb6826bd81d3542a419d6",
  "metadata": "{\"internalId\":\"3f1c2a9e-8b4d-4c6f-9a2e-5d7b1c0e4f8a\",\"tag\":\"b7e6d5c4-3a2b-4c1d-8e9f-0a1b2c3d4e5f\"}",
  "message": "File uploaded successfully",
  "status": 201
}
FieldDescription
idThe file ID. Store it with your chargeback record.
checksumMD5 hash of the file content, which you can compare with your own to confirm the file arrived intact.
metadataThe metadata you sent, returned as a string.

You do not need a second call to attach the file. Justt links it to the chargeback through the internalId you sent, then processes it in the background: it checks the screenshot type, converts PDF pages to images, adds the file to the chargeback and regenerates the chargeback's evidence.

A 201 confirms that Justt received the file, not that processing finished. A wrong internalId is rejected immediately with a 400. A wrong tag is not: the upload succeeds and the file is dropped during processing, so double-check the screenshot type ID.

Errors

Failed requests return a 4xx or 5xx status with this body. Include the errorId when you contact Justt about a failed upload. See Error Handling for the general rules.

{
  "status": 400,
  "message": "...",
  "errorId": "..."
}
StatusCause
400purpose is missing or not a supported value
400No file was sent, or the form field is not named file
400The format is not accepted for this purpose, or the content does not match the declared content type
400The file is larger than the limit for this purpose
400The file name is longer than 100 characters
400metadata is not valid JSON
400metadata.internalId is missing, is not a UUID, or is not a chargeback on your account
401The access token is missing or invalid

Retry on network errors and 5xx responses. Fix the request before retrying a 4xx.


Did this page help you?