DigiOffice API Services Services

<back to all web services

GenerateDraftExcelDocument

Generate a new or update a (corporate identity) MS Excel document without registration.

Requires Authentication
The following routes are available for this service:
POST/api/documentgenerator/excel/generatedraftdocument
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DocumentBase64File:
    content_type: Optional[str] = None
    content: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GenerateDraftExcelDocumentResponse(IGenerateDraftDocumentResponse):
    # @ApiMember(Description="Contains the file")
    file: Optional[DocumentBase64File] = None
    """
    Contains the file
    """


# @Api(Description="Generate a new or update a (corporate identity) MS Excel document without registration.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GenerateDraftExcelDocument(IGenerateDraftOfficeDocument):
    """
    Generate a new or update a (corporate identity) MS Excel document without registration.
    """

    # @ApiMember(Description="The DocumentInfo result of the registration wizard.", IsRequired=true)
    document_info: Optional[str] = None
    """
    The DocumentInfo result of the registration wizard.
    """


    # @ApiMember(Description="Hier kan de (dynamische) data voor het document geplaatst worden, de data kan middels tekstblokken en placeholders worden geplaatst.Het formaat binnen CustomData staat vrij maar vereist een 'root' element.")
    custom_data: Optional[str] = None
    """
    Hier kan de (dynamische) data voor het document geplaatst worden, de data kan middels tekstblokken en placeholders worden geplaatst.Het formaat binnen CustomData staat vrij maar vereist een 'root' element.
    """


    # @ApiMember(Description="The document to update.")
    file: Optional[DocumentBase64File] = None
    """
    The document to update.
    """

Python GenerateDraftExcelDocument DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/documentgenerator/excel/generatedraftdocument HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"DocumentInfo":"String","CustomData":"String","File":{"ContentType":"String","Content":"String"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"File":{"ContentType":"String","Content":"String"}}