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"

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

Sample Request

curl https://api.thoroughrepository.com/api/submissions/{saleId}/status \
  -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
  -H "Accept: application/json"

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.

All Sales – Sale Names & IDs

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

GET /api/inspections/sales

Query Parameters

No query parameters are required for this endpoint.

Response

An array of sales, each with:

  • saleId – Unique identifier for the sale.
  • saleName – Human-readable name of the sale.

Example Response

[
  {
    "saleId": "c74f0e4d-1e2a-4b3a-9f11-9e8aa0b31001",
    "saleName": "2026 Premier Yearling Sale"
  },
  {
    "saleId": "9c3b8a6d-7291-45f8-a31b-2bbf96c12002",
    "saleName": "2026 Autumn Mixed Sale"
  },
  {
    "saleId": "f31d2e83-89ab-4e77-8fb0-7adbb0c43003",
    "saleName": "2026 Breeze-Up Sale"
  }
]

Sale – All Lots Data Status

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

GET /api/submissions/{saleId}/status

Path Parameters

Name Type Description
saleId string 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.

Example Response (Truncated)

[
  {
    "saleId": "c74f0e4d-1e2a-4b3a-9f11-9e8aa0b31001",
    "lot": "3",
    "xrays": {
      "hasData": true,
      "status": "Approved",
      "counts": 36,
      "lastUpdate": "2026-06-14T12:10:00Z"
    },
    "scope": {
      "hasData": true,
      "status": "Approved",
      "counts": 1,
      "lastUpdate": "2026-06-14T11:50:00Z"
    },
    "lastUpdate": "2026-06-14T12:10:00Z"
  },
  {
    "saleId": "c74f0e4d-1e2a-4b3a-9f11-9e8aa0b31001",
    "lot": "4",
    "xrays": {
      "hasData": true,
      "status": "In Review",
      "counts": 36,
      "lastUpdate": "2026-06-13T16:05:00Z"
    },
    "scope": {
      "hasData": true,
      "status": "Approved",
      "counts": 1,
      "lastUpdate": "2026-06-13T16:02:00Z"
    },
    "lastUpdate": "2026-06-13T16:05:00Z"
  }
]

Sale – Single Lot Data 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.

GET /api/submissions/{saleId}/{lot}/status

Path Parameters

Name Type Description
saleId string The ID of the sale.
lot string 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.

Example Response

{
  "saleId": "c74f0e4d-1e2a-4b3a-9f11-9e8aa0b31001",
  "lot": "12",
  "xrays": {
    "hasData": true,
    "status": "Approved",
    "counts": 36,
    "lastUpdate": "2026-06-10T15:40:00Z"
  },
  "scope": {
    "hasData": true,
    "status": "Approved",
    "counts": 1,
    "lastUpdate": "2026-06-10T15:30:00Z"
  },
  "lastUpdate": "2026-06-10T15:40:00Z"
}
ThoroughRepository · Sale Data Status API · 2025