Skip to content

Compose a dispute file with the API

tryVidimus does not build dispute files: we are a neutral third party, and the file of a dispute is yours to compose. You do not need a special call. The calls you already use are enough to gather, for one transaction, every photo, the link between the "before" and the "after", and the data anyone can use to check them.

1. Gather the proofs of the transaction

List the proofs with the external_reference you gave when you created the capture sessions. Keep the sealed ones (status=sealed). Each proof tells you who captured (party), at which moment (stage), when it was sealed (sealed_at) and the list of its files (media).

$ curl "https://api.tryvidimus.com/v1/proofs?external_reference=booking_4471" \
    -H "Authorization: Bearer $TRYVIDIMUS_API_KEY"

2. Pair the "before" and the "after"

If you linked the two captures with compare_to, read the link on each proof: an "after" gives compare_to (the id of its "before"), a "before" gives compared_by (the id of its "after"). That is what shows that a photo taken at return answers a photo taken at hand-over.

// GET /v1/proofs/prf_01m4akapdbe8ev5xgt0hkpcn14  (the "after")
{ "id": "prf_01m4akapdbe8ev5xgt0hkpcn14", "compare_to": "prf_01m4akapdbe8e8qq3er9r5qwyj", "compared_by": null, … }

// GET /v1/proofs/prf_01m4akapdbe8e8qq3er9r5qwyj  (the "before")
{ "id": "prf_01m4akapdbe8e8qq3er9r5qwyj", "compare_to": null, "compared_by": "prf_01m4akapdbe8ev5xgt0hkpcn14", … }

// GET /v1/proofs?linked=false  → the proofs still waiting for their "after"

3. Fetch the photos

For each file of a sealed proof, ask for an access link: it gives a temporary link (15 minutes by default) to the signed copy, straight from storage. Download the bytes right away and do not store the link. The original is never offered. This call needs your API key (read_proof scope).

// GET /v1/proofs/prf_01m4akapdbe8ev5xgt0hkpcn14/media/med_01m4akapdbe8e8qq3er9r5qwyj/access-link
{ "url": "https://…", "expires_at": "2026-10-30T10:15:00.000Z" }

// GET /v1/public/proofs/prf_01m4akapdbe8ev5xgt0hkpcn14/bundle  (no API key)
{ "proof_id": "prf_01m4akapdbe8ev5xgt0hkpcn14", "media": [ { "manifest_id": "…", "signed_sha256": "…" } ], "timestamp": { … }, … }

4. Add what proves integrity

The public bundle of a proof (no API key) lists, for each file, its manifest_id and its signed_sha256, plus the timestamp token and the Merkle proof. Keep the signed_sha256 next to each photo and add sealed_at from the proof. Anyone can then check the photo, with the open source verifier, without asking you or us.

5. Put it together

This script gathers everything for one transaction. What you do with it is up to you: a ZIP, a PDF, a web page, before and after side by side. Keep your own layout; the proofs stay the same whatever the format.

const API = "https://api.tryvidimus.com";
const headers = { Authorization: `Bearer ${process.env.TRYVIDIMUS_API_KEY}` };
const get = (path, init) => fetch(API + path, init).then((r) => r.json());

// 1. Every proof of the transaction (sealed ones only)
const { data } = await get("/v1/proofs?external_reference=booking_4471&status=sealed", { headers });

const file = [];
for (const proof of data) {
  // 2. Integrity: the public bundle, no API key
  const bundle = await get(`/v1/public/proofs/${proof.id}/bundle`);
  for (const media of proof.media) {
    // 3. The photo: a temporary link to the signed copy
    const { url } = await get(`/v1/proofs/${proof.id}/media/${media.id}/access-link`, { headers });
    const hashes = bundle.media.find((m) => m.signed_sha256 === media.signed_sha256);
    file.push({
      stage: proof.stage, // "pickup" or "return"
      party: proof.party,
      sealed_at: proof.sealed_at,
      compare_to: proof.compare_to, // the "before" this "after" answers
      photo: await fetch(url).then((r) => r.arrayBuffer()),
      signed_sha256: media.signed_sha256,
      manifest_id: hashes?.manifest_id,
      verify_at: `${API}/v1/public/proofs/${proof.id}/bundle`,
    });
  }
}
// 4. Lay out `file` as you like: before / after side by side, in your own format.

What we do not do

We do not compare the photos, judge the condition of the item, or take a side. The proofs show what each party captured, when, and that nothing changed since. Weighing them, and deciding who is right, stays with you and the people who settle the dispute.

How to link a "before" and an "after"