NAV
bash javascript

Introduction

Welcome to the einfachArchiv API! If you're looking to integrate your application with einfachArchiv or create your own application in concert with data inside of einfachArchiv, you're in the right place. We're happy to have you!

Making a request

All URLs start with https://www.einfacharchiv.app/api/. URLs are HTTPS only. We use JSON for all API data and the snake_case notation for all keys. The outer-most resource is wrapped in a data key.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/teams" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/teams",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

To make a request for all teams in your account, append the teams path to the API endpoint to form something like https://www.einfacharchiv.app/api/teams.

Authentication

You must create an Access Token or an OAuth App in order to interact with einfachArchiv. You can do that on your profile page.

If you're making a public integration with einfachArchiv for others to enjoy, you must use OAuth2. OAuth2 allows users to authorize your application to use einfachArchiv on their behalf without having to copy/paste access tokens or touch sensitive login information.

OAuth2

Redirecting for authorization

Once you have created an OAuth app, you may use the client ID and secret to request an authorization code and access token from einfachArchiv. First, your application should make a redirect request to the /oauth/authorize path like so:

https://www.einfacharchiv.app/oauth/authorize?client_id=client-id&redirect_uri=http://example.com/callback&response_type=code

Converting authorization codes to access tokens

Example request:

curl -X POST "https://www.einfacharchiv.app/oauth/token" \
-d "grant_type"="authorization_code" \
-d "client_id"="client-id" \
-d "client_secret"="client-secret" \
-d "redirect_uri"="http://example.com/callback" \
-d "code"="code"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/oauth/token",
    "method": "POST",
    "data": {
        "grant_type": "authorization_code",
        "client_id": "client-id",
        "client_secret": "client-secret",
        "redirect_uri": "http://example.com/callback",
        "code": "code"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

If the user approves the authorization request, they will be redirected back to your application. Your application should then issue a POST request to einfachArchiv to request an access token. The request should include the authorization code that was issued by einfachArchiv when the user approved the authorization request.

This /oauth/token path will return the access_token, refresh_token, and expires_in attributes. The expires_in attribute contains the number of seconds until the access token expires.

Refreshing tokens

Example request:

curl -X POST "https://www.einfacharchiv.app/oauth/token" \
-d "grant_type"="refresh_token" \
-d "refresh_token"="the-refresh-token" \
-d "client_id"="client-id" \
-d "client_secret"="client-secret"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/oauth/token",
    "method": "POST",
    "data": {
        "grant_type": "refresh_token",
        "refresh_token": "the-refresh-token",
        "client_id": "client-id",
        "client_secret": "client-secret"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

If the access token expires, you will need to refresh the access token via the refresh token that was provided to you when the access token was issued.

This /oauth/token path will return the access_token, refresh_token, and expires_in attributes. The expires_in attribute contains the number of seconds until the access token expires.

Contacts

Get contacts

Returns a paginated list of all contacts.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/contacts" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="601" \
-d "sort"="name" \
-d "per_page"="32" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/contacts",
    "method": "GET",
    "data": {
        "team_id": 601,
        "sort": "name",
        "per_page": 32
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET contacts

Parameters

Parameter Type Status Description
team_id integer required
sort string optional name or -name
per_page integer optional Between: 1 and 100

Suggest contacts

Returns a paginated list of suggested contacts. 5 per page.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/contacts/suggest" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="221" \
-d "query"="ipsam" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/contacts/suggest",
    "method": "GET",
    "data": {
        "team_id": 221,
        "query": "ipsam"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET contacts/suggest

Parameters

Parameter Type Status Description
team_id integer required
query string optional

Create a contact

Returns the created contact.

Authorized roles

Example request:

curl -X POST "https://www.einfacharchiv.app/api/contacts" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="278" \
-d "name"="quis" \
-d "email"="[email protected]" \
-d "website"="http://www.gorczany.com/est-quia-odit-molestias-hic-ipsum-repellendus-saepe" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/contacts",
    "method": "POST",
    "data": {
        "team_id": 278,
        "name": "quis",
        "email": "[email protected]",
        "website": "http:\/\/www.gorczany.com\/est-quia-odit-molestias-hic-ipsum-repellendus-saepe"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST contacts

Parameters

Parameter Type Status Description
team_id integer required
name string required Maximum: 255
email email optional Maximum: 255
website url optional Maximum: 255

Get a contact

Returns the requested contact.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/contacts/{contact}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/contacts/{contact}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET contacts/{contact}

Update a contact

Returns the updated contact.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/contacts/{contact}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "name"="nostrum" \
-d "email"="[email protected]" \
-d "website"="http://www.white.com/eos-dolores-facilis-beatae-rem-architecto-voluptatem-eius-et" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/contacts/{contact}",
    "method": "PUT",
    "data": {
        "name": "nostrum",
        "email": "[email protected]",
        "website": "http:\/\/www.white.com\/eos-dolores-facilis-beatae-rem-architecto-voluptatem-eius-et"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT contacts/{contact}

PATCH contacts/{contact}

Parameters

Parameter Type Status Description
name string required Maximum: 255
email email optional Maximum: 255
website url optional Maximum: 255

Delete a contact

Returns 204 No Content if successful.

Authorized roles

Example request:

curl -X DELETE "https://www.einfacharchiv.app/api/contacts/{contact}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/contacts/{contact}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE contacts/{contact}

Documents

Get documents

Returns a paginated list of all documents.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/documents" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="383" \
-d "folder_id"="383" \
-d "with_subfolders"="1" \
-d "sort"="-filename" \
-d "per_page"="26" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents",
    "method": "GET",
    "data": {
        "team_id": 383,
        "folder_id": 383,
        "with_subfolders": true,
        "sort": "-filename",
        "per_page": 26
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET documents

Parameters

Parameter Type Status Description
team_id integer required
folder_id integer optional Valid folder id
with_subfolders boolean optional
sort string optional filename, -filename, date, -date, locked_until or -locked_until
per_page integer optional Between: 1 and 100

Upload a document

Returns the metadata of the uploaded document.

Authorized roles

Example request:

curl -X POST "https://www.einfacharchiv.app/api/documents" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="857" \
-d "file"="nostrum" \
-d "filename"="nostrum" \
-d "sender"="nostrum" \
-d "recipient"="nostrum" \
-d "type"="reminder" \
-d "type_id"="857" \
-d "date"="1984-05-20" \
-d "tags"="nostrum" \
-d "note"="nostrum" \
-d "folder_id"="857" \
-d "archive"="1" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents",
    "method": "POST",
    "data": {
        "team_id": 857,
        "file": "nostrum",
        "filename": "nostrum",
        "sender": "nostrum",
        "recipient": "nostrum",
        "type": "reminder",
        "type_id": 857,
        "date": "1984-05-20",
        "tags": "nostrum",
        "note": "nostrum",
        "folder_id": 857,
        "archive": true
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST documents

Parameters

Parameter Type Status Description
team_id integer required
file file required Must be a file upload Maximum: 40000
filename string optional Maximum: 255
sender string optional Maximum: 255
recipient string optional Maximum: 255
type string optional invoice, credit-note, reminder, salary-statement, bank-statement, contract, balance-sheet, tax-assessment-note, letter or other
type_id integer optional
date date optional
tags array optional Must be an array
note string optional Maximum: 65535
folder_id integer optional
archive boolean optional

Get a document

Returns the file.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/documents/{document}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET documents/{document}

Get a thumbnail

Returns the file.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/documents/{document}/thumbnail" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/thumbnail",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET documents/{document}/thumbnail

Update a document

Only possible if the document status is archived.

Returns 422 Unprocessable Entity if the storage is full.

Returns the metadata of the updated document.

Authorized roles

Example request:

curl -X POST "https://www.einfacharchiv.app/api/documents/{document}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "file"="minus" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}",
    "method": "POST",
    "data": {
        "file": "minus"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST documents/{document}

Parameters

Parameter Type Status Description
file file required Must be a file upload Maximum: 40000

Archive a document

Only possible if the document status is under_review.

Returns 422 Unprocessable Entity if the storage is full.

Returns the metadata of the archived document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/archive" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/archive",
    "method": "PUT",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/archive

Trash a document

Only possible if the document status is under_review or archived and locked_until is in the past.

Returns the metadata of the trashed document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/trash" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/trash",
    "method": "PUT",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/trash

Restore a document

Only possible if the document status is trashed.

Returns the metadata of the restored document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/restore" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/restore",
    "method": "PUT",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/restore

Delete a document

Only possible if the document status is under_review or trashed.

Returns 204 No Content if successful.

Authorized roles

Example request:

curl -X DELETE "https://www.einfacharchiv.app/api/documents/{document}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE documents/{document}

Events

Get events

Returns a paginated list of all events.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/events" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="20240361" \
-d "document_id"="20240361" \
-d "sort"="-created_at" \
-d "per_page"="80" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/events",
    "method": "GET",
    "data": {
        "team_id": 20240361,
        "document_id": 20240361,
        "sort": "-created_at",
        "per_page": 80
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET events

Parameters

Parameter Type Status Description
team_id integer optional Required if the parameters document_id are not present.
document_id integer optional Required if the parameters team_id are not present.
sort string optional created_at or -created_at
per_page integer optional Between: 1 and 100

Folders

Get folders

Returns a paginated list of all folders.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/folders" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="5" \
-d "parent_folder_id"="27" \
-d "sort"="name" \
-d "per_page"="11" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/folders",
    "method": "GET",
    "data": {
        "team_id": 5,
        "parent_folder_id": 27,
        "sort": "name",
        "per_page": 11
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET folders

Parameters

Parameter Type Status Description
team_id integer required
parent_folder_id integer optional Maximum: 255
sort string optional name or -name
per_page integer optional Between: 1 and 100

Create a folder

Returns the created folder.

Authorized roles

Example request:

curl -X POST "https://www.einfacharchiv.app/api/folders" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="362" \
-d "parent_folder_id"="362" \
-d "name"="aliquam" \
-d "classification"="unclassified" \
-d "user_ids"="aliquam" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/folders",
    "method": "POST",
    "data": {
        "team_id": 362,
        "parent_folder_id": 362,
        "name": "aliquam",
        "classification": "unclassified",
        "user_ids": "aliquam"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST folders

Parameters

Parameter Type Status Description
team_id integer required
parent_folder_id integer optional Valid folder id
name string required Maximum: 255
classification string optional unclassified or confidential
user_ids array optional Must be an array

Get a folder

Returns the requested folder.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/folders/{folder}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/folders/{folder}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET folders/{folder}

Update a folder

Returns the updated folder.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/folders/{folder}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "name"="qui" \
-d "classification"="confidential" \
-d "user_ids"="qui" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/folders/{folder}",
    "method": "PUT",
    "data": {
        "name": "qui",
        "classification": "confidential",
        "user_ids": "qui"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT folders/{folder}

PATCH folders/{folder}

Parameters

Parameter Type Status Description
name string required Maximum: 255
classification string optional unclassified or confidential
user_ids array optional Must be an array

Move a folder

Returns 422 Unprocessable Entity if the parent folder is the same folder.

Returns 422 Unprocessable Entity if the parent folder is a child of the folder.

Returns the moved folder.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/folders/{folder}/parentFolder" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "parent_folder_id"="non" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/folders/{folder}/parentFolder",
    "method": "PUT",
    "data": {
        "parent_folder_id": "non"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT folders/{folder}/parentFolder

Parameters

Parameter Type Status Description
parent_folder_id integer required Valid folder id Not in: ``

Delete a folder

Only possible if the folder does not contain subfolders. All documents in the folder will be moved to the parent folder.

Returns 204 No Content if successful.

Authorized roles

Example request:

curl -X DELETE "https://www.einfacharchiv.app/api/folders/{folder}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/folders/{folder}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE folders/{folder}

Inbox

Get documents

Returns a paginated list of all documents in the inbox.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/inbox" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="2438840" \
-d "sort"="-created_at" \
-d "per_page"="77" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/inbox",
    "method": "GET",
    "data": {
        "team_id": 2438840,
        "sort": "-created_at",
        "per_page": 77
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET inbox

Parameters

Parameter Type Status Description
team_id integer required
sort string optional created_at or -created_at
per_page integer optional Between: 1 and 100

Invoices

Get invoices

Returns an unpaginated list of all invoices.

Authorized roles

Example request:

curl -X GET "https://www.einfacharchiv.app/api/invoices" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="189400" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/invoices",
    "method": "GET",
    "data": {
        "team_id": 189400
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET invoices

Parameters

Parameter Type Status Description
team_id integer required

Get an invoice

Returns the file.

Authorized roles

Example request:

curl -X GET "https://www.einfacharchiv.app/api/invoices/{invoice}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/invoices/{invoice}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET invoices/{invoice}

Metadata

Get metadata

Returns the metadata of the requested document.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/documents/{document}/metadata" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/metadata",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET documents/{document}/metadata

Reanalyze a document

Starts the analysis of the sender, recipient, type, date, and information of the requested document.

Only possible if the document status is under_review.

Returns 204 No Content if successful.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/extractions" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/extractions",
    "method": "PUT",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/extractions

Regenerate a thumbnail

Starts the generation of the thumbnail of the requested document.

Only possible if the document status is archived.

Returns 204 No Content if successful.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/thumbnail" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/thumbnail",
    "method": "PUT",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/thumbnail

Update a filename

Only possible if the document status is under_review or archived.

Returns the metadata of the updated document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/filename" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "filename"="inventore" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/filename",
    "method": "PUT",
    "data": {
        "filename": "inventore"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/filename

Parameters

Parameter Type Status Description
filename string required Maximum: 255

Update a sender

Only possible if the document status is under_review or archived.

The recipient will be set to the current team.

Returns the metadata of the updated document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/sender" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "sender"="nostrum" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/sender",
    "method": "PUT",
    "data": {
        "sender": "nostrum"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/sender

Parameters

Parameter Type Status Description
sender string optional Maximum: 255

Update a recipient

Only possible if the document status is under_review or archived.

The sender will be set to the current team.

Returns the metadata of the updated document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/recipient" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "recipient"="enim" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/recipient",
    "method": "PUT",
    "data": {
        "recipient": "enim"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/recipient

Parameters

Parameter Type Status Description
recipient string optional Maximum: 255

Swap a sender and a recipient

Only possible if the document status is under_review or archived.

Returns the metadata of the updated document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/contacts" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/contacts",
    "method": "PUT",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/contacts

Update information

Only possible if the document status is under_review or archived.

Returns the metadata of the updated document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/information" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "type"="contract" \
-d "type_id"="50434" \
-d "date"="1995-06-16" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/information",
    "method": "PUT",
    "data": {
        "type": "contract",
        "type_id": 50434,
        "date": "1995-06-16"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/information

Parameters

Parameter Type Status Description
type string optional Required if the parameters type_id are not present. invoice, credit-note, reminder, salary-statement, bank-statement, contract, balance-sheet, tax-assessment-note, letter or other
type_id integer optional Required if the parameters type are not present. Valid type id
date date required

Update tags

Only possible if the document status is under_review or archived.

Returns the metadata of the updated document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/tags" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "tags"="esse" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/tags",
    "method": "PUT",
    "data": {
        "tags": "esse"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/tags

Parameters

Parameter Type Status Description
tags array optional Must be an array

Update a note

Only possible if the document status is under_review or archived.

Returns the metadata of the updated document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/note" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "note"="tempora" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/note",
    "method": "PUT",
    "data": {
        "note": "tempora"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/note

Parameters

Parameter Type Status Description
note string optional Maximum: 65535

Update a folder

Only possible if the document status is under_review or archived.

Returns the metadata of the updated document.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/documents/{document}/folder" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "folder_id"="13320" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/documents/{document}/folder",
    "method": "PUT",
    "data": {
        "folder_id": 13320
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT documents/{document}/folder

Parameters

Parameter Type Status Description
folder_id integer required Valid folder id

Reminders

Get reminders

Returns a paginated list of all reminders.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/reminders" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="89724" \
-d "status"="due" \
-d "assigned_to"="89724" \
-d "is_done"="1" \
-d "sort"="due_date" \
-d "per_page"="46" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/reminders",
    "method": "GET",
    "data": {
        "team_id": 89724,
        "status": "due",
        "assigned_to": 89724,
        "is_done": true,
        "sort": "due_date",
        "per_page": 46
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET reminders

Parameters

Parameter Type Status Description
team_id integer required
status string optional due or overdue
assigned_to integer optional
is_done boolean optional
sort string optional due_date or -due_date
per_page integer optional Between: 1 and 100

Create a reminder

Returns the created reminder.

Authorized roles

Example request:

curl -X POST "https://www.einfacharchiv.app/api/reminders" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "document_id"="41011841" \
-d "description"="quibusdam" \
-d "assigned_to"="41011841" \
-d "due_date"="2009-07-04" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/reminders",
    "method": "POST",
    "data": {
        "document_id": 41011841,
        "description": "quibusdam",
        "assigned_to": 41011841,
        "due_date": "2009-07-04"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST reminders

Parameters

Parameter Type Status Description
document_id integer required Valid document id
description string required Maximum: 255
assigned_to integer required
due_date date required

Get a reminder

Returns the requested reminder.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/reminders/{reminder}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/reminders/{reminder}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET reminders/{reminder}

Update a reminder

Returns the updated reminder.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/reminders/{reminder}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "description"="qui" \
-d "assigned_to"="181433" \
-d "due_date"="1998-11-20" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/reminders/{reminder}",
    "method": "PUT",
    "data": {
        "description": "qui",
        "assigned_to": 181433,
        "due_date": "1998-11-20"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT reminders/{reminder}

PATCH reminders/{reminder}

Parameters

Parameter Type Status Description
description string required Maximum: 255
assigned_to integer required
due_date date required

Mark a reminder as done

Only users to whom the reminder has been assigned can mark the reminder as done.

Returns the updated reminder.

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/reminders/{reminder}/done" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/reminders/{reminder}/done",
    "method": "PUT",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT reminders/{reminder}/done

Delete a reminder

Returns 204 No Content if successful.

Authorized roles

Example request:

curl -X DELETE "https://www.einfacharchiv.app/api/reminders/{reminder}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/reminders/{reminder}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE reminders/{reminder}

Search

Get results

Returns a paginated list of all documents.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/search" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="3" \
-d "query"="veritatis" \
-d "sort"="relevance" \
-d "per_page"="7" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/search",
    "method": "GET",
    "data": {
        "team_id": 3,
        "query": "veritatis",
        "sort": "relevance",
        "per_page": 7
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET search

Parameters

Parameter Type Status Description
team_id integer required
query string required
sort string optional relevance, -relevance, filename, -filename, date, -date, locked_until or -locked_until
per_page integer optional Between: 1 and 100

Storage

Get storage

Returns the archived, versioned, free, and total attributes.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/storage" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="14986682" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/storage",
    "method": "GET",
    "data": {
        "team_id": 14986682
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET storage

Parameters

Parameter Type Status Description
team_id integer required

Tags

Get tags

Returns a paginated list of all tags.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/tags" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="531648199" \
-d "sort"="-name" \
-d "per_page"="100" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/tags",
    "method": "GET",
    "data": {
        "team_id": 531648199,
        "sort": "-name",
        "per_page": 100
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET tags

Parameters

Parameter Type Status Description
team_id integer required
sort string optional name or -name
per_page integer optional Between: 1 and 100

Suggest tags

Returns a paginated list of suggested tags. 5 per page.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/tags/suggest" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="77726" \
-d "query"="atque" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/tags/suggest",
    "method": "GET",
    "data": {
        "team_id": 77726,
        "query": "atque"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET tags/suggest

Parameters

Parameter Type Status Description
team_id integer required
query string optional

Create a tag

Returns the created tag.

Authorized roles

Example request:

curl -X POST "https://www.einfacharchiv.app/api/tags" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="92974" \
-d "name"="sed" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/tags",
    "method": "POST",
    "data": {
        "team_id": 92974,
        "name": "sed"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST tags

Parameters

Parameter Type Status Description
team_id integer required
name string required Maximum: 255

Get a tag

Returns the requested tag.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/tags/{tag}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/tags/{tag}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET tags/{tag}

Update a tag

Returns the updated tag.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/tags/{tag}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "name"="ducimus" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/tags/{tag}",
    "method": "PUT",
    "data": {
        "name": "ducimus"
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT tags/{tag}

PATCH tags/{tag}

Parameters

Parameter Type Status Description
name string required Maximum: 255

Delete a tag

Returns 204 No Content if successful.

Authorized roles

Example request:

curl -X DELETE "https://www.einfacharchiv.app/api/tags/{tag}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/tags/{tag}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE tags/{tag}

Teams

Get teams

Returns an unpaginated list of all teams the current user belongs to.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/teams" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/teams",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET teams

Get a team

Returns the requested team. Additional billing information will be returned for owners.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/teams/{team}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/teams/{team}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET teams/{team}

Trash

Get documents

Returns a paginated list of all documents in the trash.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/trash" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="8" \
-d "sort"="trashed_at" \
-d "per_page"="2" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/trash",
    "method": "GET",
    "data": {
        "team_id": 8,
        "sort": "trashed_at",
        "per_page": 2
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET trash

Parameters

Parameter Type Status Description
team_id integer required
sort string optional trashed_at or -trashed_at
per_page integer optional Between: 1 and 100

Empty the trash

Returns 204 No Content if successful.

Authorized roles

Example request:

curl -X POST "https://www.einfacharchiv.app/api/trash/empty" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="82931" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/trash/empty",
    "method": "POST",
    "data": {
        "team_id": 82931
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST trash/empty

Parameters

Parameter Type Status Description
team_id integer required

Types

Get types

Returns an unpaginated list of all types.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/types" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="680063758" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/types",
    "method": "GET",
    "data": {
        "team_id": 680063758
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET types

Parameters

Parameter Type Status Description
team_id integer required

Create a type

Returns the created type.

Authorized roles

Example request:

curl -X POST "https://www.einfacharchiv.app/api/types" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="23948701" \
-d "name"="debitis" \
-d "locked_for"="9" \
-d "trash_after"="321" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/types",
    "method": "POST",
    "data": {
        "team_id": 23948701,
        "name": "debitis",
        "locked_for": 9,
        "trash_after": 321
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST types

Parameters

Parameter Type Status Description
team_id integer required
name string required Maximum: 255
locked_for integer optional Minimum: 1 Maximum: 10
trash_after integer optional Minimum: 0 Maximum: 365

Get a type

Returns the requested type.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/types/{type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/types/{type}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET types/{type}

Update a type

Returns the updated type.

Authorized roles

Example request:

curl -X PUT "https://www.einfacharchiv.app/api/types/{type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "name"="quasi" \
-d "locked_for"="0" \
-d "trash_after"="26" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/types/{type}",
    "method": "PUT",
    "data": {
        "name": "quasi",
        "locked_for": 0,
        "trash_after": 26
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT types/{type}

PATCH types/{type}

Parameters

Parameter Type Status Description
name string required Maximum: 255
locked_for integer optional Minimum: 1 Maximum: 10
trash_after integer optional Minimum: 0 Maximum: 365

Delete a type

Only possible if type is custom.

Returns 204 No Content if successful.

Authorized roles

Example request:

curl -X DELETE "https://www.einfacharchiv.app/api/types/{type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/types/{type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE types/{type}

User

Get current user

Example request:

curl -X GET "https://www.einfacharchiv.app/api/user" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/user",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET user

Users

Get users

Returns an unpaginated list of all users.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/users" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "team_id"="23" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/users",
    "method": "GET",
    "data": {
        "team_id": 23
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET users

Parameters

Parameter Type Status Description
team_id integer required

Get a user

Returns the requested user.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/users/{user}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/users/{user}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET users/{user}

Versions

Get versions

Returns a paginated list of all versions.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/versions" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "document_id"="481" \
-d "sort"="created_at" \
-d "per_page"="41" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/versions",
    "method": "GET",
    "data": {
        "document_id": 481,
        "sort": "created_at",
        "per_page": 41
},
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET versions

Parameters

Parameter Type Status Description
document_id integer required
sort string optional created_at or -created_at
per_page integer optional Between: 1 and 100

Get a document

Returns the file.

Example request:

curl -X GET "https://www.einfacharchiv.app/api/versions/{version}" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.einfacharchiv.app/api/versions/{version}",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "authorization": "Bearer " + access_token
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

GET versions/{version}