DigiOffice Gateway Web Services

<back to all web services

GenerateDraftWordDocument

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

Requires Authentication
The following routes are available for this service:
POST/api/documentgenerator/word/generatedraftdocument
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class DocumentBase64File implements IConvertible
{
    String? ContentType;
    String? Content;

    DocumentBase64File({this.ContentType,this.Content});
    DocumentBase64File.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContentType = json['ContentType'];
        Content = json['Content'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContentType': ContentType,
        'Content': Content
    };

    getTypeName() => "DocumentBase64File";
    TypeContext? context = _ctx;
}

class GenerateDraftWordDocumentResponse implements IGenerateDraftDocumentResponse, IConvertible
{
    /**
    * Contains the file
    */
    // @ApiMember(Description="Contains the file")
    DocumentBase64File? File;

    GenerateDraftWordDocumentResponse({this.File});
    GenerateDraftWordDocumentResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        File = JsonConverters.fromJson(json['File'],'DocumentBase64File',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'File': JsonConverters.toJson(File,'DocumentBase64File',context!)
    };

    getTypeName() => "GenerateDraftWordDocumentResponse";
    TypeContext? context = _ctx;
}

/**
* Generate a new or update a (corporate identity) MS Word document without registration.
*/
// @Api(Description="Generate a new or update a (corporate identity) MS Word document without registration.")
class GenerateDraftWordDocument implements IGenerateDraftOfficeDocument, IConvertible
{
    /**
    * The DocumentInfo result of the registration wizard.
    */
    // @ApiMember(Description="The DocumentInfo result of the registration wizard.", IsRequired=true)
    String? DocumentInfo;

    /**
    * 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="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.")
    String? CustomData;

    /**
    * The document to update.
    */
    // @ApiMember(Description="The document to update.")
    DocumentBase64File? File;

    GenerateDraftWordDocument({this.DocumentInfo,this.CustomData,this.File});
    GenerateDraftWordDocument.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DocumentInfo = json['DocumentInfo'];
        CustomData = json['CustomData'];
        File = JsonConverters.fromJson(json['File'],'DocumentBase64File',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DocumentInfo': DocumentInfo,
        'CustomData': CustomData,
        'File': JsonConverters.toJson(File,'DocumentBase64File',context!)
    };

    getTypeName() => "GenerateDraftWordDocument";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'doapigw.baasbv.nl', types: <String, TypeInfo> {
    'DocumentBase64File': TypeInfo(TypeOf.Class, create:() => DocumentBase64File()),
    'GenerateDraftWordDocumentResponse': TypeInfo(TypeOf.Class, create:() => GenerateDraftWordDocumentResponse()),
    'GenerateDraftWordDocument': TypeInfo(TypeOf.Class, create:() => GenerateDraftWordDocument()),
});

Dart GenerateDraftWordDocument DTOs

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

HTTP + XML

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

POST /api/documentgenerator/word/generatedraftdocument HTTP/1.1 
Host: doapigw.baasbv.nl 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GenerateDraftWordDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.DocumentGenerator.SDK.Operations.Word">
  <CustomData>String</CustomData>
  <DocumentInfo>String</DocumentInfo>
  <File xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.DocumentGenerator.SDK.DTO">
    <d2p1:Content>String</d2p1:Content>
    <d2p1:ContentType>String</d2p1:ContentType>
  </File>
</GenerateDraftWordDocument>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GenerateDraftWordDocumentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.DocumentGenerator.SDK.DTO.Word">
  <File xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.DocumentGenerator.SDK.DTO">
    <d2p1:Content>String</d2p1:Content>
    <d2p1:ContentType>String</d2p1:ContentType>
  </File>
</GenerateDraftWordDocumentResponse>