Answer a reading's cost
Says yes or no to the cost Werk asked before reading a long document.
Yes starts the reading at its cost on the plan; no leaves the document unread. A question that changed or ended answers kind refused.
Authorization
Authorization: Bearer <key> Authentication
Headers
The language tag Werk writes the answer's own words in, such as step names and history lines, matched to a language it serves; a card's text stays as written. At a project's paths, the reads of its cards and steps, of a card, its update photos, a file and its reminders, and of follow and reminder invitations, and a document's read-now and consent, take the language of the person's chat with Werk in that project first, while it has one. Without either, the language Werk uses with the person the key or the connection acts for.
Path parameters
The project's id.
The card's id.
The document's id.
Body
The id of the question about the reading's cost.
The question's version as last read.
True reads the document at its cost, false leaves it unread.
Response
200 What came of the answer.
One of 4 shapes, told apart by kind:
kindreadingreading once Werk reads it, not_read when it will not, awaiting_confirmation while it waits for a yes to its cost, refused when the request could not be taken.
The document after the request.
Show properties of documentHide properties of document
The document's id.
The card the document is on.
The document's name.
The document's media type.
The document's revision, which grows each time its file is replaced.
not_read while it is not being read, awaiting_confirmation while Werk waits for a yes to its cost, reading, failed, or ready.
The document's version, which grows with every change to it; a read request sends it as expectedVersion.
How many parts the document has, or null while not known.
How many parts Werk read.
True when Werk read only the document's first parts.
Werk's summary of the document, or null.
The issuer, number, date, total and currency Werk read in the document, or null.
Show properties of fieldsHide properties of fields
The issuer Werk read in the document, or null when it found none.
Show properties of issuerHide properties of issuer
The issuer as read.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The document's number Werk read in the document, or null when it found none.
Show properties of numberHide properties of number
The document's number as read.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The date Werk read in the document, or null when it found none.
Show properties of dateHide properties of date
The date as read, as YYYY-MM-DD.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The total Werk read in the document, or null when it found none.
Show properties of totalHide properties of total
The total as read, a decimal number with a point.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The currency Werk read in the document, or null when it found none.
Show properties of currencyHide properties of currency
The currency as read, its ISO 4217 code.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
Why reading failed, or null.
What reading the document counts on the plan, in messages, or null before Werk inspected it.
A PDF's pages, or other text in pages of 3,000 characters; null when not known.
A workbook's sheets with data; null for other files or when not known.
True when the key's person may take this document off the card now.
True when this answers a request already taken.
kindnot_reading once Werk reads it, not_read when it will not, awaiting_confirmation while it waits for a yes to its cost, refused when the request could not be taken.
The document after the request.
Show properties of documentHide properties of document
The document's id.
The card the document is on.
The document's name.
The document's media type.
The document's revision, which grows each time its file is replaced.
not_read while it is not being read, awaiting_confirmation while Werk waits for a yes to its cost, reading, failed, or ready.
The document's version, which grows with every change to it; a read request sends it as expectedVersion.
How many parts the document has, or null while not known.
How many parts Werk read.
True when Werk read only the document's first parts.
Werk's summary of the document, or null.
The issuer, number, date, total and currency Werk read in the document, or null.
Show properties of fieldsHide properties of fields
The issuer Werk read in the document, or null when it found none.
Show properties of issuerHide properties of issuer
The issuer as read.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The document's number Werk read in the document, or null when it found none.
Show properties of numberHide properties of number
The document's number as read.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The date Werk read in the document, or null when it found none.
Show properties of dateHide properties of date
The date as read, as YYYY-MM-DD.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The total Werk read in the document, or null when it found none.
Show properties of totalHide properties of total
The total as read, a decimal number with a point.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The currency Werk read in the document, or null when it found none.
Show properties of currencyHide properties of currency
The currency as read, its ISO 4217 code.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
Why reading failed, or null.
What reading the document counts on the plan, in messages, or null before Werk inspected it.
A PDF's pages, or other text in pages of 3,000 characters; null when not known.
A workbook's sheets with data; null for other files or when not known.
True when the key's person may take this document off the card now.
kindawaiting_reading once Werk reads it, not_read when it will not, awaiting_confirmation while it waits for a yes to its cost, refused when the request could not be taken.
The document after the request.
Show properties of documentHide properties of document
The document's id.
The card the document is on.
The document's name.
The document's media type.
The document's revision, which grows each time its file is replaced.
not_read while it is not being read, awaiting_confirmation while Werk waits for a yes to its cost, reading, failed, or ready.
The document's version, which grows with every change to it; a read request sends it as expectedVersion.
How many parts the document has, or null while not known.
How many parts Werk read.
True when Werk read only the document's first parts.
Werk's summary of the document, or null.
The issuer, number, date, total and currency Werk read in the document, or null.
Show properties of fieldsHide properties of fields
The issuer Werk read in the document, or null when it found none.
Show properties of issuerHide properties of issuer
The issuer as read.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The document's number Werk read in the document, or null when it found none.
Show properties of numberHide properties of number
The document's number as read.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The date Werk read in the document, or null when it found none.
Show properties of dateHide properties of date
The date as read, as YYYY-MM-DD.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The total Werk read in the document, or null when it found none.
Show properties of totalHide properties of total
The total as read, a decimal number with a point.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
The currency Werk read in the document, or null when it found none.
Show properties of currencyHide properties of currency
The currency as read, its ISO 4217 code.
The part of the document it was read from.
Show properties of sourceHide properties of source
The document's id.
The revision it was read in.
The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.
The SHA-256 of the file it was read from.
Where in the file the part is.
Show properties of locationHide properties of location
One of 5 shapes, told apart by kind:
kindpdf_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The PDF page.
kindsectionWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The section, counted from 1.
kindparagraphWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The paragraph, counted from 1.
kindsheet_Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The sheet's name.
The part's first row.
The part's last row.
kindlinesWhere in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.
The part's first line.
The part's last line.
Why reading failed, or null.
What reading the document counts on the plan, in messages, or null before Werk inspected it.
A PDF's pages, or other text in pages of 3,000 characters; null when not known.
A workbook's sheets with data; null for other files or when not known.
True when the key's person may take this document off the card now.
The question about the reading's cost, answered with the consent route.
Show properties of consentHide properties of consent
The question's id, sent as consentId.
The question's version, sent as expectedConsentVersion.
What the reading counts on the plan, in messages.
When the question lapses.
The question as Werk asks it, in the reader's language.
kindrefusedreading once Werk reads it, not_read when it will not, awaiting_confirmation while it waits for a yes to its cost, refused when the request could not be taken.
Why the request could not be taken.
Errors
invalid_query The query is not in the form the route takes; the limit is in the unit of the input details.field names (characters for a text, entries for a list, the value for a number).invalid_media The file, its name or the request about it is not in a form the route takes; the limit is in the unit of the input details.field names (characters for a text, entries for a list, the value for a number).session_revoked The request carries no session the server holds, or its session has ended.session_expired The session has expired.conversation_not_found The project the request names, or its chat, is not one the signed-in person is in.item_not_found The card the request names, or its list, is not one the signed-in person can see.asset_not_found The file the request names is not one the signed-in person can reach where the request names it, or is no longer available.session_changed The session changed while the request was in flight.project_deleted The project is being deleted.project_archived The project is archived, so it does not take this request.payload_too_large The request body has more bytes than the route takes.rate_limited More requests of this kind were sent than Werk takes within the time it counts them over.server_error The server could not complete the request, and it is not known whether a write it holds was made.curl -X POST "https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/cards/3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48/documents/d7e1b5c3-9a4f-4e26-b8d0-2f6a4c8e1d59/consent" \
-H "Authorization: Bearer wk_key_..." \
-H "Content-Type: application/json" \
-d '{
"consentId": "d2a6c0e4-9b3f-4d5b-87a9-2b8c0f4d6a08",
"expectedConsentVersion": 1,
"accept": true
}'const res = await fetch("https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/cards/3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48/documents/d7e1b5c3-9a4f-4e26-b8d0-2f6a4c8e1d59/consent", {
method: "POST",
headers: {
Authorization: "Bearer wk_key_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
"consentId": "d2a6c0e4-9b3f-4d5b-87a9-2b8c0f4d6a08",
"expectedConsentVersion": 1,
"accept": true
}),
});
const answer = await res.json();{
"kind": "reading",
"document": {
"id": "d7e1b5c3-9a4f-4e26-b8d0-2f6a4c8e1d59",
"itemId": "3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48",
"filename": "countertop-quote.pdf",
"mimeType": "application/pdf",
"revision": 1,
"state": "reading",
"version": 3,
"totalSources": 2,
"readSources": 0,
"truncated": false,
"summary": null,
"fields": null,
"failureCode": null,
"units": 1,
"pages": 2,
"sheets": null,
"removable": true
},
"replay": false
}Send a requestPOST
It is sent with the key you give, as you. A change made here is real.
The request could not be sent, or its response could not be read.