API Getting Started

ThoroughRepository – Sale Data Status API

This API lets sales companies keep their online catalogues in sync with ThoroughRepository. Use it to show which lots have X-ray images and scope videos available, track study counts, approval status, and update timestamps.

Quick Start

  1. Obtain a bearer access token from ThoroughRepository.
  2. List your active sales with GET /api/inspections/sales.
  3. For a given sale, call GET /api/submissions/{saleId}/status to see status for every lot.
  4. Optionally, query a single lot with GET /api/submissions/{saleId}/{lot}/status.
AUTHENTICATION EXAMPLE
curl
  https://api.thoroughrepository.com/api/inspections/sales
  \
    -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
    -H "Accept: application/json"
API Getting Started

Authentication

All requests must be made over HTTPS and authenticated with a bearer token in the Authorization header. Requests without a valid token will receive a 401 Unauthorized response.

Headers

Header Example Required
Authorization Bearer sk_test_12345 Yes
Accept application/json Yes
API Getting Started

Errors

The API uses standard HTTP response codes to indicate success or failure. A non-2xx status code will usually be returned with a JSON error body.

HTTP STATUS CODES
Status Description Typical Causes
200 OK Request succeeded. Valid token and parameters.
400 Bad Request Invalid or missing parameter. Malformed saleId or lot value.
401 Unauthorized Authentication failed. Missing or expired bearer token.
404 Not Found Resource not found. Sale or lot does not exist or is not active.
500 Server Error Unexpected error on ThoroughRepository side. Temporary issue – retry with backoff.
API Endpoints

All Sales – Sale Names & IDs

GET /api/inspections/sales

Returns all of your sales that are currently active in ThoroughRepository, including each sale's display name and its saleId.

Returns

saleId string

Unique identifier for the sale.

saleName string

Display name of the sale.

API Endpoints

Sale – All Lots Data Status

GET /api/submi ssions/{saleId}/status

Returns the data status for every lot in a sale, including counts and review state for X-ray images and scope videos.

Path Parameters

saleId string required

The ID of the sale returned from /api/inspections/sales.

Counts

  • X-ray counts – Total number of X-ray images submitted for the horse.
  • Scope counts – Total number of scope videos submitted for the horse.

Data Status Values

  • Approved – Approved by sale admin, visible to vets during the viewing window.
  • In Review – Submitted to sale admin, not yet visible to vets.
  • Denied – Denied by sale admin, not visible to vets.
  • Draft – Uploaded by the vet but not yet submitted for review.
API Endpoints

Sale – Single Lot Data Status

GET /api/submi ssions/{saleId}/{lot}/status

Returns the data status for a single horse (lot) in a sale. This uses the same schema as the previous endpoint, but only for one lot.

Path Parameters

saleId string required

The ID of the sale.

lot string required

Lot number within the sale.

Counts

  • X-ray counts – Total number of X-ray images submitted for the horse.
  • Scope counts – Total number of scope videos submitted for the horse.

Data Status Values

  • Approved – Approved by sale admin, visible to vets during the viewing window.
  • In Review – Submitted to sale admin, not yet visible to vets.
  • Denied – Denied by sale admin, not visible to vets.
  • Draft – Uploaded by the vet but not yet submitted for review.
Local Media Server

Overview

The ThoroughRepository Local Media Server is an optional on-premise caching solution that serves approved repository media from a server inside the sales company's network, reducing bandwidth and improving load times.

Reduced Data Usage

Media cached locally during viewing periods.

Faster Loading

Consistent performance for X-rays and scope videos.

Seamless Experience

No change to user login or navigation.

Local Media Server

Architecture

How the Local Media Server integrates with ThoroughRepository cloud services and delivers media to on-site workstations.

System Architecture

Amazon Web Services
ThoroughRepository

AWS Hosting

ThoroughRepository API & Authentication Services

Cloud Services
Azure CDN
ThoroughRepository

Azure CDN

Media Storage - DICOM Images, Videos & Media, Reports

API & Authentication
Network Traffic
Media Sync
Repository Office

Dedicated Repository Computers

Access to Local Media

Local Services
Local Media Server
Server

Local Media Server

Local Media Storage - DICOM Images, Videos & Media, Reports

Data Flow Legend
API & Authentication / Media Sync
Cloud / Local Services
Network Traffic

How It Works

1
Authentication

Users authenticate via the cloud ThoroughRepository platform.

2
Media Sync

Approved media syncs from Azure CDN to the Local Media Server.

3
Local Delivery

Repository workstations on the LAN load media from the local server.

Local Media Server

Requirements

Server Requirements

Hardware

Dedicated on-site server or VM with minimum 16 GB RAM.

Operating System

Windows Server (version agreed with ThoroughRepository).

Storage

Sufficient disk space for active sale media.

Network Requirements

Internet

Reliable connection required at all times.

Static IP

Static outbound IP address.

Access

RDP with admin permissions for TR engineers.

Local Media Server

Setup & Usage

Deployment Steps

1
Provide Server Access

Sales company provides server with RDP admin access.

2
Installation

ThoroughRepository installs and configures Local TR API.

3
Network Setup

Network routing and firewall rules configured.

4
Initial Sync

Media sync run for current sale.

5
Workstation Config

Workstations configured to use dedicated Repository URL.

ThoroughRepository · Technical Documentation · 2025