batches

Upload Batch

Upload a CSV of contractors (the request body, as text/csv) and get back its columns, matches and cost.

Nothing runs or is charged yet: the batch is a draft, matched by the columns guessed from its headers. Check them, change them with POST /batches/{id}/preview if needed, then POST /batches/{id}/run. Only the cell values are kept, never the file; a draft nobody runs is deleted after a day.

Args: request: The request, whose body is the file. filename: The file's name. key: Injected: the caller's paid key. batches: Injected BatchRepository. licenses: Injected LicenseRepository, for matching. keys: Injected ApiKeyRepository, for the cost.

Returns: The draft.

Raises: HTTPException: 413 or 422 for a file that can't be read; 429 for too many uploads.

post/batches

Request

  • Base URL: https://api.licenscheck.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.licenscheck.com/batches
  • Auth: none declared

Query parameters

filenamestring

The file's name, for display.

Response

Successful Response

idstring uuid required

The batch's ID.

filenamestring required

The uploaded file's name.

status'draft' | 'queued' | 'running' | 'done' | 'failed' required

Where a batch verification is: uploaded, waiting, being verified, or finished.

Attributes: DRAFT: Uploaded and matched, waiting for the customer to confirm the columns and cost. QUEUED: Confirmed; waiting for a worker. RUNNING: A worker is reading each matched row's verdict. DONE: Every matched row has its verdict. FAILED: The worker gave up on it; rows verified before that keep their results.

rowsinteger required

Data rows in the file.

matchedinteger required

Rows matched to one contractor: verified, one verification each.

ambiguousinteger required

Rows several contractors could be: never charged until you pick one.

not_foundinteger required

Rows no license matches: never charged.

invalidinteger required

Rows with no usable number or name, or an unknown state: never charged.

with_numberinteger required

Rows with a license number.

processedinteger required

Matched rows verified so far.

levelsobject required

Verified rows by verdict: clear, review, risk.

verificationsinteger required

New verifications the batch has used.

created_atstring date-time required

When it was uploaded.

finished_atstring date-time nullable required

When it finished, if it has.

Changes

No recorded changes to this operation across all 1 revision of this API.