POST | /api/documentgenerator/word/generatedraftdocument |
---|
import Foundation
import ServiceStack
/**
* 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.")
public class GenerateDraftWordDocument : IGenerateDraftOfficeDocument, Codable
{
/**
* The DocumentInfo result of the registration wizard.
*/
// @ApiMember(Description="The DocumentInfo result of the registration wizard.", IsRequired=true)
public var documentInfo:String
/**
* 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.")
public var customData:String
/**
* The document to update.
*/
// @ApiMember(Description="The document to update.")
public var file:DocumentBase64File
required public init(){}
}
public class DocumentBase64File : Codable
{
public var contentType:String
public var content:String
required public init(){}
}
public class GenerateDraftWordDocumentResponse : IGenerateDraftDocumentResponse, Codable
{
/**
* Contains the file
*/
// @ApiMember(Description="Contains the file")
public var file:DocumentBase64File
required public init(){}
}
Swift GenerateDraftWordDocument DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
Content-Type: text/csv
Content-Length: length
{"DocumentInfo":"String","CustomData":"String","File":{"ContentType":"String","Content":"String"}}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"File":{"ContentType":"String","Content":"String"}}