Document API 1.0 / Documents

POST /documents

Upload a document

This method has the URL https://files.toptranslation.com/documents and returns a information about the uploaded document.

Authentification

An upload token is required to upload to the DocumentStore it needs to be added as parameter token to the request URL. An upload token can be retrieved from the Rest-API. See Create an upload token in the Rest-API documentation .

Required arguments

token
Upload token to authorise the upload.
String
file
The file to upload.
File
type
Type of the document. May be used to control different behavior or filtering in DocumentStore.
String

Response

Returns information about the uploaded document.

{
  meta: {
    status: 201
  },
  data: {
    identifier: '64134c25-36ee-47a2-a6ea-ffcd27249580',
    mime_type: 'application/pdf',
    document_token: 'Y0c5c2JIVjQ7bllIdzNOSUFVeW8yMXNybFlUW1DNHFvZw...',
    document_type: 'request_document',
    download_url: 'https://files.tt.gl/documents/64134c25-36ee-47a2-a6ea-...',
    excerpt: null,
    filename: 'documentation.pdf',
    words: 208,
    filesize: 96994,
    characters: 1552,
    lines: 32,
    locale_code: 'de',
    locale_name: 'GERMAN',
    created_at: '2016-01-23T17:54:48.497Z'
  }
}

Errors

403 - Access token invalid
Token can not be validated.