Zum Inhalt

Reference

Attachments

POST/api/v1/attachmentsUpload attachment

Uploads one file, as base64, to attach to a comment: pass the returned id in add_task_comment's attachments within a day, or it is removed. PNG, JPEG, WebP, PDF, DOCX and XLSX, recognised by their content, and Markdown: a file_name ending in .md and UTF-8 text; at most 10 MB. With finance.manage and the finance:write scope an XML e-invoice (XRechnung, UBL or CII) is accepted as well, to pass as attachment_id to create_incoming_invoice_draft; its fields then fill the draft. Every file is scanned for malware and shown to nobody -- nor to the customer -- until it is found clean.scope tasks:comment

Body (JSON)

file_namerequiredstringThe name people see, e.g. "fehler.png".
content_base64requiredstringThe file, base64-encoded.

Response 200

idstring
file_namestring
content_typestring
scan_statestring
Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "file_name": {
      "type": "string"
    },
    "content_type": {
      "type": "string"
    },
    "scan_state": {
      "type": "string",
      "const": "pending"
    }
  },
  "required": [
    "id",
    "file_name",
    "content_type",
    "scan_state"
  ],
  "additionalProperties": false
}

Refusals are problems with a code — see Errors.

GET/api/v1/attachments/{id}Get attachment

One attachment's content, by the id get_task lists. Images come back as images, Markdown as text, other files as a document. Only files the malware scan found clean; one still pending can be asked for again later.scope tasks:read

Path

idrequiredstringThe attachment's id, from get_task.

Response 200: the file itself, with its content type.

Refusals are problems with a code — see Errors.