Create document
POST
/api/public/v1/documents/document
const url = 'https://app.kontera.ch/api/public/v1/documents/document';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"signedFileName":"example","fileName":"example","processImmediately":false,"paymentType":"not-yet-determined","externalId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.kontera.ch/api/public/v1/documents/document \ --header 'Content-Type: application/json' \ --data '{ "signedFileName": "example", "fileName": "example", "processImmediately": false, "paymentType": "not-yet-determined", "externalId": "example" }'Creates a new document using an uploaded file.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
signedFileName
required
The received name from the document upload
string
fileName
required
The original filename of the document
string
processImmediately
Whether the AI should extract the documents contents immediately after upload. Defaults to false.
boolean
paymentType
The payment type of the document
string
externalId
An optional external ID for the document
string
Responses
Section titled “Responses”Media typeapplication/json
object
konteraId
ID of generated and to be processed document within Kontera. Only set, if processImmediately was true.
string
konteraFileId
required
ID of generated file within Kontera
string
Examplegenerated
{ "konteraId": "example", "konteraFileId": "example"}