Zum Inhalt

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

stateone of queued, processing, review, failed, filed, handled[]Default: review and failed.
pageinteger1-based page of 50 rows. Omit for the first page.

Response 200

items[]object[]
items[].idstring
items[].filestring
items[].kindstring
items[].statestring
items[].received_atstring
items[].senderstring | null
items[].questionstring | null
items[].errorstring | null
items[].error_labelstring | null
items[].error_detailstring | null
items[].attemptsinteger
items[].next_try_atstring | null
items[].document_typestring | null
items[].pathstring | null
items[].urlstring | null
items[].tasksstring[]
items[].page_urlstring
pageinteger
totalinteger
has_moreboolean
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

idrequiredstringThe item's id, from list_intake_items.

Response 200

idstring
statestring
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

idrequiredstringThe item's id, from list_intake_items.

Body (JSON)

hintrequiredstring

Response 200

idstring
statestring
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.