Zum Inhalt springen

Dokumente

Dateien zu Kontakten, Forderungen und Belegen.
GET/api/v1/documents

Berechtigung: documents:read

Query-Parameter

  • contactIdstring
    max. 128 Zeichen
  • debtIdstring
    max. 128 Zeichen
  • limitinteger
    Anzahl Einträge (1–100)
    1–100 · Standard: 25
  • cursorstring
    `nextCursor` der vorherigen Seite
    max. 500 Zeichen

Antwort 200

  • object"list"Pflicht
  • dataArray<Document>Pflicht
    • idstringPflicht
    • object"document"Pflicht
    • contactIdstring | nullPflicht
    • debtIdstring | nullPflicht
    • fileNamestringPflicht
    • typestringPflicht
    • descriptionstringPflicht
    • contentTypestring | nullPflicht
    • sizeinteger | nullPflicht
      -9007199254740991–9007199254740991
    • downloadPathstringPflicht
      GET-Pfad zum Herunterladen (mit Authorization-Header)
    • createdAtstring (date-time)Pflicht
      Zeitpunkt (ISO 8601)
  • hasMorebooleanPflicht
  • nextCursorstring | nullPflicht

Mögliche Fehler: 400, 401, 403, 429, 500

curl 'https://www.debt-flow.io/api/v1/documents' \
  -H "Authorization: Bearer $DEBTFLOW_API_KEY"
Antwort 200
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "object": "document",
      "contactId": "string",
      "debtId": "string",
      "fileName": "string",
      "type": "string",
      "description": "string",
      "contentType": "string",
      "size": 0,
      "downloadPath": "string",
      "createdAt": "2026-11-01T09:30:00.000Z"
    }
  ],
  "hasMore": false,
  "nextCursor": "string"
}
POST/api/v1/documents

multipart/form-data mit Feld file (PDF, JPG, PNG, WebP, DOC, DOCX; max. 10 MB) und optional contactId, debtId, type, description.

Berechtigung: documents:write

Body (multipart/form-data)

  • filestring (binary)Pflicht
    application/pdf, image/jpeg, image/png, image/webp, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, max. 10240 KB
  • contactIdstring
    max. 128 Zeichen
  • debtIdstring
    max. 128 Zeichen
  • typeenum
    Werte: invoice, contract, payment_reminder, reminder, final_reminder, enforcement_order, court_order, bailiff_notice, correspondence, other · Standard: "other"
  • descriptionstring
    max. 500 Zeichen

Antwort 201 · Document

  • idstringPflicht
  • object"document"Pflicht
  • contactIdstring | nullPflicht
  • debtIdstring | nullPflicht
  • fileNamestringPflicht
  • typestringPflicht
  • descriptionstringPflicht
  • contentTypestring | nullPflicht
  • sizeinteger | nullPflicht
    -9007199254740991–9007199254740991
  • downloadPathstringPflicht
    GET-Pfad zum Herunterladen (mit Authorization-Header)
  • createdAtstring (date-time)Pflicht
    Zeitpunkt (ISO 8601)

Mögliche Fehler: 400, 401, 403, 429, 500

curl
curl -X POST 'https://www.debt-flow.io/api/v1/documents' \
  -H "Authorization: Bearer $DEBTFLOW_API_KEY" \
  -F 'file=@datei' \
  -F 'contactId=…' \
  -F 'debtId=…' \
  -F 'type=…' \
  -F 'description=…'
Antwort 201
{
  "id": "string",
  "object": "document",
  "contactId": "string",
  "debtId": "string",
  "fileName": "string",
  "type": "string",
  "description": "string",
  "contentType": "string",
  "size": 0,
  "downloadPath": "string",
  "createdAt": "2026-11-01T09:30:00.000Z"
}
GET/api/v1/documents/{id}

Metadaten; die Datei selbst unter downloadPath.

Berechtigung: documents:read

Pfadparameter

  • idstringPflicht
    ID der Ressource
    max. 128 Zeichen

Antwort 200 · Document

  • idstringPflicht
  • object"document"Pflicht
  • contactIdstring | nullPflicht
  • debtIdstring | nullPflicht
  • fileNamestringPflicht
  • typestringPflicht
  • descriptionstringPflicht
  • contentTypestring | nullPflicht
  • sizeinteger | nullPflicht
    -9007199254740991–9007199254740991
  • downloadPathstringPflicht
    GET-Pfad zum Herunterladen (mit Authorization-Header)
  • createdAtstring (date-time)Pflicht
    Zeitpunkt (ISO 8601)

Mögliche Fehler: 400, 401, 403, 404, 429, 500

curl 'https://www.debt-flow.io/api/v1/documents/ID' \
  -H "Authorization: Bearer $DEBTFLOW_API_KEY"
Antwort 200
{
  "id": "string",
  "object": "document",
  "contactId": "string",
  "debtId": "string",
  "fileName": "string",
  "type": "string",
  "description": "string",
  "contentType": "string",
  "size": 0,
  "downloadPath": "string",
  "createdAt": "2026-11-01T09:30:00.000Z"
}
PATCH/api/v1/documents/{id}

Berechtigung: documents:write

Pfadparameter

  • idstringPflicht
    ID der Ressource
    max. 128 Zeichen

Body (JSON) · DocumentUpdate

  • typeenum
    Werte: invoice, contract, payment_reminder, reminder, final_reminder, enforcement_order, court_order, bailiff_notice, correspondence, other
  • descriptionstring
    max. 500 Zeichen
  • fileNamestring
    max. 200 Zeichen

Antwort 200 · Document

  • idstringPflicht
  • object"document"Pflicht
  • contactIdstring | nullPflicht
  • debtIdstring | nullPflicht
  • fileNamestringPflicht
  • typestringPflicht
  • descriptionstringPflicht
  • contentTypestring | nullPflicht
  • sizeinteger | nullPflicht
    -9007199254740991–9007199254740991
  • downloadPathstringPflicht
    GET-Pfad zum Herunterladen (mit Authorization-Header)
  • createdAtstring (date-time)Pflicht
    Zeitpunkt (ISO 8601)

Mögliche Fehler: 400, 401, 403, 404, 429, 500

curl -X PATCH 'https://www.debt-flow.io/api/v1/documents/ID' \
  -H "Authorization: Bearer $DEBTFLOW_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "invoice",
  "description": "string",
  "fileName": "string"
}'
Antwort 200
{
  "id": "string",
  "object": "document",
  "contactId": "string",
  "debtId": "string",
  "fileName": "string",
  "type": "string",
  "description": "string",
  "contentType": "string",
  "size": 0,
  "downloadPath": "string",
  "createdAt": "2026-11-01T09:30:00.000Z"
}
DELETE/api/v1/documents/{id}

Berechtigung: documents:write

Pfadparameter

  • idstringPflicht
    ID der Ressource
    max. 128 Zeichen

Antwort 204

Erfolg, keine Antwort

Mögliche Fehler: 400, 401, 403, 404, 429, 500

curl -X DELETE 'https://www.debt-flow.io/api/v1/documents/ID' \
  -H "Authorization: Bearer $DEBTFLOW_API_KEY"
GET/api/v1/documents/{id}/file

Liefert die Datei (auch ältere, im Dashboard oder in der App hochgeladene Dateien) aus dem DebtFlow-Speicher.

Berechtigung: documents:read

Pfadparameter

  • idstringPflicht
    ID der Ressource
    max. 128 Zeichen

Antwort 200

Datei (application/octet-stream).

Mögliche Fehler: 400, 401, 403, 404, 429, 500

curl 'https://www.debt-flow.io/api/v1/documents/ID/file' \
  -H "Authorization: Bearer $DEBTFLOW_API_KEY"