Skip to content

  • Documentation
    • OKdokument API
    • SIGNATUS User Manual
  • Contact Us

1. API concept

  • Overview
  • 1.1 Supported web browsers
  • 1.2 Supported languages
  • 1.3 How to prepare document for signature
  • 1.4 How to use acrofields
  • 1.5 How to use pre-defined signature fields
  • 1.6 Document states
  • 1.7 Storing and deleting documents
  • 1.8 OKDokument API call list
  • 1.9 QR code
  • 1.10 Email and SMS
  • 1.11 Dictionary

2. Core API services

  • 2.1 Authorization
  • 2.2 Create signature request
  • 2.3 Open document
  • 2.4 Information about signing completion
  • 2.5 Result URL
  • 2.6 Download document
  • 2.7 Delete document

3. Additional API services

  • 3.1 List of the documents
  • 3.2 Document Info
  • 3.3 Update Signature Request ID
  • 3.4 Delete Signature Request ID
  • 3.5 Signature request Counter
  • 3.6 Upload document

4. Use cases

  • Overview
  • 4.1 Example 1: Simple one-round signing
  • 4.2 Example 2: One-round signing with redirect url
  • 4.3 Example 3: One-round signing with send info
  • 4.4 Example 4: Multi-Round Signing

5. Configuration of the signing process

  • Overview
  • 5.1 One-round signing with simple PDF
  • 5.2 Multi-round signing with simple PDF
  • 5.3  One-round signing with PDF with tags
  • 5.4 Multi-round signing with PDF with tags
  • 5.5 One-round signing with PDF with signature acrofields
  • 5.6 Multi-round signing with PDF with signature acrofields
  • 5.7 Accessing document after inserting OTP
  • 5.8 Sign document with OTP
  • 5.9 Email
  • 5.10 QR code
View Categories
  • Home
  • Documentation
  • OKdokument API
  • 3. Additional API services
  • 3.6 Upload document

3.6 Upload document

Other way to upload document instead of using signature Request service, described in core API services, is to use Upload service. Upload service only uploads content of document in base 64 format, without definition of additional parameters like in signature Request service. If you are using Upload service than signature Request service refers only to document ID that was already uploaded (also in case of first-round signing process).

Upload service is used, when there is one system responsible for document preparation + upload and the other system knows how to configure signatureRequest parameters. It is necessary that the system which uploads the document to OKdokument API, provides unique document ID to the system which is registering the signing request. Service specifications:

URLhttps://apidev.okdokument.com/JSON/document
MethodPOST
Authenticationset header x-api-key
Content typeapplication/json
ResponseHTTP 200 when uploaded successfully

JSON request body parts (Content type):

KeyFormatRequiredDefault valueDescription
filenameStringNo Name of the document. This parameter is mandatory if you want to do the file conversion to PDF format. For conversion the file postfix must be: contract.doccontract.docxcontract.xlscontract.xlsx
stateStringNotosignThe state of the document: tosign – document ready for signingtags – pre-processing document, searching for tags and inserting signature acrofields. After inserting signature acrofields, document changes state to tosign.
fileJSON ObjectYes, JSON Object of PDF file
contentbase64 StringYes The binary content of the uploaded PDF file in base64 format. https://base64.guru/converter/encode/file Maximal document size is 10 MB Parameter content can be also called with $content.

Request body example:

{
    "filename": "example1.docx",
    "state": "tags",
    "file": {
        "content": "xyz_JVBERi0xLjc=="
    }
}

Response body example

{    "message": "msg.document.upload",
    "result": "y7Ki_u1mrUwijfb-o_S1JiphSsoXya8iypH380F"}

Updated on 25/07/2024
3.5 Signature request Counter
  • Documentation
    • OKdokument API
    • SIGNATUS User Manual
  • Contact Us
Proudly powered by WordPress