Reference
Intake items
GET/api/v1/intake-itemsList intake items
Documents mailed to the document intake, newest first, 50 per page: file, state, where it was filed or the question the intake asks, and the numbers of the tasks it created. A mail item (kind mail) is a mail without attachments that can only produce tasks; its file is the subject. Default: the ones waiting for a person (review, failed). A failure carries error_label in words and error_detail with the step, the service's answer and its request-id; a queued item that failed waits until next_try_at. The caller's own, or all with documentIntake.manage.scope documents:read
Query
| state | one of queued, processing, review, failed, filed, handled[]Default: review and failed. |
| page | integer1-based page of 50 rows. Omit for the first page. |
Response 200
| items[] | object[] |
| items[].id | string |
| items[].file | string |
| items[].kind | string |
| items[].state | string |
| items[].received_at | string |
| items[].sender | string | null |
| items[].question | string | null |
| items[].error | string | null |
| items[].error_label | string | null |
| items[].error_detail | string | null |
| items[].attempts | integer |
| items[].next_try_at | string | null |
| items[].document_type | string | null |
| items[].path | string | null |
| items[].url | string | null |
| items[].tasks | string[] |
| items[].page_url | string |
| page | integer |
| total | integer |
| has_more | boolean |
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"file": {
"type": "string"
},
"kind": {
"type": "string"
},
"state": {
"type": "string"
},
"received_at": {
"type": "string"
},
"sender": {
"type": [
"string",
"null"
]
},
"question": {
"type": [
"string",
"null"
]
},
"error": {
"type": [
"string",
"null"
]
},
"error_label": {
"type": [
"string",
"null"
]
},
"error_detail": {
"type": [
"string",
"null"
]
},
"attempts": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"next_try_at": {
"type": [
"string",
"null"
]
},
"document_type": {
"type": [
"string",
"null"
]
},
"path": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"tasks": {
"type": "array",
"items": {
"type": "string"
}
},
"page_url": {
"type": "string"
}
},
"required": [
"id",
"file",
"kind",
"state",
"received_at",
"sender",
"question",
"error",
"error_label",
"error_detail",
"attempts",
"next_try_at",
"document_type",
"path",
"url",
"tasks",
"page_url"
],
"additionalProperties": false
}
},
"page": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"has_more": {
"type": "boolean"
}
},
"required": [
"items",
"page",
"total",
"has_more"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/intake-items/{id}/handledMark intake item handled
Says a document waiting for review, or one that failed, was filed by hand. The sender is told with the next answer to that mail.scope documents:write
Path
| idrequired | stringThe item's id, from list_intake_items. |
Response 200
| id | string |
| state | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"state": {
"type": "string",
"const": "handled"
}
},
"required": [
"id",
"state"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/intake-items/{id}/rerunRerun intake item
Sends a document waiting for review, or one that failed, through the intake again, with a hint added -- e.g. which company or order it belongs to, or where it should go. The intake then files it and answers the sender.scope documents:write
Path
| idrequired | stringThe item's id, from list_intake_items. |
Body (JSON)
| hintrequired | string |
Response 200
| id | string |
| state | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"state": {
"type": "string",
"const": "queued"
}
},
"required": [
"id",
"state"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.