Skip to content
Master UW

API reference, version 0.1.0

The partner API

Open a file for each deal under your own id, send its bank statements, and read back coverage, revenue, positions, tamper signals and your sheets' verdicts. Keys come with a workspace: request access to get one.

Getting started

Base URL https://api.masteruw.com. Every path below sits under it.

The partner API's host. For now it serves these paths for reading only, GET and HEAD. Any other method answers 503, error The desk is open for reading only., with Retry-After: 3600 — except a call whose key belongs to a workspace opened to writes, which reaches the engine instead. GET /api/underwriting/documents/{documentId}/pdf serves the statement's PDF; answers 404, error The statement's bytes are gone, when its file isn't kept; answers 503, error Statement PDFs can't be fetched from this desk yet., only on a deploy without the statements bucket. Nobody signs in here, so a call without a key answers 401.

Calling with a key

Send Authorization: Bearer uwk_live_<key> or X-Api-Key: uwk_live_<key>. A key is uwk_live_ and 43 characters; the engine takes 40 or more of A-Z a-z 0-9 _ -.

Answers

Every JSON answer is { "ok": true, ... } with 200, or { "ok": false, "error": "..." } with the status; each operation lists its error strings, which are the code's own words. The one other answer is a statement's PDF. On /files/{fileId} and the paths under it, a file the workspace does not have answers 404 File not found to any method. Request bodies are JSON (application/json) except the two multipart uploads.

Money is in cents, as integers, unless a name says millicents (thousandths of a cent). Ratios are fractions (0.25 is a quarter) and can pass 1. Days are YYYY-MM-DD, times ISO 8601 in UTC. Text sent too long is cut, not refused, at the lengths each field gives.

Sending the same thing twice

There is no Idempotency-Key header. What the code does:

  • POST /files: a record (rowId) keeps one file; asking again returns it with created: false.
  • POST /files/{fileId}/documents: a statement sent again on the same file, by its externalRef or by its bytes (SHA-256), is the statement already there, duplicate: true, not read or charged again, even one whose read failed, unless retry=true is sent.

How much a list holds

  • GET /files: the 200 newest; with rowId, the 50 newest.
  • GET /files/{fileId}/events: 500 after after.
  • Every other list is whole, GET /files/{fileId}'s events included.
  • Uploads: 25 MB.

How keys and statements are kept is on the security page.

Connecting

Whose desk a key opens.

Whose desk the key opens

GET/api/underwriting/whoami

The workspace the call acts on, the key that made it, and who the timeline will say acted. Call it once when you connect.

Parameters

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

Who is calling.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Files

A deal's file: one per record.

List files

GET/api/underwriting/files

Newest first: the workspace's 200 newest files, or with rowId, the 50 newest on that record.

Parameters

rowIdquery

Your own id for the record (cut to 120): only that record's files.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The files.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Open the file for one of your records

POST/api/underwriting/files

A record keeps one file. When a file already sits on rowId it comes back as it is, with created: false, and name, tableId and facts are not looked at; two opens of one record at the same moment get the same file. On a keyed call, a rowId with no tableId files it on the workspace's primary table, the one the mail intake files a deal's statements on. With no name, the file takes the record's name from the grid, else Untitled file. With no rowId, every call opens a new file. facts, sent on a call that opens a new file, is stored in the same transaction as the file's row.

Parameters

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Body, application/json

rowIdstring

Your own deal or application id; cut to 120.

tableIdstring

The table the record is on; cut to 120.

namestring

Cut to 200.

factsFileFactsPatch

Only the keys sent change; a key sent as null clears that fact. Leave the whole object out to touch nothing.

{
  "rowId": "deal-1001",
  "name": "Example Bakery LLC"
}

Answers

200

The file.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Everything the desk holds on a file

GET/api/underwriting/files/{fileId}

A file whose statements were read before the desk read positions has them read now, so this GET can write.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The file and all it holds.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

State the file's own numbers

PATCH/api/underwriting/files/{fileId}/facts

For a workspace with no grid of its own: the stated monthly revenue, positions, requested amount and time in business, read back as facts on the file and read by the verifier the same as a grid's columns. Only the keys sent change; a key sent as null clears that fact.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Body, application/json

factsFileFactsPatch, required

Only the keys sent change; a key sent as null clears that fact. Leave the whole object out to touch nothing.

{
  "facts": {
    "statedMonthlyRevenueCents": 8500000,
    "statedPositions": 1,
    "requestedCents": 4500000,
    "timeInBusinessMonths": 42
  }
}

Answers

200

The stored facts.

400

Bad request. error is one of:

  • Send at least one of statedMonthlyRevenueCents, statedPositions, requestedCents, timeInBusinessMonths.
401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Judge the file again

POST/api/underwriting/files/{fileId}/verify

The positions are read again, then the verifier, the tamper score, the sheets and the offers run, each on the timeline. The findings replace the last set. For after the record's stated revenue or requested amount changed, say.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The findings.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

The timeline since an event

GET/api/underwriting/files/{fileId}/events

Up to 500 events after after, oldest first, and every document on the file as it stands: for a live view.

Parameters

fileIdpath, required

The file's id.

afterquery

An event id: only the events after it. 0 when left out.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The events.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Statements

The bank statements on a file, and the rows read from them.

File a sent Plaid pull

POST/api/underwriting/files/{fileId}/feed

For a direct-merchant application whose bank is linked through the sender's own Plaid, not ours: the transactions the sender already pulled, in Plaid's own /transactions/get shape. Writes each account-month as a document (source plaid), replacing the same account-month filed before, the same as /bank; then the file is judged again. Never calls Plaid and never spends a read credit: the sender already paid for its own pull.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Body, application/json

institutionstring

The bank's name, for the timeline's words. "the linked bank" when left out.

accountsobject[], required

Plaid's own account shape, as /transactions/get returns it.

transactionsobject[], required

Plaid's own transaction shape, as /transactions/get returns it. No more than 20,000.

startDatestring, required

YYYY-MM-DD, the pull's start.

endDatestring, required

YYYY-MM-DD, not after today, and no more than 12 calendar months after startDate, that month included — /bank's own longest pull.

Answers

200

Filed.

400

Bad request. error is one of:

  • Send accounts and transactions as arrays, the shape Plaid's own /transactions/get returns.
  • Send no more than 20,000 transactions in one pull.
  • startDate and endDate must be YYYY-MM-DD.
  • startDate is after endDate.
  • endDate is in the future.
  • The range can't be longer than 12 calendar months, /bank's own longest pull.
  • Every transaction's date must be YYYY-MM-DD.
  • Every transaction's amount must be a finite number.
  • Every transaction's account_id must name one of the sent accounts.
  • the pull's own words, same as /bank's 502, for a pull that leaves nothing to file: no checking or savings account, or no posted transaction in range.
401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Send a statement

POST/api/underwriting/files/{fileId}/documents

The statement is read, reconciled and the whole file judged again before the answer comes. The same statement sent again, by externalRef or by its bytes (SHA-256), on the same file, is the statement already there: it comes back as it stands with duplicate: true, and is not read or charged again. That includes one whose read failed: send retry=true to read it again, on its own row when the externalRef is the same, on a new row when only the bytes match. A document plainly not a bank statement is passed over (status: passed): before its read and at no cost when its first pages or its name say so; after a read that found no rows, paid as any read, when it is a printout from online banking or a scanned application. One labelled application, identification or processing_statement, or named as one of the letters the desk passes over, is recorded as passed over: document is null and passedOver says why. One with no label yet (category empty or pending) answers 409, and is sent again once it has one. Any other is filed, read and charged as any statement is, and its record is written in the same transaction as the statement. One whose PDF the file already holds is that statement.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Body, multipart/form-data

filefile, required

The statement, a PDF, up to 25 MB.

externalRefstring

Your own id for the statement, cut to 200.

retrystring

true or 1 (any case): read a statement whose read failed again.

categorystring

Empty or pending answers 409.

Answers

200

The statement, read, or as it already stood.

400

Bad request. error is one of:

  • Upload the statement as multipart form data with a file field.
  • No file in the upload.
401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
413

Too large. error is one of:

  • Statements over 25 MB aren't accepted.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.
503

Not available. error is one of:

  • The statements bucket (UNDERWRITING_DOCS) is not bound.

Read a statement again

POST/api/underwriting/documents/{documentId}/retry

It costs a read like the first time, except a read that was paid for and then failed on our side, not the statement's: it stopped before its rows were saved, the scan reader refused it, failed on its side or could not be reached, or it found no rows — each of those is read again free. A failed or stalled statement keeps the new reading only when it lands no further from the printed closing balance than what the statement already holds; otherwise it stays failed, saying why. A statement already read, reconciled, with no period either end, whose eight or more stored rows (not from a scan) all fall in one calendar month, can also be pressed: read again from the same bytes, free, writing only the recovered period when the fresh reading agrees with every stored row and comes out reconciled with a month of its own; otherwise nothing is written and it stays as it was, already read.

Parameters

documentIdpath, required

The document's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The statement after the read.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • Document not found
  • File not found: no file with that id in this workspace.
  • The statement's bytes are gone; send it again.
409

Conflict. error is one of:

  • This month came from the bank's feed; pull the feed again instead.
  • This statement is already read.
  • This statement is being read now.
  • The reader's fresh copy of this statement does not yet recover the month's own date; it is already read.: it qualified for the free undated-month press, but the fresh reading did not come back unchanged and reconciled with a month, so nothing was written.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Overrule the reader on one row

POST/api/underwriting/transactions/{transactionId}

The row takes the kind given and is marked overruled by hand. The statement's measures are computed again from its rows, and the whole file is judged again, so the positions, sheets and offers follow. The kind is checked before the row is looked for.

Parameters

transactionIdpath, required

The row's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Body, application/json

kind"deposit" | "processor" | "transfer_in" | "transfer_out" | "lender" | "nsf" | "fee" | "payroll" | "check" | "card" | "debit" | "loan" | "refund" | "return" | "other_in", required

Answers

200

The row and its statement, after.

400

Bad request. error is one of:

  • Not a kind the desk knows
401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • Row not found
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Every row read from a statement

GET/api/underwriting/documents/{documentId}/transactions

In statement order, each with its page and its box on the page.

Parameters

documentIdpath, required

The document's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The rows.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • Document not found
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

The statement itself

GET/api/underwriting/documents/{documentId}/pdf

The PDF as it was sent, inline, under its filename. Not cached.

Parameters

documentIdpath, required

The document's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The PDF.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • Document not found
  • This month came from the bank's feed; there is no PDF of it.
  • The statement's bytes are gone
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Report

The file as one structured report.

The file as one structured report

GET/api/underwriting/files/{fileId}/report

Coverage, revenue, the months, the statements, the banking, the positions, the checks, the sheets, the offers and a preliminary outcome, each saying what it does not know. A file whose statements were read before the desk read positions has them read now, so this GET can write. This is what to draw a deal page or a one-page breakdown from.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The report.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Press the Super Deep Dive

POST/api/underwriting/files/{fileId}/deepdive

For a deal about to fund: the file's report, drawn exactly as GET .../report draws it, with a deepDive section beside it. Each press is put on the file's timeline as an event with agent desk, kind done and detail { kind: "deep_dive", actor, at }: who pressed, and when. Since the call writes, a key answers 503 here unless its workspace's desk is open for writing, as on every other write. Every field in the deepDive section resolves in the press itself. With a businessName, the press looks the business up on Google once and answers its listing in deepDive.googleReviews; nothing Google answers is kept.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Body, application/json

websiteUrlstring

The business's website, for deepDive.websiteCheck. Left out or blank: websiteCheck is null.

businessNamestring

The business's name, for deepDive.googleReviews: the press looks it up on Google once. Trimmed, and cut to 200 characters. Left out or blank: nothing is looked up, and googleReviews.status is not_sent. The report holds no business name, so the caller sends it.

businessAddressstring

The business's address, sent to Google with businessName to find the right listing. Trimmed, and cut to 300 characters. Optional; on its own it looks nothing up.

{
  "websiteUrl": "https://example-bakery.com",
  "businessName": "Example Bakery",
  "businessAddress": "12 Main Street, Springfield, IL 62701"
}

Answers

200

The report, with the deep dive.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Positions

What the merchant already owes.

What the merchant already owes

GET/api/underwriting/files/{fileId}/positions

Read for the first time when the file has statements and no positions yet, so this GET can write.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The positions.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Review, add or rescan positions

POST/api/underwriting/files/{fileId}/positions

action is review when left out. rescan reads the positions again from every statement. add records one the statements cannot show, marked manual, so no rescan removes it. review records the underwriter's half of one position: only the fields sent change. With teach: true and a teachMatch, the correction is also kept in this workspace's own dictionary, so the next file with that descriptor already knows.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Body, application/json

action"rescan" | "review" | "add"
positionIdstring

review: the position.

reviewstring

review: confirmed, rejected, paid_off or active; anything else clears it.

funderstring

review: the name to call it, cut to 160. add: required.

paymentCentsinteger | null

review: the payment to underwrite on; null clears the correction. add: required, more than 0.

cadencestring

review: cut to 20. add: weekly when left out.

notestring

review or add.

declaredByMerchantboolean

review: the merchant told us of it.

mergeIntostring | null

review: another position on this file that this one is. Any other id answers 404 That position is not on this file.

firstSeenstring

add: YYYY-MM-DD.

lastSeenstring

add: YYYY-MM-DD.

teachboolean

review: keep the correction in the workspace's dictionary.

teachMatchstring

review, with teach: the descriptor the dictionary matches on.

Answers

200

The positions, after.

400

Bad request. error is one of:

  • Give the position a funder name.
  • Give the position a payment amount.
  • action must be rescan, review or add.
401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
  • That position is not on this file.: positionId, or mergeInto, names no position on this file.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Decisions

Your underwriter's decision, recorded.

Record your underwriter's decision

POST/api/underwriting/files/{fileId}/decision

Every decision is a row and a line on the timeline, with the terms it was made on. The file's status becomes the decision (more_info makes it waiting). An approval, a counter or a funding is always made on terms, and the terms must name frequency. Not idempotent: each call records a decision.

Parameters

fileIdpath, required

The file's id.

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Body, application/json

decision"approved" | "countered" | "declined" | "more_info" | "funded", required

Any case.

offerDecisionOfferInput

The terms a decision is made on. Payback and payment are recomputed from them.

notestring

Cut to 2,000.

{
  "decision": "approved",
  "offer": {
    "frequency": "weekly",
    "advanceCents": 2500000,
    "factor": 1.3,
    "term": 26
  },
  "note": "Approved on the desk's terms."
}

Answers

200

The decision.

400

Bad request. error is one of:

  • decision must be approved, countered, declined, more_info, or funded.
  • Payment frequency needs review: choose daily or weekly for these terms.: an approval, counter or funding whose offer.frequency is not daily or weekly, or that sent no offer.
  • An approval, counter, or funding needs the terms it is made on.: terms that come to no advance, a factor under 1, or no term.
401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
404

Not found. error is one of:

  • File not found: no file with that id in this workspace.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Sheets

The rules a file is judged by, and the terms it prices at.

The workspace's sheets

GET/api/underwriting/guidelines

The rules each file is judged by and the terms each prices at, in order. A workspace with none is given the two default sheets, A paper and B paper, the first time anyone asks, so this GET can write.

Parameters

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Answers

200

The sheets.

401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.

Documents

Documents that are not statements.

Read a document that is not a statement

POST/api/underwriting/read-document

For a platform that parses a form itself (an application, say): the document goes to the OCR meter's layout reader and Azure's analyzeResult comes back untouched in result. Nothing is kept on the desk, no file and no document: only the read's cost row. It is billed at cost. A reader answer that cannot be parsed after the meter charged is still drawn from the funds.

Parameters

X-On-Behalf-Ofheader

Keyed calls: the email address of the person in your system the call is for. A value that is not an email address is ignored.

Body, multipart/form-data

filefile, required

The document, up to 25 MB. Its own content type is passed to the reader; application/pdf when it has none.

referencestring

Your own words for it, cut to 120: added to the meter's reference and the cost row.

Answers

200

Read.

400

Bad request. error is one of:

  • Send the document as multipart form data, in a field called file.
  • The document is empty.
401

Unauthorized. error is one of:

  • This API key is not valid, or has been revoked.: a key-shaped credential the desk does not know.
402

Payment required. error is one of:

  • Out of funds. Add funds under Plans and drop the statement in again.: an at-cost desk whose funds are spent.
  • Reading documents other than statements is billed at cost; this workspace is on a statement-credit plan.
413

Too large. error is one of:

  • The desk reads documents up to 25 MB.
500

Something threw. error is one of:

  • The desk took too long answering — try again in a moment.
  • The desk couldn't reach its database just now — try again in a moment.
  • Something went wrong on the desk's side. Try again; if it keeps happening, the operator can find the cause in the worker's log.
502

Bad gateway. error is one of:

  • The reader: <its words>: the reader failed.
503

Not available. error is one of:

  • Document reading is not connected on this desk.: no OCR reader is configured.
  • The reader: <its words>: the reader answered 402 or 403.